Initial commit

This commit is contained in:
2025-10-11 17:02:49 +02:00
commit 92056f073f
243 changed files with 27536 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
<?php
namespace App\Http\Controllers\Api;
use App\Http\Controllers\Controller;
use Illuminate\Http\JsonResponse;
use App\Models\Photo;
class PhotoController extends Controller
{
public function index(): JsonResponse
{
$photos = Photo::orderBy('sort_order', 'asc')->get();
$photosWithPaths = $photos->map(function ($photo) {
$data = $photo->toArray();
$data['photo'] = $photo->photo ? '/storage/' . $photo->photo : null;
return $data;
});
return response()->json([
'status' => 'success',
'data' => $photosWithPaths
]);
}
}