dimanche 27 mars 2016

Laravel 5: Argument 1 passed to Illuminate\Database\Grammar::columnize() must be of the type array, string given

this should be working but I don't know where is the error, when I try to display the details of a patient it gives me the error

Argument 1 passed to Illuminate\Database\Grammar::columnize() must be of the type array, string given

The function in my controller is:

public function show($id){
    $patient = Patient::findOrFail($id);
    return view('details.show', compact('patient'));
}

And my model:

class Patient extends Model{

protected $fillable = [
    'ci', 'name'
];

// RELATIONSHIPS!
public function user(){
    return $this->belongsTo('App\User');
}

}

However in the function show when I return $patient; it totally works. What am I missing?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire