2023-04-26 12:29:33 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Http\Livewire\Project\New;
|
|
|
|
|
|
|
|
use App\Models\Project;
|
|
|
|
use Livewire\Component;
|
|
|
|
|
|
|
|
class EmptyProject extends Component
|
|
|
|
{
|
|
|
|
public function createEmptyProject()
|
|
|
|
{
|
|
|
|
$project = Project::create([
|
2023-05-24 12:26:50 +00:00
|
|
|
'name' => generate_random_name(),
|
2023-08-22 15:44:49 +00:00
|
|
|
'team_id' => currentTeam()->id,
|
2023-04-26 12:29:33 +00:00
|
|
|
]);
|
2023-05-22 13:47:40 +00:00
|
|
|
return redirect()->route('project.show', ['project_uuid' => $project->uuid, 'environment_name' => 'production']);
|
2023-04-26 12:29:33 +00:00
|
|
|
}
|
|
|
|
}
|