misc_pterodactyl-panel/app/Providers/ViewComposerServiceProvider.php

22 lines
596 B
PHP
Raw Normal View History

<?php
namespace Pterodactyl\Providers;
use Illuminate\Support\ServiceProvider;
2018-02-24 19:58:48 +00:00
use Pterodactyl\Http\ViewComposers\ServerListComposer;
use Pterodactyl\Http\ViewComposers\Server\ServerDataComposer;
class ViewComposerServiceProvider extends ServiceProvider
{
/**
* Register bindings in the container.
*/
public function boot()
{
$this->app->make('view')->composer('server.*', ServerDataComposer::class);
2018-02-24 19:58:48 +00:00
// Add data to make the sidebar work when viewing a server.
$this->app->make('view')->composer(['server.*'], ServerListComposer::class);
}
}