<?php

namespace App\Providers;

use App\Model\ModuleModel;
use Illuminate\Support\ServiceProvider;

class AppServiceProvider extends ServiceProvider
{
    /**
     * Register any application services.
     *
     * @return void
     */
    public function register()
    {
        //
        $this->app->bind('logs',\App\Tool\Log::class);
    }

    /**
     * Bootstrap any application services.
     *
     * @return void
     */
    public function boot()
    {
        view()->composer('*', function ($view) {

            $result = ModuleModel::getModuleList();

            $view->with([
                'left'       => $result,
            ]);
        });
    }
}
