Xboard/app/Http/Controllers/V1/Guest/PlanController.php
2025-01-10 08:00:27 +08:00

26 lines
577 B
PHP
Executable File

<?php
namespace App\Http\Controllers\V1\Guest;
use App\Http\Controllers\Controller;
use App\Http\Resources\PlanResource;
use App\Models\Plan;
use App\Services\PlanService;
use Auth;
use Illuminate\Http\Request;
class PlanController extends Controller
{
protected $planService;
public function __construct(PlanService $planService)
{
$this->planService = $planService;
}
public function fetch(Request $request)
{
$plan = $this->planService->getAvailablePlans();
return $this->success(PlanResource::collection($plan));
}
}