mraps98

PHP Laravel quickies

Oct 23rd, 2018
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.43 KB | None | 0 0
  1. // make controller with index, create etc methods
  2. php artisan make:controller TestsController --resource
  3.  
  4. // make model with migration
  5. php artisan make:model Test -m
  6.  
  7. // server
  8. php artisan serve
  9.  
  10. // routing controllers
  11. route::resource('tests','TestsController');
  12.  
  13. //making authenitcaion pages
  14. php artisan make:auth
  15.  
  16. //routing through middleware like authentication
  17. Route::group(['middleware' => 'auth'], function () {
  18. };
Advertisement
Add Comment
Please, Sign In to add comment