Back | Home
الـ Path الحالي: /home/picotech/domains/instantly.picotech.app/public_html/public/uploads/.././../app/././Providers
الملفات الموجودة في هذا الـ Path:
.
..
AppServiceProvider.php
AuthServiceProvider.php
BroadcastServiceProvider.php
EventServiceProvider.php
MailConfigServiceProvider.php
RouteServiceProvider.php
SettingServiceProvider.php

مشاهدة ملف: SettingServiceProvider.php

<?php

namespace App\Providers;

use Illuminate\Support\ServiceProvider;
use Illuminate\Support\Facades\Config;

class SettingServiceProvider extends ServiceProvider
{
    /**
     * Register services.
     *
     * @return void
     */
    public function register()
    {
        //
    }

    /**
     * Bootstrap services.
     *
     * @return void
     */
    public function boot()
    {
        $localSetting = json_decode(get_settings('local_setting'));
        $config = [];
        if ($localSetting) {
            $config['timezone'] = isset($localSetting->timezone) ? $localSetting->timezone : 'UTC';
            config(['app.timezone' => $config['timezone']]);
            date_default_timezone_set($config['timezone']);
        }
    }
}