<?php

namespace App\Http\Controllers;

use App\Http\Controllers\BaseController; // Make sure to import your controller
use Illuminate\Http\Request;
use Illuminate\Support\Facades\View;
/**
 * Description of HeaderController
 *
 * @author Phattharaphon
 */
class MenuController extends Controller {
    
    //public $MainMenu;
 /*
    public function compose(View $view)
    {
        $data = BaseController::SetMenuHeader();

        \Log::info('Main Menu Shared by Composer:', ['mainMenu' => $data]);

        $view->with('MainMenu', $data);
    }    
  * 
  */

    public function HeaderMenu(){
        $data = BaseController::SetMenuHeader();
        view('partials.header', ['MainMenu' => $data]);
    }
    
    public function MainSlideLandingPage(){
        $SEOToolGroup = BaseController::GetSEOToolGroup();
        view('partials.main_slider', compact('SEOToolGroup'));
        view('partials.footer', compact('SEOToolGroup'));
    }    
    
    public function SEOToolsRecommendedLandingPage(){
        $ToolsRecommended = BaseController::GetSEOToolList();
        //echo "<pre>";print_r($data);echo "</pre>";
        View::share('ToolsRecommended', $ToolsRecommended);        
        view('partials.seo_tools_recommended', compact('ToolsRecommended'));
    }        

}
