diff --git a/app/Http/Controllers/Dashboard/ProjectController.php b/app/Http/Controllers/Dashboard/ProjectController.php index 9e081122..f811be74 100644 --- a/app/Http/Controllers/Dashboard/ProjectController.php +++ b/app/Http/Controllers/Dashboard/ProjectController.php @@ -7,12 +7,9 @@ use App\Http\Controllers\Controller; use App\Http\Requests\Project\StoreRequest; use App\Http\Resources\Project\EditProjectResource; -use App\Http\Resources\Project\ShowProjectResource; use App\Http\Resources\ProjectCardResource; use App\Models\Activity; -use App\Models\County; use App\Models\Project; -use App\Models\ProjectCategory; use App\Services\ProjectService; use Illuminate\Database\Eloquent\Builder; use Illuminate\Http\Request; @@ -83,17 +80,16 @@ public function update(Request $request, Project $project) { $this->authorize('editAsNgo', $project); - if ($request->has('counties')) { $project->counties()->sync(collect($request->get('counties'))); } if ($request->has('categories')) { $project->categories()->sync(collect($request->get('categories'))); } +// dd($request->all()); if ($request->has('image')) { $project->addMediaFromRequest('image')->toMediaCollection('preview'); } -// dd($request->all()); $project->update($request->all()); return redirect()->back() diff --git a/resources/js/Pages/AdminOng/Projects/EditProject.vue b/resources/js/Pages/AdminOng/Projects/EditProject.vue index 7fa16abe..908d430c 100644 --- a/resources/js/Pages/AdminOng/Projects/EditProject.vue +++ b/resources/js/Pages/AdminOng/Projects/EditProject.vue @@ -264,7 +264,7 @@