Xboard/app/Http/Controllers/V1/Guest/PlanController.php
2025-01-07 01:20:11 +08:00

26 lines
579 B
PHP
Executable File

<?php
namespace App\Http\Controllers\V1\Guest;
use App\Http\Controllers\Controller;
use App\Http\Resources\PlanResources;
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(PlanResources::collection($plan));
}
}