Lots of work on apps

This commit is contained in:
KodeStar
2022-03-16 15:49:44 +00:00
parent ed3dbf2f14
commit 1e2b807e05
19 changed files with 378 additions and 684 deletions

View File

@@ -45,6 +45,15 @@ class Application extends Model
return $class;
}
public static function classFromName($name)
{
$name = preg_replace('/[^\p{L}\p{N}]/u', '', $name);
$class = '\App\SupportedApps\\'.$name.'\\'.$name;
return $class;
}
public static function apps()
{
$json = json_decode(file_get_contents(storage_path('app/supportedapps.json'))) ?? [];