jeudi 1 décembre 2016

Laravel delete() static call

I got this error

Non-static method Illuminate\Database\Eloquent\Model::delete() should not be called statically, assuming $this from incompatible context

here is code in my controller

$file_db = new File();
$file_db = $file_db->where('id',$id)->find($id);
$file_db = $file_db->delete();

Can someone explain what I am doing wrong and how to call it correctly.



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

Aucun commentaire:

Enregistrer un commentaire