2023-04-26 14:29:33 +02:00
|
|
|
<?php
|
|
|
|
|
2023-12-07 19:06:32 +01:00
|
|
|
namespace App\Livewire\Project\New;
|
2023-04-26 14:29:33 +02:00
|
|
|
|
|
|
|
use App\Models\Project;
|
|
|
|
use Livewire\Component;
|
|
|
|
|
|
|
|
class EmptyProject extends Component
|
|
|
|
{
|
|
|
|
public function createEmptyProject()
|
|
|
|
{
|
|
|
|
$project = Project::create([
|
2023-05-24 14:26:50 +02:00
|
|
|
'name' => generate_random_name(),
|
2023-08-22 17:44:49 +02:00
|
|
|
'team_id' => currentTeam()->id,
|
2023-04-26 14:29:33 +02:00
|
|
|
]);
|
2023-12-21 09:33:11 +01:00
|
|
|
return $this->redirectRoute('project.show', ['project_uuid' => $project->uuid, 'environment_name' => 'production'], navigate: false);
|
2023-04-26 14:29:33 +02:00
|
|
|
}
|
|
|
|
}
|