jeudi 26 septembre 2019

Laravel find is returning an array instead of an object

In my local the return is as expected an object, but in our development box it's returning an array. What configs should I check as to why it's returning an array instead of an object?

The code is \App\Models\TheModel::find($id);

Is this perhaps a model specific problem? Since other calls are returning objects as intended this specific model on this specific page is having this error.

The Model:

<?php

namespace App\Models;
use Illuminate\Database\Eloquent\SoftDeletes;

class TheModel extends MyBaseModel
{
    use SoftDeletes;

    public $dates         = ['deleted_at'];
}


from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2lAK0cK
via IFTTT

Aucun commentaire:

Enregistrer un commentaire