mirror of
https://github.com/Einundzwanzig-Podcast/einundzwanzig-portal.git
synced 2025-12-11 06:46:47 +00:00
new library added
This commit is contained in:
35
database/factories/LibraryItemsFactory.php
Normal file
35
database/factories/LibraryItemsFactory.php
Normal file
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Factories;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
use Illuminate\Support\Str;
|
||||
use App\Models\Lecturer;
|
||||
use App\Models\Library;
|
||||
use App\Models\LibraryItems;
|
||||
|
||||
class LibraryItemsFactory extends Factory
|
||||
{
|
||||
/**
|
||||
* The name of the factory's corresponding model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $model = LibraryItems::class;
|
||||
|
||||
/**
|
||||
* Define the model's default state.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function definition(): array
|
||||
{
|
||||
return [
|
||||
'lecturer_id' => Lecturer::factory(),
|
||||
'library_id' => Library::factory(),
|
||||
'order_column' => $this->faker->randomNumber(),
|
||||
'type' => $this->faker->word,
|
||||
'value' => $this->faker->text,
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user