For example:
php artisan make:controller API/AuthController php artisan make:controller Admin/DashboardControllerAnd then we define our routes like:
Route::group(['prefix' => 'api', 'namespace' => 'API'], function() { Route::post('login', 'AuthController@login'); }); Route::group(array('prefix' => 'adm', 'namespace' => 'AdminPanel'), function() { Route::get('/', 'DashboardController@index'); });This is a simple way for us to have a nice Laravel structure.
No comments:
Post a Comment