<?php

namespace App\Http\Controllers\Api;

use App\Http\Controllers\AppBaseController;
use App\Http\Controllers\Controller;
use App\Models\LeftHeaderNavigation;
use Illuminate\Http\Request;

class LeftHeaderNavigationsController extends AppBaseController
{
    
    public function index(){
        $LeftHeaderNavigation = [];
        $datas =   LeftHeaderNavigation::all();

        foreach ($datas as $value){
            $data = [];
            $data['id'] =  $value->id;
            $data['title'] =  $value->title;
            $data['url'] =  $value->url;
            $data['status'] =  $value->status;
            $data['active'] =  $value->active;
            $data['image'] =  $value->left_header_image;
            $LeftHeaderNavigation[] = $data;
        }
        return $this->sendResponse($LeftHeaderNavigation, 'Left Header Navigation fetch successfully');
//        return response()->json($LeftHeaderNavigation);
    }
}
