Laravel 5’s Soft delete

Laravel 5’s Eloquent has a function called SoftDeletes that performs logical deletion instead of physically deleting data from a DB table.

If you do this soft delete, data will not be deleted from the table but it will not be able to be pulled by ordinary SELECT etc. It will behave the same as deleting it.
This function allows you to extract information once it is deleted, when it is needed again.


use Illuminate\Database\Eloquent\SoftDeletes;

class User extends Eloquent {
	use SoftDeletes;

	protected $dates = ['deleted_at'];