2017-09-03 02:35:33 +00:00
|
|
|
<?php
|
|
|
|
|
2017-09-03 21:32:52 +00:00
|
|
|
namespace Pterodactyl\Providers;
|
2017-09-03 02:35:33 +00:00
|
|
|
|
2017-09-03 21:32:52 +00:00
|
|
|
use Illuminate\Support\ServiceProvider;
|
2018-02-24 19:58:48 +00:00
|
|
|
use Pterodactyl\Http\ViewComposers\ServerListComposer;
|
2017-09-03 21:32:52 +00:00
|
|
|
use Pterodactyl\Http\ViewComposers\Server\ServerDataComposer;
|
2017-09-03 02:35:33 +00:00
|
|
|
|
2017-09-03 21:32:52 +00:00
|
|
|
class ViewComposerServiceProvider extends ServiceProvider
|
2017-09-03 02:35:33 +00:00
|
|
|
{
|
|
|
|
/**
|
2017-09-03 21:32:52 +00:00
|
|
|
* Register bindings in the container.
|
2017-09-03 02:35:33 +00:00
|
|
|
*/
|
2017-09-03 21:32:52 +00:00
|
|
|
public function boot()
|
2017-09-03 02:35:33 +00:00
|
|
|
{
|
2017-09-03 21:32:52 +00:00
|
|
|
$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);
|
2017-09-03 02:35:33 +00:00
|
|
|
}
|
|
|
|
}
|