update function in laravel 8 resource controller code example Example: resource controller laravel Route::resource('photos', PhotoController::class);