Skip to content

Commit

Permalink
fix counties
Browse files Browse the repository at this point in the history
  • Loading branch information
gheorghelupu17 committed Oct 12, 2023
1 parent 253a601 commit e65989a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions app/Http/Resources/ProjectResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ class ProjectResource extends Resource

public function toArray(Request $request): array
{
// dd($this);
// dd($this->counties);

return [
'id' => $this->id,
// 'type' => $this->type,
'name' => $this->name,
'slug' => $this->slug,
'county' => $this->counties->pluck('name')->join(', '),
'counties' => $this->counties->pluck('name')->join(', '),
'image' => $this->getFirstMediaUrl('preview'),
'target_budget' => $this->target_budget,
'gallery' => $this->getMedia('gallery')->map(function ($media) {
Expand All @@ -33,14 +33,15 @@ public function toArray(Request $request): array
'id' => $this->organization->id,
],
'is_national' => \boolval($this->is_national),
'beneficiaries' => $this->beneficiaries,
'start' => $this->start,
'end' => $this->end,
'description' => $this->description,
'scope' => $this->scope,
'reason_to_donate' => $this->reason_to_donate,
'accepting_volunteers' => \boolval($this->accepting_volunteers),
'accepting_comments' => \boolval($this->accepting_comments),
'videos' => $this->videos,
'videos' => '',
'external_links' => $this->external_links,
'categories' => $this->categories->pluck('name')->join(', '),
'championship' => [
Expand Down
2 changes: 1 addition & 1 deletion resources/js/Pages/AdminOng/Projects/EditProject.vue
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@
{{ $t('video_link_label') }}
</dt>
<dt class="col-span-12 text-base font-medium leading-6 text-gray-700 md:col-span-6">
{{ project.image }}
{{ project.video }}
</dt>
<dt class="col-span-12 text-base font-medium leading-6 text-gray-700 md:col-span-6">
{{ project.project_links }}
Expand Down

0 comments on commit e65989a

Please sign in to comment.