Using ::class notation

parent 4380909c
...@@ -9,10 +9,10 @@ class WidgetServiceProvider extends ServiceProvider ...@@ -9,10 +9,10 @@ class WidgetServiceProvider extends ServiceProvider
{ {
public function register() public function register()
{ {
$this->app->singleton('Modules\Dashboard\Composers\WidgetViewComposer', function () { $this->app->singleton(WidgetViewComposer::class, function () {
return new WidgetViewComposer(); return new WidgetViewComposer();
}); });
$this->app['view']->composer('dashboard::admin.dashboard', 'Modules\Dashboard\Composers\WidgetViewComposer'); $this->app['view']->composer('dashboard::admin.dashboard', WidgetViewComposer::class);
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment