new library added

This commit is contained in:
Benjamin Takats
2022-12-05 19:04:57 +01:00
parent 54f8256a4a
commit 83f1b0609f
39 changed files with 1482 additions and 115 deletions

View File

@@ -12,6 +12,7 @@ class Header extends Component
public Country $country;
public $currentRouteName;
public string $c = 'de';
public bool $withGlobe = true;
public function rules()
{

View File

@@ -0,0 +1,27 @@
<?php
namespace App\Http\Livewire\Frontend;
use App\Models\Country;
use Livewire\Component;
class Library extends Component
{
public Country $country;
public $currentTab = 'Alle';
protected $queryString = [
'currentTab' => ['except' => 'alle'],
];
public function render()
{
return view('livewire.frontend.library', [
'libraries' => \App\Models\Library::get()
->prepend(\App\Models\Library::make([
'name' => 'Alle',
])),
]);
}
}

View File

@@ -18,6 +18,7 @@ class SearchByTag extends Component
{
return view('livewire.frontend.search-by-tag', [
'tags' => Tag::query()
->where('type', 'course')
->with([
'courses.lecturer',
])

View File

@@ -0,0 +1,25 @@
<?php
namespace App\Http\Livewire\Frontend;
use App\Models\Tag;
use Livewire\Component;
class SearchByTagInLibrary extends Component
{
public string $country = 'de';
public ?array $table = [];
protected $queryString = [
'table',
];
public function render()
{
return view('livewire.frontend.search-by-tag-in-library', [
'tags' => Tag::query()
->where('type', 'library_item')
->get(),
]);
}
}