<?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()
    {
        //
    }

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

            $result = ModuleModel::getModuleList();

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