#Attribution
This is a direct copy of https://github.com/tsyama/laravel-soft-delete-flag - I only made null
be the "not deleted"
state, rather than false
A Laravel package that can use Boolean column for soft deletes.
You can install this package into your Laravel application using composer.
The recommended way to install composer package is
composer require tsyama/laravel-soft-delete-flag
<?php
namespace App;
use Mikeqci\LaravelSoftDeleteFlag\Traits\SoftDeleteFlagTrait;
use Illuminate\Database\Eloquent\Model;
class User extends Model
{
use SoftDeleteFlagTrait;
...
class User extends Model
{
use SoftDeleteFlagTrait;
const DELETED_AT = 'delete_flag';
...