I'm trying to use the soft delete functionality of Elequent ORM in Laravel 4.1
Deleting records works as expected, however when I search for results using withTrashed() and then check to see if it was a soft deleted record using trashed() I get the following error
Call to undefined method Illuminate\Database\Eloquent\Collection::trashed()
Here is my code. Any suggestions?
$product = Product::withTrashed()->where('url', Input::get("product_url.$key"))->where('prolist_id', $list->id)->get();
if($product->trashed())
{
$product->restore();
}