Soft Delete : $user->delete();
Force Delete : $user->forceDelete();
Restore Soft Deleted Item : $user->restore();
$table->softDeletes();
$model = Contents::find( $id );
$model->delete();
use IlluminateDatabaseEloquentModel;
use IlluminateDatabaseEloquentSoftDeletes;
class Post extends Model {
use SoftDeletes;
protected $table = 'posts';
// ...
}
$flights = Flight::where('active', 1)
->orderBy('name')
->take(10)
->get();