feat/factory_creation (#1)

Prepping for launch.

Reviewed-on: #1
Co-authored-by: Paul Couture <paul@paulcouture.com>
Co-committed-by: Paul Couture <paul@paulcouture.com>
This commit was merged in pull request #1.
This commit is contained in:
2023-12-14 11:33:03 -06:00
committed by Paul Couture
parent 8eb4d14909
commit c4398c641e
342 changed files with 60893 additions and 2557 deletions

View File

@@ -4,9 +4,21 @@ namespace Database\Factories;
use Illuminate\Database\Eloquent\Factories\Factory;
use Illuminate\Support\Str;
use App\Models\Artist;
use App\Models\Artwork;
use App\Models\Episode;
use App\Models\Podcast;
use App\Models\Overlay;
class PodcastFactory extends Factory
{
/**
* The name of the factory's corresponding model
*
* @var string
*/
protected $model = Podcast::class;
/**
* Define the model's default state.
*
@@ -14,12 +26,14 @@ class PodcastFactory extends Factory
*/
public function definition()
{
$name = fake()->name();
$slug = Str::slug($name);
return [
'name' => fake()->name(),
'name' => $name,
'description' => fake()->paragraphs(rand(1,3), true),
'website' => 'https://' . fake()->domainName(),
'feed' => fake()->url(),
'slug' => fake()->slug(),
'feed' => 'podcast/' . $slug,
'slug' => $slug,
'published' => fake()->boolean(),
'added_at' => fake()->dateTimeThisDecade(),
];