芝麻web文件管理V1.00
编辑当前文件:/home/shaabmuni/public_html/public/crm/app/Providers/AppServiceProvider.php
app->bind('Illuminate\Contracts\Auth\Registrar'); require_once __DIR__.'/../Http/helpers.php'; if ($this->app->environment('local', 'testing')) { $this->app->register(DuskServiceProvider::class); } if (isInstall()) { $this->registerPlugin(); } } public function boot() { Queue::failing(function (JobFailed $event) { loging('Failed Job - '.$event->connectionName, json_encode([$event->job->payload(), 'error' => $event->exception->getMessage().' file=>'.$event->exception->getFile().' line=>'.$event->exception->getLine()])); }); Route::singularResourceParameters(false); $this->composer(); } public function composer() { \View::composer('themes.default1.update.notification', function () { $notification = new BarNotification(); $not = [ 'notification' => $notification->where('value', '!=', '')->get(), ]; view()->share($not); }); } public function registerPlugin() { $activePlugins = \DB::table('plugins')->select('name', 'path')->where('status', 1)->get(); foreach ($activePlugins as $activePlugin) { if ($this->isPluginDir($activePlugin->name)) { $class = '\App\Plugins\\'.$activePlugin->name.'\ServiceProvider'; $this->app->register($class); } } } public function isPluginDir($name) { $check = false; if (is_dir(app_path('Plugins'.DIRECTORY_SEPARATOR.$name))) { $check = true; } return $check; } public function isModuleDir($name) { $check = false; if (is_dir(app_path($name))) { $check = true; } return $check; } }