Complete the code to register a resource controller route in Laravel.
Route::[1]('photos', PhotoController::class);
Use resource to register all resource routes for a controller in Laravel.
Complete the method name to show the form for creating a new resource.
public function [1]() { return view('photos.create'); }
The create method shows the form to add a new resource.
Fix the error in the method signature for updating a resource.
public function update(Request $request, [1] $photo)
{
// update logic
}The update method should type-hint the model class to get the resource instance.
Fill both blanks to define a route that only includes index and show methods.
Route::resource('articles', ArticleController::class)->[1](['[2]', 'show']);
Use only to limit resource routes to specific methods like index and show.
Fill all three blanks to define a resource route with a custom parameter name.
Route::resource('users', UserController::class)->parameters(['users' => '[1]']); public function show([2] $[3]) { // show user }
Use parameters to rename route parameters. The method should type-hint the model class and use the new parameter name.