Prepping for launch. Reviewed-on: #1 Co-authored-by: Paul Couture <paul@paulcouture.com> Co-committed-by: Paul Couture <paul@paulcouture.com>
		
			
				
	
	
		
			42 lines
		
	
	
		
			870 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			42 lines
		
	
	
		
			870 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
| <?php
 | |
| 
 | |
| 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 OverlayFactory extends Factory
 | |
| {
 | |
|     
 | |
|     /**
 | |
|      * The name of the factory's corresponding model
 | |
|      * 
 | |
|      * @var string
 | |
|      */
 | |
|     protected $model = Overlay::class;
 | |
| 
 | |
|     /**
 | |
|      * Define the model's default state.
 | |
|      *
 | |
|      * @return array
 | |
|      */
 | |
|     public function definition()
 | |
|     {
 | |
|         $name = fake()->name();
 | |
|         $slug = Str::slug($name);
 | |
|         return [
 | |
|             'name' => $name,
 | |
|             'artist_id' => Artist::factory(),
 | |
|             'podcast_id' => Podcast::factory(),
 | |
|             'available' => fake()->boolean(),
 | |
|             'filename' => fake()->imageUrl(3000, 3000),
 | |
|         ];
 | |
|     }
 | |
| }
 |