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