coolify/app/Livewire/Project/New/EmptyProject.php
Andras Bacsai 062ad57740 fix(security): enforce team access on mutable actions
Authorize cloud provider token access, audit sensitive operations, and
standardize public IDs across deployment and resource flows.
2026-06-04 11:03:06 +02:00

20 lines
516 B
PHP

<?php
namespace App\Livewire\Project\New;
use App\Models\Project;
use Livewire\Component;
class EmptyProject extends Component
{
public function createEmptyProject()
{
$project = Project::create([
'name' => generate_random_name(),
'team_id' => currentTeam()->id,
'uuid' => new_public_id(),
]);
return redirectRoute($this, 'project.show', ['project_uuid' => $project->uuid, 'environment_uuid' => $project->environments->first()->uuid]);
}
}