Файл: src/app/Providers/SettingsProvider.php
Строк: 27
<?php
namespace AppProviders;
use IlluminateSupportServiceProvider;
use AppModelsSettings;
use AppModelsCompanies;
use Schema;
class SettingsProvider extends ServiceProvider
{
/**
* Bootstrap the application services.
*
* @return void
*/
public function boot()
{
if (Schema::hasTable('Settings')){
$Settings = Settings::with("currency")->find(1);
if ($Settings) {
$Settings["Company"] = Companies::where("isOwn",1)->first();
View::share( 'Settings', $Settings );
}
}
}
/**
* Register the application services.
*
* @return void
*/
public function register()
{
//
}
}