current state
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
use App\Http\Controllers\ProfileController;
|
||||
use Illuminate\Support\Facades\Route;
|
||||
use App\Http\Controllers\Dashboard\ArtworkController as DashboardArtworkController;
|
||||
|
||||
// Legacy routes are defined in routes/legacy.php and provide the site's
|
||||
// legacy pages (art, forum, news, profile, etc.). We keep the auth routes
|
||||
@@ -12,6 +13,13 @@ Route::get('/dashboard', function () {
|
||||
return view('dashboard');
|
||||
})->middleware(['auth', 'verified'])->name('dashboard');
|
||||
|
||||
Route::middleware(['auth'])->prefix('dashboard')->name('dashboard.')->group(function () {
|
||||
Route::get('/artworks', [DashboardArtworkController::class, 'index'])->name('artworks.index');
|
||||
Route::get('/artworks/{id}/edit', [DashboardArtworkController::class, 'edit'])->whereNumber('id')->name('artworks.edit');
|
||||
Route::put('/artworks/{id}', [DashboardArtworkController::class, 'update'])->whereNumber('id')->name('artworks.update');
|
||||
Route::delete('/artworks/{id}', [DashboardArtworkController::class, 'destroy'])->whereNumber('id')->name('artworks.destroy');
|
||||
});
|
||||
|
||||
Route::middleware('auth')->group(function () {
|
||||
Route::get('/profile', [ProfileController::class, 'edit'])->name('profile.edit');
|
||||
Route::patch('/profile', [ProfileController::class, 'update'])->name('profile.update');
|
||||
@@ -22,6 +30,8 @@ Route::middleware('auth')->group(function () {
|
||||
|
||||
require __DIR__.'/auth.php';
|
||||
|
||||
Route::view('/blank', 'blank')->name('blank');
|
||||
|
||||
// Artwork public show (slug-based). This must come before the category route so the artwork
|
||||
// slug (last segment) is matched correctly while allowing multi-segment category paths.
|
||||
Route::get('/{contentTypeSlug}/{categoryPath}/{artwork}', [\App\Http\Controllers\ArtworkController::class, 'show'])
|
||||
|
||||
Reference in New Issue
Block a user