Skip to content

Commit

Permalink
Feature/lar 6 migrate tailwind 4 (#149)
Browse files Browse the repository at this point in the history
* feat(design): update footer style

* chore: fix and apply rebase

* style: migrate auth views

* chore: add new styles
  • Loading branch information
mckenziearts authored Oct 11, 2024
1 parent bba404f commit bc5d375
Show file tree
Hide file tree
Showing 189 changed files with 2,420 additions and 4,812 deletions.
53 changes: 24 additions & 29 deletions app/Http/Controllers/HomeController.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@
use App\Models\Plan;
use App\Models\Thread;
use Illuminate\Contracts\View\View;
use Illuminate\Support\Collection;
use Illuminate\Support\Facades\Cache;

final class HomeController extends Controller
final class HomeController
{
public function __invoke(): View
{
Expand All @@ -21,37 +22,31 @@ public function __invoke(): View
->get();
});

$latestArticles = Cache::remember('latestArticles', now()->addHour(), function () {
return Article::with(['tags', 'user', 'user.transactions'])
->published()
->orderByDesc('sponsored_at')
->orderByDesc('published_at')
->orderByViews()
->trending()
->limit(4)
->get();
});

$latestThreads = Cache::remember('latestThreads', now()->addHour(), function () {
return Thread::with(['user', 'user.transactions'])->whereNull('solution_reply_id')
->whereBetween('threads.created_at', [now()->subMonths(3), now()])
->inRandomOrder()
->limit(4)
->get();
});

$latestDiscussions = Cache::remember('latestDiscussions', now()->addHour(), function () {
return Discussion::with(['user', 'user.transactions'])
->recent()
->orderByViews()
->limit(3)
->get();
});
$latestArticles = Cache::remember('latestArticles', now()->addMinute(), fn (): Collection => Article::with(['tags', 'user', 'user.transactions'])
->published()
->orderByDesc('sponsored_at')
->orderByDesc('published_at')
->orderByViews()
->trending()
->limit(4)
->get());

$latestThreads = Cache::remember('latestThreads', now()->addMinute(), fn (): Collection => Thread::with(['user', 'user.transactions'])->whereNull('solution_reply_id')
->whereBetween('threads.created_at', [now()->subMonths(3), now()])
->inRandomOrder()
->limit(4)
->get());

$latestDiscussions = Cache::remember('latestDiscussions', now()->addMinute(), fn (): Collection => Discussion::with(['user', 'user.transactions'])
->recent()
->orderByViews()
->limit(3)
->get());

// @phpstan-ignore-next-line
seo()
->description('Laravel Cameroun est le portail de la communauté de développeurs PHP & Laravel au Cameroun, On partage, on apprend, on découvre et on construit une grande communauté.')
->twitterDescription('Laravel Cameroun est le portail de la communauté de développeurs PHP & Laravel au Cameroun, On partage, on apprend, on découvre et on construit une grande communauté.')
->description(__('pages/home.description'))
->twitterDescription(__('pages/home.description'))
->image(asset('/images/socialcard.png'))
->twitterSite('laravelcm')
->withUrl();
Expand Down
1 change: 1 addition & 0 deletions config/filesystems.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@

'links' => [
public_path('storage') => storage_path('app/public'),
public_path('media') => storage_path('app/media'),
],

];
224 changes: 0 additions & 224 deletions config/media-library.php

This file was deleted.

Loading

0 comments on commit bc5d375

Please sign in to comment.