Seebad 0.3 stays in this release. With a single landlord every host still reaches the default website. Co-authored-by: Cursor <cursoragent@cursor.com>
28 lines
529 B
PHP
28 lines
529 B
PHP
<?php
|
|
|
|
namespace Database\Factories;
|
|
|
|
use App\Models\Tenant;
|
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
|
use Illuminate\Support\Str;
|
|
|
|
/**
|
|
* @extends Factory<Tenant>
|
|
*/
|
|
class TenantFactory extends Factory
|
|
{
|
|
/**
|
|
* @return array<string, mixed>
|
|
*/
|
|
public function definition(): array
|
|
{
|
|
$name = fake()->unique()->company();
|
|
|
|
return [
|
|
'name' => $name,
|
|
'slug' => Str::slug($name).'-'.Str::lower(Str::random(4)),
|
|
'is_active' => true,
|
|
];
|
|
}
|
|
}
|