Sindbad~EG File Manager
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Builder;
class TransactionCategory extends Model
{
/**
* The table associated with the model.
*
* @var string
*/
protected $table = 'transaction_categories';
/**
* The "booted" method of the model.
*
* @return void
*/
protected static function booted() {
static::addGlobalScope('status', function (Builder $builder) {
return $builder->where('status', 1);
});
}
}
Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists