Files
panel-pelican-dev/database/Factories/DatabaseFactory.php
Lance Pioch 4ff5adc2a6 Monthly Shift: July 2026 (#2433)
Co-authored-by: Shift <shift@laravelshift.com>
2026-07-09 09:55:11 -04:00

36 lines
769 B
PHP

<?php
namespace Database\Factories;
use App\Models\Database;
use Illuminate\Database\Eloquent\Factories\Factory;
use Illuminate\Support\Carbon;
use Illuminate\Support\Str;
class DatabaseFactory extends Factory
{
/**
* The name of the factory's corresponding model.
*
* @var string
*/
protected $model = Database::class;
/**
* Define the model's default state.
*/
public function definition(): array
{
static $password;
return [
'database' => Str::random(10),
'username' => Str::random(10),
'remote' => '%',
'password' => $password ?: 'test123',
'created_at' => Carbon::now(),
'updated_at' => Carbon::now(),
];
}
}