blog api created
This commit is contained in:
1 parent
4f101885a8
commit
d98bc7bbb0
27 files changed
+1022
-44
No files matched your search
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Factories\Blog;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
/**
|
||||
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\Category>
|
||||
*/
|
||||
class CategoryFactory extends Factory
|
||||
{
|
||||
/**
|
||||
* Define the model's default state.
|
||||
*
|
||||
* @return array<string, mixed>
|
||||
*/
|
||||
public function definition(): array
|
||||
{
|
||||
$name = $this->faker->unique()->word;
|
||||
return [
|
||||
'name' => ucfirst($name),
|
||||
'slug' => Str::slug($name),
|
||||
'description' => $this->faker->paragraph,
|
||||
'short_description' => $this->faker->sentence,
|
||||
'image' => $this->faker->imageUrl(640, 480, 'business', true),
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user