i want to delete row permanently from database via delete button.
this is my button code in a form that sends id to destroy function.
{!! Form::open(array('url' => 'admin/newsmaster/'.$value->id, 'class' => 'form-horizontal create_form', 'files' => true)) !!}
<input type="hidden" name="_method" value="delete">
<button type="submit" class="btn red">Delete</button>
</form>
this is my destroy function:
public function destroy($id)
{
$feed= Feed::find($id);
$feed->delete();
Session::flash('message', 'News Deleted Successfully.');
$redirect = 'admin/newsmaster';
return Redirect::to($redirect);
}
this is my Feed model:
protected $table = 'feed_news';
use SoftDeletes;
protected $softDelete = true;
protected $dates = ['deleted_at'];
my problem is when i click on delete option my row in database doesn't get deleted, instead it updates the deleted_at column.
SoftDeletes