Monday, 8 May 2023

Partial Resource Routes

 => "When declaring a resource route, you may specify a subset 

   of actions the controller should handle instead of the full 

   set of default actions: "

   

use App\Http\Controllers\PhotoController;

 

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

 

Route::resource('photos', PhotoController::class)->except([

    'create', 'store', 'update', 'destroy'

]);

No comments:

Post a Comment

Other post

1) The create() Method The  create()  method is a powerful and convenient way to store data in your Laravel application. It is typically use...