1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2026-02-04 19:24:02 +00:00

Delete unused method

This commit is contained in:
lukinovec 2023-06-15 09:33:05 +02:00
parent 97f227a037
commit 7d77c171d5

View file

@ -48,21 +48,6 @@ trait DealsWithModels
return static::getModels()->filter(fn (Model $model) => tenancy()->modelBelongsToTenant($model) || tenancy()->modelBelongsToTenantIndirectly($model));
}
protected static function getModelFromTable(string $table): Model|null
{
foreach (get_declared_classes() as $class) {
if (is_subclass_of($class, Model::class)) {
$model = new $class;
if ($model->getTable() === $table) {
return $model;
}
}
}
return null;
}
public static function modelBelongsToTenant(Model $model): bool
{
return in_array(BelongsToTenant::class, class_uses_recursive($model::class));