data-id="1190000004972875" data-licence="">
1. Configure all routing information in the /app/Http/routes.php file. Try not to write logical processing information here
<code>Route::group(['prefix' => 'blog', 'namespace' => 'Blog', 'middleware' => 'auth'], function() { Route::get('columns/create','ColumnsController@create'); });</code>
2. The controller is in AppHttpControllers , it is very convenient to build controllers using Artisan
<code>php artisan make:controller Blog/ColumnsController</code>
3. If your application uses controllers based entirely on routing, you can use Laravel's route cache. Using route cache will greatly reduce the time spent registering all application routes. , in some cases, the route registration speed can even be increased by 100 times!
<code>php artisan route:cache</code>
The above has introduced the basic practices of Lavarel - routing and controller, including lava and var content. I hope it will be helpful to friends who are interested in PHP tutorials.