Deleting Models: Soft Deleting

<?php

namespace App;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;

class Flight extends Model
{
    use SoftDeletes;

    /**
     * The attributes that should be mutated to dates.
     *
     * @var array
     */
    protected $dates = ['deleted_at'];
}
Schema::table('flights', function (Blueprint $table) {
    $table->softDeletes();
});
If ($flight->trashed()) {
    //
}

Deleting Models: Soft Deleting — Structure map

Clickable & Draggable!

Deleting Models: Soft Deleting — Related pages: