Init
This commit is contained in:
36
database/factories/EpisodeFactory.php
Normal file
36
database/factories/EpisodeFactory.php
Normal file
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Factories;
|
||||
|
||||
use App\Models\Studios;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
|
||||
/**
|
||||
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\Episode>
|
||||
*/
|
||||
class EpisodeFactory extends Factory
|
||||
{
|
||||
/**
|
||||
* Define the model's default state.
|
||||
*
|
||||
* @return array<string, mixed>
|
||||
*/
|
||||
public function definition(): array
|
||||
{
|
||||
return [
|
||||
'title' => $this->faker->title(),
|
||||
'title_search' => $this->faker->title(),
|
||||
'title_jpn' => $this->faker->title(),
|
||||
'slug' => $this->faker->slug,
|
||||
'episode' => $this->faker->randomDigit(),
|
||||
'description' => $this->faker->text(),
|
||||
'url' => $this->faker->url(),
|
||||
'cover_url' => $this->faker->url(),
|
||||
'view_count' => $this->faker->randomNumber(),
|
||||
'interpolated' => $this->faker->boolean(),
|
||||
'interpolated_uhd' => $this->faker->boolean(),
|
||||
'release_date' => $this->faker->date(),
|
||||
'is_dvd_aspect' => $this->faker->boolean(),
|
||||
];
|
||||
}
|
||||
}
|
24
database/factories/HentaiFactory.php
Normal file
24
database/factories/HentaiFactory.php
Normal file
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Factories;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
|
||||
/**
|
||||
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\Hentai>
|
||||
*/
|
||||
class HentaiFactory extends Factory
|
||||
{
|
||||
/**
|
||||
* Define the model's default state.
|
||||
*
|
||||
* @return array<string, mixed>
|
||||
*/
|
||||
public function definition(): array
|
||||
{
|
||||
return [
|
||||
'slug' => $this->faker->slug,
|
||||
'description' => $this->faker->text(),
|
||||
];
|
||||
}
|
||||
}
|
24
database/factories/StudiosFactory.php
Normal file
24
database/factories/StudiosFactory.php
Normal file
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Factories;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
|
||||
/**
|
||||
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\Studios>
|
||||
*/
|
||||
class StudiosFactory extends Factory
|
||||
{
|
||||
/**
|
||||
* Define the model's default state.
|
||||
*
|
||||
* @return array<string, mixed>
|
||||
*/
|
||||
public function definition(): array
|
||||
{
|
||||
return [
|
||||
'name' => $this->faker->company(),
|
||||
'slug' => $this->faker->slug,
|
||||
];
|
||||
}
|
||||
}
|
38
database/factories/UserFactory.php
Normal file
38
database/factories/UserFactory.php
Normal file
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Factories;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
/**
|
||||
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\User>
|
||||
*/
|
||||
class UserFactory extends Factory
|
||||
{
|
||||
/**
|
||||
* Define the model's default state.
|
||||
*
|
||||
* @return array<string, mixed>
|
||||
*/
|
||||
public function definition(): array
|
||||
{
|
||||
return [
|
||||
'name' => fake()->name(),
|
||||
'email' => fake()->unique()->safeEmail(),
|
||||
'email_verified_at' => now(),
|
||||
'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', // password
|
||||
'remember_token' => Str::random(10),
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Indicate that the model's email address should be unverified.
|
||||
*/
|
||||
public function unverified(): static
|
||||
{
|
||||
return $this->state(fn (array $attributes) => [
|
||||
'email_verified_at' => null,
|
||||
]);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user