<?php

namespace App\Web\Controller;


use App\Util\ArticleCategoryUtil;
use App\Util\NavUtil;
use Illuminate\Routing\Controller;
use Illuminate\Support\Facades\View;
use TechSoft\Laravel\Post\PostUtil;
use TechSoft\Laravel\View\TemplateViewTrait;

class BaseController extends Controller
{
    use TemplateViewTrait;

    public function __construct()
    {
        View::share('_nav', NavUtil::all());
        View::share('_footerPost', PostUtil::listPost('footer'));
        View::share('_articleCategoryTree', ArticleCategoryUtil::tree());
    }
}