Add solutions image upload field and update settings: introduce a file upload component for solutions images in ManageSolutions, add solutions_image property to SolutionSettings, and update related database migrations and views to support dynamic image display.
This commit is contained in:
24
database/factories/NewsFactory.php
Normal file
24
database/factories/NewsFactory.php
Normal file
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Factories;
|
||||
|
||||
use App\Models\News;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
class NewsFactory extends Factory
|
||||
{
|
||||
protected $model = News::class;
|
||||
|
||||
public function definition()
|
||||
{
|
||||
$title = $this->faker->sentence(6);
|
||||
return [
|
||||
'title' => $title,
|
||||
'slug' => Str::slug($title),
|
||||
'content' => $this->faker->paragraphs(3, true),
|
||||
'image' => 'news/' . $this->faker->image('public/storage/news', 640, 480, null, false),
|
||||
'published_at' => $this->faker->dateTimeBetween('-1 year', 'now'),
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user