myvideogamelist.com/app/Providers/AppServiceProvider.php
Jimmy Brancaccio b39ecf1638 Initial Commit
The initial public commit of MVGL website code.
2024-01-14 13:51:43 -06:00

52 lines
1.2 KiB
PHP

<?php
namespace App\Providers;
use App\Core\Adapters\Theme;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\Facades\View;
use Illuminate\Support\ServiceProvider;
class AppServiceProvider extends ServiceProvider
{
/**
* Register any application services.
*
* @return void
*/
public function register()
{
// if ($this->app->isLocal()) {
// $this->app->register(\Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider::class);
// }
}
/**
* Bootstrap any application services.
*
* @return void
*/
public function boot()
{
$theme = theme();
// Share theme adapter class
View::share('theme', $theme);
// Set demo globally
$theme->setDemo('demo1');
$theme->initConfig();
bootstrap()->run();
if (isRTL()) {
// RTL html attributes
Theme::addHtmlAttribute('html', 'dir', 'rtl');
Theme::addHtmlAttribute('html', 'direction', 'rtl');
Theme::addHtmlAttribute('html', 'style', 'direction:rtl;');
Theme::addHtmlAttribute('body', 'direction', 'rtl');
}
}
}