I got this error:
The non-static method Illuminate \ Database \ Eloquent \ Model :: delete () should not be called statically, assuming $ this from an incompatible context
Here is the code of 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 what to call correctly?
source
share