Check out example codes for "Route::resource". It will help you in understanding the concepts better.

Code Example 1

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

Code Example 2

Route::resource('photos', PhotoController::class)->only([
    'index', 'show'
]);

Route::resource('photos', PhotoController::class)->except([
    'create', 'store', 'update', 'destroy'
]);

Code Example 3

Route::resource('photos', PhotoController::class);

Code Example 4

php artisan make:controller PhotoController --resource

Learn ReactJs, React Native from akashmittal.com