provider, enums, no timestamp

This commit is contained in:
2025-04-07 15:52:59 +01:00
parent 7f546c1678
commit 1e7d023b09
15 changed files with 30 additions and 29 deletions

View File

@@ -51,7 +51,6 @@ class GenerateJSEnums extends Command
}
$js = "// This is a generated file. \n";
$js .= '// Published at '.now()->format('Y-m-d H:i:s')."\n";
$js .= "\n";
$js .= 'export default ';
$js .= json_encode($enum::toArray(), JSON_PRETTY_PRINT)."\n";

View File

@@ -2,8 +2,12 @@
namespace App\Enums;
use App\Enums\Concerns\Arrayable;
enum FirewallRuleType: string
{
use Arrayable;
case ALLOW = 'allow';
case DENY = 'deny';
}

View File

@@ -25,6 +25,8 @@ class ServerController extends Controller
public function create(Request $request)
{
$organisation = Organisation::findOrFail($request->route('organisation'));
$locations = null;
$serverTypes = null;
$images = null;
@@ -47,6 +49,7 @@ class ServerController extends Controller
}
return inertia('servers/Create', [
'providers' => $organisation->providers,
'locations' => $locations,
'serverTypes' => $serverTypes,
'images' => $images,