initial
This commit is contained in:
commit
bd92c3e3fc
79 files changed
+10789
No files matched your search
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Factories;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
use App\Models\Project;
|
||||
|
||||
/**
|
||||
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\Project>
|
||||
*/
|
||||
class ProjectFactory extends Factory
|
||||
{
|
||||
/**
|
||||
* Define the model's default state.
|
||||
*
|
||||
* @return array<string, mixed>
|
||||
*/
|
||||
protected $model = Project::class;
|
||||
public function definition(): array
|
||||
{
|
||||
return [
|
||||
'title' => $this->faker->sentence,
|
||||
'category' => $this->faker->randomElement(['Web Design', 'App Design', 'Graphic Design', 'Front End', 'Back End']),
|
||||
'images' => json_encode([
|
||||
['src' => $this->faker->imageUrl(), 'position' => 'bottom-[-5px] left-[-5px]', 'zIndex' => 20],
|
||||
['src' => $this->faker->imageUrl(), 'position' => 'top-[-5px] right-[-5px]', 'zIndex' => 10],
|
||||
]),
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user