-
-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
dfd59e0
commit 03100d2
Showing
33 changed files
with
283 additions
and
235 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace App\Livewire\Pages\Forum; | ||
|
||
use App\Models\Channel; | ||
use Illuminate\Contracts\View\View; | ||
use Livewire\Attributes\Layout; | ||
use Livewire\Component; | ||
|
||
#[Layout('layouts.forum')] | ||
final class Channels extends Component | ||
{ | ||
public function render(): View | ||
{ | ||
return view('livewire.pages.forum.channels', [ | ||
'channels' => Channel::query() | ||
->withCount('threads') | ||
->whereNull('parent_id') | ||
->get() | ||
->sortByDesc('threads_count'), | ||
'childChannels' => Channel::query() | ||
->withCount('threads') | ||
->whereNotNull('parent_id') | ||
->get() | ||
->sortByDesc('threads_count'), | ||
]) | ||
->title(__('pages/forum.navigation.channels')); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.