lasthourcloud/app/Http/Livewire/Project/New/EmptyProject.php
2023-05-02 09:11:22 +02:00

19 lines
468 B
PHP

<?php
namespace App\Http\Livewire\Project\New;
use App\Models\Project;
use Livewire\Component;
class EmptyProject extends Component
{
public function createEmptyProject()
{
$project = Project::create([
'name' => generateRandomName(),
'team_id' => session('currentTeam')->id,
]);
return redirect()->route('project.environments', ['project_uuid' => $project->uuid, 'environment_name' => 'production']);
}
}