Shift with red gradient lettering

Expand resource routes

Premium
Laravel
Experimental

Separate routes registered with resource and apiResource methods into their individual routes.

Before

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

After

Route::get('photos', [PhotoController::class, 'index'])->name('photos.index');
Route::get('photos/create', [PhotoController::class, 'create'])->name('photos.create');
Route::post('photos/create', [PhotoController::class, 'store'])->name('photos.store');
Route::get('photos/{photo}', [PhotoController::class, 'show'])->name('photos.show');
Route::get('photos/{photo}/edit', [PhotoController::class, 'edit'])->name('photos.edit');
Route::match(['PUT', 'PATCH'], 'photos/{photo}', [PhotoController::class, 'update'])->name('photos.update');
Route::delete('photos/{photo}', [PhotoController::class, 'destroy'])->name('photos.destroy');

← Back to the Workbench Tasks

Sign in with any of the following services to connect Shift with your Laravel project.


Don't use one of these services?

Temporarily push your project to a free, private repository on one of these cloud-based services or upgrade your project locally with Shift for Docker.