Skip to content

Commit

Permalink
Some cleaning
Browse files Browse the repository at this point in the history
  • Loading branch information
sdebacker committed Nov 9, 2021
1 parent 59027bf commit 214045f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 14 deletions.
2 changes: 1 addition & 1 deletion src/Composers/SidebarViewComposer.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

namespace TypiCMS\Modules\Dashboard\Composers;

use Illuminate\Contracts\View\View;
use Illuminate\Support\Facades\Gate;
use Illuminate\View\View;
use Maatwebsite\Sidebar\SidebarGroup;
use Maatwebsite\Sidebar\SidebarItem;

Expand Down
17 changes: 5 additions & 12 deletions src/Providers/ModuleServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@

namespace TypiCMS\Modules\Dashboard\Providers;

use Illuminate\Support\Facades\View;
use Illuminate\Support\ServiceProvider;
use TypiCMS\Modules\Dashboard\Composers\SidebarViewComposer;

class ModuleServiceProvider extends ServiceProvider
{
public function boot()
public function boot(): void
{
$this->mergeConfigFrom(__DIR__.'/../config/config.php', 'typicms.dashboard');

Expand All @@ -17,19 +18,11 @@ public function boot()
__DIR__.'/../../resources/views' => resource_path('views/vendor/dashboard'),
], 'views');

/*
* Sidebar view composer
*/
$this->app->view->composer('core::admin._sidebar', SidebarViewComposer::class);
View::composer('core::admin._sidebar', SidebarViewComposer::class);
}

public function register()
public function register(): void
{
$app = $this->app;

/*
* Register route service provider
*/
$app->register(RouteServiceProvider::class);
$this->app->register(RouteServiceProvider::class);
}
}
2 changes: 1 addition & 1 deletion src/Providers/RouteServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

class RouteServiceProvider extends ServiceProvider
{
public function map()
public function map(): void
{
/*
* Admin routes
Expand Down

0 comments on commit 214045f

Please sign in to comment.