Untitled

mail@pastecode.io avatar
unknown
php
a month ago
492 B
1
Indexable
Never
class SupportController extends Controller
{
    private $supportRepo;

    public function __construct(SupportRepo $supportRepo)
    {
        $this->supportRepo = $supportRepo;
    }

    public function getActiveSupportTickets(Request $request)
    {
        $user = $request->user();
        $supportTickets = $this->supportRepo->getActiveSupportTickets($user->id);
        return response()->json([
            'success' => true,
            'data' => $supportTickets
        ]);
    }
}
Leave a Comment