perbaili list table corporate, dan table plan

This commit is contained in:
pajri
2022-12-19 18:00:24 +07:00
parent 2bf3ae7b2b
commit da14589328
8 changed files with 599 additions and 256 deletions

View File

@@ -11,6 +11,8 @@ class CorporatePlan extends Model
{
use HasFactory, SoftDeletes, Blameable;
protected $table = 'plans';
protected $fillable = [
'corporate_id',
'code',
@@ -28,8 +30,8 @@ class CorporatePlan extends Model
{
$query->when($filters['search'] ?? false, function ($query, $search) {
return $query
->where('code', 'like', "%" . $search . "%")
->orWhere('name', 'like', "%" . $search . "%");
->where('code', 'like', "%" . $search . "%")
->orWhere('name', 'like', "%" . $search . "%");
});
}
}