mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-18 16:22:14 +00:00
- added folder, file factories
This commit is contained in:
36
database/factories/FolderFactory.php
Normal file
36
database/factories/FolderFactory.php
Normal file
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Factories;
|
||||
|
||||
use App\Folder;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
|
||||
class FolderFactory extends Factory
|
||||
{
|
||||
/**
|
||||
* The name of the factory's corresponding model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $model = Folder::class;
|
||||
|
||||
/**
|
||||
* Define the model's default state.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function definition()
|
||||
{
|
||||
return [
|
||||
'id' => $this->faker->uuid,
|
||||
'user_id' => $this->faker->uuid,
|
||||
'name' => $this->faker->name,
|
||||
'user_scope' => $this->faker->randomElement(
|
||||
['master', 'editor', 'visitor']
|
||||
),
|
||||
'created_at' => $this->faker->dateTimeBetween(
|
||||
$startDate = '-36 months', $endDate = 'now', $timezone = null
|
||||
),
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user