Current state

This commit is contained in:
2026-02-07 08:23:18 +01:00
commit 0a4372c40d
22479 changed files with 1553543 additions and 0 deletions

35
routes/api.php Normal file
View File

@@ -0,0 +1,35 @@
<?php
use Illuminate\Support\Facades\Route;
/**
* API v1 routes for Artworks module
*
* GET /api/v1/artworks/{slug}
* GET /api/v1/categories/{slug}/artworks
*/
Route::prefix('v1')->name('api.v1.')->group(function () {
// Public browse feed (authoritative tables only)
Route::get('browse', [\App\Http\Controllers\Api\BrowseController::class, 'index'])
->name('browse');
// Browse by content type + category path (slug-based)
Route::get('browse/{contentTypeSlug}/{categoryPath}', [\App\Http\Controllers\Api\BrowseController::class, 'byCategoryPath'])
->where('contentTypeSlug', '[a-z0-9\-]+')
->where('categoryPath', '.+')
->name('browse.category');
// Browse by content type only (slug-based)
Route::get('browse/{contentTypeSlug}', [\App\Http\Controllers\Api\BrowseController::class, 'byContentType'])
->where('contentTypeSlug', '[a-z0-9\-]+')
->name('browse.content_type');
// Public artwork by slug
Route::get('artworks/{slug}', [\App\Http\Controllers\Api\ArtworkController::class, 'show'])
->where('slug', '[A-Za-z0-9\-]+')
->name('artworks.show');
// Category artworks (Category route-model binding uses slug)
Route::get('categories/{category}/artworks', [\App\Http\Controllers\Api\ArtworkController::class, 'categoryArtworks'])
->name('categories.artworks');
});