<?php

namespace App\Controllers;

class Home extends BaseController
{
    public function index(): string
    {

        $siteData =[];
        $out  = $this->APIcall('GET','http://10.10.10.35:8805/blogdata/oluameye',[]);
        $siteData['blogdata'] = $out['payload']['blogdata'];
        $siteData['blog_media_url'] = $out['payload']['image_url'];
        $siteData['recent_works'] =  $this->recentWorks();
        return view('view_home', $siteData);
    }

    private function recentWorks(){
        return [
            [
                'title'=>'My title',
                'category'=>'ecommerce',
                'banner'=>'./assets/images/demo/asymmetric-9/case-studies/1.jpg',
                'description'=> 'My description'
            ],
            [
                'title'=>'Mobility',
                'category'=>'mobility',
                'banner'=>'./assets/images/demo/asymmetric-9/case-studies/1.jpg',
                'description'=> 'Optimizing Mobility'
            ],
            [
                'title'=>'Healthcare',
                'category'=>'healthcare',
                'banner'=>'./assets/images/demo/asymmetric-9/case-studies/1.jpg',
                'description'=> 'Personal & Practices'
            ],
            [
                'title'=>'My title',
                'category'=>'ecommerce',
                'banner'=>'./assets/images/demo/asymmetric-9/case-studies/1.jpg',
                'description'=> 'My description'
            ],
            [
                'title'=>'My title',
                'category'=>'ecommerce',
                'banner'=>'./assets/images/demo/asymmetric-9/case-studies/1.jpg',
                'description'=> 'My description'
            ],
            [
                'title'=>'My title',
                'category'=>'ecommerce',
                'banner'=>'./assets/images/demo/asymmetric-9/case-studies/1.jpg',
                'description'=> 'My description'
            ],

        ];

    }
}
