samedi 22 octobre 2022

Laravel Trying to get property of non-object $-> non Object

    public function handle()
    {
        $response = json_decode(file_get_contents(config('app.vatusa_api_base') . '/facility/zdv/roster?apikey=' . config('app.vatusa_api_key')));

        // Create Users

        foreach ($response as $user) {
            if(!User::where('vatsim_id', $user->cid)->whereNull('home_facility')->count()) {
                switch($user->rating) {
                    case 12:
                        $rating = 'ADM';
                        break;

Attempting to Pull from Our API For a Roster though it seems that I have messed something up somewhere.

Any and all help is appreciated.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire