laravel route controller

Solutions on MaxInterview for laravel route controller by the best coders in the world

showing results for - "laravel route controller"
Celian
28 May 2016
1php artisan make:controller MyController
Hattie
12 Nov 2020
1use App\Http\Controllers\UserController;
2
3Route::get('user/{id}', [UserController::class, 'show']);
Rafael
22 May 2020
1Route::resources([
2    'photos' => 'PhotoController',
3    'posts' => 'PostController',
4]);
Laura
26 Apr 2020
1Verb          Path                        Action  Route Name
2GET           /users                      index   users.index
3GET           /users/create               create  users.create
4POST          /users                      store   users.store
5GET           /users/{user}               show    users.show
6GET           /users/{user}/edit          edit    users.edit
7PUT|PATCH     /users/{user}               update  users.update
8DELETE        /users/{user}               destroy users.destroy
Luis
13 Jan 2018
1class UserController extends Controller
2{
3    /**
4     * Instantiate a new controller instance.
5     *
6     * @return void
7     */
8    public function __construct()
9    {
10        $this->middleware('auth');
11
12        $this->middleware('log')->only('index');
13
14        $this->middleware('subscribed')->except('store');
15    }
16}
Magdalena
25 Aug 2017
1//in the terminal run
2composer dump-autoload
similar questions
queries leading to this page
laravel route controller