You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

22 lines
445 B

<?php
namespace App\Model\v3;
use App\Model\Model;
use Hyperf\Database\Model\Builder;
class Employees extends Model
{
protected $table = 'lanzu_employees';
protected $casts = [
'position' => 'array'
];
protected function boot(): void
{
parent::boot();
self::addGlobalScope('normal', function (Builder $builder) {
$builder->where([$this->getTable().'.status' => 1]);
});
}
}