diff --git a/app/Http/Controllers/Dashboard/ProjectController.php b/app/Http/Controllers/Dashboard/ProjectController.php index 89145685..dfe5e4e2 100644 --- a/app/Http/Controllers/Dashboard/ProjectController.php +++ b/app/Http/Controllers/Dashboard/ProjectController.php @@ -101,7 +101,7 @@ public function changeStatus($id, Request $request) { $project = Project::findOrFail($id); $projectArray = $project->toArray(); - $projectArray['preview'] = $project->getFirstMediaUrl('preview') ?? null; + $projectArray['preview'] = $project->getFirstMedia('preview'); Validator::make( $projectArray, [ diff --git a/lang/ro/validation.php b/lang/ro/validation.php index 4c6b3afc..0aa82794 100644 --- a/lang/ro/validation.php +++ b/lang/ro/validation.php @@ -222,5 +222,6 @@ 'target_budget' => 'Bugetul țintă', 'categories' => 'Categorii', 'counties' => 'Județe', + 'preview' => 'Imaginea principala' ], ]; diff --git a/resources/js/Pages/AdminOng/Projects/EditProject.vue b/resources/js/Pages/AdminOng/Projects/EditProject.vue index 7f36e9b6..22dc78fd 100644 --- a/resources/js/Pages/AdminOng/Projects/EditProject.vue +++ b/resources/js/Pages/AdminOng/Projects/EditProject.vue @@ -261,7 +261,7 @@ - +