mirror of
https://github.com/vitodeploy/vito.git
synced 2025-07-03 15:02:34 +00:00
Add site redirects (#552)
* feat(redirects): add redirects to sites * chore(style): fixed coding style issues * style: fix php-stan docblocks * style: pint cleanup * tests: fixed redirect test suite * feat: vhosts include additional configs * fix: use exact location matching * - add enums - use queues - use vhost rather than separate conf files - vhost formatter - cleanup * generate docs --------- Co-authored-by: Saeed Vaziry <mr.saeedvaziry@gmail.com>
This commit is contained in:
28
database/factories/RedirectFactory.php
Normal file
28
database/factories/RedirectFactory.php
Normal file
@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Factories;
|
||||
|
||||
use App\Enums\RedirectStatus;
|
||||
use App\Models\Redirect;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
|
||||
/**
|
||||
* @extends Factory<Redirect>
|
||||
*/
|
||||
class RedirectFactory extends Factory
|
||||
{
|
||||
protected $model = Redirect::class;
|
||||
|
||||
/**
|
||||
* @return array<string, mixed>
|
||||
*/
|
||||
public function definition(): array
|
||||
{
|
||||
return [
|
||||
'from' => $this->faker->word,
|
||||
'to' => $this->faker->url,
|
||||
'mode' => $this->faker->randomElement([301, 302, 307, 308]),
|
||||
'status' => RedirectStatus::READY,
|
||||
];
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user