diff --git a/app/Http/Livewire/Frontend/SearchBookCase.php b/app/Http/Livewire/BookCase/BookCaseTable.php similarity index 72% rename from app/Http/Livewire/Frontend/SearchBookCase.php rename to app/Http/Livewire/BookCase/BookCaseTable.php index ee90e29c..b1ef0e5e 100644 --- a/app/Http/Livewire/Frontend/SearchBookCase.php +++ b/app/Http/Livewire/BookCase/BookCaseTable.php @@ -1,18 +1,18 @@ BookCase::get(), 'countries' => Country::query() ->select(['code', 'name']) diff --git a/app/Http/Livewire/Frontend/CommentBookCase.php b/app/Http/Livewire/BookCase/CommentBookCase.php similarity index 79% rename from app/Http/Livewire/Frontend/CommentBookCase.php rename to app/Http/Livewire/BookCase/CommentBookCase.php index f56341f3..b742888b 100644 --- a/app/Http/Livewire/Frontend/CommentBookCase.php +++ b/app/Http/Livewire/BookCase/CommentBookCase.php @@ -1,6 +1,6 @@ addMedia($this->photo) ->toMediaCollection('images'); - return to_route('comment.bookcase', ['bookCase' => $this->bookCase->id]); + return to_route('bookCases.comment.bookcase', ['bookCase' => $this->bookCase->id]); } protected function url_to_absolute($url) diff --git a/app/Http/Livewire/Frontend/Header.php b/app/Http/Livewire/Frontend/Header.php index f45ec561..90b2f2b3 100644 --- a/app/Http/Livewire/Frontend/Header.php +++ b/app/Http/Livewire/Frontend/Header.php @@ -9,7 +9,7 @@ use Livewire\Component; class Header extends Component { - public Country $country; + public ?Country $country = null; public $currentRouteName; public string $c = 'de'; public bool $withGlobe = true; @@ -23,6 +23,11 @@ class Header extends Component public function mount() { + if (!$this->country) { + $this->country = Country::query() + ->where('code', $this->c) + ->first(); + } $this->currentRouteName = Route::currentRouteName(); $this->c = $this->country->code; } diff --git a/app/Http/Livewire/Frontend/SearchLecturer.php b/app/Http/Livewire/Frontend/SearchLecturer.php deleted file mode 100644 index 4d4b3b1a..00000000 --- a/app/Http/Livewire/Frontend/SearchLecturer.php +++ /dev/null @@ -1,16 +0,0 @@ -route() - ->getName() !== 'library.lecturer'; + ->getName() !== 'library.table.lecturer'; if (!$shouldBePublic && !auth()->user()->is_lecturer) { abort(403); } @@ -39,7 +39,7 @@ class Library extends Component ]); } - return view('livewire.frontend.library', [ + return view('livewire.library.library-table', [ 'libraries' => $tabs, ]); } diff --git a/app/Http/Livewire/Frontend/SearchByTagInLibrary.php b/app/Http/Livewire/Library/SearchByTagComponent.php similarity index 79% rename from app/Http/Livewire/Frontend/SearchByTagInLibrary.php rename to app/Http/Livewire/Library/SearchByTagComponent.php index 9712baa6..6fcb55c5 100644 --- a/app/Http/Livewire/Frontend/SearchByTagInLibrary.php +++ b/app/Http/Livewire/Library/SearchByTagComponent.php @@ -1,11 +1,11 @@ route() - ->getName() !== 'library.lecturer'; + ->getName() !== 'library.table.lecturer'; - return view('livewire.frontend.search-by-tag-in-library', [ + return view('livewire.library.search-by-tag-component', [ 'tags' => Tag::query() ->with([ 'libraryItems.libraries', diff --git a/app/Http/Livewire/Frontend/SearchCity.php b/app/Http/Livewire/School/CityTable.php similarity index 50% rename from app/Http/Livewire/Frontend/SearchCity.php rename to app/Http/Livewire/School/CityTable.php index 6a17f5db..96eab351 100644 --- a/app/Http/Livewire/Frontend/SearchCity.php +++ b/app/Http/Livewire/School/CityTable.php @@ -1,16 +1,16 @@ Tag::query() ->where('type', 'course') ->with([ diff --git a/app/Http/Livewire/School/VenueTable.php b/app/Http/Livewire/School/VenueTable.php new file mode 100644 index 00000000..c584fb01 --- /dev/null +++ b/app/Http/Livewire/School/VenueTable.php @@ -0,0 +1,16 @@ +find($id); $query = City::radius($city->latitude, $city->longitude, 100) ->where('id', '!=', $id); - return to_route('search.event', [ + return to_route('school.table.event', [ '#table', 'country' => $this->country, 'table' => [ @@ -94,7 +94,7 @@ class CityTable extends DataTableComponent $city = City::query() ->find($id); $query = BookCase::radius($city->latitude, $city->longitude, 5); - return to_route('search.bookcases', [ + return to_route('bookCases.table.bookcases', [ '#table', 'country' => $this->country, 'table' => [ diff --git a/app/Http/Livewire/Tables/CourseTable.php b/app/Http/Livewire/Tables/CourseTable.php index cdb1f6b9..0f7eb452 100644 --- a/app/Http/Livewire/Tables/CourseTable.php +++ b/app/Http/Livewire/Tables/CourseTable.php @@ -94,7 +94,7 @@ class CourseTable extends DataTableComponent public function courseSearch($id) { - return to_route('search.event', [ + return to_route('school.table.event', [ '#table', 'country' => $this->country, 'table' => [ diff --git a/app/Http/Livewire/Tables/LecturerTable.php b/app/Http/Livewire/Tables/LecturerTable.php index 14375230..91bbae33 100644 --- a/app/Http/Livewire/Tables/LecturerTable.php +++ b/app/Http/Livewire/Tables/LecturerTable.php @@ -81,7 +81,7 @@ class LecturerTable extends DataTableComponent { $lecturer = Lecturer::query()->find($id); - return to_route('search.event', [ + return to_route('school.table.event', [ '#table', 'country' => $this->country, 'table' => [ diff --git a/app/Http/Livewire/Tables/LibraryItemTable.php b/app/Http/Livewire/Tables/LibraryItemTable.php index 7a3b464d..208702f9 100644 --- a/app/Http/Livewire/Tables/LibraryItemTable.php +++ b/app/Http/Livewire/Tables/LibraryItemTable.php @@ -145,7 +145,7 @@ class LibraryItemTable extends DataTableComponent { $shouldBePublic = request() ->route() - ->getName() !== 'library.lecturer'; + ->getName() !== 'library.table.lecturer'; return LibraryItem::query() ->whereHas('libraries', fn($query) => $query->where('libraries.is_public', $shouldBePublic)) diff --git a/app/Http/Livewire/Tables/VenueTable.php b/app/Http/Livewire/Tables/VenueTable.php index e63e27ff..98da1ee5 100644 --- a/app/Http/Livewire/Tables/VenueTable.php +++ b/app/Http/Livewire/Tables/VenueTable.php @@ -75,7 +75,7 @@ class VenueTable extends DataTableComponent { $venue = Venue::query()->find($id); - return to_route('search.event', [ + return to_route('school.table.event', [ '#table', 'country' => $this->country, 'table' => [ diff --git a/app/Models/BookCase.php b/app/Models/BookCase.php index 7919a2f1..ab792f8b 100644 --- a/app/Models/BookCase.php +++ b/app/Models/BookCase.php @@ -74,6 +74,6 @@ class BookCase extends Model implements HasMedia */ public function commentUrl(): string { - return url()->route('comment.bookcase', ['bookCase' => $this->id]); + return url()->route('bookCases.comment.bookcase', ['bookCase' => $this->id]); } } diff --git a/resources/views/columns/book_cases/oranged-pilled.blade.php b/resources/views/columns/book_cases/oranged-pilled.blade.php index 831e7eb9..f09bbcc9 100644 --- a/resources/views/columns/book_cases/oranged-pilled.blade.php +++ b/resources/views/columns/book_cases/oranged-pilled.blade.php @@ -8,7 +8,7 @@ @endif
💊 Orange Pill Now - Details + Details
@else
diff --git a/resources/views/dashboard.blade.php b/resources/views/dashboard.blade.php index fc5e7969..768fd660 100644 --- a/resources/views/dashboard.blade.php +++ b/resources/views/dashboard.blade.php @@ -67,7 +67,7 @@
- +

Übersicht der Kurse

Zeige das Benutzer Frontend

diff --git a/resources/views/livewire/book-case/book-case-table.blade.php b/resources/views/livewire/book-case/book-case-table.blade.php new file mode 100644 index 00000000..7a3c08e5 --- /dev/null +++ b/resources/views/livewire/book-case/book-case-table.blade.php @@ -0,0 +1,12 @@ +
+ {{-- HEADER --}} + + {{-- MAIN --}} +
+
+ +
+
+ {{-- FOOTER --}} + +
diff --git a/resources/views/livewire/frontend/comment-book-case.blade.php b/resources/views/livewire/book-case/comment-book-case.blade.php similarity index 85% rename from resources/views/livewire/frontend/comment-book-case.blade.php rename to resources/views/livewire/book-case/comment-book-case.blade.php index 97289b4c..ce863534 100644 --- a/resources/views/livewire/frontend/comment-book-case.blade.php +++ b/resources/views/livewire/book-case/comment-book-case.blade.php @@ -17,29 +17,29 @@
@@ -65,7 +65,7 @@
- + Zurück zur Übersicht diff --git a/resources/views/livewire/frontend/header.blade.php b/resources/views/livewire/frontend/header.blade.php index 1c6a0a0b..9a1cb639 100644 --- a/resources/views/livewire/frontend/header.blade.php +++ b/resources/views/livewire/frontend/header.blade.php @@ -1,15 +1,4 @@
- -
@auth @@ -56,84 +74,50 @@
@endauth
- @if($withGlobe) -
-
+
+
+
+
+
-

+ @if(str(request()->route()->getName())->contains('school.')) +
+

Bitcoin School -
{{ str($country->name)->upper() }} + class="w-full text-transparent bg-clip-text bg-gradient-to-r from-amber-400 via-amber-500 to-amber-200 lg:inline">Kurse + für deine Reise in den Kaninchenbau.

-
- - @foreach($countries as $country) - - @endforeach - -
-

- Finde Bitcoin Kurse in deiner City

- @php - $searchTitle = match ($currentRouteName) { - 'search.city' => 'Stadt', - 'search.lecturer' => 'Dozent', - 'search.venue' => 'Veranstaltungs-Ort', - 'search.course' => 'Kurs', - 'search.event' => 'Termin', - }; - @endphp - - 👇 {{ $searchTitle }} finden 👇 - -

{{-- TEXT --}}

+

Wähle deine Stadt, suche im + Umkreis nach + Kursen und wähle ein für dich passendes Thema aus.

- - @endif + @endif + + @if(str(request()->route()->getName())->contains('bookCases.')) +
+

+ Bitcoin Bücher-Schränke + für deine Reise in den Kaninchenbau. +

+

Suche einen öffentlichen + Bücher-Schrank aus.

+
+ @endif + +

diff --git a/resources/views/livewire/frontend/search-book-case.blade.php b/resources/views/livewire/frontend/search-book-case.blade.php deleted file mode 100644 index 44aff99e..00000000 --- a/resources/views/livewire/frontend/search-book-case.blade.php +++ /dev/null @@ -1,79 +0,0 @@ -
- {{-- HEADER --}} -
-
-
-
-
- - - - -
- @auth -
- @else - - @endauth -
-
-
- -

- Bitcoin School -
Worldwide -

-

- Finde einen Bücher-Schrank in deiner City

- - 👇 Bücher-Schrank finden 👇 - -

{{-- TEXT --}}

-
-
-
-
-
- {{-- MAIN --}} -
-
- -
-
- {{-- FOOTER --}} - -
diff --git a/resources/views/livewire/frontend/search-tabs.blade.php b/resources/views/livewire/frontend/search-tabs.blade.php index e0079cba..155a173d 100644 --- a/resources/views/livewire/frontend/search-tabs.blade.php +++ b/resources/views/livewire/frontend/search-tabs.blade.php @@ -9,20 +9,20 @@ $currentTab = 'border-amber-500 text-amber-600'; $notCurrentTab = 'border-transparent text-gray-200 hover:text-gray-400 hover:border-gray-300'; @endphp - Städte + Städte - Dozenten + Dozenten - Veranstaltungs-Orte + Veranstaltungs-Orte - Kurse + Kurse - Termine + Termine
diff --git a/resources/views/livewire/frontend/welcome.blade.php b/resources/views/livewire/frontend/welcome.blade.php index eadf9f96..35318654 100644 --- a/resources/views/livewire/frontend/welcome.blade.php +++ b/resources/views/livewire/frontend/welcome.blade.php @@ -35,7 +35,7 @@
-
@@ -56,7 +56,7 @@
-
@@ -98,7 +98,7 @@
-
@@ -119,7 +119,7 @@
-
diff --git a/resources/views/livewire/frontend/library.blade.php b/resources/views/livewire/library/library-table.blade.php similarity index 94% rename from resources/views/livewire/frontend/library.blade.php rename to resources/views/livewire/library/library-table.blade.php index 84442bf7..8da4dd6b 100644 --- a/resources/views/livewire/frontend/library.blade.php +++ b/resources/views/livewire/library/library-table.blade.php @@ -1,13 +1,13 @@
{{-- HEADER --}} - + {{-- MAIN --}}
- @if(request()->route()->getName() === 'library.lecturer') + @if(request()->route()->getName() === 'library.table.lecturer')

Dozenten-Bibliotheken

@else

Bibliotheken

@@ -40,7 +40,7 @@
- +
diff --git a/resources/views/livewire/frontend/search-by-tag-in-library.blade.php b/resources/views/livewire/library/search-by-tag-component.blade.php similarity index 100% rename from resources/views/livewire/frontend/search-by-tag-in-library.blade.php rename to resources/views/livewire/library/search-by-tag-component.blade.php diff --git a/resources/views/livewire/frontend/search-city.blade.php b/resources/views/livewire/school/city-table.blade.php similarity index 58% rename from resources/views/livewire/frontend/search-city.blade.php rename to resources/views/livewire/school/city-table.blade.php index b6d2ff79..fdfb18f7 100644 --- a/resources/views/livewire/frontend/search-city.blade.php +++ b/resources/views/livewire/school/city-table.blade.php @@ -3,9 +3,9 @@ {{-- MAIN --}}
-
- - +
+ +{{-- --}}
diff --git a/resources/views/livewire/frontend/search-course.blade.php b/resources/views/livewire/school/couse-table.blade.php similarity index 59% rename from resources/views/livewire/frontend/search-course.blade.php rename to resources/views/livewire/school/couse-table.blade.php index 0c1f6eb1..2c464516 100644 --- a/resources/views/livewire/frontend/search-course.blade.php +++ b/resources/views/livewire/school/couse-table.blade.php @@ -3,9 +3,9 @@ {{-- MAIN --}}
-
- - +
+ +{{-- --}}
diff --git a/resources/views/livewire/frontend/search-event.blade.php b/resources/views/livewire/school/event-table.blade.php similarity index 59% rename from resources/views/livewire/frontend/search-event.blade.php rename to resources/views/livewire/school/event-table.blade.php index b5d726af..f4e59e27 100644 --- a/resources/views/livewire/frontend/search-event.blade.php +++ b/resources/views/livewire/school/event-table.blade.php @@ -3,9 +3,9 @@ {{-- MAIN --}}
-
- - +
+ +{{-- --}}
diff --git a/resources/views/livewire/frontend/search-lecturer.blade.php b/resources/views/livewire/school/lecturer-table.blade.php similarity index 59% rename from resources/views/livewire/frontend/search-lecturer.blade.php rename to resources/views/livewire/school/lecturer-table.blade.php index 52f4294a..a3727192 100644 --- a/resources/views/livewire/frontend/search-lecturer.blade.php +++ b/resources/views/livewire/school/lecturer-table.blade.php @@ -3,9 +3,9 @@ {{-- MAIN --}}
-
- - +
+ +{{-- --}}
diff --git a/resources/views/livewire/frontend/search-by-tag.blade.php b/resources/views/livewire/school/search-by-tag-component.blade.php similarity index 95% rename from resources/views/livewire/frontend/search-by-tag.blade.php rename to resources/views/livewire/school/search-by-tag-component.blade.php index 4da19ba9..a6241d93 100644 --- a/resources/views/livewire/frontend/search-by-tag.blade.php +++ b/resources/views/livewire/school/search-by-tag-component.blade.php @@ -13,7 +13,7 @@ @endphp
{{-- MAIN --}}
-
- - +
+ +{{-- --}}
diff --git a/routes/web.php b/routes/web.php index 8f5dbfcb..0caa2d53 100644 --- a/routes/web.php +++ b/routes/web.php @@ -9,40 +9,68 @@ Route::get('/auth/ln', \App\Http\Livewire\Auth\LNUrlAuth::class) ->name('auth.ln') ->middleware('guest'); -Route::get('/{country:code}/suche/stadt', \App\Http\Livewire\Frontend\SearchCity::class) - ->name('search.city') - ->where( - 'country', - '(.*)' - ); +/* + * School + * */ +Route::middleware([]) + ->as('school.') + ->prefix('school') + ->group(function () { + Route::get('/{country:code}/table/city', \App\Http\Livewire\School\CityTable::class) + ->name('table.city'); -Route::get('/{country:code}/suche/dozent', \App\Http\Livewire\Frontend\SearchLecturer::class) - ->name('search.lecturer'); + Route::get('/{country:code}/table/lecturer', \App\Http\Livewire\School\LecturerTable::class) + ->name('table.lecturer'); -Route::get('/{country:code}/suche/ort', \App\Http\Livewire\Frontend\SearchVenue::class) - ->name('search.venue'); + Route::get('/{country:code}/table/venue', \App\Http\Livewire\School\VenueTable::class) + ->name('table.venue'); -Route::get('/{country:code}/suche/kurs', \App\Http\Livewire\Frontend\SearchCourse::class) - ->name('search.course'); + Route::get('/{country:code}/table/course', \App\Http\Livewire\School\CouseTable::class) + ->name('table.course'); -Route::get('/{country:code}/suche/termin', \App\Http\Livewire\Frontend\SearchEvent::class) - ->name('search.event'); + Route::get('/{country:code}/table/event', \App\Http\Livewire\School\EventTable::class) + ->name('table.event'); + }); -Route::get('/{country:code}/bibliothek', \App\Http\Livewire\Frontend\Library::class) - ->name('library'); +/* + * Library + * */ +Route::middleware([]) + ->as('library.') + ->prefix('library') + ->group(function () { + Route::get('/{country:code}/table/library-item', \App\Http\Livewire\Library\LibraryTable::class) + ->name('table.libraryItems'); -Route::get('/{country:code}/dozenten/bibliothek', \App\Http\Livewire\Frontend\Library::class) - ->name('library.lecturer'); + Route::get('/{country:code}/table/content-creator', \App\Http\Livewire\Library\LibraryTable::class) + ->name('table.lecturer'); + }); -Route::get('/dozenten', \App\Http\Livewire\Guest\Welcome::class) - ->name('search.lecturers'); +/* + * Books + * */ +Route::middleware([]) + ->as('bookCases.') + ->prefix('book-cases') + ->group(function () { + Route::get('/table/book-case', \App\Http\Livewire\BookCase\BookCaseTable::class) + ->name('table.bookcases'); -Route::get('/buecher-schraenke', \App\Http\Livewire\Frontend\SearchBookCase::class) - ->name('search.bookcases'); + Route::get('/book-case/{bookCase}', \App\Http\Livewire\BookCase\CommentBookCase::class) + ->name('comment.bookcase'); + }); -Route::get('/buecher-schrank/{bookCase}', \App\Http\Livewire\Frontend\CommentBookCase::class) - ->name('comment.bookcase'); +/* + * Events + * */ +/* + * Meetups + * */ + +/* + * Authenticated + * */ Route::middleware([ 'auth:sanctum', config('jetstream.auth_session'),