It's more or less the same. You could also use
Project::findOrFail($id)->delete();
Project::findOrFail($id)->destroy($id);
$go = Project::findOrFail($id);
$go->destroy($id);
There's probably more ways to do that but you get the idea...
Destroy lets you optionally pass an array of id's to delete.
Both ultimately call delete() on the model instance, if you follow the API trail.
http://laravel.com/api/source-class-Illuminate.Database.Eloquent.Model.html#675 http://laravel.com/api/source-class-Illuminate.Database.Eloquent.Model.html#742
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community