mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-05 18:23:48 +00:00
added it_get_shared_items test
This commit is contained in:
37
database/factories/ShareFactory.php
Normal file
37
database/factories/ShareFactory.php
Normal file
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Factories;
|
||||
|
||||
use App\Models\Share;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
class ShareFactory extends Factory
|
||||
{
|
||||
/**
|
||||
* The name of the factory's corresponding model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $model = Share::class;
|
||||
|
||||
/**
|
||||
* Define the model's default state.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function definition()
|
||||
{
|
||||
return [
|
||||
'id' => $this->faker->uuid,
|
||||
'user_id' => $this->faker->uuid,
|
||||
'item_id' => $this->faker->uuid,
|
||||
'token' => Str::random(16),
|
||||
'type' => $this->faker->randomElement(['file', 'folder']),
|
||||
'permission' => $this->faker->randomElement(['visitor', 'editor']),
|
||||
'is_protected' => $this->faker->boolean(20),
|
||||
'password' => \Hash::make('secret'),
|
||||
'expire_in' => $this->faker->randomElement([1, 6, 12, 24]),
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user