<?php

namespace App\Http\Controllers;

use App\FAQ;
use Illuminate\Http\Request;

class FAQController extends Controller
{
    public function index($id = null)
    {
        if ($id == null) {

            $faq = FAQ::all();
            $data['faq']=$faq;
            $data['status'] = 1;
            $data['message'] = "FAQ retreived successfully";
            return response($data, 200);
        } else {
            $data['notification'] = $this->show($id);
            return response($data, 200);
        }

    }
}
