This commit is contained in:
Shaun Collins
2026-03-04 16:34:33 +00:00
committed by shaun collins
commit 646041230b
15 changed files with 459 additions and 0 deletions
+13
View File
@@ -0,0 +1,13 @@
<?php
namespace App\Traits;
use Illuminate\Database\Eloquent\Builder;
trait HasActive
{
public function scopeActive(Builder $query): Builder
{
return $query->where('active', true);
}
}
+11
View File
@@ -0,0 +1,11 @@
<?php
namespace App\Traits;
trait HasTableName
{
public static function tableName(): string
{
return (new static)->getTable();
}
}