route resource laravel
snippet in php

laravel create controller

user5803

php artisan make:controller MyController

laravel create resource controller

user4316

php artisan make:controller PhotoController --resource

how to named route resource laravel

user4126

Route::resource('faq', 'ProductFaqController', [
    'names' => [
        'index' => 'faq',
        'store' => 'faq.new',
        // etc...
    ]
]);

Route::resource('/posts','PostController');

user9582

Route::resources([
    'photos' => 'PhotoController',
    'posts' => 'PostController',
]);

laravel create resource controller

user5108

php artisan make:controller PhotoController --resource --model=Photo

route resource laravel

user3969

Verb          Path                        Action  Route Name
GET           /users                      index   users.index
GET           /users/create               create  users.create
POST          /users                      store   users.store
GET           /users/{user}               show    users.show
GET           /users/{user}/edit          edit    users.edit
PUT|PATCH     /users/{user}               update  users.update
DELETE        /users/{user}               destroy users.destroy