<?php

namespace App\Http\Controllers\Api;

use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use App\Models\Faq;
use Exception;

class FaqController extends Controller
{
    
    public function getFaq() 
    {
   
          $faq = Faq::all(); 
        
        if ($faq->isEmpty()) {
            
            return $this->jsonResponse(true, 200, 'No FAQ found.',[]);
        }
        
        return $this->jsonResponse(true, 200, 'FAQs fetched successfully.',$faq);
        
    }
       
}
