Add Departure Time Slot and Catalog read API (T2.4, T2.5)
Adds the shared DepartureTimeSlot catalog entity with its Filament resource, and public GET /api/v1/companies + /api/v1/destinations endpoints (auth:sanctum + throttled) for the mini app/mobile/agent clients to consume.
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Catalog\Http\Controllers;
|
||||
|
||||
use Illuminate\Http\Resources\Json\AnonymousResourceCollection;
|
||||
use Illuminate\Routing\Controller;
|
||||
use Modules\Catalog\Http\Resources\DestinationResource;
|
||||
use Modules\Catalog\Models\Destination;
|
||||
|
||||
class DestinationController extends Controller
|
||||
{
|
||||
public function index(): AnonymousResourceCollection
|
||||
{
|
||||
return DestinationResource::collection(
|
||||
Destination::query()->where('is_active', true)->get()
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user