Skip to content

Commit

Permalink
fix project count
Browse files Browse the repository at this point in the history
  • Loading branch information
gheorghelupu17 committed Feb 5, 2024
1 parent 247fff2 commit 3ba9916
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/Http/Controllers/HomeController.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public function index()
{
return Inertia::render('Public/Home', [
'projects_count' => Project::query()
->whereIsApproved()
->whereIsPublished()
->count(),

'organizations_count' => Organization::query()
Expand Down
4 changes: 2 additions & 2 deletions app/Models/BCRProject.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class BCRProject extends Model implements HasMedia
'county_id',
'project_category_id',
'is_national',
'external_links'
'external_links',
];

protected $casts = [
Expand Down Expand Up @@ -90,7 +90,7 @@ public function getEmbeddedVideosAttribute(): array
{
return collect($this->videos)
->pluck('link')
->filter(fn ($video) => !blank($video))
->filter(fn ($video) => ! blank($video))
->map(
fn (string $videoUrl) => Cache::remember(
'video-' . hash('sha256', $videoUrl),
Expand Down

0 comments on commit 3ba9916

Please sign in to comment.