web.php 948 B

123456789101112131415161718192021222324252627282930
  1. <?php
  2. /*
  3. |--------------------------------------------------------------------------
  4. | Web Routes
  5. |--------------------------------------------------------------------------
  6. |
  7. | Here is where you can register web routes for your application. These
  8. | routes are loaded by the RouteServiceProvider within a group which
  9. | contains the "web" middleware group. Now create something great!
  10. |
  11. */
  12. /** @var \Illuminate\Routing\Router $this */
  13. $this->get('/', 'PostsController@index');
  14. $this->post('/posts', 'PostsController@store');
  15. $this->get('/posts/create', 'PostsController@create');
  16. $this->get('/posts/{post}', 'PostsController@show');
  17. /* Reminder about typical REST routes
  18. GET /posts List posts
  19. GET /posts/create Show a post creation form
  20. POST /posts Create a post
  21. GET /posts/{id} Show a post
  22. GET /posts/{id}/edit Show a post update form
  23. PATCH /posts/{id} Update a post
  24. DELETE /posts/{id} Delete a post
  25. */