Skip to content

Instantly share code, notes, and snippets.

@mariapaulinar
Created August 20, 2016 20:45
Show Gist options
  • Save mariapaulinar/9a4b7dbc885cca3f7be0515baeca0c43 to your computer and use it in GitHub Desktop.
Save mariapaulinar/9a4b7dbc885cca3f7be0515baeca0c43 to your computer and use it in GitHub Desktop.
Model con soft delete
<?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'];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment