Skip to content

Commit

Permalink
Added information about --invokable flag
Browse files Browse the repository at this point in the history
Added information about --invokable flag (creating single action controller)
  • Loading branch information
Ilya Sakovich authored Jul 22, 2018
1 parent ba31b1c commit c7bce2e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions controllers.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,10 @@ If you would like to define a controller that only handles a single action, you
}
}

Using the `make:controller` Artisan command, we can quickly create such a controller:

php artisan make:controller ShowProfile --invokable

When registering routes for single action controllers, you do not need to specify a method:

Route::get('user/{id}', 'ShowProfile');
Expand Down

0 comments on commit c7bce2e

Please sign in to comment.