feat(forms): implement MerchandiseFormController, MerchandiseFormService, and MerchandiseFormResource for managing merchandise options
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
namespace App\Domains\Forms\Controllers\AdminApp;
|
||||
|
||||
use App\Domains\Forms\Resources\MerchandiseFormResource;
|
||||
use App\Domains\Forms\Services\MerchandiseFormService;
|
||||
use App\Http\Controllers\Controller;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class MerchandiseFormController extends Controller
|
||||
{
|
||||
public function __construct(protected MerchandiseFormService $merchandiseFormService) {}
|
||||
|
||||
public function __invoke(Request $request): MerchandiseFormResource
|
||||
{
|
||||
return MerchandiseFormResource::make(
|
||||
$this->merchandiseFormService->get(
|
||||
$request->user('sanctum')->tenant()->firstOrFail()
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user