app/Http/Controllers/Frontend/DiscordController.php
/**
     * Fetching the Discord Server
     * @return mixed|null
     */
Fetching the Discord Server
@return mixed|null
Fetching the Discord Server @return mixed|null
public function fetch()
    {
        $seconds = 60 * 60; 
        if($this->getDiscordServerId()) {
            $response = @file_get_contents(
                'https://discord.com/api/guilds/' .
                $this->getDiscordServerId() .
                '/widget.json'
            );
            if($response === FALSE){
                return null;
            }
            return json_decode($response, true);
        } else {
            $discordFetch = null;
        }
        return $discordFetch;
    }
public function fetch ( ) { $ seconds = 60 * 60 ; if ( $ this -> getDiscordServerId ( ) ) { $ response = @ file_get_contents ( 'https://discord.com/api/guilds/' . $ this -> getDiscordServerId ( ) . '/widget.json' ) ; if ( $ response === FALSE ) { return null ; } return json_decode ( $ response , true ) ; } else { $ discordFetch = null ; } return $ discordFetch ; }
Fetching the Discord Server
 @return mixed|null
Fetching the Discord Server @return mixed|null
// 1 hour // Widget not activated // or Channel not found