testing php storm code cleanup and styling

This commit is contained in:
Andras Bacsai
2023-08-08 11:51:36 +02:00
parent a8ee779b31
commit f2228cec7b
368 changed files with 23834 additions and 2623 deletions

View File

@@ -2,7 +2,6 @@
namespace App\Http\Controllers;
use App\Http\Livewire\Server\PrivateKey;
use App\Models\Environment;
use App\Models\Project;
use App\Models\Server;
@@ -16,24 +15,28 @@ class MagicController extends Controller
'servers' => Server::isUsable()->get()
]);
}
public function destinations()
{
return response()->json([
'destinations' => Server::destinationsByServer(request()->query('server_id'))->sortBy('name')
]);
}
public function projects()
{
return response()->json([
'projects' => Project::ownedByCurrentTeam()->get()
]);
}
public function environments()
{
return response()->json([
'environments' => Project::ownedByCurrentTeam()->whereUuid(request()->query('project_uuid'))->first()->environments
]);
}
public function newProject()
{
$project = Project::firstOrCreate(
@@ -44,6 +47,7 @@ class MagicController extends Controller
'project_uuid' => $project->uuid
]);
}
public function newEnvironment()
{
$environment = Environment::firstOrCreate(
@@ -54,6 +58,7 @@ class MagicController extends Controller
'environment_name' => $environment->name,
]);
}
public function newTeam()
{
$team = Team::create(