Advertisement
Guest User

Untitled

a guest
Jun 26th, 2019
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.00 KB | None | 0 0
  1. <?php
  2.  
  3. /*
  4. |--------------------------------------------------------------------------
  5. | Web Routes
  6. |--------------------------------------------------------------------------
  7. |
  8. | Here is where you can register web routes for your application. These
  9. | routes are loaded by the RouteServiceProvider within a group which
  10. | contains the "web" middleware group. Now create something great!
  11. |
  12. */
  13.  
  14. Route::get('/', [
  15. 'uses' => 'TasksController@index',
  16. 'as' => 'tasks.index',
  17. ]);
  18.  
  19.  
  20. Route::group(['prefix' => 'tasks'], function () {
  21. Route::get('/{id}', [
  22. 'uses' => 'TasksController@show',
  23. 'as' => 'tasks.show',
  24. ]);
  25.  
  26. Route::post('/', [
  27. 'uses' => 'TasksController@store',
  28. 'as' => 'tasks.store',
  29. ]);
  30.  
  31. Route::put('/{id}', [
  32. 'uses' => 'TasksController@update',
  33. 'as' => 'tasks.update',
  34. ]);
  35.  
  36. Route::delete('/{id}', [
  37. 'uses' => 'TasksController@destroy',
  38. 'as' => 'tasks.destroy',
  39. ]);
  40. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement