lasthourcloud/app/Http/Livewire/Project/New/EmptyProject.php
Andras Bacsai 2c68eed072 do not use hash routing for tabs
add empty project creation
if local image is found, we only refresh the configuration
2023-04-26 14:29:33 +02:00

20 lines
514 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' => fake()->company(),
'description' => fake()->sentence(),
'team_id' => session('currentTeam')->id,
]);
return redirect()->route('project.environments', ['project_uuid' => $project->uuid, 'environment_name' => 'production']);
}
}