From 74da191e2834a1a7edfb3fca24a0e86716851efd Mon Sep 17 00:00:00 2001 From: Zakaria Labib <58374576+Zakarialabib@users.noreply.github.com> Date: Sun, 6 Aug 2023 16:04:42 +0100 Subject: [PATCH 1/8] upgrade --- app/Enums/MenuPlacement.php | 19 ++ app/Enums/MenuType.php | 18 + app/Enums/NotificationType.php | 13 + app/Enums/PageType.php | 21 ++ app/Enums/RedirectionStatus.php | 25 ++ app/Enums/Status.php | 21 ++ app/Http/Livewire/Language/Create.php | 56 +++ app/Http/Livewire/Language/Edit.php | 59 ++++ .../Livewire/Language/EditTranslation.php | 64 ++++ app/Http/Livewire/Language/Index.php | 62 ++++ app/Http/Livewire/Menu/Index.php | 207 +++++++++++ app/Http/Livewire/Menu/Settings.php | 15 + app/Http/Livewire/Project/Create.php | 108 ++++++ app/Http/Livewire/Project/Edit.php | 115 +++++++ app/Http/Livewire/Project/Index.php | 170 ++++++++++ app/Http/Livewire/Redirects.php | 123 +++++++ app/Http/Livewire/Utils/Modal.php | 26 ++ app/Http/Livewire/Utils/Notifications.php | 31 ++ app/Http/Livewire/Utils/Sidebar.php | 15 + app/Http/Livewire/Utils/ToggleButton.php | 46 +++ app/Http/Livewire/Utils/WithSorting.php | 27 ++ app/Support/FilterQueryBuilder.php | 96 ++++++ app/Support/HasAdvancedFilter.php | 79 +++++ app/Support/Helpers.php | 68 ++++ app/View/Components/AppLayout.php | 29 ++ app/View/Components/Card.php | 30 ++ app/View/Components/Content.php | 30 ++ app/View/Components/DashboardLayout.php | 15 + app/View/Components/DatePicker.php | 25 ++ app/View/Components/Dropzone.php | 27 ++ app/View/Components/Footer.php | 32 ++ app/View/Components/GuestLayout.php | 22 ++ app/View/Components/Header.php | 32 ++ app/View/Components/Select2.php | 37 ++ app/View/Components/SelectList.php | 33 ++ app/View/Components/Sidebar.php | 30 ++ app/View/Components/Table.php | 30 ++ app/View/Components/ToggleButton.php | 22 ++ app/helpers.php | 135 ++++++++ ...22_10_23_150306_create_languages_table.php | 37 ++ ...022_10_24_150653_create_projects_table.php | 46 +++ ...23_01_24_213944_create_redirects_table.php | 36 ++ .../2023_06_21_134012_create_menus_table.php | 41 +++ database/seeders/LanguagesSeeder.php | 43 +++ database/seeders/MenuSeeder.php | 43 +++ database/seeders/ProjectSeeder.php | 21 ++ .../views/components/accordion.blade.php | 17 + resources/views/components/alert.blade.php | 11 + .../views/components/alerts/error.blade.php | 26 ++ .../views/components/analytics.blade.php | 18 + .../components/application-logo.blade.php | 6 + .../views/components/auth-card.blade.php | 15 + .../components/auth-session-status.blade.php | 7 + .../auth-validation-errors.blade.php | 15 + resources/views/components/badge.blade.php | 18 + .../views/components/bottomheader.blade.php | 10 + .../components/button/auth/google.blade.php | 6 + .../views/components/button/back.blade.php | 6 + .../components/button/icon-link.blade.php | 15 + .../views/components/button/icon.blade.php | 15 + .../views/components/button/index.blade.php | 15 + .../views/components/button/link.blade.php | 15 + resources/views/components/card.blade.php | 5 + resources/views/components/checkbox.blade.php | 1 + .../views/components/date-picker.blade.php | 77 +++++ .../views/components/dialog-modal.blade.php | 21 ++ .../views/components/dropdown-link.blade.php | 1 + resources/views/components/dropdown.blade.php | 63 ++++ .../views/components/dropdown/item.blade.php | 11 + resources/views/components/dropzone.blade.php | 73 ++++ .../components/dynamic-component.blade.php | 17 + .../views/components/file-detail.blade.php | 33 ++ resources/views/components/filepond.blade.php | 53 +++ .../views/components/fileupload.blade.php | 243 +++++++++++++ resources/views/components/footer.blade.php | 98 ++++++ .../views/components/form-alert.blade.php | 9 + .../components/forms/add-input.blade.php | 7 + .../components/forms/adon-input.blade.php | 6 + .../views/components/forms/input.blade.php | 1 + resources/views/components/from-url.blade.php | 6 + resources/views/components/header.blade.php | 172 ++++++++++ .../views/components/icons/bell.blade.php | 14 + .../components/icons/chevron-down.blade.php | 3 + .../components/icons/dashboard.blade.php | 16 + .../views/components/icons/delivery.blade.php | 66 ++++ .../views/components/icons/edit.blade.php | 14 + .../components/icons/empty-circle.blade.php | 5 + .../views/components/icons/eye.blade.php | 8 + .../views/components/icons/facebook.blade.php | 6 + .../components/icons/info-circle.blade.php | 5 + .../components/icons/instagram.blade.php | 6 + .../components/icons/menu-fold-left.blade.php | 3 + .../icons/menu-fold-right.blade.php | 3 + .../views/components/icons/menu.blade.php | 4 + .../views/components/icons/moon.blade.php | 4 + .../views/components/icons/sun.blade.php | 4 + .../views/components/icons/trash.blade.php | 5 + .../views/components/icons/twitter.blade.php | 6 + resources/views/components/icons/x.blade.php | 3 + .../views/components/input-date.blade.php | 16 + .../views/components/input-error.blade.php | 9 + .../views/components/input-label.blade.php | 5 + resources/views/components/input.blade.php | 33 ++ .../views/components/input/checkbox.blade.php | 6 + .../components/input/ckeditor5.blade.php | 30 ++ .../views/components/input/date.blade.php | 19 ++ .../components/input/datepicker.blade.php | 89 +++++ .../components/input/file-upload.blade.php | 12 + .../views/components/input/group.blade.php | 47 +++ .../views/components/input/money.blade.php | 25 ++ .../views/components/input/quill.blade.php | 20 ++ .../components/input/rich-text.blade.php | 24 ++ .../views/components/input/select.blade.php | 18 + .../views/components/input/text.blade.php | 23 ++ .../views/components/input/textarea.blade.php | 3 + .../views/components/input/tinymce.blade.php | 28 ++ resources/views/components/label.blade.php | 18 + .../components/language-dropdown.blade.php | 47 +++ .../components/layouts/admin-menu.blade.php | 3 + .../views/components/loading-mask.blade.php | 52 +++ resources/views/components/loading.blade.php | 1 + .../views/components/loadingBrand.blade.php | 7 + .../views/components/media-upload.blade.php | 104 ++++++ .../views/components/modal/card.blade.php | 70 ++++ .../components/modal/confirmation.blade.php | 27 ++ .../views/components/modal/dialog.blade.php | 27 ++ resources/views/components/navbar.blade.php | 116 +++++++ .../components/navigation/desktop.blade.php | 16 + .../components/navigation/mobile.blade.php | 27 ++ .../components/perfect-scrollbar.blade.php | 27 ++ resources/views/components/picture.blade.php | 14 + .../views/components/primary-button.blade.php | 3 + .../components/responsive-nav-link.blade.php | 11 + resources/views/components/search.blade.php | 39 +++ .../components/secondary-button.blade.php | 4 + .../views/components/select-list.blade.php | 58 ++++ resources/views/components/select.blade.php | 32 ++ resources/views/components/select2.blade.php | 33 ++ .../views/components/sidebar-item.blade.php | 15 + .../components/sidebar/content.blade.php | 106 ++++++ .../components/sidebar/dropdown.blade.php | 22 ++ .../views/components/sidebar/footer.blade.php | 13 + .../views/components/sidebar/header.blade.php | 9 + .../views/components/sidebar/link.blade.php | 55 +++ .../components/sidebar/overlay.blade.php | 11 + .../components/sidebar/sidebar.blade.php | 16 + .../components/sidebar/sublink.blade.php | 13 + .../components/sort/sort-field.blade.php | 48 +++ .../components/spinner/code/black.blade.php | 4 + .../components/spinner/code/white.blade.php | 4 + .../components/spinner/image/black.blade.php | 1 + .../components/spinner/image/white.blade.php | 1 + .../views/components/spinner/index.blade.php | 17 + resources/views/components/tab.blade.php | 10 + .../components/table-responsive.blade.php | 7 + resources/views/components/table.blade.php | 15 + .../views/components/table/cell.blade.php | 11 + .../views/components/table/checkbox.blade.php | 4 + .../views/components/table/heading.blade.php | 47 +++ .../views/components/table/row.blade.php | 13 + .../views/components/table/sort.blade.php | 9 + .../views/components/table/tbody.blade.php | 9 + resources/views/components/table/td.blade.php | 5 + .../views/components/table/tfoot.blade.php | 3 + resources/views/components/table/th.blade.php | 42 +++ .../views/components/table/thead.blade.php | 5 + resources/views/components/table/tr.blade.php | 6 + resources/views/components/tabs.blade.php | 57 ++++ .../views/components/text-input.blade.php | 3 + .../views/components/toggle-switch.blade.php | 4 + .../views/components/topheader.blade.php | 56 +++ resources/views/components/trix.blade.php | 70 ++++ resources/views/components/unsplash.blade.php | 3 + resources/views/components/upload.blade.php | 31 ++ resources/views/components/whatsapp.blade.php | 27 ++ .../views/livewire/language/create.blade.php | 28 ++ .../language/edit-translation.blade.php | 35 ++ .../views/livewire/language/edit.blade.php | 28 ++ .../views/livewire/language/index.blade.php | 93 +++++ resources/views/livewire/menu/index.blade.php | 320 ++++++++++++++++++ .../views/livewire/menu/settings.blade.php | 3 + .../views/livewire/project/create.blade.php | 108 ++++++ .../views/livewire/project/edit.blade.php | 107 ++++++ .../views/livewire/project/index.blade.php | 222 ++++++++++++ resources/views/livewire/redirects.blade.php | 162 +++++++++ .../views/livewire/utils/modal.blade.php | 38 +++ .../views/livewire/utils/sidebar.blade.php | 19 ++ .../livewire/utils/toggle-button.blade.php | 5 + routes/cpanel.php | 16 + routes/web.php | 2 + 190 files changed, 6668 insertions(+) create mode 100644 app/Enums/MenuPlacement.php create mode 100644 app/Enums/MenuType.php create mode 100644 app/Enums/NotificationType.php create mode 100644 app/Enums/PageType.php create mode 100644 app/Enums/RedirectionStatus.php create mode 100644 app/Enums/Status.php create mode 100644 app/Http/Livewire/Language/Create.php create mode 100644 app/Http/Livewire/Language/Edit.php create mode 100644 app/Http/Livewire/Language/EditTranslation.php create mode 100644 app/Http/Livewire/Language/Index.php create mode 100644 app/Http/Livewire/Menu/Index.php create mode 100644 app/Http/Livewire/Menu/Settings.php create mode 100644 app/Http/Livewire/Project/Create.php create mode 100644 app/Http/Livewire/Project/Edit.php create mode 100644 app/Http/Livewire/Project/Index.php create mode 100644 app/Http/Livewire/Redirects.php create mode 100644 app/Http/Livewire/Utils/Modal.php create mode 100644 app/Http/Livewire/Utils/Notifications.php create mode 100644 app/Http/Livewire/Utils/Sidebar.php create mode 100644 app/Http/Livewire/Utils/ToggleButton.php create mode 100644 app/Http/Livewire/Utils/WithSorting.php create mode 100644 app/Support/FilterQueryBuilder.php create mode 100644 app/Support/HasAdvancedFilter.php create mode 100644 app/Support/Helpers.php create mode 100644 app/View/Components/AppLayout.php create mode 100644 app/View/Components/Card.php create mode 100644 app/View/Components/Content.php create mode 100644 app/View/Components/DashboardLayout.php create mode 100644 app/View/Components/DatePicker.php create mode 100644 app/View/Components/Dropzone.php create mode 100644 app/View/Components/Footer.php create mode 100644 app/View/Components/GuestLayout.php create mode 100644 app/View/Components/Header.php create mode 100644 app/View/Components/Select2.php create mode 100644 app/View/Components/SelectList.php create mode 100644 app/View/Components/Sidebar.php create mode 100644 app/View/Components/Table.php create mode 100644 app/View/Components/ToggleButton.php create mode 100644 database/migrations/2022_10_23_150306_create_languages_table.php create mode 100644 database/migrations/2022_10_24_150653_create_projects_table.php create mode 100644 database/migrations/2023_01_24_213944_create_redirects_table.php create mode 100644 database/migrations/2023_06_21_134012_create_menus_table.php create mode 100644 database/seeders/LanguagesSeeder.php create mode 100644 database/seeders/MenuSeeder.php create mode 100644 database/seeders/ProjectSeeder.php create mode 100644 resources/views/components/accordion.blade.php create mode 100644 resources/views/components/alert.blade.php create mode 100644 resources/views/components/alerts/error.blade.php create mode 100644 resources/views/components/analytics.blade.php create mode 100644 resources/views/components/application-logo.blade.php create mode 100644 resources/views/components/auth-card.blade.php create mode 100644 resources/views/components/auth-session-status.blade.php create mode 100644 resources/views/components/auth-validation-errors.blade.php create mode 100644 resources/views/components/badge.blade.php create mode 100644 resources/views/components/bottomheader.blade.php create mode 100644 resources/views/components/button/auth/google.blade.php create mode 100644 resources/views/components/button/back.blade.php create mode 100644 resources/views/components/button/icon-link.blade.php create mode 100644 resources/views/components/button/icon.blade.php create mode 100644 resources/views/components/button/index.blade.php create mode 100644 resources/views/components/button/link.blade.php create mode 100644 resources/views/components/card.blade.php create mode 100644 resources/views/components/checkbox.blade.php create mode 100644 resources/views/components/date-picker.blade.php create mode 100644 resources/views/components/dialog-modal.blade.php create mode 100644 resources/views/components/dropdown-link.blade.php create mode 100644 resources/views/components/dropdown.blade.php create mode 100644 resources/views/components/dropdown/item.blade.php create mode 100644 resources/views/components/dropzone.blade.php create mode 100644 resources/views/components/dynamic-component.blade.php create mode 100644 resources/views/components/file-detail.blade.php create mode 100644 resources/views/components/filepond.blade.php create mode 100644 resources/views/components/fileupload.blade.php create mode 100644 resources/views/components/footer.blade.php create mode 100644 resources/views/components/form-alert.blade.php create mode 100644 resources/views/components/forms/add-input.blade.php create mode 100644 resources/views/components/forms/adon-input.blade.php create mode 100644 resources/views/components/forms/input.blade.php create mode 100644 resources/views/components/from-url.blade.php create mode 100644 resources/views/components/header.blade.php create mode 100644 resources/views/components/icons/bell.blade.php create mode 100644 resources/views/components/icons/chevron-down.blade.php create mode 100644 resources/views/components/icons/dashboard.blade.php create mode 100644 resources/views/components/icons/delivery.blade.php create mode 100644 resources/views/components/icons/edit.blade.php create mode 100644 resources/views/components/icons/empty-circle.blade.php create mode 100644 resources/views/components/icons/eye.blade.php create mode 100644 resources/views/components/icons/facebook.blade.php create mode 100644 resources/views/components/icons/info-circle.blade.php create mode 100644 resources/views/components/icons/instagram.blade.php create mode 100644 resources/views/components/icons/menu-fold-left.blade.php create mode 100644 resources/views/components/icons/menu-fold-right.blade.php create mode 100644 resources/views/components/icons/menu.blade.php create mode 100644 resources/views/components/icons/moon.blade.php create mode 100644 resources/views/components/icons/sun.blade.php create mode 100644 resources/views/components/icons/trash.blade.php create mode 100644 resources/views/components/icons/twitter.blade.php create mode 100644 resources/views/components/icons/x.blade.php create mode 100644 resources/views/components/input-date.blade.php create mode 100644 resources/views/components/input-error.blade.php create mode 100644 resources/views/components/input-label.blade.php create mode 100644 resources/views/components/input.blade.php create mode 100644 resources/views/components/input/checkbox.blade.php create mode 100644 resources/views/components/input/ckeditor5.blade.php create mode 100644 resources/views/components/input/date.blade.php create mode 100644 resources/views/components/input/datepicker.blade.php create mode 100644 resources/views/components/input/file-upload.blade.php create mode 100644 resources/views/components/input/group.blade.php create mode 100644 resources/views/components/input/money.blade.php create mode 100644 resources/views/components/input/quill.blade.php create mode 100644 resources/views/components/input/rich-text.blade.php create mode 100644 resources/views/components/input/select.blade.php create mode 100644 resources/views/components/input/text.blade.php create mode 100644 resources/views/components/input/textarea.blade.php create mode 100644 resources/views/components/input/tinymce.blade.php create mode 100644 resources/views/components/label.blade.php create mode 100644 resources/views/components/language-dropdown.blade.php create mode 100644 resources/views/components/loading-mask.blade.php create mode 100644 resources/views/components/loading.blade.php create mode 100644 resources/views/components/loadingBrand.blade.php create mode 100644 resources/views/components/media-upload.blade.php create mode 100644 resources/views/components/modal/card.blade.php create mode 100644 resources/views/components/modal/confirmation.blade.php create mode 100644 resources/views/components/modal/dialog.blade.php create mode 100644 resources/views/components/navbar.blade.php create mode 100644 resources/views/components/navigation/desktop.blade.php create mode 100644 resources/views/components/navigation/mobile.blade.php create mode 100644 resources/views/components/perfect-scrollbar.blade.php create mode 100644 resources/views/components/picture.blade.php create mode 100644 resources/views/components/primary-button.blade.php create mode 100644 resources/views/components/responsive-nav-link.blade.php create mode 100644 resources/views/components/search.blade.php create mode 100644 resources/views/components/secondary-button.blade.php create mode 100644 resources/views/components/select-list.blade.php create mode 100644 resources/views/components/select.blade.php create mode 100644 resources/views/components/select2.blade.php create mode 100644 resources/views/components/sidebar-item.blade.php create mode 100644 resources/views/components/sidebar/content.blade.php create mode 100644 resources/views/components/sidebar/dropdown.blade.php create mode 100644 resources/views/components/sidebar/footer.blade.php create mode 100644 resources/views/components/sidebar/header.blade.php create mode 100644 resources/views/components/sidebar/link.blade.php create mode 100644 resources/views/components/sidebar/overlay.blade.php create mode 100644 resources/views/components/sidebar/sidebar.blade.php create mode 100644 resources/views/components/sidebar/sublink.blade.php create mode 100644 resources/views/components/sort/sort-field.blade.php create mode 100644 resources/views/components/spinner/code/black.blade.php create mode 100644 resources/views/components/spinner/code/white.blade.php create mode 100644 resources/views/components/spinner/image/black.blade.php create mode 100644 resources/views/components/spinner/image/white.blade.php create mode 100644 resources/views/components/spinner/index.blade.php create mode 100644 resources/views/components/tab.blade.php create mode 100644 resources/views/components/table-responsive.blade.php create mode 100644 resources/views/components/table.blade.php create mode 100644 resources/views/components/table/cell.blade.php create mode 100644 resources/views/components/table/checkbox.blade.php create mode 100644 resources/views/components/table/heading.blade.php create mode 100644 resources/views/components/table/row.blade.php create mode 100644 resources/views/components/table/sort.blade.php create mode 100644 resources/views/components/table/tbody.blade.php create mode 100644 resources/views/components/table/td.blade.php create mode 100644 resources/views/components/table/tfoot.blade.php create mode 100644 resources/views/components/table/th.blade.php create mode 100644 resources/views/components/table/thead.blade.php create mode 100644 resources/views/components/table/tr.blade.php create mode 100644 resources/views/components/tabs.blade.php create mode 100644 resources/views/components/text-input.blade.php create mode 100644 resources/views/components/toggle-switch.blade.php create mode 100644 resources/views/components/topheader.blade.php create mode 100644 resources/views/components/trix.blade.php create mode 100644 resources/views/components/unsplash.blade.php create mode 100644 resources/views/components/upload.blade.php create mode 100644 resources/views/components/whatsapp.blade.php create mode 100644 resources/views/livewire/language/create.blade.php create mode 100644 resources/views/livewire/language/edit-translation.blade.php create mode 100644 resources/views/livewire/language/edit.blade.php create mode 100644 resources/views/livewire/language/index.blade.php create mode 100644 resources/views/livewire/menu/index.blade.php create mode 100644 resources/views/livewire/menu/settings.blade.php create mode 100644 resources/views/livewire/project/create.blade.php create mode 100644 resources/views/livewire/project/edit.blade.php create mode 100644 resources/views/livewire/project/index.blade.php create mode 100644 resources/views/livewire/redirects.blade.php create mode 100644 resources/views/livewire/utils/modal.blade.php create mode 100644 resources/views/livewire/utils/sidebar.blade.php create mode 100644 resources/views/livewire/utils/toggle-button.blade.php diff --git a/app/Enums/MenuPlacement.php b/app/Enums/MenuPlacement.php new file mode 100644 index 0000000..4fb02c8 --- /dev/null +++ b/app/Enums/MenuPlacement.php @@ -0,0 +1,19 @@ +$value) + // + // @endforeach +} diff --git a/app/Enums/Status.php b/app/Enums/Status.php new file mode 100644 index 0000000..48a4e0c --- /dev/null +++ b/app/Enums/Status.php @@ -0,0 +1,21 @@ + 'required|max:191', + 'code' => 'required', + ]; + + public function createLanguage() + { + $this->createLanguage = true; + } + + public function create() + { + $this->validate(); + + $this->language->save(); + + File::copy(App::langPath().('/en.json'), App::langPath().('/'.$this->code.'.json')); + + $this->alert('success', __('Data created successfully!')); + + $this->emit('resetIndex'); + + $this->createLanguage = false; + } + + public function render() + { + return view('livewire.admin.language.create'); + } +} diff --git a/app/Http/Livewire/Language/Edit.php b/app/Http/Livewire/Language/Edit.php new file mode 100644 index 0000000..e754fe7 --- /dev/null +++ b/app/Http/Livewire/Language/Edit.php @@ -0,0 +1,59 @@ + 'required|max:191', + 'language.code' => 'required', + ]; + + public function editLanguage($id) + { + $this->language = Language::findOrFail($id); + + $this->editLanguage = true; + } + + public function update() + { + $this->validate(); + + $this->language->save(); + + File::copy(App::langPath().('/en.json'), App::langPath().('/'.$this->code.'.json')); + + $this->alert('success', __('Data created successfully!')); + + $this->emit('resetIndex'); + + $this->editLanguage = false; + } + + public function render() + { + return view('livewire.admin.language.edit'); + } +} diff --git a/app/Http/Livewire/Language/EditTranslation.php b/app/Http/Livewire/Language/EditTranslation.php new file mode 100644 index 0000000..c4ead6b --- /dev/null +++ b/app/Http/Livewire/Language/EditTranslation.php @@ -0,0 +1,64 @@ + 'required', + ]; + + public function mount($language) + { + $this->language = Language::where('id', $language)->firstOrFail(); + // dd($this->all()); + $this->translations = $this->getTranslations(); + $this->translations = collect($this->translations)->map(function ($item, $key) { + return [ + 'key' => $key, + 'value' => $item, + ]; + })->toArray(); + } + + private function getTranslations() + { + $path = base_path("lang/{$this->language->code}.json"); + $content = file_get_contents($path); + + return json_decode($content, true); + } + + public function updateTranslation() + { + $this->validate(); + + $path = base_path("lang/{$this->language->code}.json"); + + $data = file_get_contents($path); + $translations = json_decode($data, true); + + foreach ($this->translations as $key => $translation) { + $translations[$translation['key']] = $translation['value']; + } + + file_put_contents($path, json_encode($translations, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE)); + + $this->alert('success', __('Data created successfully!')); + } + + public function render() + { + return view('livewire.admin.language.edit-translation'); + } +} diff --git a/app/Http/Livewire/Language/Index.php b/app/Http/Livewire/Language/Index.php new file mode 100644 index 0000000..a85339a --- /dev/null +++ b/app/Http/Livewire/Language/Index.php @@ -0,0 +1,62 @@ + '$refresh', + ]; + + public function mount() + { + $this->languages = Language::all()->toArray(); + } + + public function render() + { + return view('livewire.admin.language.index'); + } + + public function onSetDefault($id) + { + Language::where('is_default', '=', true)->update(['is_default' => false]); + + $this->language = Language::findOrFail($id); + + $this->language->is_default = true; + + $this->language->save(); + + $this->alert('success', __('Language updated successfully!')); + } + + public function sync($id) + { + $languages = Language::findOrFail($id); + + Artisan::call('translatable:export', ['lang' => $languages->code]); + + $this->alert('success', __('Translation updated successfully!')); + } + + public function delete(Language $language) + { + $language->delete(); + + $this->alert('warning', __('Language deleted successfully!')); + } +} diff --git a/app/Http/Livewire/Menu/Index.php b/app/Http/Livewire/Menu/Index.php new file mode 100644 index 0000000..0b96038 --- /dev/null +++ b/app/Http/Livewire/Menu/Index.php @@ -0,0 +1,207 @@ + '$refresh' + ]; + public $links = []; + public $menu; + public $menus; + public $name; + public $label; + public $url; + public $type; + public $placement; + public $parent_id; + public $new_window; + + protected $rules = [ + 'menus.*.name' => 'required', + 'menus.*.type' => 'required', + 'menus.*.placement' => 'nullable', + 'menus.*.label' => 'required', + 'menus.*.url' => 'required', + 'menus.*.parent_id' => 'nullable|exists:menus,id', + 'menus.*.new_window' => 'boolean', + ]; + + public function mount() + { + $this->menus = Menu::when($this->placement, function ($query) { + $query->where('placement', $this->placement); + })->orderBy('sort_order') + ->get()->toArray(); + + $this->links = [ + 'Link 1', + 'Link 2', + 'Link 3', + // Add more links as needed + ]; + + $this->resetErrorBag(); + $this->resetValidation(); + } + + public function filterByPlacement($value) + { + $this->placement = $value; + $this->mount(); + } + + public function render() + { + $menus = Menu::when($this->placement, function ($query) { + $query->where('placement', $this->placement); + })->paginate($this->perPage); + + return view('livewire.admin.menu.index', compact('menus'))->extends('layouts.dashboard'); + } + + + public function update($id) + { + $this->menu = Menu::find($id); + + $this->validate(); + + foreach ($this->menus as $menu) { + $this->menu = Menu::find($menu['id']); + $this->menu->name = $menu['name']; + $this->menu->label = $menu['label']; + $this->menu->type = $menu['type']; + $this->menu->placement = $menu['placement']; + $this->menu->url = $menu['url']; + $this->menu->parent_id = $menu['parent_id'] ?? null; + $this->menu->new_window = $menu['new_window'] ?? false; + + $this->menu->save(); + + } + $this->alert('success', __('Menu updated successfully.')); + + $this->reset(['name', 'label', 'url', 'type', 'placement', 'parent_id', 'new_window']); + } + + public function store() + { + $this->validate([ + 'name' => 'required', + 'type' => 'required', + 'placement' => 'required', + 'label' => 'required', + 'url' => 'required', + 'parent_id' => 'nullable|exists:menus,id', + 'new_window' => 'boolean', + ]); + + $menu = new Menu(); + $menu->name = $this->name; + $menu->label = $this->label; + $menu->type = $this->type; + $menu->placement = $this->placement; + $menu->url = $this->url; + $menu->parent_id = $this->parent_id ?? null; + $menu->new_window = $this->new_window ?? false; + // Add any additional fields you have in your menu model + + $menu->save(); + + $this->alert('success', __('Menu created successfully.')); + + $this->mount(); + } + + public function updateMenuOrder($ids) + { + foreach ($ids as $index => $id) { + $menu = Menu::find($id); + $menu->sort_order = $index + 1; + $menu->save(); + } + $this->mount(); + $this->alert('success', __('Menu order updated successfully.')); + } + + public function predefinedMenu(): void + { + $this->menus = [ + [ + 'name' => 'Home', + 'type' => 'route', + 'label' => 'Home', + 'url' => 'home', + 'parent_id' => null, + 'new_window' => false, + ], + [ + 'name' => 'About', + 'type' => 'route', + 'label' => 'About', + 'url' => 'about', + 'parent_id' => null, + 'new_window' => false, + ], + [ + 'name' => 'Contact', + 'type' => 'route', + 'label' => 'Contact', + 'url' => 'contact', + 'parent_id' => null, + 'new_window' => false, + ], + [ + 'name' => 'Login', + 'type' => 'route', + 'label' => 'Login', + 'url' => 'login', + 'parent_id' => null, + 'new_window' => false, + ], + [ + 'name' => 'Register', + 'type' => 'route', + 'label' => 'Register', + 'url' => 'register', + 'parent_id' => null, + 'new_window' => false, + ], + ]; + // create the menus + foreach ($this->menus as $menu) { + Menu::create($menu); + } + $this->mount(); + $this->alert('success', __('Predefined menus created successfully.')); + } + + public function delete(Menu $menu) + { + // abort_if(Gate::denies('menu_delete'), Response::HTTP_FORBIDDEN, '403 Forbidden'); + + $menu->delete(); + $this->mount(); + $this->alert('success', __('Menu deleted successfully.')); + } + + +} diff --git a/app/Http/Livewire/Menu/Settings.php b/app/Http/Livewire/Menu/Settings.php new file mode 100644 index 0000000..3bc72b8 --- /dev/null +++ b/app/Http/Livewire/Menu/Settings.php @@ -0,0 +1,15 @@ + 'required|unique:projects,title|max:191', + 'description' => 'required', + 'project.client_name' => 'required', + 'project.link' => 'required', + 'project.service_id' => 'required', + 'project.meta_title' => 'nullable', + 'project.meta_description' => 'nullable', + 'project.language_id' => 'required', + ]; + + public function updatedDescription($value) + { + $this->description = $value; + } + + public function createModal() + { + $this->resetErrorBag(); + + $this->resetValidation(); + + $this->project = new Project(); + + $this->description = ""; + + $this->createModal = true; + } + + public function submit() + { + $this->project->slug = Str::slug($this->project->title); + + if ($this->image) { + $imageName = Str::slug($this->project->title).'.'.$this->image->extension(); + $this->image->storeAs('projects', $imageName); + $this->project->image = $imageName; + } + + // Multiple images within an array + + foreach ($this->images as $key => $image) { + $this->images[$key] = $image->store('project', 'public'); + } + + $this->images = json_encode($this->images); + + $this->project->gallery = $this->images; + + $this->project->description = $this->description; + + $this->project->save(); + + $this->alert('success', __('Service created successfully!')); + + $this->emit('refreshIndex'); + + $this->createModal = false; + } + + public function render() + { + return view('livewire.admin.project.create'); + } + + public function getLanguagesProperty() + { + return Language::pluck('name', 'id')->toArray(); + } + + public function getServicesProperty() + { + return Service::select('title', 'id')->get(); + } +} diff --git a/app/Http/Livewire/Project/Edit.php b/app/Http/Livewire/Project/Edit.php new file mode 100644 index 0000000..c8c6a35 --- /dev/null +++ b/app/Http/Livewire/Project/Edit.php @@ -0,0 +1,115 @@ + 'required|max:191', + 'description' => 'required', + 'project.client_name' => 'required', + 'project.link' => 'required', + 'project.service_id' => 'required', + 'project.meta_title' => 'nullable', + 'project.meta_description' => 'nullable', + 'project.language_id' => 'required', + ]; + + public function updatedDescription($value) + { + $this->description = $value; + } + + public function editModal($project) + { + // abort_if(Gate::denies('project_update'), 403); + + $this->resetErrorBag(); + + $this->resetValidation(); + + $this->project = Project::findOrfail($project); + + $this->description = $this->project->content; + + $this->editModal = true; + } + + public function submit() + { + $this->project->slug = Str::slug($this->project->title); + + // Single image + + if ($this->image) { + $imageName = Str::slug($this->project->title).'.'.$this->image->extension(); + $this->image->storeAs('projects', $imageName); + $this->project->image = $imageName; + } + + // Multiple images within an array + // if (empty($this->images)) { + // foreach ($this->images as $key => $image) { + // $this->images[$key] = $image->store('/'); + // } + // } + + $this->images = json_encode($this->images); + + $this->project->gallery = $this->images; + + $this->project->content = $this->description; + + $this->project->save(); + + $this->editModal = false; + + $this->emit('refreshIndex'); + + $this->alert('success', __('Service updated successfully!')); + } + + public function render() + { + return view('livewire.admin.project.edit'); + } + + public function getLanguagesProperty() + { + return Language::pluck('name', 'id')->toArray(); + } + + public function getServicesProperty() + { + return Service::select('title', 'id')->get(); + } +} diff --git a/app/Http/Livewire/Project/Index.php b/app/Http/Livewire/Project/Index.php new file mode 100644 index 0000000..7b72315 --- /dev/null +++ b/app/Http/Livewire/Project/Index.php @@ -0,0 +1,170 @@ + '$refresh', + 'showModal', 'importModal', + 'delete', + ]; + + protected $queryString = [ + 'search' => [ + 'except' => '', + ], + 'sortBy' => [ + 'except' => 'id', + ], + 'sortDirection' => [ + 'except' => 'desc', + ], + ]; + + public function confirmed() + { + $this->emit('delete'); + } + + public function getSelectedCountProperty() + { + return count($this->selected); + } + + public function updatingSearch() + { + $this->resetPage(); + } + + public function updatingPerPage() + { + $this->resetPage(); + } + + public function resetSelected() + { + $this->selected = []; + } + + public function mount() + { + $this->sortBy = 'id'; + $this->sortDirection = 'desc'; + $this->perPage = 100; + $this->paginationOptions = config('project.pagination.options'); + $this->orderable = (new Project())->orderable; + } + + public function render() + { + $query = Project::when($this->language_id, function ($query) { + return $query->where('language_id', $this->language_id); + })->advancedFilter([ + 's' => $this->search ?: null, + 'order_column' => $this->sortBy, + 'order_direction' => $this->sortDirection, + ]); + + $projects = $query->paginate($this->perPage); + + return view('livewire.admin.project.index', compact('projects'))->extends('layouts.dashboard'); + } + + public function showModal(Project $project) + { + // abort_if(Gate::denies('project_show'), 403); + + $this->resetErrorBag(); + + $this->resetValidation(); + + $this->project = $project; + + $this->showModal = true; + } + + public function deleteModal($project) + { + $this->confirm(__('Are you sure you want to delete this?'), [ + 'toast' => false, + 'position' => 'center', + 'showConfirmButton' => true, + 'cancelButtonText' => __('Cancel'), + 'onConfirmed' => 'delete', + ]); + $this->project = $project; + } + + public function deleteSelected() + { + abort_if(Gate::denies('project_delete'), 403); + + Project::whereIn('id', $this->selected)->delete(); + + $this->resetSelected(); + } + + public function delete() + { + abort_if(Gate::denies('project_delete'), 403); + + Project::findOrFail($this->project)->delete(); + + $this->alert('success', __('Project deleted successfully.')); + } + + // Project Clone + public function clone(Project $project) + { + $portfolio_details = Project::find($project->id); + // dd($portfolio_details); + Project::create([ + 'service_id' => $portfolio_details->service_id, + 'language_id' => $portfolio_details->language_id, + 'title' => $portfolio_details->title, + 'slug' => ! empty($portfolio_details->slug) ? Str::slug($portfolio_details->slug) : Str::slug($portfolio_details->title), + 'content' => $portfolio_details->content, + 'client_name' => $portfolio_details->client_name, + 'link' => $portfolio_details->link, + 'featured_image' => $portfolio_details->featured_image, + 'gallery' => $portfolio_details->gallery, + 'status' => 0, + 'meta_title' => $portfolio_details->meta_title, + 'meta_description' => $portfolio_details->meta_description, + ]); + // $this->alert('success', __('Project Cloned successfully!') ); + } +} diff --git a/app/Http/Livewire/Redirects.php b/app/Http/Livewire/Redirects.php new file mode 100644 index 0000000..a8fb8f2 --- /dev/null +++ b/app/Http/Livewire/Redirects.php @@ -0,0 +1,123 @@ + '$refresh']; + + public $editModal = false; + + public $redirect; + + public $refreshIndex; + + public int $perPage; + + public array $orderable; + + public string $search = ''; + + public array $selected = []; + + public array $paginationOptions; + + protected $queryString = [ + 'search' => [ + 'except' => '', + ], + 'sortBy' => [ + 'except' => 'id', + ], + 'sortDirection' => [ + 'except' => 'desc', + ], + ]; + + protected $rules = [ + 'redirect.old_url' => 'required', + 'redirect.new_url' => 'nullable', + ]; + + public function getSelectedCountProperty() + { + return count($this->selected); + } + + public function updatingSearch() + { + $this->resetPage(); + } + + public function updatingPerPage() + { + $this->resetPage(); + } + + public function resetSelected() + { + $this->selected = []; + } + + public function mount() + { + $this->sortBy = 'id'; + $this->sortDirection = 'desc'; + $this->perPage = 100; + $this->paginationOptions = [25, 50, 100]; + $this->orderable = (new Redirect())->orderable; + } + + public function editModal($id) + { + $this->redirect = Redirect::find($id); + $this->editModal = true; + } + + public function update() + { + $this->validate(); + + $this->redirect->save(); + + $this->alert('warning', __('Redirect updated successfully!')); + + $this->editModal = false; + + $this->emit('refreshIndex'); + } + + public function delete(Redirect $redirect) + { + $redirect->delete(); + + $this->alert('warning', __('Redirect deleted successfully!')); + } + + public function render(): View|Factory + { + $query = Redirect::advancedFilter([ + 's' => $this->search ?: null, + 'order_column' => $this->sortBy, + 'order_direction' => $this->sortDirection, + ]); + + $redirects = $query->paginate($this->perPage); + + return view('livewire.admin.settings.redirects', compact('redirects')); + } +} diff --git a/app/Http/Livewire/Utils/Modal.php b/app/Http/Livewire/Utils/Modal.php new file mode 100644 index 0000000..18849bd --- /dev/null +++ b/app/Http/Livewire/Utils/Modal.php @@ -0,0 +1,26 @@ + 'show', + ]; + + /** + * ------------------------------------------------------------------------------- + * Set Modal + * ------------------------------------------------------------------------------- + */ + public function show() + { + $this->show = true; + } +} diff --git a/app/Http/Livewire/Utils/Notifications.php b/app/Http/Livewire/Utils/Notifications.php new file mode 100644 index 0000000..e545b60 --- /dev/null +++ b/app/Http/Livewire/Utils/Notifications.php @@ -0,0 +1,31 @@ +notifications = auth()->user()->notifications->take(10); + } + + public function toggleReadStatus($key) + { + $notification = $this->notifications[$key]; + + $notification->read_at === null ? $notification->read_at = Carbon::now()->toTimeString() : $notification->read_at = null; + $notification->save(); + } +} diff --git a/app/Http/Livewire/Utils/Sidebar.php b/app/Http/Livewire/Utils/Sidebar.php new file mode 100644 index 0000000..9937de7 --- /dev/null +++ b/app/Http/Livewire/Utils/Sidebar.php @@ -0,0 +1,15 @@ +status = (bool) $this->model->getAttribute($this->field); + $this->uniqueId = uniqid(); + } + + public function updating($field, $value) + { + $this->model->setAttribute($this->field, $value)->save(); + + $this->alert('success', __('Status Changed successfully!'), [ + 'position' => 'center', + 'timer' => 3000, + 'toast' => true, + 'text' => '', + 'showDenyButton' => false, + 'onDenied' => '', + ]); + } + + public function render() + { + return view('livewire.utils.toggle-button'); + } +} diff --git a/app/Http/Livewire/Utils/WithSorting.php b/app/Http/Livewire/Utils/WithSorting.php new file mode 100644 index 0000000..370dd6f --- /dev/null +++ b/app/Http/Livewire/Utils/WithSorting.php @@ -0,0 +1,27 @@ +sortBy = $field; + + $this->sortDirection = $this->sortBy === $field + ? $this->reverseSort() + : 'asc'; + } + + public function reverseSort() + { + return $this->sortDirection === 'asc' + ? 'desc' + : 'asc'; + } +} diff --git a/app/Support/FilterQueryBuilder.php b/app/Support/FilterQueryBuilder.php new file mode 100644 index 0000000..c5d1e9e --- /dev/null +++ b/app/Support/FilterQueryBuilder.php @@ -0,0 +1,96 @@ +model = $query->getModel(); + $this->table = $this->model->getTable(); + + if (isset($data['f'])) { + foreach ($data['f'] as $filter) { + $filter['match'] = $data['filter_match'] ?? 'and'; + $this->makeFilter($query, $filter); + } + } + + $this->makeOrder($query, $data); + + return $query; + } + + public function contains($filter, $query) + { + $filter['query_1'] = addslashes($filter['query_1']); + + return $query->where($filter['column'], 'like', '%'.$filter['query_1'].'%', $filter['match']); + } + + protected function makeOrder($query, $data) + { + if ($this->isNestedColumn($data['order_column'])) { + [$relationship, $column] = explode('.', $data['order_column']); + $callable = Str::camel($relationship); + $belongs = $this->model->{$callable}( + ); + $relatedModel = $belongs->getModel(); + $relatedTable = $relatedModel->getTable(); + $as = "prefix_{$relatedTable}"; + + if ( ! $belongs instanceof BelongsTo) { + return; + } + + $query->leftJoin( + "{$relatedTable} as {$as}", + "{$as}.id", + '=', + "{$this->table}.{$relationship}_id" + ); + + $data['order_column'] = "{$as}.{$column}"; + } + + $query + ->orderBy($data['order_column'], $data['order_direction']) + ->select("{$this->table}.*"); + } + + protected function makeFilter($query, $filter) + { + if ($this->isNestedColumn($filter['column'])) { + [$relation, $filter['column']] = explode('.', $filter['column']); + $callable = Str::camel($relation); + $filter['match'] = 'and'; + + $query->orWhereHas(Str::camel($callable), function ($q) use ($filter) { + $this->{Str::camel($filter['operator'])}( + $filter, + $q + ); + }); + } else { + $filter['column'] = "{$this->table}.{$filter['column']}"; + $this->{Str::camel($filter['operator'])}( + $filter, + $query + ); + } + } + + protected function isNestedColumn($column) + { + return strpos($column, '.') !== false; + } +} diff --git a/app/Support/HasAdvancedFilter.php b/app/Support/HasAdvancedFilter.php new file mode 100644 index 0000000..e2b424b --- /dev/null +++ b/app/Support/HasAdvancedFilter.php @@ -0,0 +1,79 @@ +processQuery($query, $data); + } + + public function processQuery($query, $data) + { + $data = $this->processGlobalSearch($data); + + $v = validator()->make($data, [ + 's' => 'sometimes|nullable|string', + 'order_column' => 'sometimes|required|in:'.$this->orderableColumns(), + 'order_direction' => 'sometimes|required|in:asc,desc', + // 'limit' => 'sometimes|required|integer|min:1', + + // advanced filter + 'filter_match' => 'sometimes|required|in:and,or', + 'f' => 'sometimes|required|array', + 'f.*.column' => 'required|in:'.$this->whiteListColumns(), + 'f.*.operator' => 'required_with:f.*.column|in:'.$this->allowedOperators(), + 'f.*.query_1' => 'required', + 'f.*.query_2' => 'required_if:f.*.operator,between,not_between', + ]); + + if ($v->fails()) { + throw new ValidationException($v); + } + + $data = $v->validated(); + + return (new FilterQueryBuilder())->apply($query, $data); + } + + protected function orderableColumns() + { + return implode(',', $this->orderable); + } + + protected function whiteListColumns() + { + return implode(',', $this->filterable); + } + + protected function allowedOperators() + { + return implode(',', [ + 'contains', + ]); + } + + protected function processGlobalSearch($data) + { + if (isset($data['f']) || ! isset($data['s'])) { + return $data; + } + + $data['filter_match'] = 'or'; + + $data['f'] = array_map(function ($column) use ($data) { + return [ + 'column' => $column, + 'operator' => 'contains', + 'query_1' => $data['s'], + ]; + }, $this->filterable); + + return $data; + } +} diff --git a/app/Support/Helpers.php b/app/Support/Helpers.php new file mode 100644 index 0000000..0e0cebe --- /dev/null +++ b/app/Support/Helpers.php @@ -0,0 +1,68 @@ +rememberForever('languages', function () { + return Session::has('language') + ? Language::pluck('name', 'code')->toArray() + : Language::where('is_default', 1)->pluck('name', 'code')->toArray(); + }); + } +} + +if ( ! function_exists('getCategories')) { + function getCategories() + { + return cache()->rememberForever('categories', function () { + return Category::pluck('name', 'id')->toArray(); + }); + } +} + +if ( ! function_exists('getBlogCategories')) { + function getBlogCategories() + { + return cache()->rememberForever('blogCategories', function () { + return BlogCategory::pluck('title', 'id')->toArray(); + }); + } +} + +if ( ! function_exists('settings')) { + function settings() + { + return cache()->rememberForever('settings', function () { + return \App\Models\Settings::firstOrFail(); + }); + } +} + +function flagImageUrl($language_code) +{ + return asset("images/flags/{$language_code}.png"); +} + +function getSlug($request, $key) +{ + $language_default = \App\Models\Language::query() + ->where('is_default', \App\Models\Language::IS_DEFAULT) + ->select('code') + ->first(); + $language_code = $language_default->code; + $value = $request[$language_code][$key]; + + return \Illuminate\Support\Str::slug($value); +} diff --git a/app/View/Components/AppLayout.php b/app/View/Components/AppLayout.php new file mode 100644 index 0000000..1ff66ab --- /dev/null +++ b/app/View/Components/AppLayout.php @@ -0,0 +1,29 @@ +name = $name; + $this->id = $id; + $this->options = $options; + $this->selected = $selected; + $this->multiple = $multiple; + $this->searchable = $searchable; + } + + /** + * Get the view / contents that represent the component. + * + * @return \Illuminate\Contracts\View\View|string + */ + public function render() + { + return view('components.select2'); + } +} diff --git a/app/View/Components/SelectList.php b/app/View/Components/SelectList.php new file mode 100644 index 0000000..9b0e8d7 --- /dev/null +++ b/app/View/Components/SelectList.php @@ -0,0 +1,33 @@ +options = $options; + } + + /** + * Get the view / contents that represent the component. + * + * @return \Illuminate\Contracts\View\View|string + */ + public function render() + { + return view('components.select-list'); + } +} diff --git a/app/View/Components/Sidebar.php b/app/View/Components/Sidebar.php new file mode 100644 index 0000000..2f8197b --- /dev/null +++ b/app/View/Components/Sidebar.php @@ -0,0 +1,30 @@ +get($key); + } +} + +if (! function_exists('getActiveCategories')) { + function getActiveCategories() + { + return Category::active() + ->select('id', 'name') + ->get(); + } +} + +if (! function_exists('getActivePages')) { + function getActivePages() + { + return Page::active() + ->select('id', 'title', 'slug') + ->limit(4) + ->get(); + } +} + +if (! function_exists('categoryName')) { + function categoryName($category_id) + { + return Category::find($category_id)->name; + } +} + +if (! function_exists('uploadImage')) { + /** + * @param mixed $image + * + * @return string|null + */ + function uploadImage($image) + { + // Path cannot be empty + if (empty($image)) { + return null; + } + + $image = file_get_contents($image); + $name = Str::random(10) . '.jpg'; + $path = public_path() . '/images/products/' . $name; + file_put_contents($path, $image); + + return $name; + } +} + +if (! function_exists('uploadGallery')) { + /** + * @param mixed $gallery + * + * @return array|null + */ + function uploadGallery($gallery) + { + // Path cannot be empty + if (empty($gallery)) { + return null; + } + + $gallery = explode(',', $gallery); + + return array_map(function ($image) { + $image = file_get_contents($image); + $name = Str::random(10) . '.jpg'; + $path = public_path() . '/images/products/' . $name; + file_put_contents($path, $image); + + return $name; + }, $gallery); + } +} + +if (! function_exists('handleUpload')) { + /** + * @param mixed $input + * + * @return string|false|void + */ + function handleUpload($input) + { + if (is_array($input)) { + // handle gallery + $galleryArray = []; + + foreach ($input as $key => $value) { + $img = Image::make($value->getRealPath())->encode('webp', 85)->resize(1000, 1000, function ($constraint) { + $constraint->aspectRatio(); + $constraint->upsize(); + }); + + $img->stream(); + Storage::disk('local_files')->put('products/' . $value->getClientOriginalName(), $img, 'public'); + $galleryArray[] = $value->getClientOriginalName(); + } + + return json_encode($galleryArray); + } + // handle single image + + $img = Image::make($input->getRealPath())->encode('webp', 85)->resize(1000, 1000, function ($constraint) { + $constraint->aspectRatio(); + $constraint->upsize(); + }); + $img->stream(); + + Storage::disk('local_files')->put('products/' . $input->getClientOriginalName(), $img, 'public'); + } +} + if ( ! function_exists('active')) { /** diff --git a/database/migrations/2022_10_23_150306_create_languages_table.php b/database/migrations/2022_10_23_150306_create_languages_table.php new file mode 100644 index 0000000..ad5b451 --- /dev/null +++ b/database/migrations/2022_10_23_150306_create_languages_table.php @@ -0,0 +1,37 @@ +id(); + $table->string('name'); + $table->string('code'); + $table->string('rtl')->default('0'); + $table->string('status')->default('1'); + $table->string('is_default')->default('0'); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('languages'); + } +}; diff --git a/database/migrations/2022_10_24_150653_create_projects_table.php b/database/migrations/2022_10_24_150653_create_projects_table.php new file mode 100644 index 0000000..3982a10 --- /dev/null +++ b/database/migrations/2022_10_24_150653_create_projects_table.php @@ -0,0 +1,46 @@ +id(); + $table->text('title'); + $table->text('client_name')->nullable(); + $table->text('slug')->nullable(); + $table->string('link')->nullable(); + $table->text('content')->nullable(); + $table->boolean('status')->default(true); + $table->text('image')->nullable(); + $table->text('gallery')->nullable(); + $table->string('meta_title')->nullable(); + $table->text('meta_description')->nullable(); + $table->foreignId('service_id')->nullable()->constrained('services')->nullOnDelete(); + $table->foreignId('page_id')->nullable()->constrained('pages')->nullOnDelete(); + $table->foreignId('language_id')->nullable()->constrained('languages')->nullOnDelete(); + $table->timestamps(); + $table->softDeletes(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('sections'); + } +}; diff --git a/database/migrations/2023_01_24_213944_create_redirects_table.php b/database/migrations/2023_01_24_213944_create_redirects_table.php new file mode 100644 index 0000000..93a15fe --- /dev/null +++ b/database/migrations/2023_01_24_213944_create_redirects_table.php @@ -0,0 +1,36 @@ +id(); + $table->string('old_url'); + $table->string('new_url')->nullable(); + $table->boolean('status')->default(true); + $table->timestamps(); + $table->softDeletes(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('redirects'); + } +}; diff --git a/database/migrations/2023_06_21_134012_create_menus_table.php b/database/migrations/2023_06_21_134012_create_menus_table.php new file mode 100644 index 0000000..123a9be --- /dev/null +++ b/database/migrations/2023_06_21_134012_create_menus_table.php @@ -0,0 +1,41 @@ +id(); + $table->timestamps(); + $table->string('name'); + $table->string('label'); + $table->string('url'); + $table->char('type'); + $table->string('placement')->nullable(); + $table->integer('sort_order')->nullable(); + $table->integer('parent_id')->nullable(); + $table->string('icon')->nullable(); + $table->boolean('new_window')->default(false); + $table->integer('status')->default(true); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('menus'); + } +}; diff --git a/database/seeders/LanguagesSeeder.php b/database/seeders/LanguagesSeeder.php new file mode 100644 index 0000000..8f43403 --- /dev/null +++ b/database/seeders/LanguagesSeeder.php @@ -0,0 +1,43 @@ + 1, + 'name' => 'English', + 'code' => 'en', + 'status' => 1, + 'is_default' => 0, + ], + [ + 'id' => 2, + 'name' => 'Arabic', + 'code' => 'ar', + 'status' => 1, + 'is_default' => 0, + ], + [ + 'id' => 3, + 'name' => 'French', + 'code' => 'fr', + 'status' => 1, + 'is_default' => 1, + ], + ]); + } +} diff --git a/database/seeders/MenuSeeder.php b/database/seeders/MenuSeeder.php new file mode 100644 index 0000000..00f7d10 --- /dev/null +++ b/database/seeders/MenuSeeder.php @@ -0,0 +1,43 @@ + 'Home', + 'label' => 'Home', + 'url' => '/', + 'type' => 'link', + 'placement' => 'header', + 'sort_order' => 1, + 'parent_id' => null, + 'new_window' => false, + ]); + + Menu::create([ + 'name' => 'About', + 'label' => 'About', + 'url' => '/about', + 'type' => 'dropdown', + 'placement' => 'header', + 'sort_order' => 2, + 'parent_id' => null, + 'new_window' => false, + ]); + + // Add more menu items as needed + } +} diff --git a/database/seeders/ProjectSeeder.php b/database/seeders/ProjectSeeder.php new file mode 100644 index 0000000..a6dd0e0 --- /dev/null +++ b/database/seeders/ProjectSeeder.php @@ -0,0 +1,21 @@ +create(); + } +} diff --git a/resources/views/components/accordion.blade.php b/resources/views/components/accordion.blade.php new file mode 100644 index 0000000..d151b14 --- /dev/null +++ b/resources/views/components/accordion.blade.php @@ -0,0 +1,17 @@ +@props(['title','id']) + +
+
+
+ {{ $title }} +
+
+ + + +
+
+
+ {{ $slot }} +
+
\ No newline at end of file diff --git a/resources/views/components/alert.blade.php b/resources/views/components/alert.blade.php new file mode 100644 index 0000000..101cd5a --- /dev/null +++ b/resources/views/components/alert.blade.php @@ -0,0 +1,11 @@ +
+ + + + + {{ $attributes['message'] }} + + +
\ No newline at end of file diff --git a/resources/views/components/alerts/error.blade.php b/resources/views/components/alerts/error.blade.php new file mode 100644 index 0000000..70c026a --- /dev/null +++ b/resources/views/components/alerts/error.blade.php @@ -0,0 +1,26 @@ + +@props(['errors']) + +@if ($errors->any()) +
+
+
+ +
+
+

+ {{__('There were')}} {{ count($errors) }} {{ Str::plural('error') }} with your submission +

+
+
    + @foreach($errors as $error) +
  • {{ $error }}
  • + @endforeach +
+
+
+
+
+@endif diff --git a/resources/views/components/analytics.blade.php b/resources/views/components/analytics.blade.php new file mode 100644 index 0000000..9371b71 --- /dev/null +++ b/resources/views/components/analytics.blade.php @@ -0,0 +1,18 @@ + + + diff --git a/resources/views/components/application-logo.blade.php b/resources/views/components/application-logo.blade.php new file mode 100644 index 0000000..7d1eb54 --- /dev/null +++ b/resources/views/components/application-logo.blade.php @@ -0,0 +1,6 @@ + + + + + +{{-- Site Logomerge(['class' => 'w-auto h-30']) }}> --}} diff --git a/resources/views/components/auth-card.blade.php b/resources/views/components/auth-card.blade.php new file mode 100644 index 0000000..44dcdd3 --- /dev/null +++ b/resources/views/components/auth-card.blade.php @@ -0,0 +1,15 @@ +{{-- attribute class and title null --}} + +@props(['title' => null]) + +
+
+ @if ($title) +
+ {{ $title }} +
+ @endif + + {{ $slot }} +
+
\ No newline at end of file diff --git a/resources/views/components/auth-session-status.blade.php b/resources/views/components/auth-session-status.blade.php new file mode 100644 index 0000000..c4bd6e2 --- /dev/null +++ b/resources/views/components/auth-session-status.blade.php @@ -0,0 +1,7 @@ +@props(['status']) + +@if ($status) +
merge(['class' => 'font-medium text-sm text-green-600']) }}> + {{ $status }} +
+@endif diff --git a/resources/views/components/auth-validation-errors.blade.php b/resources/views/components/auth-validation-errors.blade.php new file mode 100644 index 0000000..fc0eaeb --- /dev/null +++ b/resources/views/components/auth-validation-errors.blade.php @@ -0,0 +1,15 @@ +@props(['errors']) + +@if ($errors->any()) +
+
+ {{ __('Whoops! Something went wrong.') }} +
+ + +
+@endif diff --git a/resources/views/components/badge.blade.php b/resources/views/components/badge.blade.php new file mode 100644 index 0000000..d567055 --- /dev/null +++ b/resources/views/components/badge.blade.php @@ -0,0 +1,18 @@ +@props(['primary' => false, 'secondary' => false, 'success' => false, 'info' => false, 'alert' => false, 'danger' => false, 'warning' => false, 'black' => false]) + +@php + $classes = + ($primary ? 'text-white bg-indigo-500 hover:bg-indigo-700 hover:bg-indigo-700 active:bg-indigo-900 focus:outline-none focus:border-indigo-900 focus:ring ring-indigo-300' : '') . + ($secondary ? 'text-gray-100 bg-gray-500 hover:bg-gray-700 hover:bg-gray-700 active:bg-gray-900 focus:outline-none focus:border-gray-900 focus:ring ring-gray-300' : '') . + ($info ? 'text-blue-100 bg-blue-500 hover:bg-blue-700 hover:bg-blue-700 active:bg-blue-900 focus:outline-none focus:border-blue-900 focus:ring ring-blue-300' : '') . + ($success ? 'text-green-100 bg-green-500 hover:bg-green-700 hover:bg-green-700 active:bg-green-900 focus:outline-none focus:border-green-900 focus:ring ring-green-300' : '') . + ($alert ? 'text-yellow-100 bg-yellow-500 hover:bg-yellow-700 hover:bg-yellow-700 active:bg-yellow-900 focus:outline-none focus:border-yellow-900 focus:ring ring-yellow-300' : '') . + ($danger ? 'text-red-100 bg-red-500 hover:bg-red-700 hover:bg-red-700 active:bg-red-900 focus:outline-none focus:border-red-900 focus:ring ring-red-300' : '') . + ($warning ? 'text-orange-100 bg-orange-500 hover:bg-orange-700 hover:bg-orange-700 active:bg-orange-900 focus:outline-none focus:border-orange-900 focus:ring ring-orange-300' : '') . + ($black ? 'text-orange-500 bg-black hover:bg-gray-800 hover:bg-gray-800 active:bg-orange-900 focus:outline-none focus:border-orange-900 focus:ring ring-orange-300' : ''); +@endphp + +merge(['class' => 'inline-flex items-center justify-center px-2 py-1 mr-2 text-xs font-bold leading-none rounded-full ' . $classes]) }}> + {{ $slot }} + diff --git a/resources/views/components/bottomheader.blade.php b/resources/views/components/bottomheader.blade.php new file mode 100644 index 0000000..6e553da --- /dev/null +++ b/resources/views/components/bottomheader.blade.php @@ -0,0 +1,10 @@ +
+
+ @foreach (\App\Helpers::getActiveCategories() as $category) + + {{ $category->name }} + + @endforeach +
+
diff --git a/resources/views/components/button/auth/google.blade.php b/resources/views/components/button/auth/google.blade.php new file mode 100644 index 0000000..2b40db8 --- /dev/null +++ b/resources/views/components/button/auth/google.blade.php @@ -0,0 +1,6 @@ +merge(['href' => '#', 'title' => 'Continue with Google']) }}> + + Google logo + Continue with Google + + diff --git a/resources/views/components/button/back.blade.php b/resources/views/components/button/back.blade.php new file mode 100644 index 0000000..fe28338 --- /dev/null +++ b/resources/views/components/button/back.blade.php @@ -0,0 +1,6 @@ +@props(['color' => 'transparent']) + + + + {{__('Back')}} + diff --git a/resources/views/components/button/icon-link.blade.php b/resources/views/components/button/icon-link.blade.php new file mode 100644 index 0000000..3f8f272 --- /dev/null +++ b/resources/views/components/button/icon-link.blade.php @@ -0,0 +1,15 @@ +@props(['color' => 'brand', 'style_override' => null]) + + + +merge(['type' => 'button', 'class' => "btn btn__icon {$style} {$ring}"]) }}> + {{ $slot }} + diff --git a/resources/views/components/button/icon.blade.php b/resources/views/components/button/icon.blade.php new file mode 100644 index 0000000..b51a33b --- /dev/null +++ b/resources/views/components/button/icon.blade.php @@ -0,0 +1,15 @@ +@props(['color' => 'brand', 'style_override' => null]) + + + + diff --git a/resources/views/components/button/index.blade.php b/resources/views/components/button/index.blade.php new file mode 100644 index 0000000..54f43e4 --- /dev/null +++ b/resources/views/components/button/index.blade.php @@ -0,0 +1,15 @@ +@props(['color' => 'brand', 'style_override' => null]) + + + + diff --git a/resources/views/components/button/link.blade.php b/resources/views/components/button/link.blade.php new file mode 100644 index 0000000..dad0d71 --- /dev/null +++ b/resources/views/components/button/link.blade.php @@ -0,0 +1,15 @@ +@props(['color' => 'brand', 'style_override' => null]) + + + +merge(['type' => 'button', 'class' => "btn btn__text {$style} {$ring}"]) }}> + {{ $slot }} + diff --git a/resources/views/components/card.blade.php b/resources/views/components/card.blade.php new file mode 100644 index 0000000..824cca3 --- /dev/null +++ b/resources/views/components/card.blade.php @@ -0,0 +1,5 @@ +
+
+ {{ $slot }} +
+
diff --git a/resources/views/components/checkbox.blade.php b/resources/views/components/checkbox.blade.php new file mode 100644 index 0000000..119079c --- /dev/null +++ b/resources/views/components/checkbox.blade.php @@ -0,0 +1 @@ +merge(['class' => 'rounded border-zinc-300 text-indigo-600 shadow-sm focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50']) !!}> diff --git a/resources/views/components/date-picker.blade.php b/resources/views/components/date-picker.blade.php new file mode 100644 index 0000000..4ab0ac6 --- /dev/null +++ b/resources/views/components/date-picker.blade.php @@ -0,0 +1,77 @@ +
+
+ @if(!isset($attributes['required'])) +
+ +
+ @endif + + +
+
+ +@push('page_scripts') + +@endpush \ No newline at end of file diff --git a/resources/views/components/dialog-modal.blade.php b/resources/views/components/dialog-modal.blade.php new file mode 100644 index 0000000..5377608 --- /dev/null +++ b/resources/views/components/dialog-modal.blade.php @@ -0,0 +1,21 @@ +@props(['id' => null, 'maxWidth' => null]) + + +
+
+
+

+ {{ $title }} +

+ +
+ {{ $content }} +
+
+
+
+ +
+ {{ $footer }} +
+
diff --git a/resources/views/components/dropdown-link.blade.php b/resources/views/components/dropdown-link.blade.php new file mode 100644 index 0000000..761ee8a --- /dev/null +++ b/resources/views/components/dropdown-link.blade.php @@ -0,0 +1 @@ +merge(['class' => 'block px-4 py-2 text-sm leading-5 text-gray-700 hover:bg-gray-100 focus:outline-none focus:bg-gray-100 transition duration-150 ease-in-out']) }}>{{ $slot }} diff --git a/resources/views/components/dropdown.blade.php b/resources/views/components/dropdown.blade.php new file mode 100644 index 0000000..7871c77 --- /dev/null +++ b/resources/views/components/dropdown.blade.php @@ -0,0 +1,63 @@ +{{-- Optimize this code --}} + +@props(['align' => 'right', 'width' => null, 'contentClasses' => 'py-1 bg-white']) + +@php +switch ($align) { + case 'left': + $alignmentClasses = ' origin-top-left left-0'; + break; + case 'top': + $alignmentClasses = ' origin-top'; + break; + case 'right': + default: + $alignmentClasses = ' origin-top-right right-0'; + break; +} +switch ($width) { + case '48': + $widthClasses = ' w-48'; + break; + case '56': + $widthClasses = ' w-56'; + break; + case '64': + $widthClasses = ' w-64'; + break; + case '72': + $widthClasses = ' w-72'; + break; + case '80': + $widthClasses = ' w-80'; + break; + case '96': + $widthClasses = ' w-96'; + break; + case 'auto': + default: + $widthClasses = ''; + break; +} +@endphp + +
+
+ {{ $trigger }} +
+ + +
diff --git a/resources/views/components/dropdown/item.blade.php b/resources/views/components/dropdown/item.blade.php new file mode 100644 index 0000000..5a02662 --- /dev/null +++ b/resources/views/components/dropdown/item.blade.php @@ -0,0 +1,11 @@ +@props(['type' => 'link']) + +@if ($type === 'link') + merge(['href' => '#', 'class' => 'block w-full px-4 py-2 text-sm leading-5 text-gray-700 hover:bg-gray-100 hover:text-gray-900 focus:outline-none focus:bg-gray-100 focus:text-gray-900']) }} role="menuitem"> + {{ $slot }} + +@elseif ($type === 'button') + +@endif diff --git a/resources/views/components/dropzone.blade.php b/resources/views/components/dropzone.blade.php new file mode 100644 index 0000000..76bb677 --- /dev/null +++ b/resources/views/components/dropzone.blade.php @@ -0,0 +1,73 @@ +
+
+
+ +@push('page_scripts') + +@endpush \ No newline at end of file diff --git a/resources/views/components/dynamic-component.blade.php b/resources/views/components/dynamic-component.blade.php new file mode 100644 index 0000000..0e79f91 --- /dev/null +++ b/resources/views/components/dynamic-component.blade.php @@ -0,0 +1,17 @@ +{{-- --}} +@props([ + 'key', + 'name', + 'tab', + 'icon' +]) + + + + + {{ $name ?? \Illuminate\Support\Str::headline($key) }} + diff --git a/resources/views/components/file-detail.blade.php b/resources/views/components/file-detail.blade.php new file mode 100644 index 0000000..86ec2a0 --- /dev/null +++ b/resources/views/components/file-detail.blade.php @@ -0,0 +1,33 @@ +@props([ + 'file' +]) + +
+
+
+ +
+
+ + +
\ No newline at end of file diff --git a/resources/views/components/filepond.blade.php b/resources/views/components/filepond.blade.php new file mode 100644 index 0000000..1d0f5d7 --- /dev/null +++ b/resources/views/components/filepond.blade.php @@ -0,0 +1,53 @@ +@props(['images' => []]) + +
+
get('maxFileSize') . "'" : 'null' !!}, + server: { + process:(fieldName, file, metadata, load, error, progress, abort, transfer, options) => { + @this.upload('{{ $attributes->whereStartsWith('wire:model')->first() }}', file, load, error, progress) + }, + revert: (filename, load) => { + @this.removeUpload('{{ $attributes->whereStartsWith('wire:model')->first() }}', filename, load) + }, + }, + }); + }); + " + > + +
+
+ +@push('styles') + @once + + + @endonce +@endpush + +@push('scripts') + @once + + + + + + @endonce +@endpush \ No newline at end of file diff --git a/resources/views/components/fileupload.blade.php b/resources/views/components/fileupload.blade.php new file mode 100644 index 0000000..4d1ead2 --- /dev/null +++ b/resources/views/components/fileupload.blade.php @@ -0,0 +1,243 @@ +@props([ + 'file' => null, + 'accept' => 'image/jpg,image/jpeg,image/png,application/pdf,application/xls,application/xlsx', + 'multiple' => false, + 'mode' => 'attachment', + 'show' => 'w-20 h-20 rounded-full', +]) + +
+ @if (!$file || $mode === 'preview') + @php $randomId = Str::random(6); @endphp + + @endif + + @if ($mode === 'attachment') + {{-- Loading indicator for file remove --}} +
+
+ {{ __('Removing file...') }} +
+
+ + {{-- Preview for mode 'attachment' --}} +
+ @if (is_array($file) && count($file) > 0) + @foreach ($file as $key => $f) +
+
+ @if (collect(['jpg', 'png', 'jpeg', 'webp'])->contains($f->getClientOriginalExtension())) +
+ +
+ @else +
+ + + +
+ @endif +
+
+ @if ($multiple) + {{-- prints attachment.* --}} + @error($attributes->wire('model')->value . '.' . $key) +

{{ $message }}

+ @enderror + @endif + +
{{ $f->getClientOriginalName() }} +
+
+
+
{{ $f->getClientOriginalExtension() }} +
+
+ + +
+
+ @endforeach + @else + @if ($file) +
+
+ @if (collect(['jpg', 'png', 'jpeg', 'webp'])->contains($file->getClientOriginalExtension())) +
+ +
+ @else +
+ + + +
+ @endif +
+
+ @error($attributes->wire('model')->value) +

{{ $message }}

+ @enderror +
+ {{ $file->getClientOriginalName() }}
+
+
+
{{ $file->getClientOriginalExtension() }} +
+
+ +
+
+ @endif + @endif +
+ @endif +
\ No newline at end of file diff --git a/resources/views/components/footer.blade.php b/resources/views/components/footer.blade.php new file mode 100644 index 0000000..1e7a51b --- /dev/null +++ b/resources/views/components/footer.blade.php @@ -0,0 +1,98 @@ +
+
+
+
+
+

+ {{ __('Information') }}

+ +
+
+

+ {{ __('Open Source') }}

+ +
+
+

+ {{ __('Contact Us') }}

+ +
+
+
+ +
+
+ + {{ Helpers::settings('site_title') }} + +

+ Copyright 2022 - {{ Helpers::settings('site_title') }} +

+
+
diff --git a/resources/views/components/form-alert.blade.php b/resources/views/components/form-alert.blade.php new file mode 100644 index 0000000..29ef709 --- /dev/null +++ b/resources/views/components/form-alert.blade.php @@ -0,0 +1,9 @@ + + \ No newline at end of file diff --git a/resources/views/components/forms/add-input.blade.php b/resources/views/components/forms/add-input.blade.php new file mode 100644 index 0000000..66cf7dc --- /dev/null +++ b/resources/views/components/forms/add-input.blade.php @@ -0,0 +1,7 @@ + +
+ + {{$adon}} + + {{$slot}} +
\ No newline at end of file diff --git a/resources/views/components/forms/adon-input.blade.php b/resources/views/components/forms/adon-input.blade.php new file mode 100644 index 0000000..3b05ec8 --- /dev/null +++ b/resources/views/components/forms/adon-input.blade.php @@ -0,0 +1,6 @@ +
+ + {{$adon}} + + {{$slot}} +
\ No newline at end of file diff --git a/resources/views/components/forms/input.blade.php b/resources/views/components/forms/input.blade.php new file mode 100644 index 0000000..de172bd --- /dev/null +++ b/resources/views/components/forms/input.blade.php @@ -0,0 +1 @@ +merge(['class'=> 'border border-zinc-400 rounded-md w-full focus:outline-none px-3 focus:border-blue-700 text-base'])}}> \ No newline at end of file diff --git a/resources/views/components/from-url.blade.php b/resources/views/components/from-url.blade.php new file mode 100644 index 0000000..ef6432e --- /dev/null +++ b/resources/views/components/from-url.blade.php @@ -0,0 +1,6 @@ +
+ +
\ No newline at end of file diff --git a/resources/views/components/header.blade.php b/resources/views/components/header.blade.php new file mode 100644 index 0000000..aed51ec --- /dev/null +++ b/resources/views/components/header.blade.php @@ -0,0 +1,172 @@ +@props(['vertical' => false]) + + diff --git a/resources/views/components/icons/bell.blade.php b/resources/views/components/icons/bell.blade.php new file mode 100644 index 0000000..3c7401e --- /dev/null +++ b/resources/views/components/icons/bell.blade.php @@ -0,0 +1,14 @@ + + + + + + \ No newline at end of file diff --git a/resources/views/components/icons/chevron-down.blade.php b/resources/views/components/icons/chevron-down.blade.php new file mode 100644 index 0000000..cd2b393 --- /dev/null +++ b/resources/views/components/icons/chevron-down.blade.php @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/resources/views/components/icons/dashboard.blade.php b/resources/views/components/icons/dashboard.blade.php new file mode 100644 index 0000000..25c2b27 --- /dev/null +++ b/resources/views/components/icons/dashboard.blade.php @@ -0,0 +1,16 @@ + + + + + + + + + \ No newline at end of file diff --git a/resources/views/components/icons/delivery.blade.php b/resources/views/components/icons/delivery.blade.php new file mode 100644 index 0000000..50223be --- /dev/null +++ b/resources/views/components/icons/delivery.blade.php @@ -0,0 +1,66 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/views/components/icons/edit.blade.php b/resources/views/components/icons/edit.blade.php new file mode 100644 index 0000000..fc9ee88 --- /dev/null +++ b/resources/views/components/icons/edit.blade.php @@ -0,0 +1,14 @@ + + + + + + \ No newline at end of file diff --git a/resources/views/components/icons/empty-circle.blade.php b/resources/views/components/icons/empty-circle.blade.php new file mode 100644 index 0000000..8c70f00 --- /dev/null +++ b/resources/views/components/icons/empty-circle.blade.php @@ -0,0 +1,5 @@ + + + \ No newline at end of file diff --git a/resources/views/components/icons/eye.blade.php b/resources/views/components/icons/eye.blade.php new file mode 100644 index 0000000..650de49 --- /dev/null +++ b/resources/views/components/icons/eye.blade.php @@ -0,0 +1,8 @@ + + + + diff --git a/resources/views/components/icons/facebook.blade.php b/resources/views/components/icons/facebook.blade.php new file mode 100644 index 0000000..6616298 --- /dev/null +++ b/resources/views/components/icons/facebook.blade.php @@ -0,0 +1,6 @@ + + + \ No newline at end of file diff --git a/resources/views/components/icons/info-circle.blade.php b/resources/views/components/icons/info-circle.blade.php new file mode 100644 index 0000000..589fff2 --- /dev/null +++ b/resources/views/components/icons/info-circle.blade.php @@ -0,0 +1,5 @@ + + + diff --git a/resources/views/components/icons/instagram.blade.php b/resources/views/components/icons/instagram.blade.php new file mode 100644 index 0000000..1ffb924 --- /dev/null +++ b/resources/views/components/icons/instagram.blade.php @@ -0,0 +1,6 @@ + + + \ No newline at end of file diff --git a/resources/views/components/icons/menu-fold-left.blade.php b/resources/views/components/icons/menu-fold-left.blade.php new file mode 100644 index 0000000..2f8b0f9 --- /dev/null +++ b/resources/views/components/icons/menu-fold-left.blade.php @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/resources/views/components/icons/menu-fold-right.blade.php b/resources/views/components/icons/menu-fold-right.blade.php new file mode 100644 index 0000000..7f705fd --- /dev/null +++ b/resources/views/components/icons/menu-fold-right.blade.php @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/resources/views/components/icons/menu.blade.php b/resources/views/components/icons/menu.blade.php new file mode 100644 index 0000000..ec6d3ed --- /dev/null +++ b/resources/views/components/icons/menu.blade.php @@ -0,0 +1,4 @@ + + \ No newline at end of file diff --git a/resources/views/components/icons/moon.blade.php b/resources/views/components/icons/moon.blade.php new file mode 100644 index 0000000..7d232a8 --- /dev/null +++ b/resources/views/components/icons/moon.blade.php @@ -0,0 +1,4 @@ + + \ No newline at end of file diff --git a/resources/views/components/icons/sun.blade.php b/resources/views/components/icons/sun.blade.php new file mode 100644 index 0000000..4af2204 --- /dev/null +++ b/resources/views/components/icons/sun.blade.php @@ -0,0 +1,4 @@ + + \ No newline at end of file diff --git a/resources/views/components/icons/trash.blade.php b/resources/views/components/icons/trash.blade.php new file mode 100644 index 0000000..b4e70e1 --- /dev/null +++ b/resources/views/components/icons/trash.blade.php @@ -0,0 +1,5 @@ + + + \ No newline at end of file diff --git a/resources/views/components/icons/twitter.blade.php b/resources/views/components/icons/twitter.blade.php new file mode 100644 index 0000000..866e354 --- /dev/null +++ b/resources/views/components/icons/twitter.blade.php @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/resources/views/components/icons/x.blade.php b/resources/views/components/icons/x.blade.php new file mode 100644 index 0000000..da8c0a4 --- /dev/null +++ b/resources/views/components/icons/x.blade.php @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/resources/views/components/input-date.blade.php b/resources/views/components/input-date.blade.php new file mode 100644 index 0000000..70424ef --- /dev/null +++ b/resources/views/components/input-date.blade.php @@ -0,0 +1,16 @@ +@props(['name', 'value' => null, 'placeholder' => null, 'required' => false]) + +@php + $id = $attributes->get('id', Str::random(10)); +@endphp + +merge(['class' => '']) }} +/> diff --git a/resources/views/components/input-error.blade.php b/resources/views/components/input-error.blade.php new file mode 100644 index 0000000..9e6da21 --- /dev/null +++ b/resources/views/components/input-error.blade.php @@ -0,0 +1,9 @@ +@props(['messages']) + +@if ($messages) + +@endif diff --git a/resources/views/components/input-label.blade.php b/resources/views/components/input-label.blade.php new file mode 100644 index 0000000..1cc65e2 --- /dev/null +++ b/resources/views/components/input-label.blade.php @@ -0,0 +1,5 @@ +@props(['value']) + + diff --git a/resources/views/components/input.blade.php b/resources/views/components/input.blade.php new file mode 100644 index 0000000..4a62c4d --- /dev/null +++ b/resources/views/components/input.blade.php @@ -0,0 +1,33 @@ +@props([ + 'id' => null, + 'type' => 'text', + 'name' => null, + 'value' => null, + 'disabled' => false, + 'required' => false, + 'placeholder' => null, + 'autofocus' => false, + 'autocomplete' => null, + 'readonly' => false, +]) + +@php + $attributes = $attributes->class([ + 'shadow-sm focus:ring-indigo-500 focus:border-indigo-500 block w-full sm:text-sm border-gray-300 rounded-md', + 'disabled:opacity-50' => $disabled, + 'border-red-300 text-red-900 placeholder-red-300 focus:border-red-300 focus:ring-red-500' => $errors->has($name), + ])->merge([ + 'id' => $id, + 'type' => $type, + 'name' => $name, + 'value' => $value, + 'disabled' => $disabled, + 'required' => $required, + 'placeholder' => $placeholder, + 'autofocus' => $autofocus, + 'autocomplete' => $autocomplete, + 'readonly' => $readonly, + ]); +@endphp + + diff --git a/resources/views/components/input/checkbox.blade.php b/resources/views/components/input/checkbox.blade.php new file mode 100644 index 0000000..77030ff --- /dev/null +++ b/resources/views/components/input/checkbox.blade.php @@ -0,0 +1,6 @@ +
+ +
diff --git a/resources/views/components/input/ckeditor5.blade.php b/resources/views/components/input/ckeditor5.blade.php new file mode 100644 index 0000000..1b856ab --- /dev/null +++ b/resources/views/components/input/ckeditor5.blade.php @@ -0,0 +1,30 @@ + +
whereDoesntStartWith('wire:model') }} + wire:ignore +> + +
+ + +@push('scripts') + + +@endpush diff --git a/resources/views/components/input/date.blade.php b/resources/views/components/input/date.blade.php new file mode 100644 index 0000000..f0d7ebd --- /dev/null +++ b/resources/views/components/input/date.blade.php @@ -0,0 +1,19 @@ +
+ + + + + + + whereDoesntStartWith('wire:model') }} + x-ref="input" + x-bind:value="value" + class="rounded-none rounded-r-md flex-1 form-input block w-full transition duration-150 ease-in-out sm:text-sm sm:leading-5" + /> +
diff --git a/resources/views/components/input/datepicker.blade.php b/resources/views/components/input/datepicker.blade.php new file mode 100644 index 0000000..e6cdc90 --- /dev/null +++ b/resources/views/components/input/datepicker.blade.php @@ -0,0 +1,89 @@ +
+
+
+ {{-- --}} + + +
+ + + +
+ + + +
+ +
+
+
+ + +
+
+ + +
+
+ +
+ +
+ +
+ + +
+
+
+
+
+
\ No newline at end of file diff --git a/resources/views/components/input/file-upload.blade.php b/resources/views/components/input/file-upload.blade.php new file mode 100644 index 0000000..8ea0430 --- /dev/null +++ b/resources/views/components/input/file-upload.blade.php @@ -0,0 +1,12 @@ +
+ {{ $slot }} + +
+ + + + +
+
diff --git a/resources/views/components/input/group.blade.php b/resources/views/components/input/group.blade.php new file mode 100644 index 0000000..6534c72 --- /dev/null +++ b/resources/views/components/input/group.blade.php @@ -0,0 +1,47 @@ +@props([ + 'label', + 'for', + 'error' => false, + 'helpText' => false, + 'inline' => false, + 'paddingless' => false, + 'borderless' => false, +]) + +@if($inline) +
+ + +
+ {{ $slot }} + + @if ($error) +
{{ $error }}
+ @endif + + @if ($helpText) +

{{ $helpText }}

+ @endif +
+
+@else +
+ + +
+ {{ $slot }} + + @if ($error) +
{{ $error }}
+ @endif + + @if ($helpText) +

{{ $helpText }}

+ @endif +
+
+@endif + + diff --git a/resources/views/components/input/money.blade.php b/resources/views/components/input/money.blade.php new file mode 100644 index 0000000..09b6785 --- /dev/null +++ b/resources/views/components/input/money.blade.php @@ -0,0 +1,25 @@ +{{-- +-- Important note: +-- +-- This template is based on an example from Tailwind UI, and is used here with permission from Tailwind Labs +-- for educational purposes only. Please do not use this template in your own projects without purchasing a +-- Tailwind UI license, or they’ll have to tighten up the licensing and you’ll ruin the fun for everyone. +-- +-- Purchase here: https://tailwindui.com/ +--}} + +
+
+ + $ + +
+ + + +
+ + USD + +
+
diff --git a/resources/views/components/input/quill.blade.php b/resources/views/components/input/quill.blade.php new file mode 100644 index 0000000..f326a7e --- /dev/null +++ b/resources/views/components/input/quill.blade.php @@ -0,0 +1,20 @@ + +
whereDoesntStartWith('wire:model') }} + wire:ignore +> +
+
+ + +@push('scripts') + +@endpush diff --git a/resources/views/components/input/rich-text.blade.php b/resources/views/components/input/rich-text.blade.php new file mode 100644 index 0000000..55deafc --- /dev/null +++ b/resources/views/components/input/rich-text.blade.php @@ -0,0 +1,24 @@ + +
+
+
+ + + +@push('styles') + +@endpush +@push('scripts') + +@endpush diff --git a/resources/views/components/input/select.blade.php b/resources/views/components/input/select.blade.php new file mode 100644 index 0000000..18be095 --- /dev/null +++ b/resources/views/components/input/select.blade.php @@ -0,0 +1,18 @@ +@props([ + 'placeholder' => null, + 'trailingAddOn' => null, +]) + +
+ + + @if ($trailingAddOn) + {{ $trailingAddOn }} + @endif +
diff --git a/resources/views/components/input/text.blade.php b/resources/views/components/input/text.blade.php new file mode 100644 index 0000000..4451f7f --- /dev/null +++ b/resources/views/components/input/text.blade.php @@ -0,0 +1,23 @@ +{{-- +-- Important note: +-- +-- This template is based on an example from Tailwind UI, and is used here with permission from Tailwind Labs +-- for educational purposes only. Please do not use this template in your own projects without purchasing a +-- Tailwind UI license, or they’ll have to tighten up the licensing and you’ll ruin the fun for everyone. +-- +-- Purchase here: https://tailwindui.com/ +--}} + +@props([ + 'leadingAddOn' => false, +]) + +
+ @if ($leadingAddOn) + + {{ $leadingAddOn }} + + @endif + + merge(['class' => 'flex-1 form-input border-cool-zinc-300 block w-full transition duration-150 ease-in-out sm:text-sm sm:leading-5' . ($leadingAddOn ? ' rounded-none rounded-r-md' : '')]) }}/> +
diff --git a/resources/views/components/input/textarea.blade.php b/resources/views/components/input/textarea.blade.php new file mode 100644 index 0000000..8ba3c55 --- /dev/null +++ b/resources/views/components/input/textarea.blade.php @@ -0,0 +1,3 @@ +
+ +
diff --git a/resources/views/components/input/tinymce.blade.php b/resources/views/components/input/tinymce.blade.php new file mode 100644 index 0000000..39ee91c --- /dev/null +++ b/resources/views/components/input/tinymce.blade.php @@ -0,0 +1,28 @@ + +
whereDoesntStartWith('wire:model') }} + wire:ignore +> + +
+ + +@push('scripts') + + +@endpush diff --git a/resources/views/components/label.blade.php b/resources/views/components/label.blade.php new file mode 100644 index 0000000..3ee1b9a --- /dev/null +++ b/resources/views/components/label.blade.php @@ -0,0 +1,18 @@ +@props(['for', 'value', 'required' => false, 'tooltip' => null]) + +@php + $requiredClasses = 'text-red-500'; + $requiredLabel = '*'; +@endphp + + diff --git a/resources/views/components/language-dropdown.blade.php b/resources/views/components/language-dropdown.blade.php new file mode 100644 index 0000000..95b4cda --- /dev/null +++ b/resources/views/components/language-dropdown.blade.php @@ -0,0 +1,47 @@ +
+ + + + {{ strtoupper(app()->getLocale()) }} + + + + @foreach (\App\Models\Language::all() as $language) + + {{ $language->name }} + + @endforeach + + +
+ +{{--
  • + + + @if (count($languages) > 1) + + @if (count($languages) > 1) + + @endif +
  • --}} diff --git a/resources/views/components/layouts/admin-menu.blade.php b/resources/views/components/layouts/admin-menu.blade.php index f55901d..8d69337 100644 --- a/resources/views/components/layouts/admin-menu.blade.php +++ b/resources/views/components/layouts/admin-menu.blade.php @@ -8,6 +8,9 @@ {{ __('Analytics') }} + + {{ __('Analytics') }} + {{ __('Utilisateurs') }} diff --git a/resources/views/components/loading-mask.blade.php b/resources/views/components/loading-mask.blade.php new file mode 100644 index 0000000..8c13ea7 --- /dev/null +++ b/resources/views/components/loading-mask.blade.php @@ -0,0 +1,52 @@ +@props([ + 'size' => 'lg', + 'class' => '', + 'sizing' => [ + 'sm' => 6, + 'md' => 10, + 'lg' => 14, + 'xl' => 24, + 'xxl' => 36, + ], +]) +
    +
    + + + + + + +
    +

    + LaravelMaroc +

    +
    +
    + +@push('styles') + +@endpush diff --git a/resources/views/components/loading.blade.php b/resources/views/components/loading.blade.php new file mode 100644 index 0000000..d0d9f84 --- /dev/null +++ b/resources/views/components/loading.blade.php @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/resources/views/components/loadingBrand.blade.php b/resources/views/components/loadingBrand.blade.php new file mode 100644 index 0000000..e301570 --- /dev/null +++ b/resources/views/components/loadingBrand.blade.php @@ -0,0 +1,7 @@ +
    +
    + + + +
    +
    diff --git a/resources/views/components/media-upload.blade.php b/resources/views/components/media-upload.blade.php new file mode 100644 index 0000000..beae5f0 --- /dev/null +++ b/resources/views/components/media-upload.blade.php @@ -0,0 +1,104 @@ +@props(['file', 'multiple' => false, 'single' => false, 'preview' => false]) + +
    + +
    diff --git a/resources/views/components/modal/card.blade.php b/resources/views/components/modal/card.blade.php new file mode 100644 index 0000000..a8c3bd7 --- /dev/null +++ b/resources/views/components/modal/card.blade.php @@ -0,0 +1,70 @@ +@props(['id', 'maxWidth']) + +@php +$id = $id ?? md5($attributes->wire('model')); + +$maxWidth = [ + 'sm' => 'sm:max-w-sm', + 'md' => 'sm:max-w-md', + 'lg' => 'sm:max-w-lg', + 'xl' => 'sm:max-w-xl', + '2xl' => 'sm:max-w-2xl', + '3xl' => 'sm:max-w-3xl', + '4xl' => 'sm:max-w-4xl', + '5xl' => 'sm:max-w-5xl', +][$maxWidth ?? '2xl'] ?? 'sm:max-w-2xl'; +@endphp + + diff --git a/resources/views/components/modal/confirmation.blade.php b/resources/views/components/modal/confirmation.blade.php new file mode 100644 index 0000000..5c993ea --- /dev/null +++ b/resources/views/components/modal/confirmation.blade.php @@ -0,0 +1,27 @@ +@props(['id' => null, 'maxWidth' => null]) + + +
    +
    +
    + + + +
    + +
    +

    + {{ $title }} +

    + +
    + {{ $content }} +
    +
    +
    +
    + +
    + {{ $footer }} +
    +
    diff --git a/resources/views/components/modal/dialog.blade.php b/resources/views/components/modal/dialog.blade.php new file mode 100644 index 0000000..e72494d --- /dev/null +++ b/resources/views/components/modal/dialog.blade.php @@ -0,0 +1,27 @@ +@props(['id' => null, 'maxWidth' => null]) + + +
    +
    +
    + + + +
    + +
    +

    + {{ $title }} +

    + +
    + {{ $content }} +
    +
    +
    +
    + +
    + {{ $footer }} +
    +
    diff --git a/resources/views/components/navbar.blade.php b/resources/views/components/navbar.blade.php new file mode 100644 index 0000000..c8d5219 --- /dev/null +++ b/resources/views/components/navbar.blade.php @@ -0,0 +1,116 @@ + + + +@push('scripts') + +@endpush diff --git a/resources/views/components/navigation/desktop.blade.php b/resources/views/components/navigation/desktop.blade.php new file mode 100644 index 0000000..3aaa692 --- /dev/null +++ b/resources/views/components/navigation/desktop.blade.php @@ -0,0 +1,16 @@ + diff --git a/resources/views/components/navigation/mobile.blade.php b/resources/views/components/navigation/mobile.blade.php new file mode 100644 index 0000000..de6e3f7 --- /dev/null +++ b/resources/views/components/navigation/mobile.blade.php @@ -0,0 +1,27 @@ + diff --git a/resources/views/components/perfect-scrollbar.blade.php b/resources/views/components/perfect-scrollbar.blade.php new file mode 100644 index 0000000..600a18b --- /dev/null +++ b/resources/views/components/perfect-scrollbar.blade.php @@ -0,0 +1,27 @@ +@props(['as' => 'div']) + + +<{{ $as }} x-data="perfectScroll" {{ $attributes->merge(['class' => 'relative max-h-full']) }} @mousemove="update"> + {{ $slot }} + + + \ No newline at end of file diff --git a/resources/views/components/picture.blade.php b/resources/views/components/picture.blade.php new file mode 100644 index 0000000..c27b964 --- /dev/null +++ b/resources/views/components/picture.blade.php @@ -0,0 +1,14 @@ + +@if (isset($sizes)) +@foreach($sizes as $minWidth => $size) + +@endforeach +@endif + + {{ $alt }} + diff --git a/resources/views/components/primary-button.blade.php b/resources/views/components/primary-button.blade.php new file mode 100644 index 0000000..8f18773 --- /dev/null +++ b/resources/views/components/primary-button.blade.php @@ -0,0 +1,3 @@ + diff --git a/resources/views/components/responsive-nav-link.blade.php b/resources/views/components/responsive-nav-link.blade.php new file mode 100644 index 0000000..02bb527 --- /dev/null +++ b/resources/views/components/responsive-nav-link.blade.php @@ -0,0 +1,11 @@ +@props(['active']) + +@php +$classes = ($active ?? false) + ? 'block pl-3 pr-4 py-2 border-l-4 border-indigo-400 text-base font-medium text-indigo-700 bg-indigo-50 focus:outline-none focus:text-indigo-800 focus:bg-indigo-100 focus:border-indigo-700 transition duration-150 ease-in-out' + : 'block pl-3 pr-4 py-2 border-l-4 border-transparent text-base font-medium text-gray-600 hover:text-gray-800 hover:bg-gray-50 hover:border-gray-300 focus:outline-none focus:text-gray-800 focus:bg-gray-50 focus:border-gray-300 transition duration-150 ease-in-out'; +@endphp + +merge(['class' => $classes]) }}> + {{ $slot }} + diff --git a/resources/views/components/search.blade.php b/resources/views/components/search.blade.php new file mode 100644 index 0000000..874f66e --- /dev/null +++ b/resources/views/components/search.blade.php @@ -0,0 +1,39 @@ +
    +
    + + + +
    + @if (!empty($search)) +
    +
      + @forelse ($results as $blog) +
    • + + +
      +

      {{ $blog->name }}

      +
      +
      +
    • + @empty +
    • {{ __('No results found for') }} + "{{ $search }}" +
    • + @endforelse +
    +
    + @endif +
    diff --git a/resources/views/components/secondary-button.blade.php b/resources/views/components/secondary-button.blade.php new file mode 100644 index 0000000..38e2250 --- /dev/null +++ b/resources/views/components/secondary-button.blade.php @@ -0,0 +1,4 @@ +{{-- todo --}} + diff --git a/resources/views/components/select-list.blade.php b/resources/views/components/select-list.blade.php new file mode 100644 index 0000000..bc25499 --- /dev/null +++ b/resources/views/components/select-list.blade.php @@ -0,0 +1,58 @@ +
    + + @if(!isset($attributes['multiple'])) + + @endif + @foreach($options as $key => $value) + + @endforeach + +
    + + +@push('scripts') + +@endpush diff --git a/resources/views/components/select.blade.php b/resources/views/components/select.blade.php new file mode 100644 index 0000000..8b61174 --- /dev/null +++ b/resources/views/components/select.blade.php @@ -0,0 +1,32 @@ +@props(['options', 'name', 'label', 'value', 'placeholder' => 'Select an option', 'required' => false, 'disabled' => false, 'multiple' => false, 'error' => false]) + +@php + $id = Str::random(10); +@endphp + +
    + + + @if($error) +

    {{ $error }}

    + @endif +
    \ No newline at end of file diff --git a/resources/views/components/select2.blade.php b/resources/views/components/select2.blade.php new file mode 100644 index 0000000..4559d11 --- /dev/null +++ b/resources/views/components/select2.blade.php @@ -0,0 +1,33 @@ +
    +
    + +
    +
    + + +@push('scripts') + +@endpush diff --git a/resources/views/components/sidebar-item.blade.php b/resources/views/components/sidebar-item.blade.php new file mode 100644 index 0000000..05f3001 --- /dev/null +++ b/resources/views/components/sidebar-item.blade.php @@ -0,0 +1,15 @@ +@props([ + 'key', + 'name', + 'tab', + 'icon' +]) + + + +{{ $name ?? \Illuminate\Support\Str::headline($key) }} + \ No newline at end of file diff --git a/resources/views/components/sidebar/content.blade.php b/resources/views/components/sidebar/content.blade.php new file mode 100644 index 0000000..3ca15dd --- /dev/null +++ b/resources/views/components/sidebar/content.blade.php @@ -0,0 +1,106 @@ + + + + + + + + + + + {{-- @can('user_access') --}} + + + + + + + + + + + + + {{-- @endcan --}} + + + + + + + + + {{-- @can('blog_access') --}} + + + {{-- @endcan --}} + + {{-- --}} + + + + + + + + + + + + {{-- @can('user_access') --}} + + {{-- @endcan --}} + {{-- @can('role_access') --}} + {{-- --}} + {{-- @endcan --}} + {{-- @can('permission_access') --}} + {{-- --}} + {{-- @endcan --}} + {{-- @can('setting_access') --}} + + + + {{-- @endcan --}} + {{-- --}} + + + + + + + + + + + + + + + diff --git a/resources/views/components/sidebar/dropdown.blade.php b/resources/views/components/sidebar/dropdown.blade.php new file mode 100644 index 0000000..483b823 --- /dev/null +++ b/resources/views/components/sidebar/dropdown.blade.php @@ -0,0 +1,22 @@ +@props(['active' => false, 'title' => '']) + +
    + + @if ($icon ?? false) + + {{ $icon }} + + @endif + @if ($add ?? false) + + {{ $add }} + + @endif + + +
    +
      + {{ $slot }} +
    +
    +
    \ No newline at end of file diff --git a/resources/views/components/sidebar/footer.blade.php b/resources/views/components/sidebar/footer.blade.php new file mode 100644 index 0000000..f7ecde5 --- /dev/null +++ b/resources/views/components/sidebar/footer.blade.php @@ -0,0 +1,13 @@ +
    + + + + +
    \ No newline at end of file diff --git a/resources/views/components/sidebar/header.blade.php b/resources/views/components/sidebar/header.blade.php new file mode 100644 index 0000000..35416a3 --- /dev/null +++ b/resources/views/components/sidebar/header.blade.php @@ -0,0 +1,9 @@ + diff --git a/resources/views/components/sidebar/link.blade.php b/resources/views/components/sidebar/link.blade.php new file mode 100644 index 0000000..75d4d16 --- /dev/null +++ b/resources/views/components/sidebar/link.blade.php @@ -0,0 +1,55 @@ +@props(['isActive' => false, 'title' => '', 'collapsible' => false]) + +@php +$isActiveClasses = $isActive ? 'bg-indigo-500 text-white active:bg-indigo-500' : 'text-white hover:text-indigo-500 hover:bg-gray-100 dark:hover:text-gray-300 dark:hover:bg-dark-eval-2'; +$classes = 'flex items-center hover:text-white hover:bg-indigo-500 pl-3 py-3 pr-4 rounded ' . $isActiveClasses; +if ($collapsible) { + $classes .= ' w-full'; +} +@endphp + +@if ($collapsible) + + + @if ($add ?? false) + {{ $add }} + @endif +@else + merge(['class' => $classes]) }}> + @if ($icon ?? false) + {{ $icon }} + @else + + + @endif + + + {{ $title }} + + + + + @if ($add ?? false) + {{ $add }} + @endif +@endif diff --git a/resources/views/components/sidebar/overlay.blade.php b/resources/views/components/sidebar/overlay.blade.php new file mode 100644 index 0000000..e6025b1 --- /dev/null +++ b/resources/views/components/sidebar/overlay.blade.php @@ -0,0 +1,11 @@ +
    \ No newline at end of file diff --git a/resources/views/components/sidebar/sidebar.blade.php b/resources/views/components/sidebar/sidebar.blade.php new file mode 100644 index 0000000..13fd2e4 --- /dev/null +++ b/resources/views/components/sidebar/sidebar.blade.php @@ -0,0 +1,16 @@ + + + diff --git a/resources/views/components/sidebar/sublink.blade.php b/resources/views/components/sidebar/sublink.blade.php new file mode 100644 index 0000000..3399972 --- /dev/null +++ b/resources/views/components/sidebar/sublink.blade.php @@ -0,0 +1,13 @@ +@props(['title' => '', 'active' => false]) + +@php + +$classes = 'transition-colors hover:text-gray-900'; +$active + ? $classes .= ' text-gray-200' + : $classes .= ' text-white'; +@endphp + +
  • + merge(['class' => $classes]) }}>{{ $title }} +
  • \ No newline at end of file diff --git a/resources/views/components/sort/sort-field.blade.php b/resources/views/components/sort/sort-field.blade.php new file mode 100644 index 0000000..4b08be8 --- /dev/null +++ b/resources/views/components/sort/sort-field.blade.php @@ -0,0 +1,48 @@ +# Create a sort-field like sort in resources/views/components/table/sort.blade.php: +#
    +# +# +#
    +# +# Create a sort-field like sort in resources/views/components/sort/sort-field.blade.php: + +# # Path: resources/views/components/sort/sort-field.blade.php +#
    +#
    +# +# +# +# +#
    +#
    +# +# +# +#
    +#
    +# +# Compare this snippet from resources/views/components/table/sort.blade.php: + +@props(['field', 'direction']) +@if($direction === 'asc') + +@elseif($direction === 'desc') + +@else + +@endif + + diff --git a/resources/views/components/spinner/code/black.blade.php b/resources/views/components/spinner/code/black.blade.php new file mode 100644 index 0000000..7b4a5a2 --- /dev/null +++ b/resources/views/components/spinner/code/black.blade.php @@ -0,0 +1,4 @@ + + + + diff --git a/resources/views/components/spinner/code/white.blade.php b/resources/views/components/spinner/code/white.blade.php new file mode 100644 index 0000000..bf506db --- /dev/null +++ b/resources/views/components/spinner/code/white.blade.php @@ -0,0 +1,4 @@ + + + + diff --git a/resources/views/components/spinner/image/black.blade.php b/resources/views/components/spinner/image/black.blade.php new file mode 100644 index 0000000..db3ff09 --- /dev/null +++ b/resources/views/components/spinner/image/black.blade.php @@ -0,0 +1 @@ + diff --git a/resources/views/components/spinner/image/white.blade.php b/resources/views/components/spinner/image/white.blade.php new file mode 100644 index 0000000..e588746 --- /dev/null +++ b/resources/views/components/spinner/image/white.blade.php @@ -0,0 +1 @@ + diff --git a/resources/views/components/spinner/index.blade.php b/resources/views/components/spinner/index.blade.php new file mode 100644 index 0000000..084a332 --- /dev/null +++ b/resources/views/components/spinner/index.blade.php @@ -0,0 +1,17 @@ +@props(['type' => 'white', 'is_image' => false]) + +merge([]) }}> + @if ($type === 'white') + @if ($is_image) + + @else + + @endif + @else + @if ($is_image) + + @else + + @endif + @endif + diff --git a/resources/views/components/tab.blade.php b/resources/views/components/tab.blade.php new file mode 100644 index 0000000..d9dab9e --- /dev/null +++ b/resources/views/components/tab.blade.php @@ -0,0 +1,10 @@ +@props(['name']) + +
    + {{ $slot }} +
    \ No newline at end of file diff --git a/resources/views/components/table-responsive.blade.php b/resources/views/components/table-responsive.blade.php new file mode 100644 index 0000000..dcbd075 --- /dev/null +++ b/resources/views/components/table-responsive.blade.php @@ -0,0 +1,7 @@ +
    + merge(['class' => 'table-auto min-w-full']) }}> + + {{ $slot }} + +
    +
    diff --git a/resources/views/components/table.blade.php b/resources/views/components/table.blade.php new file mode 100644 index 0000000..d1c845d --- /dev/null +++ b/resources/views/components/table.blade.php @@ -0,0 +1,15 @@ +@php + $tableClasses = ' table-auto w-full '; +@endphp + +
    + + merge(['class' => $tableClasses]) }}> + + {{ $thead }} + + + {{ $slot }} + +
    +
    diff --git a/resources/views/components/table/cell.blade.php b/resources/views/components/table/cell.blade.php new file mode 100644 index 0000000..4a50165 --- /dev/null +++ b/resources/views/components/table/cell.blade.php @@ -0,0 +1,11 @@ +@props([ + 'padding' => null, + 'wrap' => 'whitespace-nowrap', +]) + +@php + $padding = $padding ?? 'px-4 py-4'; +@endphp +merge(['class' => "{$padding} {$wrap} text-sm"]) }}> + {{ $slot }} + diff --git a/resources/views/components/table/checkbox.blade.php b/resources/views/components/table/checkbox.blade.php new file mode 100644 index 0000000..55b7cd0 --- /dev/null +++ b/resources/views/components/table/checkbox.blade.php @@ -0,0 +1,4 @@ +
    + + {{ $label }} +
    diff --git a/resources/views/components/table/heading.blade.php b/resources/views/components/table/heading.blade.php new file mode 100644 index 0000000..1390309 --- /dev/null +++ b/resources/views/components/table/heading.blade.php @@ -0,0 +1,47 @@ + +@props([ + 'sortable' => null, + 'direction' => null, + 'multiColumn' => null, +]) + +@php + $hover = $sortable ? 'hover:bg-brand-300/50 dark:hover:bg-indigo-500/25' : ''; +@endphp + +merge(['class' => "px-6 py-4 {$hover}"]) }} +> + @unless ($sortable) + {{ $slot }} + @else + + @endif + diff --git a/resources/views/components/table/row.blade.php b/resources/views/components/table/row.blade.php new file mode 100644 index 0000000..91fdce4 --- /dev/null +++ b/resources/views/components/table/row.blade.php @@ -0,0 +1,13 @@ +@props([ + 'tableRowclass' => null, + 'hasDivider' => false, + 'divider' => 'divide-x divide-slate-100' +]) + +@php + $divider = $hasDivider ? $divider : ''; +@endphp + +merge(['class' => "hover:bg-indigo-50 dark:hover:bg-indigo-500/25 {$divider}"]) }}> + {{ $slot }} + diff --git a/resources/views/components/table/sort.blade.php b/resources/views/components/table/sort.blade.php new file mode 100644 index 0000000..e2ffcf1 --- /dev/null +++ b/resources/views/components/table/sort.blade.php @@ -0,0 +1,9 @@ +@if(in_array($field, $orderable)) + @if($sortBy !== $field) + + @elseif($sortBy === $field && $sortDirection == 'desc') + + @else + + @endif +@endif \ No newline at end of file diff --git a/resources/views/components/table/tbody.blade.php b/resources/views/components/table/tbody.blade.php new file mode 100644 index 0000000..9411136 --- /dev/null +++ b/resources/views/components/table/tbody.blade.php @@ -0,0 +1,9 @@ +merge([ 'class' => 'divide-y divide-zinc-200' ]) }}> + {{ $slot }} + + @if(isset($tfootSlot)) + + {{ $tfootSlot }} + + @endif + diff --git a/resources/views/components/table/td.blade.php b/resources/views/components/table/td.blade.php new file mode 100644 index 0000000..c5ef8ac --- /dev/null +++ b/resources/views/components/table/td.blade.php @@ -0,0 +1,5 @@ +merge([ + 'class' => 'p-2 text-left text-gray-800', +]) }}> + {{ $slot }} + \ No newline at end of file diff --git a/resources/views/components/table/tfoot.blade.php b/resources/views/components/table/tfoot.blade.php new file mode 100644 index 0000000..e7a91d7 --- /dev/null +++ b/resources/views/components/table/tfoot.blade.php @@ -0,0 +1,3 @@ + + {{ $slot }} + diff --git a/resources/views/components/table/th.blade.php b/resources/views/components/table/th.blade.php new file mode 100644 index 0000000..122f43d --- /dev/null +++ b/resources/views/components/table/th.blade.php @@ -0,0 +1,42 @@ +@props([ + 'sortable' => null, + 'direction' => null, + 'multiColumn' => null, +]) + +merge(['class' => 'p-3 text-left text-xs font-medium uppercase tracking-wider bg-gray-100 text-black'])->only('class') }} +> + @unless ($sortable) + {{ $slot }} + @else + + @endif + diff --git a/resources/views/components/table/thead.blade.php b/resources/views/components/table/thead.blade.php new file mode 100644 index 0000000..376741c --- /dev/null +++ b/resources/views/components/table/thead.blade.php @@ -0,0 +1,5 @@ + + + {{ $slot }} + + \ No newline at end of file diff --git a/resources/views/components/table/tr.blade.php b/resources/views/components/table/tr.blade.php new file mode 100644 index 0000000..9c20e3c --- /dev/null +++ b/resources/views/components/table/tr.blade.php @@ -0,0 +1,6 @@ +merge([ + 'class' => 'border-b border-blue-50 whitespace-nowrap text-sm text-gray-800', + ]) }}> + {{ $slot }} + diff --git a/resources/views/components/tabs.blade.php b/resources/views/components/tabs.blade.php new file mode 100644 index 0000000..98a20c5 --- /dev/null +++ b/resources/views/components/tabs.blade.php @@ -0,0 +1,57 @@ +@props(['active']) + +
    +
    + +
    + {{ $slot }} +
    + + + \ No newline at end of file diff --git a/resources/views/components/text-input.blade.php b/resources/views/components/text-input.blade.php new file mode 100644 index 0000000..d6d857b --- /dev/null +++ b/resources/views/components/text-input.blade.php @@ -0,0 +1,3 @@ +@props(['disabled' => false]) + +merge(['class' => 'rounded-md shadow-sm border-gray-300 focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50']) !!}> diff --git a/resources/views/components/toggle-switch.blade.php b/resources/views/components/toggle-switch.blade.php new file mode 100644 index 0000000..97848be --- /dev/null +++ b/resources/views/components/toggle-switch.blade.php @@ -0,0 +1,4 @@ +
    + merge(['class'=>"toggle-checkbox absolute block w-6 h-6 rounded-full bg-white border-4 appearance-none cursor-pointer"])}}/> + +
    \ No newline at end of file diff --git a/resources/views/components/topheader.blade.php b/resources/views/components/topheader.blade.php new file mode 100644 index 0000000..e598e23 --- /dev/null +++ b/resources/views/components/topheader.blade.php @@ -0,0 +1,56 @@ +
    +
    +

    + LaravelMaroc +

    + @if (Auth::check()) + + +
    + {{ Auth::user()->name }} +
    +
    + + + {{-- if admin show dashboard and settings else show logout --}} + @if (Auth::user()->isAdmin()) + + {{ __('Dashboard') }} + + + + {{ __('Settings') }} + + @else + + {{ __('My account') }} + + @endif + +
    + + +
    + @csrf + + {{ __('Log Out') }} + +
    +
    +
    + @else + + @endif +
    +
    diff --git a/resources/views/components/trix.blade.php b/resources/views/components/trix.blade.php new file mode 100644 index 0000000..e772ce3 --- /dev/null +++ b/resources/views/components/trix.blade.php @@ -0,0 +1,70 @@ +@props([ + 'label' => '', + 'name' => '', +]) + +@php + $id = $name ? str_replace(' ', '', $name) : uniqid(); +@endphp + +
    + @if ($label) + + @endif + +
    + +
    + + @error($name) + {{ $message }} + @enderror +
    + +{{-- +@push('scripts') + +@endpush --}} \ No newline at end of file diff --git a/resources/views/components/unsplash.blade.php b/resources/views/components/unsplash.blade.php new file mode 100644 index 0000000..a6808e4 --- /dev/null +++ b/resources/views/components/unsplash.blade.php @@ -0,0 +1,3 @@ +
    + @livewire('unsplash') +
    \ No newline at end of file diff --git a/resources/views/components/upload.blade.php b/resources/views/components/upload.blade.php new file mode 100644 index 0000000..0dc8952 --- /dev/null +++ b/resources/views/components/upload.blade.php @@ -0,0 +1,31 @@ + + + + + diff --git a/resources/views/components/whatsapp.blade.php b/resources/views/components/whatsapp.blade.php new file mode 100644 index 0000000..f3a7ac0 --- /dev/null +++ b/resources/views/components/whatsapp.blade.php @@ -0,0 +1,27 @@ +@php + $phone = Helpers::settings('social_whatsapp'); + + // Delete the leading zero from the phone number, if it exists. + if (strpos($phone, '0') === 0) { + $phone = substr($phone, 1); + } + + $greeting = 'Salam,'; + + $message = "J'ai une Question/Demande d'nformation"; + // Construct the message text. + $message = "$greeting $message"; + + // Encode the message text for use in the URL. + $message = urlencode($message); + + // Construct the WhatsApp API endpoint URL. + $url = "https://api.whatsapp.com/send?phone=+212$phone&text=$message"; +@endphp + + + diff --git a/resources/views/livewire/language/create.blade.php b/resources/views/livewire/language/create.blade.php new file mode 100644 index 0000000..44e845b --- /dev/null +++ b/resources/views/livewire/language/create.blade.php @@ -0,0 +1,28 @@ +
    + + + {{ __('Create Language') }} + + +
    +
    +
    + + + +
    +
    + + + +
    +
    + + {{ __('Save') }} + +
    +
    +
    +
    +
    +
    diff --git a/resources/views/livewire/language/edit-translation.blade.php b/resources/views/livewire/language/edit-translation.blade.php new file mode 100644 index 0000000..ac9f02d --- /dev/null +++ b/resources/views/livewire/language/edit-translation.blade.php @@ -0,0 +1,35 @@ +
    +
    +

    + {{ $language->name }} +

    + + {{__('update translations')}} + +
    + + + {{__('System')}} + {{__('Translation')}} + {{__('Action')}} + + + @foreach($translations as $key => $translation) + + +

    {{ $key }}

    +
    + + + + + {{-- + + --}} + +
    + @endforeach +
    +
    +
    diff --git a/resources/views/livewire/language/edit.blade.php b/resources/views/livewire/language/edit.blade.php new file mode 100644 index 0000000..c72971f --- /dev/null +++ b/resources/views/livewire/language/edit.blade.php @@ -0,0 +1,28 @@ +
    + + + {{ __('Update language') }} + + +
    +
    +
    + + + +
    +
    + + + +
    +
    + + {{ __('Save') }} + +
    +
    +
    +
    +
    +
    diff --git a/resources/views/livewire/language/index.blade.php b/resources/views/livewire/language/index.blade.php new file mode 100644 index 0000000..3b4f44a --- /dev/null +++ b/resources/views/livewire/language/index.blade.php @@ -0,0 +1,93 @@ +
    + + + # + {{ __('Language') }} + {{ __('Status') }} + {{ __('Default') }} + {{ __('Actions') }} + + + @forelse ($languages as $language) + + # + {{ $language['name'] }} + + @if ($language['status'] == true) + + {{ __('Active') }} + + @elseif($language['status'] == false) + + {{ __('Inactive') }} + + @endif + + + @if ($language['is_default'] == true) + + {{ __('Yes') }} + + @endif + + + @if ($language['is_default'] == false) + + {{ __('Set as Default') }} + @endif + + + {{ __('Sync') }} + + + + {{__('Translate')}} + + + + + + + + + + + + @empty + + {{ __('No record found') }} + + @endforelse + + + + + @livewire('admin.language.create') + + + @livewire('admin.language.edit', ['language' => $language]) + +
    + + +@push('scripts') + +@endpush diff --git a/resources/views/livewire/menu/index.blade.php b/resources/views/livewire/menu/index.blade.php new file mode 100644 index 0000000..736c9b7 --- /dev/null +++ b/resources/views/livewire/menu/index.blade.php @@ -0,0 +1,320 @@ +
    +
    +
    +
    +

    + {{ __('Menu') }} +

    + +
    +
    +
    + + +
    +
    + + {{ __('Add Predefined Menu') }} + + + +
    +
    +
    + + + +
    +
    + + + +
    +
    + + + +
    +
    + + + +
    + +
    + + + +
    + +
    + + + +
    + +
    + + + +
    + + +
    + + {{ __('Create') }} + +
    +
    +
    +
    +
    +
    + @foreach (\App\Enums\MenuPlacement::cases() as $case) + + {{ __($case->name) }} + + @endforeach + + Clear + +
    +
    + @forelse($menus as $index => $menu) +
    +
    +
    +
    + +
    + +
    + + +
    + +
    +
    +
    +
    + + + +
    +
    + + + +
    +
    + + + +
    + +
    + + + +
    + +
    + +
    + +
    + +
    +
    +
    +
      + @foreach ($links as $link) +
    • + +
    • + @endforeach +
    +
    + +
    + +
    + + + +
    + +
    + + + +
    +

    + + {{ __('Edit') }} + +

    +
    +
    +
    +
    + @empty +

    {{ __('No menus found') }}.

    + @endforelse +
    +
    + +
    diff --git a/resources/views/livewire/menu/settings.blade.php b/resources/views/livewire/menu/settings.blade.php new file mode 100644 index 0000000..b2b426d --- /dev/null +++ b/resources/views/livewire/menu/settings.blade.php @@ -0,0 +1,3 @@ +
    + {{-- Because she competes with no one, no one can compete with her. --}} +
    diff --git a/resources/views/livewire/project/create.blade.php b/resources/views/livewire/project/create.blade.php new file mode 100644 index 0000000..4dcd966 --- /dev/null +++ b/resources/views/livewire/project/create.blade.php @@ -0,0 +1,108 @@ +
    + + + + {{ __('Create Project') }} + + + + + + +
    +
    +
    + + + {{-- --}} +
    + +
    + + + +
    +
    + + + +
    + +
    + + + +
    + +
    + + + +
    + +
    + + + +
    +
    + + + +

    + {{ __('Upload 710X400 (Pixel) Size image for best quality. Only jpg, jpeg, png image is allowed.') }} +

    +
    +
    + + + +

    + {{ __('Upload 710X400 (Pixel) Size image for best quality. Only jpg, jpeg, png image is allowed.') }} +

    +
    + +
    + + + +
    +
    + + + +
    +
    + +
    + + {{ __('Save') }} + +
    +
    +
    +
    +
    diff --git a/resources/views/livewire/project/edit.blade.php b/resources/views/livewire/project/edit.blade.php new file mode 100644 index 0000000..fd1dab5 --- /dev/null +++ b/resources/views/livewire/project/edit.blade.php @@ -0,0 +1,107 @@ +
    + + + + {{ __('Edit Project') }} + + + + + + +
    +
    +
    + + + +
    + +
    + + + +
    +
    + + + +
    + +
    + + + +
    + +
    + + + +
    +
    + + + +
    +
    + + + +
    +
    + +
    + + + +
    + +
    + + + +

    + {{ __('Upload 710X400 (Pixel) Size image for best quality. Only jpg, jpeg, png image is allowed.') }} +

    +
    + +
    + + + +

    + {{ __('Upload 710X400 (Pixel) Size image for best quality. Only jpg, jpeg, png image is allowed.') }} +

    +
    + + + +
    + + {{ __('Save') }} + +
    +
    +
    +
    +
    diff --git a/resources/views/livewire/project/index.blade.php b/resources/views/livewire/project/index.blade.php new file mode 100644 index 0000000..8afb0ab --- /dev/null +++ b/resources/views/livewire/project/index.blade.php @@ -0,0 +1,222 @@ +
    + @section('title', __('Projects')) +
    +
    +
    +

    + {{ __('Projects') }} +

    + +
    +
    + + + + {{ __('Create Project') }} + +
    +
    +
    + + + +
    +
    +
    +

    + {{ __('Show items per page') }} +

    + +
    + @if ($this->selected) + + + + @endif + @if ($this->selectedCount) +

    + + {{ $this->selectedCount }} + + {{ __('Entries selected') }} +

    + @endif +
    +
    +
    + +
    +
    +
    + + + + # + {{-- + {{ __('Title') }} + @include('components.table.sort', ['field' => 'title']) + --}} + + {{ __('Language') }} + + + {{ __('Title') }} + @include('components.table.sort', ['field' => 'title']) + + + {{ __('Service') }} + + + {{ __('Status') }} + + + {{ __('Action') }} + + + + @forelse($projects as $project) + + +
    + +
    + {{-- --}} +
    + + + + + + {{ $project->title }} + + + @if (empty($project->service_id)) + {{ __('No relation') }} + @else + {{ $project->service->title }} + @endif + + + + + +
    + + + + + +
    +
    +
    + + +
    +

    {{ $project->title }}

    +

    {!! $project->content !!}

    +

    {{ $project->link }}

    +

    {{ $project->meta_keywords }}

    +

    {{ $project->meta_description }}

    +
    + @if (empty($project->gallery)) + {{ __('No images') }} + @else + @php + $images = explode(',', $project->gallery); + @endphp + @foreach ($images as $image) + + @endforeach + @endif +
    +
    + + + @empty + + + {{ __('No entries found.') }} + + + @endforelse +
    +
    + +
    +
    + @if ($this->selectedCount) +

    + + {{ $this->selectedCount }} + + {{ __('Entries selected') }} +

    + @endif + {{ $projects->links() }} +
    +
    +
    + + @livewire('admin.project.edit', [$project]) + + @livewire('admin.project.create') +
    diff --git a/resources/views/livewire/redirects.blade.php b/resources/views/livewire/redirects.blade.php new file mode 100644 index 0000000..4da023c --- /dev/null +++ b/resources/views/livewire/redirects.blade.php @@ -0,0 +1,162 @@ +
    +
    +
    +
    + + + @if ($this->selectedCount) +

    + + {{ $this->selectedCount }} + + {{ __('Entries selected') }} +

    + @endif +
    +
    +
    +
    + +
    +
    +
    + + + + # + + {{ __('Old url') }} + + + {{ __('New url') }} + + + {{ __('Created at') }} + + + {{ __('Updated at') }} + + + {{ __('Status') }} + + + {{ __('Actions') }} + + + + @forelse($redirects as $redirect) + + + + + + {{ $redirect->old_url }} + + + {{ $redirect->new_url }} + + + {{ $redirect->created_at->format('d/m/Y') }} + + + {{ $redirect->updated_at->format('d/m/Y') }} + + + + + + +
    + + + + + + +
    +
    +
    + @empty + + + {{ __('No entries found.') }} + + + @endforelse +
    +
    + +
    +
    + {{ $redirects->links() }} +
    +
    + + + + {{ __('Edit Redirect') }} + + + + + + +
    +
    + + +
    + + + +
    +
    + + + +
    + +
    + + {{ __('Save') }} + +
    +
    +
    +
    +
    +
    + +@push('scripts') + +@endpush diff --git a/resources/views/livewire/utils/modal.blade.php b/resources/views/livewire/utils/modal.blade.php new file mode 100644 index 0000000..0a83d93 --- /dev/null +++ b/resources/views/livewire/utils/modal.blade.php @@ -0,0 +1,38 @@ + diff --git a/resources/views/livewire/utils/sidebar.blade.php b/resources/views/livewire/utils/sidebar.blade.php new file mode 100644 index 0000000..6c50129 --- /dev/null +++ b/resources/views/livewire/utils/sidebar.blade.php @@ -0,0 +1,19 @@ +
    + + + + +
    diff --git a/resources/views/livewire/utils/toggle-button.blade.php b/resources/views/livewire/utils/toggle-button.blade.php new file mode 100644 index 0000000..62f46fa --- /dev/null +++ b/resources/views/livewire/utils/toggle-button.blade.php @@ -0,0 +1,5 @@ +
    + +
    + + \ No newline at end of file diff --git a/routes/cpanel.php b/routes/cpanel.php index 37ae454..54482d2 100644 --- a/routes/cpanel.php +++ b/routes/cpanel.php @@ -4,10 +4,26 @@ use App\Http\Controllers\Cpanel; use Illuminate\Support\Facades\Route; +use App\Http\Livewire\Admin\Project\Index as ProjectIndex; +use App\Http\Livewire\Admin\Menu\Index as MenuIndex; +use App\Http\Livewire\Admin\Language\Index as LanguageIndex; +use App\Http\Livewire\Admin\Redirect\Index as RedirectIndex; +use App\Http\Livewire\Admin\Language\EditTranslation; + Route::redirect('/', 'cpanel/home'); Route::get('/home', Cpanel\DashboardController::class)->name('home'); Route::get('/analytics', Cpanel\AnalyticsController::class)->name('analytics'); + +Route::get('/language', LanguageIndex::class)->name('language'); +Route::get('/translation/{code}', EditTranslation::class)->name('translation'); + +Route::get('/redirects', RedirectIndex::class)->name('setting.redirects'); + +Route::get('/menu-settings', MenuIndex::class)->name('menu-settings.index'); + +Route::get('projects', ProjectIndex::class)->name('projects.index'); + Route::prefix('users')->as('users.')->group(function (): void { Route::get('/', Cpanel\UserController::class)->name('browse'); }); diff --git a/routes/web.php b/routes/web.php index d6241f8..be48244 100644 --- a/routes/web.php +++ b/routes/web.php @@ -108,3 +108,5 @@ Route::get('sponsors', [SponsoringController::class, 'sponsors'])->name('sponsors'); Route::get('callback-payment', NotchPayCallBackController::class)->name('notchpay-callback'); + +require __DIR__.'/cpanel.php'; From eb16d556f9e8e67c2e7c759da6dd84f4184d95a0 Mon Sep 17 00:00:00 2001 From: Zakarialabib Date: Sun, 6 Aug 2023 15:05:28 +0000 Subject: [PATCH 2/8] Fix code styling --- app/Enums/MenuPlacement.php | 3 +- app/Enums/MenuType.php | 3 +- app/Http/Livewire/Language/Create.php | 6 +- app/Http/Livewire/Language/Edit.php | 6 +- .../Livewire/Language/EditTranslation.php | 6 +- app/Http/Livewire/Language/Index.php | 10 ++-- app/Http/Livewire/Menu/Index.php | 50 ++++++++--------- app/Http/Livewire/Menu/Settings.php | 2 +- app/Http/Livewire/Project/Create.php | 10 ++-- app/Http/Livewire/Project/Edit.php | 10 ++-- app/Http/Livewire/Project/Index.php | 30 +++++----- app/Http/Livewire/Redirects.php | 16 +++--- app/Http/Livewire/Utils/Modal.php | 4 +- app/Http/Livewire/Utils/Notifications.php | 8 +-- app/Http/Livewire/Utils/Sidebar.php | 2 +- app/Http/Livewire/Utils/ToggleButton.php | 6 +- app/Http/Livewire/Utils/WithSorting.php | 4 +- app/Support/FilterQueryBuilder.php | 16 +++--- app/Support/Helpers.php | 12 +--- app/View/Components/AppLayout.php | 2 +- app/View/Components/Card.php | 2 +- app/View/Components/Content.php | 2 +- app/View/Components/DashboardLayout.php | 2 +- app/View/Components/DatePicker.php | 2 +- app/View/Components/Dropzone.php | 2 +- app/View/Components/Footer.php | 2 +- app/View/Components/GuestLayout.php | 2 +- app/View/Components/Header.php | 2 +- app/View/Components/Select2.php | 2 +- app/View/Components/SelectList.php | 2 +- app/View/Components/Sidebar.php | 2 +- app/View/Components/Table.php | 2 +- app/View/Components/ToggleButton.php | 2 +- app/helpers.php | 34 ++++++------ ...22_10_23_150306_create_languages_table.php | 6 +- ...022_10_24_150653_create_projects_table.php | 6 +- ...23_01_24_213944_create_redirects_table.php | 6 +- .../2023_06_21_134012_create_menus_table.php | 11 ++-- database/seeders/LanguagesSeeder.php | 4 +- database/seeders/MenuSeeder.php | 55 ++++++++++--------- database/seeders/ProjectSeeder.php | 4 +- routes/cpanel.php | 1 - 42 files changed, 175 insertions(+), 184 deletions(-) diff --git a/app/Enums/MenuPlacement.php b/app/Enums/MenuPlacement.php index 4fb02c8..ff9dab1 100644 --- a/app/Enums/MenuPlacement.php +++ b/app/Enums/MenuPlacement.php @@ -1,4 +1,5 @@ - 'required', ]; - public function createLanguage() + public function createLanguage(): void { $this->createLanguage = true; } - public function create() + public function create(): void { $this->validate(); diff --git a/app/Http/Livewire/Language/Edit.php b/app/Http/Livewire/Language/Edit.php index e754fe7..ecbf80e 100644 --- a/app/Http/Livewire/Language/Edit.php +++ b/app/Http/Livewire/Language/Edit.php @@ -10,7 +10,7 @@ use App\Models\Language; use Jantinnerezo\LivewireAlert\LivewireAlert; -class Edit extends Component +final class Edit extends Component { use LivewireAlert; @@ -30,14 +30,14 @@ class Edit extends Component 'language.code' => 'required', ]; - public function editLanguage($id) + public function editLanguage($id): void { $this->language = Language::findOrFail($id); $this->editLanguage = true; } - public function update() + public function update(): void { $this->validate(); diff --git a/app/Http/Livewire/Language/EditTranslation.php b/app/Http/Livewire/Language/EditTranslation.php index c4ead6b..1f14a2b 100644 --- a/app/Http/Livewire/Language/EditTranslation.php +++ b/app/Http/Livewire/Language/EditTranslation.php @@ -8,7 +8,7 @@ use App\Models\Language; use Jantinnerezo\LivewireAlert\LivewireAlert; -class EditTranslation extends Component +final class EditTranslation extends Component { use LivewireAlert; public $language; @@ -18,7 +18,7 @@ class EditTranslation extends Component 'translations.*.value' => 'required', ]; - public function mount($language) + public function mount($language): void { $this->language = Language::where('id', $language)->firstOrFail(); // dd($this->all()); @@ -39,7 +39,7 @@ private function getTranslations() return json_decode($content, true); } - public function updateTranslation() + public function updateTranslation(): void { $this->validate(); diff --git a/app/Http/Livewire/Language/Index.php b/app/Http/Livewire/Language/Index.php index a85339a..c36f34e 100644 --- a/app/Http/Livewire/Language/Index.php +++ b/app/Http/Livewire/Language/Index.php @@ -9,7 +9,7 @@ use Artisan; use Jantinnerezo\LivewireAlert\LivewireAlert; -class Index extends Component +final class Index extends Component { use LivewireAlert; @@ -21,7 +21,7 @@ class Index extends Component 'refreshIndex' => '$refresh', ]; - public function mount() + public function mount(): void { $this->languages = Language::all()->toArray(); } @@ -31,7 +31,7 @@ public function render() return view('livewire.admin.language.index'); } - public function onSetDefault($id) + public function onSetDefault($id): void { Language::where('is_default', '=', true)->update(['is_default' => false]); @@ -44,7 +44,7 @@ public function onSetDefault($id) $this->alert('success', __('Language updated successfully!')); } - public function sync($id) + public function sync($id): void { $languages = Language::findOrFail($id); @@ -53,7 +53,7 @@ public function sync($id) $this->alert('success', __('Translation updated successfully!')); } - public function delete(Language $language) + public function delete(Language $language): void { $language->delete(); diff --git a/app/Http/Livewire/Menu/Index.php b/app/Http/Livewire/Menu/Index.php index 0b96038..5528758 100644 --- a/app/Http/Livewire/Menu/Index.php +++ b/app/Http/Livewire/Menu/Index.php @@ -6,24 +6,22 @@ use App\Http\Livewire\Utils\WithSorting; use App\Models\Menu; -use Illuminate\Contracts\View\Factory; -use Illuminate\Contracts\View\View; -use Illuminate\Database\Eloquent\Collection; use Livewire\Component; use Livewire\WithPagination; use Jantinnerezo\LivewireAlert\LivewireAlert; -class Index extends Component + +final class Index extends Component { + use LivewireAlert; use WithPagination; use WithSorting; - use LivewireAlert; - + public string $perPage = '100'; protected $listeners = [ 'refreshIndex' => '$refresh' ]; - public $links = []; + public $links = []; public $menu; public $menus; public $name; @@ -44,12 +42,12 @@ class Index extends Component 'menus.*.new_window' => 'boolean', ]; - public function mount() + public function mount(): void { - $this->menus = Menu::when($this->placement, function ($query) { + $this->menus = Menu::when($this->placement, function ($query): void { $query->where('placement', $this->placement); })->orderBy('sort_order') - ->get()->toArray(); + ->get()->toArray(); $this->links = [ 'Link 1', @@ -57,12 +55,12 @@ public function mount() 'Link 3', // Add more links as needed ]; - + $this->resetErrorBag(); $this->resetValidation(); } - public function filterByPlacement($value) + public function filterByPlacement($value): void { $this->placement = $value; $this->mount(); @@ -70,7 +68,7 @@ public function filterByPlacement($value) public function render() { - $menus = Menu::when($this->placement, function ($query) { + $menus = Menu::when($this->placement, function ($query): void { $query->where('placement', $this->placement); })->paginate($this->perPage); @@ -78,10 +76,10 @@ public function render() } - public function update($id) + public function update($id): void { $this->menu = Menu::find($id); - + $this->validate(); foreach ($this->menus as $menu) { @@ -98,11 +96,11 @@ public function update($id) } $this->alert('success', __('Menu updated successfully.')); - + $this->reset(['name', 'label', 'url', 'type', 'placement', 'parent_id', 'new_window']); } - - public function store() + + public function store(): void { $this->validate([ 'name' => 'required', @@ -113,7 +111,7 @@ public function store() 'parent_id' => 'nullable|exists:menus,id', 'new_window' => 'boolean', ]); - + $menu = new Menu(); $menu->name = $this->name; $menu->label = $this->label; @@ -123,15 +121,15 @@ public function store() $menu->parent_id = $this->parent_id ?? null; $menu->new_window = $this->new_window ?? false; // Add any additional fields you have in your menu model - + $menu->save(); - + $this->alert('success', __('Menu created successfully.')); - + $this->mount(); } - public function updateMenuOrder($ids) + public function updateMenuOrder($ids): void { foreach ($ids as $index => $id) { $menu = Menu::find($id); @@ -141,7 +139,7 @@ public function updateMenuOrder($ids) $this->mount(); $this->alert('success', __('Menu order updated successfully.')); } - + public function predefinedMenu(): void { $this->menus = [ @@ -194,7 +192,7 @@ public function predefinedMenu(): void $this->alert('success', __('Predefined menus created successfully.')); } - public function delete(Menu $menu) + public function delete(Menu $menu): void { // abort_if(Gate::denies('menu_delete'), Response::HTTP_FORBIDDEN, '403 Forbidden'); @@ -203,5 +201,5 @@ public function delete(Menu $menu) $this->alert('success', __('Menu deleted successfully.')); } - + } diff --git a/app/Http/Livewire/Menu/Settings.php b/app/Http/Livewire/Menu/Settings.php index 3bc72b8..b22d6e4 100644 --- a/app/Http/Livewire/Menu/Settings.php +++ b/app/Http/Livewire/Menu/Settings.php @@ -6,7 +6,7 @@ use Livewire\Component; -class Settings extends Component +final class Settings extends Component { public function render() { diff --git a/app/Http/Livewire/Project/Create.php b/app/Http/Livewire/Project/Create.php index bbf933a..3803f59 100644 --- a/app/Http/Livewire/Project/Create.php +++ b/app/Http/Livewire/Project/Create.php @@ -12,7 +12,7 @@ use Livewire\WithFileUploads; use Illuminate\Support\Str; -class Create extends Component +final class Create extends Component { use LivewireAlert; use WithFileUploads; @@ -22,7 +22,7 @@ class Create extends Component public $image; public $images; - + public $description; public $createModal = false; @@ -42,12 +42,12 @@ class Create extends Component 'project.language_id' => 'required', ]; - public function updatedDescription($value) + public function updatedDescription($value): void { $this->description = $value; } - public function createModal() + public function createModal(): void { $this->resetErrorBag(); @@ -60,7 +60,7 @@ public function createModal() $this->createModal = true; } - public function submit() + public function submit(): void { $this->project->slug = Str::slug($this->project->title); diff --git a/app/Http/Livewire/Project/Edit.php b/app/Http/Livewire/Project/Edit.php index c8c6a35..0de8fee 100644 --- a/app/Http/Livewire/Project/Edit.php +++ b/app/Http/Livewire/Project/Edit.php @@ -12,7 +12,7 @@ use Livewire\WithFileUploads; use Str; -class Edit extends Component +final class Edit extends Component { use LivewireAlert; use WithFileUploads; @@ -22,7 +22,7 @@ class Edit extends Component public $images; public $image; - + public $description; public array $listsForFields = []; @@ -44,12 +44,12 @@ class Edit extends Component 'project.language_id' => 'required', ]; - public function updatedDescription($value) + public function updatedDescription($value): void { $this->description = $value; } - public function editModal($project) + public function editModal($project): void { // abort_if(Gate::denies('project_update'), 403); @@ -64,7 +64,7 @@ public function editModal($project) $this->editModal = true; } - public function submit() + public function submit(): void { $this->project->slug = Str::slug($this->project->title); diff --git a/app/Http/Livewire/Project/Index.php b/app/Http/Livewire/Project/Index.php index 7b72315..7bfa46c 100644 --- a/app/Http/Livewire/Project/Index.php +++ b/app/Http/Livewire/Project/Index.php @@ -12,11 +12,11 @@ use Illuminate\Support\Facades\Gate; use Str; -class Index extends Component +final class Index extends Component { + use LivewireAlert; use WithPagination; use WithSorting; - use LivewireAlert; public int $perPage; @@ -54,7 +54,7 @@ class Index extends Component ], ]; - public function confirmed() + public function confirmed(): void { $this->emit('delete'); } @@ -64,22 +64,22 @@ public function getSelectedCountProperty() return count($this->selected); } - public function updatingSearch() + public function updatingSearch(): void { $this->resetPage(); } - public function updatingPerPage() + public function updatingPerPage(): void { $this->resetPage(); } - public function resetSelected() + public function resetSelected(): void { $this->selected = []; } - public function mount() + public function mount(): void { $this->sortBy = 'id'; $this->sortDirection = 'desc'; @@ -90,9 +90,7 @@ public function mount() public function render() { - $query = Project::when($this->language_id, function ($query) { - return $query->where('language_id', $this->language_id); - })->advancedFilter([ + $query = Project::when($this->language_id, fn ($query) => $query->where('language_id', $this->language_id))->advancedFilter([ 's' => $this->search ?: null, 'order_column' => $this->sortBy, 'order_direction' => $this->sortDirection, @@ -103,7 +101,7 @@ public function render() return view('livewire.admin.project.index', compact('projects'))->extends('layouts.dashboard'); } - public function showModal(Project $project) + public function showModal(Project $project): void { // abort_if(Gate::denies('project_show'), 403); @@ -116,7 +114,7 @@ public function showModal(Project $project) $this->showModal = true; } - public function deleteModal($project) + public function deleteModal($project): void { $this->confirm(__('Are you sure you want to delete this?'), [ 'toast' => false, @@ -128,7 +126,7 @@ public function deleteModal($project) $this->project = $project; } - public function deleteSelected() + public function deleteSelected(): void { abort_if(Gate::denies('project_delete'), 403); @@ -137,7 +135,7 @@ public function deleteSelected() $this->resetSelected(); } - public function delete() + public function delete(): void { abort_if(Gate::denies('project_delete'), 403); @@ -146,8 +144,8 @@ public function delete() $this->alert('success', __('Project deleted successfully.')); } - // Project Clone - public function clone(Project $project) + // Project Clone + public function clone(Project $project): void { $portfolio_details = Project::find($project->id); // dd($portfolio_details); diff --git a/app/Http/Livewire/Redirects.php b/app/Http/Livewire/Redirects.php index a8fb8f2..870f986 100644 --- a/app/Http/Livewire/Redirects.php +++ b/app/Http/Livewire/Redirects.php @@ -12,7 +12,7 @@ use Livewire\Component; use Livewire\WithPagination; -class Redirects extends Component +final class Redirects extends Component { use LivewireAlert; use WithPagination; @@ -58,22 +58,22 @@ public function getSelectedCountProperty() return count($this->selected); } - public function updatingSearch() + public function updatingSearch(): void { $this->resetPage(); } - public function updatingPerPage() + public function updatingPerPage(): void { $this->resetPage(); } - public function resetSelected() + public function resetSelected(): void { $this->selected = []; } - public function mount() + public function mount(): void { $this->sortBy = 'id'; $this->sortDirection = 'desc'; @@ -82,13 +82,13 @@ public function mount() $this->orderable = (new Redirect())->orderable; } - public function editModal($id) + public function editModal($id): void { $this->redirect = Redirect::find($id); $this->editModal = true; } - public function update() + public function update(): void { $this->validate(); @@ -101,7 +101,7 @@ public function update() $this->emit('refreshIndex'); } - public function delete(Redirect $redirect) + public function delete(Redirect $redirect): void { $redirect->delete(); diff --git a/app/Http/Livewire/Utils/Modal.php b/app/Http/Livewire/Utils/Modal.php index 18849bd..e390925 100644 --- a/app/Http/Livewire/Utils/Modal.php +++ b/app/Http/Livewire/Utils/Modal.php @@ -6,7 +6,7 @@ use Livewire\Component; -class Modal extends Component +final class Modal extends Component { public $show = false; @@ -19,7 +19,7 @@ class Modal extends Component * Set Modal * ------------------------------------------------------------------------------- */ - public function show() + public function show(): void { $this->show = true; } diff --git a/app/Http/Livewire/Utils/Notifications.php b/app/Http/Livewire/Utils/Notifications.php index e545b60..3989be9 100644 --- a/app/Http/Livewire/Utils/Notifications.php +++ b/app/Http/Livewire/Utils/Notifications.php @@ -7,7 +7,7 @@ use Carbon\Carbon; use Livewire\Component; -class Notifications extends Component +final class Notifications extends Component { public $notifications; @@ -16,16 +16,16 @@ public function render() return view('livewire.notifications'); } - public function mount() + public function mount(): void { $this->notifications = auth()->user()->notifications->take(10); } - public function toggleReadStatus($key) + public function toggleReadStatus($key): void { $notification = $this->notifications[$key]; - $notification->read_at === null ? $notification->read_at = Carbon::now()->toTimeString() : $notification->read_at = null; + null === $notification->read_at ? $notification->read_at = Carbon::now()->toTimeString() : $notification->read_at = null; $notification->save(); } } diff --git a/app/Http/Livewire/Utils/Sidebar.php b/app/Http/Livewire/Utils/Sidebar.php index 9937de7..e3a5f54 100644 --- a/app/Http/Livewire/Utils/Sidebar.php +++ b/app/Http/Livewire/Utils/Sidebar.php @@ -6,7 +6,7 @@ use Livewire\Component; -class Sidebar extends Component +final class Sidebar extends Component { public function render() { diff --git a/app/Http/Livewire/Utils/ToggleButton.php b/app/Http/Livewire/Utils/ToggleButton.php index e96cbca..806700e 100644 --- a/app/Http/Livewire/Utils/ToggleButton.php +++ b/app/Http/Livewire/Utils/ToggleButton.php @@ -8,7 +8,7 @@ use Jantinnerezo\LivewireAlert\LivewireAlert; use Livewire\Component; -class ToggleButton extends Component +final class ToggleButton extends Component { use LivewireAlert; public Model $model; @@ -19,13 +19,13 @@ class ToggleButton extends Component protected $listeners = ['updating']; - public function mount() + public function mount(): void { $this->status = (bool) $this->model->getAttribute($this->field); $this->uniqueId = uniqid(); } - public function updating($field, $value) + public function updating($field, $value): void { $this->model->setAttribute($this->field, $value)->save(); diff --git a/app/Http/Livewire/Utils/WithSorting.php b/app/Http/Livewire/Utils/WithSorting.php index 370dd6f..3b55d76 100644 --- a/app/Http/Livewire/Utils/WithSorting.php +++ b/app/Http/Livewire/Utils/WithSorting.php @@ -9,7 +9,7 @@ trait WithSorting public $sortBy = 'id'; public $sortDirection = 'desc'; - public function sortBy($field) + public function sortBy($field): void { $this->sortBy = $field; @@ -20,7 +20,7 @@ public function sortBy($field) public function reverseSort() { - return $this->sortDirection === 'asc' + return 'asc' === $this->sortDirection ? 'desc' : 'asc'; } diff --git a/app/Support/FilterQueryBuilder.php b/app/Support/FilterQueryBuilder.php index c5d1e9e..c2c5d5c 100644 --- a/app/Support/FilterQueryBuilder.php +++ b/app/Support/FilterQueryBuilder.php @@ -7,11 +7,11 @@ use Illuminate\Database\Eloquent\Relations\BelongsTo; use Illuminate\Support\Str; -class FilterQueryBuilder +final class FilterQueryBuilder { - protected $model; + private $model; - protected $table; + private $table; public function apply($query, $data) { @@ -37,7 +37,7 @@ public function contains($filter, $query) return $query->where($filter['column'], 'like', '%'.$filter['query_1'].'%', $filter['match']); } - protected function makeOrder($query, $data) + private function makeOrder($query, $data): void { if ($this->isNestedColumn($data['order_column'])) { [$relationship, $column] = explode('.', $data['order_column']); @@ -67,14 +67,14 @@ protected function makeOrder($query, $data) ->select("{$this->table}.*"); } - protected function makeFilter($query, $filter) + private function makeFilter($query, $filter): void { if ($this->isNestedColumn($filter['column'])) { [$relation, $filter['column']] = explode('.', $filter['column']); $callable = Str::camel($relation); $filter['match'] = 'and'; - $query->orWhereHas(Str::camel($callable), function ($q) use ($filter) { + $query->orWhereHas(Str::camel($callable), function ($q) use ($filter): void { $this->{Str::camel($filter['operator'])}( $filter, $q @@ -89,8 +89,8 @@ protected function makeFilter($query, $filter) } } - protected function isNestedColumn($column) + private function isNestedColumn($column) { - return strpos($column, '.') !== false; + return str_contains($column, '.') ; } } diff --git a/app/Support/Helpers.php b/app/Support/Helpers.php index 0e0cebe..2972b56 100644 --- a/app/Support/Helpers.php +++ b/app/Support/Helpers.php @@ -26,27 +26,21 @@ function getLanguages() if ( ! function_exists('getCategories')) { function getCategories() { - return cache()->rememberForever('categories', function () { - return Category::pluck('name', 'id')->toArray(); - }); + return cache()->rememberForever('categories', fn () => Category::pluck('name', 'id')->toArray()); } } if ( ! function_exists('getBlogCategories')) { function getBlogCategories() { - return cache()->rememberForever('blogCategories', function () { - return BlogCategory::pluck('title', 'id')->toArray(); - }); + return cache()->rememberForever('blogCategories', fn () => BlogCategory::pluck('title', 'id')->toArray()); } } if ( ! function_exists('settings')) { function settings() { - return cache()->rememberForever('settings', function () { - return \App\Models\Settings::firstOrFail(); - }); + return cache()->rememberForever('settings', fn () => \App\Models\Settings::firstOrFail()); } } diff --git a/app/View/Components/AppLayout.php b/app/View/Components/AppLayout.php index 1ff66ab..ad6f82c 100644 --- a/app/View/Components/AppLayout.php +++ b/app/View/Components/AppLayout.php @@ -6,7 +6,7 @@ use Illuminate\View\Component; -class AppLayout extends Component +final class AppLayout extends Component { /** * Create a new component instance. diff --git a/app/View/Components/Card.php b/app/View/Components/Card.php index 34ace13..fc9f44f 100644 --- a/app/View/Components/Card.php +++ b/app/View/Components/Card.php @@ -7,7 +7,7 @@ use Closure; use Illuminate\View\Component; -class Card extends Component +final class Card extends Component { /** * Create a new component instance. diff --git a/app/View/Components/Content.php b/app/View/Components/Content.php index 0420525..d89f310 100644 --- a/app/View/Components/Content.php +++ b/app/View/Components/Content.php @@ -7,7 +7,7 @@ use Closure; use Illuminate\View\Component; -class Content extends Component +final class Content extends Component { /** * Create a new component instance. diff --git a/app/View/Components/DashboardLayout.php b/app/View/Components/DashboardLayout.php index 438a689..d3f330c 100644 --- a/app/View/Components/DashboardLayout.php +++ b/app/View/Components/DashboardLayout.php @@ -6,7 +6,7 @@ use Illuminate\View\Component; -class DashboardLayout extends Component +final class DashboardLayout extends Component { public function render() { diff --git a/app/View/Components/DatePicker.php b/app/View/Components/DatePicker.php index 3b54681..8901a4f 100644 --- a/app/View/Components/DatePicker.php +++ b/app/View/Components/DatePicker.php @@ -6,7 +6,7 @@ use Illuminate\View\Component; -class DatePicker extends Component +final class DatePicker extends Component { /** Create a new component instance. */ public function __construct() diff --git a/app/View/Components/Dropzone.php b/app/View/Components/Dropzone.php index 09093aa..3f59bc0 100644 --- a/app/View/Components/Dropzone.php +++ b/app/View/Components/Dropzone.php @@ -8,7 +8,7 @@ use Illuminate\Contracts\View\View; use Illuminate\View\Component; -class Dropzone extends Component +final class Dropzone extends Component { /** Create a new component instance. */ public function __construct() diff --git a/app/View/Components/Footer.php b/app/View/Components/Footer.php index 83c346e..d47dd02 100644 --- a/app/View/Components/Footer.php +++ b/app/View/Components/Footer.php @@ -9,7 +9,7 @@ use Illuminate\Contracts\View\View; use Illuminate\View\Component; -class Footer extends Component +final class Footer extends Component { /** * Create a new component instance. diff --git a/app/View/Components/GuestLayout.php b/app/View/Components/GuestLayout.php index 003d032..78a5f52 100644 --- a/app/View/Components/GuestLayout.php +++ b/app/View/Components/GuestLayout.php @@ -8,7 +8,7 @@ use Illuminate\Contracts\View\View; use Illuminate\View\Component; -class GuestLayout extends Component +final class GuestLayout extends Component { /** * Get the view / contents that represents the component. diff --git a/app/View/Components/Header.php b/app/View/Components/Header.php index 3c29097..189560b 100644 --- a/app/View/Components/Header.php +++ b/app/View/Components/Header.php @@ -9,7 +9,7 @@ use Illuminate\Contracts\View\View; use Illuminate\View\Component; -class Header extends Component +final class Header extends Component { /** * Create a new component instance. diff --git a/app/View/Components/Select2.php b/app/View/Components/Select2.php index 5baed7f..56e94c2 100644 --- a/app/View/Components/Select2.php +++ b/app/View/Components/Select2.php @@ -6,7 +6,7 @@ use Illuminate\View\Component; -class Select2 extends Component +final class Select2 extends Component { public $name; public $id; diff --git a/app/View/Components/SelectList.php b/app/View/Components/SelectList.php index 9b0e8d7..ccecccb 100644 --- a/app/View/Components/SelectList.php +++ b/app/View/Components/SelectList.php @@ -6,7 +6,7 @@ use Illuminate\View\Component; -class SelectList extends Component +final class SelectList extends Component { public $options; diff --git a/app/View/Components/Sidebar.php b/app/View/Components/Sidebar.php index 2f8197b..4bc8303 100644 --- a/app/View/Components/Sidebar.php +++ b/app/View/Components/Sidebar.php @@ -7,7 +7,7 @@ use Closure; use Illuminate\View\Component; -class Sidebar extends Component +final class Sidebar extends Component { /** * Create a new component instance. diff --git a/app/View/Components/Table.php b/app/View/Components/Table.php index 830e50e..37f91ab 100644 --- a/app/View/Components/Table.php +++ b/app/View/Components/Table.php @@ -7,7 +7,7 @@ use Closure; use Illuminate\View\Component; -class Table extends Component +final class Table extends Component { /** * Create a new component instance. diff --git a/app/View/Components/ToggleButton.php b/app/View/Components/ToggleButton.php index 7fedcb1..d72aa64 100644 --- a/app/View/Components/ToggleButton.php +++ b/app/View/Components/ToggleButton.php @@ -7,7 +7,7 @@ use Closure; use Illuminate\View\Component; -class ToggleButton extends Component +final class ToggleButton extends Component { /** Create a new component instance. */ public function __construct() diff --git a/app/helpers.php b/app/helpers.php index 85214e7..1bb6796 100644 --- a/app/helpers.php +++ b/app/helpers.php @@ -13,7 +13,7 @@ use Illuminate\Support\Str; use Intervention\Image\Facades\Image; -if (! function_exists('settings')) { +if ( ! function_exists('settings')) { /** * Fetch Cached settings from database * @@ -23,13 +23,11 @@ */ function settings($key) { - return Cache::rememberForever('settings', function () { - return Settings::pluck('value', 'key'); - })->get($key); + return Cache::rememberForever('settings', fn () => Settings::pluck('value', 'key'))->get($key); } } -if (! function_exists('getActiveCategories')) { +if ( ! function_exists('getActiveCategories')) { function getActiveCategories() { return Category::active() @@ -38,7 +36,7 @@ function getActiveCategories() } } -if (! function_exists('getActivePages')) { +if ( ! function_exists('getActivePages')) { function getActivePages() { return Page::active() @@ -48,14 +46,14 @@ function getActivePages() } } -if (! function_exists('categoryName')) { +if ( ! function_exists('categoryName')) { function categoryName($category_id) { return Category::find($category_id)->name; } } -if (! function_exists('uploadImage')) { +if ( ! function_exists('uploadImage')) { /** * @param mixed $image * @@ -69,15 +67,15 @@ function uploadImage($image) } $image = file_get_contents($image); - $name = Str::random(10) . '.jpg'; - $path = public_path() . '/images/products/' . $name; + $name = Str::random(10).'.jpg'; + $path = public_path().'/images/products/'.$name; file_put_contents($path, $image); return $name; } } -if (! function_exists('uploadGallery')) { +if ( ! function_exists('uploadGallery')) { /** * @param mixed $gallery * @@ -94,8 +92,8 @@ function uploadGallery($gallery) return array_map(function ($image) { $image = file_get_contents($image); - $name = Str::random(10) . '.jpg'; - $path = public_path() . '/images/products/' . $name; + $name = Str::random(10).'.jpg'; + $path = public_path().'/images/products/'.$name; file_put_contents($path, $image); return $name; @@ -103,7 +101,7 @@ function uploadGallery($gallery) } } -if (! function_exists('handleUpload')) { +if ( ! function_exists('handleUpload')) { /** * @param mixed $input * @@ -116,13 +114,13 @@ function handleUpload($input) $galleryArray = []; foreach ($input as $key => $value) { - $img = Image::make($value->getRealPath())->encode('webp', 85)->resize(1000, 1000, function ($constraint) { + $img = Image::make($value->getRealPath())->encode('webp', 85)->resize(1000, 1000, function ($constraint): void { $constraint->aspectRatio(); $constraint->upsize(); }); $img->stream(); - Storage::disk('local_files')->put('products/' . $value->getClientOriginalName(), $img, 'public'); + Storage::disk('local_files')->put('products/'.$value->getClientOriginalName(), $img, 'public'); $galleryArray[] = $value->getClientOriginalName(); } @@ -130,13 +128,13 @@ function handleUpload($input) } // handle single image - $img = Image::make($input->getRealPath())->encode('webp', 85)->resize(1000, 1000, function ($constraint) { + $img = Image::make($input->getRealPath())->encode('webp', 85)->resize(1000, 1000, function ($constraint): void { $constraint->aspectRatio(); $constraint->upsize(); }); $img->stream(); - Storage::disk('local_files')->put('products/' . $input->getClientOriginalName(), $img, 'public'); + Storage::disk('local_files')->put('products/'.$input->getClientOriginalName(), $img, 'public'); } } diff --git a/database/migrations/2022_10_23_150306_create_languages_table.php b/database/migrations/2022_10_23_150306_create_languages_table.php index ad5b451..80fad47 100644 --- a/database/migrations/2022_10_23_150306_create_languages_table.php +++ b/database/migrations/2022_10_23_150306_create_languages_table.php @@ -12,9 +12,9 @@ * * @return void */ - public function up() + public function up(): void { - Schema::create('languages', function (Blueprint $table) { + Schema::create('languages', function (Blueprint $table): void { $table->id(); $table->string('name'); $table->string('code'); @@ -30,7 +30,7 @@ public function up() * * @return void */ - public function down() + public function down(): void { Schema::dropIfExists('languages'); } diff --git a/database/migrations/2022_10_24_150653_create_projects_table.php b/database/migrations/2022_10_24_150653_create_projects_table.php index 3982a10..9366ae3 100644 --- a/database/migrations/2022_10_24_150653_create_projects_table.php +++ b/database/migrations/2022_10_24_150653_create_projects_table.php @@ -12,9 +12,9 @@ * * @return void */ - public function up() + public function up(): void { - Schema::create('projects', function (Blueprint $table) { + Schema::create('projects', function (Blueprint $table): void { $table->id(); $table->text('title'); $table->text('client_name')->nullable(); @@ -39,7 +39,7 @@ public function up() * * @return void */ - public function down() + public function down(): void { Schema::dropIfExists('sections'); } diff --git a/database/migrations/2023_01_24_213944_create_redirects_table.php b/database/migrations/2023_01_24_213944_create_redirects_table.php index 93a15fe..e37b7aa 100644 --- a/database/migrations/2023_01_24_213944_create_redirects_table.php +++ b/database/migrations/2023_01_24_213944_create_redirects_table.php @@ -12,9 +12,9 @@ * * @return void */ - public function up() + public function up(): void { - Schema::create('redirects', function (Blueprint $table) { + Schema::create('redirects', function (Blueprint $table): void { $table->id(); $table->string('old_url'); $table->string('new_url')->nullable(); @@ -29,7 +29,7 @@ public function up() * * @return void */ - public function down() + public function down(): void { Schema::dropIfExists('redirects'); } diff --git a/database/migrations/2023_06_21_134012_create_menus_table.php b/database/migrations/2023_06_21_134012_create_menus_table.php index 123a9be..1271143 100644 --- a/database/migrations/2023_06_21_134012_create_menus_table.php +++ b/database/migrations/2023_06_21_134012_create_menus_table.php @@ -1,19 +1,20 @@ id(); $table->timestamps(); $table->string('name'); @@ -34,7 +35,7 @@ public function up() * * @return void */ - public function down() + public function down(): void { Schema::dropIfExists('menus'); } diff --git a/database/seeders/LanguagesSeeder.php b/database/seeders/LanguagesSeeder.php index 8f43403..8ead923 100644 --- a/database/seeders/LanguagesSeeder.php +++ b/database/seeders/LanguagesSeeder.php @@ -7,14 +7,14 @@ use App\Models\Language; use Illuminate\Database\Seeder; -class LanguagesSeeder extends Seeder +final class LanguagesSeeder extends Seeder { /** * Run the database seeders. * * @return void */ - public function run() + public function run(): void { Language::insert([ [ diff --git a/database/seeders/MenuSeeder.php b/database/seeders/MenuSeeder.php index 00f7d10..237592e 100644 --- a/database/seeders/MenuSeeder.php +++ b/database/seeders/MenuSeeder.php @@ -1,43 +1,44 @@ 'Home', - 'label' => 'Home', - 'url' => '/', - 'type' => 'link', - 'placement' => 'header', - 'sort_order' => 1, - 'parent_id' => null, - 'new_window' => false, - ]); - - Menu::create([ - 'name' => 'About', - 'label' => 'About', - 'url' => '/about', - 'type' => 'dropdown', - 'placement' => 'header', - 'sort_order' => 2, - 'parent_id' => null, - 'new_window' => false, - ]); - - // Add more menu items as needed + + Menu::create([ + 'name' => 'Home', + 'label' => 'Home', + 'url' => '/', + 'type' => 'link', + 'placement' => 'header', + 'sort_order' => 1, + 'parent_id' => null, + 'new_window' => false, + ]); + + Menu::create([ + 'name' => 'About', + 'label' => 'About', + 'url' => '/about', + 'type' => 'dropdown', + 'placement' => 'header', + 'sort_order' => 2, + 'parent_id' => null, + 'new_window' => false, + ]); + + // Add more menu items as needed } } diff --git a/database/seeders/ProjectSeeder.php b/database/seeders/ProjectSeeder.php index a6dd0e0..8545f00 100644 --- a/database/seeders/ProjectSeeder.php +++ b/database/seeders/ProjectSeeder.php @@ -7,14 +7,14 @@ use App\Models\Project; use Illuminate\Database\Seeder; -class ProjectSeeder extends Seeder +final class ProjectSeeder extends Seeder { /** * Run the database seeders. * * @return void */ - public function run() + public function run(): void { Project::factory(10)->create(); } diff --git a/routes/cpanel.php b/routes/cpanel.php index 54482d2..6155238 100644 --- a/routes/cpanel.php +++ b/routes/cpanel.php @@ -10,7 +10,6 @@ use App\Http\Livewire\Admin\Redirect\Index as RedirectIndex; use App\Http\Livewire\Admin\Language\EditTranslation; - Route::redirect('/', 'cpanel/home'); Route::get('/home', Cpanel\DashboardController::class)->name('home'); Route::get('/analytics', Cpanel\AnalyticsController::class)->name('analytics'); From 4c1d133a23b5f5141bd215294d8d42c46fcfe231 Mon Sep 17 00:00:00 2001 From: Zakaria Labib <58374576+Zakarialabib@users.noreply.github.com> Date: Sun, 6 Aug 2023 16:26:18 +0100 Subject: [PATCH 3/8] update routes --- app/Http/Livewire/Language/Create.php | 2 +- app/Http/Livewire/Language/Edit.php | 2 +- app/Http/Livewire/Language/EditTranslation.php | 2 +- app/Http/Livewire/Language/Index.php | 2 +- app/Http/Livewire/Menu/Index.php | 2 +- app/Http/Livewire/Menu/Settings.php | 2 +- app/Http/Livewire/Project/Create.php | 2 +- app/Http/Livewire/Project/Edit.php | 2 +- app/Http/Livewire/Project/Index.php | 2 +- app/Http/Livewire/Redirects.php | 4 ++-- .../views/components/layouts/admin-menu.blade.php | 3 --- .../layouts/{cp.blade.php => admin.blade.php} | 2 +- resources/views/cpanel/analytics.blade.php | 4 ++-- resources/views/cpanel/dashboard.blade.php | 4 ++-- resources/views/cpanel/users/index.blade.php | 4 ++-- routes/cpanel.php | 10 +++++----- 16 files changed, 23 insertions(+), 26 deletions(-) rename resources/views/components/layouts/{cp.blade.php => admin.blade.php} (98%) diff --git a/app/Http/Livewire/Language/Create.php b/app/Http/Livewire/Language/Create.php index f4cc4dc..f0e0a37 100644 --- a/app/Http/Livewire/Language/Create.php +++ b/app/Http/Livewire/Language/Create.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace App\Http\Livewire\Admin\Language; +namespace App\Http\Livewire\Language; use Jantinnerezo\LivewireAlert\LivewireAlert; use Livewire\Component; diff --git a/app/Http/Livewire/Language/Edit.php b/app/Http/Livewire/Language/Edit.php index e754fe7..fa5dc6f 100644 --- a/app/Http/Livewire/Language/Edit.php +++ b/app/Http/Livewire/Language/Edit.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace App\Http\Livewire\Admin\Language; +namespace App\Http\Livewire\Language; use Livewire\Component; use File; diff --git a/app/Http/Livewire/Language/EditTranslation.php b/app/Http/Livewire/Language/EditTranslation.php index c4ead6b..60b41af 100644 --- a/app/Http/Livewire/Language/EditTranslation.php +++ b/app/Http/Livewire/Language/EditTranslation.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace App\Http\Livewire\Admin\Language; +namespace App\Http\Livewire\Language; use Livewire\Component; use App\Models\Language; diff --git a/app/Http/Livewire/Language/Index.php b/app/Http/Livewire/Language/Index.php index a85339a..092d167 100644 --- a/app/Http/Livewire/Language/Index.php +++ b/app/Http/Livewire/Language/Index.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace App\Http\Livewire\Admin\Language; +namespace App\Http\Livewire\Language; use Livewire\Component; use App\Models\Language; diff --git a/app/Http/Livewire/Menu/Index.php b/app/Http/Livewire/Menu/Index.php index 0b96038..d3471cc 100644 --- a/app/Http/Livewire/Menu/Index.php +++ b/app/Http/Livewire/Menu/Index.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace App\Http\Livewire\Admin\Menu; +namespace App\Http\Livewire\Menu; use App\Http\Livewire\Utils\WithSorting; use App\Models\Menu; diff --git a/app/Http/Livewire/Menu/Settings.php b/app/Http/Livewire/Menu/Settings.php index 3bc72b8..0cf0693 100644 --- a/app/Http/Livewire/Menu/Settings.php +++ b/app/Http/Livewire/Menu/Settings.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace App\Http\Livewire\Admin\Page; +namespace App\Http\Livewire\Page; use Livewire\Component; diff --git a/app/Http/Livewire/Project/Create.php b/app/Http/Livewire/Project/Create.php index bbf933a..461595b 100644 --- a/app/Http/Livewire/Project/Create.php +++ b/app/Http/Livewire/Project/Create.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace App\Http\Livewire\Admin\Project; +namespace App\Http\Livewire\Project; use App\Models\Project; use App\Models\Service; diff --git a/app/Http/Livewire/Project/Edit.php b/app/Http/Livewire/Project/Edit.php index c8c6a35..2b2df61 100644 --- a/app/Http/Livewire/Project/Edit.php +++ b/app/Http/Livewire/Project/Edit.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace App\Http\Livewire\Admin\Project; +namespace App\Http\Livewire\Project; use App\Models\Project; use App\Models\Service; diff --git a/app/Http/Livewire/Project/Index.php b/app/Http/Livewire/Project/Index.php index 7b72315..a01fa2d 100644 --- a/app/Http/Livewire/Project/Index.php +++ b/app/Http/Livewire/Project/Index.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace App\Http\Livewire\Admin\Project; +namespace App\Http\Livewire\Project; use App\Http\Livewire\Utils\WithSorting; use App\Models\Project; diff --git a/app/Http/Livewire/Redirects.php b/app/Http/Livewire/Redirects.php index a8fb8f2..59502b5 100644 --- a/app/Http/Livewire/Redirects.php +++ b/app/Http/Livewire/Redirects.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace App\Http\Livewire\Admin\Settings; +namespace App\Http\Livewire\; use App\Http\Livewire\Utils\WithSorting; use App\Models\Redirect; @@ -118,6 +118,6 @@ public function render(): View|Factory $redirects = $query->paginate($this->perPage); - return view('livewire.admin.settings.redirects', compact('redirects')); + return view('livewire.redirects', compact('redirects')); } } diff --git a/resources/views/components/layouts/admin-menu.blade.php b/resources/views/components/layouts/admin-menu.blade.php index 8d69337..f55901d 100644 --- a/resources/views/components/layouts/admin-menu.blade.php +++ b/resources/views/components/layouts/admin-menu.blade.php @@ -8,9 +8,6 @@ {{ __('Analytics') }} - - {{ __('Analytics') }} - {{ __('Utilisateurs') }} diff --git a/resources/views/components/layouts/cp.blade.php b/resources/views/components/layouts/admin.blade.php similarity index 98% rename from resources/views/components/layouts/cp.blade.php rename to resources/views/components/layouts/admin.blade.php index 784892f..bde00ad 100644 --- a/resources/views/components/layouts/cp.blade.php +++ b/resources/views/components/layouts/admin.blade.php @@ -19,7 +19,7 @@ @include('layouts._og') - + @googlefonts @vite('resources/css/app.css') @livewireStyles diff --git a/resources/views/cpanel/analytics.blade.php b/resources/views/cpanel/analytics.blade.php index 04fe78c..c0bced1 100644 --- a/resources/views/cpanel/analytics.blade.php +++ b/resources/views/cpanel/analytics.blade.php @@ -1,4 +1,4 @@ - +
    @@ -19,4 +19,4 @@
    - + diff --git a/resources/views/cpanel/dashboard.blade.php b/resources/views/cpanel/dashboard.blade.php index d1ed459..2fe3c58 100644 --- a/resources/views/cpanel/dashboard.blade.php +++ b/resources/views/cpanel/dashboard.blade.php @@ -1,4 +1,4 @@ - +

    {{ __('Shalom, :name', ['name' => auth()->user()->name]) }}

    @@ -65,4 +65,4 @@
    -
    + diff --git a/resources/views/cpanel/users/index.blade.php b/resources/views/cpanel/users/index.blade.php index 615ed0d..4c17bab 100644 --- a/resources/views/cpanel/users/index.blade.php +++ b/resources/views/cpanel/users/index.blade.php @@ -1,4 +1,4 @@ - +
    @@ -70,4 +70,4 @@
    - + diff --git a/routes/cpanel.php b/routes/cpanel.php index 54482d2..e9ed237 100644 --- a/routes/cpanel.php +++ b/routes/cpanel.php @@ -4,11 +4,11 @@ use App\Http\Controllers\Cpanel; use Illuminate\Support\Facades\Route; -use App\Http\Livewire\Admin\Project\Index as ProjectIndex; -use App\Http\Livewire\Admin\Menu\Index as MenuIndex; -use App\Http\Livewire\Admin\Language\Index as LanguageIndex; -use App\Http\Livewire\Admin\Redirect\Index as RedirectIndex; -use App\Http\Livewire\Admin\Language\EditTranslation; +use App\Http\Livewire\Project\Index as ProjectIndex; +use App\Http\Livewire\Menu\Index as MenuIndex; +use App\Http\Livewire\Language\Index as LanguageIndex; +use App\Http\Livewire\Redirect\Index as RedirectIndex; +use App\Http\Livewire\Language\EditTranslation; Route::redirect('/', 'cpanel/home'); From 627c9dbc1852431261c8f819480e93c4e03de19d Mon Sep 17 00:00:00 2001 From: Zakaria Labib <58374576+Zakarialabib@users.noreply.github.com> Date: Sun, 6 Aug 2023 20:17:50 +0100 Subject: [PATCH 4/8] update --- app/Http/Livewire/Menu/Settings.php | 4 +- app/Http/Livewire/Redirects.php | 2 +- composer.json | 3 +- composer.lock | 788 ++++++++++-------- package.json | 4 + resources/css/base.css | 10 + resources/css/select.css | 62 ++ resources/css/theme.css | 311 +++++++ resources/js/app.js | 128 +++ .../components/layouts/admin-menu.blade.php | 4 +- .../views/components/layouts/admin.blade.php | 5 + routes/admin.php | 26 + routes/cpanel.php | 28 - routes/web.php | 2 +- 14 files changed, 988 insertions(+), 389 deletions(-) create mode 100644 resources/css/select.css create mode 100644 resources/css/theme.css create mode 100644 routes/admin.php delete mode 100644 routes/cpanel.php diff --git a/app/Http/Livewire/Menu/Settings.php b/app/Http/Livewire/Menu/Settings.php index 5756ab3..a3a7315 100644 --- a/app/Http/Livewire/Menu/Settings.php +++ b/app/Http/Livewire/Menu/Settings.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace App\Http\Livewire\Page; +namespace App\Http\Livewire\Menu; use Livewire\Component; @@ -10,6 +10,6 @@ final class Settings extends Component { public function render() { - return view('livewire.admin.page.settings'); + return view('livewire.admin.menu.settings'); } } diff --git a/app/Http/Livewire/Redirects.php b/app/Http/Livewire/Redirects.php index 825f9e0..3c577d4 100644 --- a/app/Http/Livewire/Redirects.php +++ b/app/Http/Livewire/Redirects.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace App\Http\Livewire\; +namespace App\Http\Livewire; use App\Http\Livewire\Utils\WithSorting; use App\Models\Redirect; diff --git a/composer.json b/composer.json index c4dba24..805c775 100644 --- a/composer.json +++ b/composer.json @@ -5,7 +5,7 @@ "keywords": ["laravel", "morocco", "community"], "license": "MIT", "require": { - "php": "^8.2", + "php": "^8.1", "ext-fileinfo": "*", "ext-json": "*", "archtechx/laravel-seo": "^0.5.1", @@ -20,6 +20,7 @@ "francescomalatesta/laravel-feature": "^3.0", "graham-campbell/markdown": "^14.0", "guzzlehttp/guzzle": "^7.7.0", + "jantinnerezo/livewire-alert": "*", "jenssegers/agent": "^2.6.4", "laravel-notification-channels/telegram": "^2.1", "laravel-notification-channels/twitter": "^6.2", diff --git a/composer.lock b/composer.lock index 31a363c..1914fb4 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "d17909cba589f55d20974cb6c5d8ce9e", + "content-hash": "4eecaf1f169f4b03dc834066b53a8378", "packages": [ { "name": "abraham/twitteroauth", @@ -317,16 +317,16 @@ }, { "name": "bensampo/laravel-enum", - "version": "v6.4.0", + "version": "v6.6.2", "source": { "type": "git", "url": "https://github.com/BenSampo/laravel-enum.git", - "reference": "22e9faff7f34a95ff6cd96bbc3fb4395d6ffbf4d" + "reference": "85db3d402f8b4687e31f72fb1cc2f78cc71ec565" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/BenSampo/laravel-enum/zipball/22e9faff7f34a95ff6cd96bbc3fb4395d6ffbf4d", - "reference": "22e9faff7f34a95ff6cd96bbc3fb4395d6ffbf4d", + "url": "https://api.github.com/repos/BenSampo/laravel-enum/zipball/85db3d402f8b4687e31f72fb1cc2f78cc71ec565", + "reference": "85db3d402f8b4687e31f72fb1cc2f78cc71ec565", "shasum": "" }, "require": { @@ -342,12 +342,14 @@ "ergebnis/composer-normalize": "^2.28.3", "mll-lab/php-cs-fixer-config": "^5.4", "mockery/mockery": "^1.5", - "nunomaduro/larastan": "^2.1.12", + "nunomaduro/larastan": "^2.6.3", "orchestra/testbench": "^7.6.1 || ^8", "phpstan/phpstan": "^1.8.2", "phpstan/phpstan-mockery": "^1.1", "phpstan/phpstan-phpunit": "^1.1.1", - "phpunit/phpunit": "^9.5.21" + "phpunit/phpunit": "^9.5.21 || ^10", + "rector/rector": "^0.17.6", + "symplify/rule-doc-generator": "^11" }, "type": "library", "extra": { @@ -394,7 +396,7 @@ ], "support": { "issues": "https://github.com/BenSampo/laravel-enum/issues", - "source": "https://github.com/BenSampo/laravel-enum/tree/v6.4.0" + "source": "https://github.com/BenSampo/laravel-enum/tree/v6.6.2" }, "funding": [ { @@ -402,7 +404,7 @@ "type": "github" } ], - "time": "2023-07-05T08:16:59+00:00" + "time": "2023-08-03T15:22:44+00:00" }, { "name": "blade-ui-kit/blade-heroicons", @@ -1373,16 +1375,16 @@ }, { "name": "doctrine/dbal", - "version": "3.6.4", + "version": "3.6.5", "source": { "type": "git", "url": "https://github.com/doctrine/dbal.git", - "reference": "19f0dec95edd6a3c3c5ff1d188ea94c6b7fc903f" + "reference": "96d5a70fd91efdcec81fc46316efc5bf3da17ddf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/dbal/zipball/19f0dec95edd6a3c3c5ff1d188ea94c6b7fc903f", - "reference": "19f0dec95edd6a3c3c5ff1d188ea94c6b7fc903f", + "url": "https://api.github.com/repos/doctrine/dbal/zipball/96d5a70fd91efdcec81fc46316efc5bf3da17ddf", + "reference": "96d5a70fd91efdcec81fc46316efc5bf3da17ddf", "shasum": "" }, "require": { @@ -1397,10 +1399,10 @@ "require-dev": { "doctrine/coding-standard": "12.0.0", "fig/log-test": "^1", - "jetbrains/phpstorm-stubs": "2022.3", - "phpstan/phpstan": "1.10.14", + "jetbrains/phpstorm-stubs": "2023.1", + "phpstan/phpstan": "1.10.21", "phpstan/phpstan-strict-rules": "^1.5", - "phpunit/phpunit": "9.6.7", + "phpunit/phpunit": "9.6.9", "psalm/plugin-phpunit": "0.18.4", "squizlabs/php_codesniffer": "3.7.2", "symfony/cache": "^5.4|^6.0", @@ -1465,7 +1467,7 @@ ], "support": { "issues": "https://github.com/doctrine/dbal/issues", - "source": "https://github.com/doctrine/dbal/tree/3.6.4" + "source": "https://github.com/doctrine/dbal/tree/3.6.5" }, "funding": [ { @@ -1481,7 +1483,7 @@ "type": "tidelift" } ], - "time": "2023-06-15T07:40:12+00:00" + "time": "2023-07-17T09:15:50+00:00" }, { "name": "doctrine/deprecations", @@ -1919,16 +1921,16 @@ }, { "name": "filament/filament", - "version": "v2.17.50", + "version": "v2.17.51", "source": { "type": "git", "url": "https://github.com/filamentphp/panels.git", - "reference": "90514ebb0dcb6d2c9fe5608410bdb727ae272aed" + "reference": "8a735eadb6940d58215c5220d1f612bac3a47c21" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/filamentphp/panels/zipball/90514ebb0dcb6d2c9fe5608410bdb727ae272aed", - "reference": "90514ebb0dcb6d2c9fe5608410bdb727ae272aed", + "url": "https://api.github.com/repos/filamentphp/panels/zipball/8a735eadb6940d58215c5220d1f612bac3a47c21", + "reference": "8a735eadb6940d58215c5220d1f612bac3a47c21", "shasum": "" }, "require": { @@ -1977,20 +1979,20 @@ "issues": "https://github.com/filamentphp/filament/issues", "source": "https://github.com/filamentphp/filament" }, - "time": "2023-07-03T09:23:07+00:00" + "time": "2023-07-23T10:32:22+00:00" }, { "name": "filament/forms", - "version": "v2.17.50", + "version": "v2.17.51", "source": { "type": "git", "url": "https://github.com/filamentphp/forms.git", - "reference": "02a22e34909dbc93ebfe8a79499c1695727be68c" + "reference": "36406b7427166dbad1786b02fa0724ed4c2ab62e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/filamentphp/forms/zipball/02a22e34909dbc93ebfe8a79499c1695727be68c", - "reference": "02a22e34909dbc93ebfe8a79499c1695727be68c", + "url": "https://api.github.com/repos/filamentphp/forms/zipball/36406b7427166dbad1786b02fa0724ed4c2ab62e", + "reference": "36406b7427166dbad1786b02fa0724ed4c2ab62e", "shasum": "" }, "require": { @@ -2035,11 +2037,11 @@ "issues": "https://github.com/filamentphp/filament/issues", "source": "https://github.com/filamentphp/filament" }, - "time": "2023-07-03T09:23:02+00:00" + "time": "2023-07-23T10:32:22+00:00" }, { "name": "filament/notifications", - "version": "v2.17.50", + "version": "v2.17.51", "source": { "type": "git", "url": "https://github.com/filamentphp/notifications.git", @@ -2092,7 +2094,7 @@ }, { "name": "filament/support", - "version": "v2.17.50", + "version": "v2.17.51", "source": { "type": "git", "url": "https://github.com/filamentphp/support.git", @@ -2143,16 +2145,16 @@ }, { "name": "filament/tables", - "version": "v2.17.50", + "version": "v2.17.51", "source": { "type": "git", "url": "https://github.com/filamentphp/tables.git", - "reference": "1395ddf6c1e356f7e427e9cb20f6bbb9bf6803e0" + "reference": "0c66490a4a3e7809d3bb62c363f41840f6a9a875" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/filamentphp/tables/zipball/1395ddf6c1e356f7e427e9cb20f6bbb9bf6803e0", - "reference": "1395ddf6c1e356f7e427e9cb20f6bbb9bf6803e0", + "url": "https://api.github.com/repos/filamentphp/tables/zipball/0c66490a4a3e7809d3bb62c363f41840f6a9a875", + "reference": "0c66490a4a3e7809d3bb62c363f41840f6a9a875", "shasum": "" }, "require": { @@ -2195,7 +2197,7 @@ "issues": "https://github.com/filamentphp/filament/issues", "source": "https://github.com/filamentphp/filament" }, - "time": "2023-07-03T09:23:02+00:00" + "time": "2023-07-23T10:32:18+00:00" }, { "name": "francescomalatesta/laravel-feature", @@ -2659,16 +2661,16 @@ }, { "name": "guzzlehttp/promises", - "version": "2.0.0", + "version": "2.0.1", "source": { "type": "git", "url": "https://github.com/guzzle/promises.git", - "reference": "3a494dc7dc1d7d12e511890177ae2d0e6c107da6" + "reference": "111166291a0f8130081195ac4556a5587d7f1b5d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/promises/zipball/3a494dc7dc1d7d12e511890177ae2d0e6c107da6", - "reference": "3a494dc7dc1d7d12e511890177ae2d0e6c107da6", + "url": "https://api.github.com/repos/guzzle/promises/zipball/111166291a0f8130081195ac4556a5587d7f1b5d", + "reference": "111166291a0f8130081195ac4556a5587d7f1b5d", "shasum": "" }, "require": { @@ -2722,7 +2724,7 @@ ], "support": { "issues": "https://github.com/guzzle/promises/issues", - "source": "https://github.com/guzzle/promises/tree/2.0.0" + "source": "https://github.com/guzzle/promises/tree/2.0.1" }, "funding": [ { @@ -2738,20 +2740,20 @@ "type": "tidelift" } ], - "time": "2023-05-21T13:50:22+00:00" + "time": "2023-08-03T15:11:55+00:00" }, { "name": "guzzlehttp/psr7", - "version": "2.5.0", + "version": "2.6.0", "source": { "type": "git", "url": "https://github.com/guzzle/psr7.git", - "reference": "b635f279edd83fc275f822a1188157ffea568ff6" + "reference": "8bd7c33a0734ae1c5d074360512beb716bef3f77" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/b635f279edd83fc275f822a1188157ffea568ff6", - "reference": "b635f279edd83fc275f822a1188157ffea568ff6", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/8bd7c33a0734ae1c5d074360512beb716bef3f77", + "reference": "8bd7c33a0734ae1c5d074360512beb716bef3f77", "shasum": "" }, "require": { @@ -2838,7 +2840,7 @@ ], "support": { "issues": "https://github.com/guzzle/psr7/issues", - "source": "https://github.com/guzzle/psr7/tree/2.5.0" + "source": "https://github.com/guzzle/psr7/tree/2.6.0" }, "funding": [ { @@ -2854,7 +2856,7 @@ "type": "tidelift" } ], - "time": "2023-04-17T16:11:26+00:00" + "time": "2023-08-03T15:06:02+00:00" }, { "name": "guzzlehttp/uri-template", @@ -3154,18 +3156,86 @@ ], "time": "2022-05-21T17:30:32+00:00" }, + { + "name": "jantinnerezo/livewire-alert", + "version": "2.2.7", + "source": { + "type": "git", + "url": "https://github.com/jantinnerezo/livewire-alert.git", + "reference": "a017d3f41024ca3a589a6b0db5d0af3efe532fa9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/jantinnerezo/livewire-alert/zipball/a017d3f41024ca3a589a6b0db5d0af3efe532fa9", + "reference": "a017d3f41024ca3a589a6b0db5d0af3efe532fa9", + "shasum": "" + }, + "require": { + "illuminate/support": "^5.5 || ^6.0 || ^7.0 || ^8.0 || ^9.0 || ^10.0", + "livewire/livewire": "^2.0", + "php": "^7.4|^8.0|^8.1|^8.2" + }, + "require-dev": { + "orchestra/testbench": "^6.15|^7.0|^8.0", + "phpunit/phpunit": "^9.5|^10.0" + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "Jantinnerezo\\LivewireAlert\\LivewireAlertServiceProvider" + ], + "aliases": { + "LivewireAlert": "Jantinnerezo\\LivewireAlert\\LivewireAlertFacade" + } + } + }, + "autoload": { + "psr-4": { + "Jantinnerezo\\LivewireAlert\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jantinn Erezo", + "email": "erezojantinn@gmail.com", + "role": "Developer" + } + ], + "description": "This package provides a simple alert utilities for your livewire components.", + "homepage": "https://github.com/jantinnerezo/livewire-alert", + "keywords": [ + "jantinnerezo", + "livewire-alert" + ], + "support": { + "issues": "https://github.com/jantinnerezo/livewire-alert/issues", + "source": "https://github.com/jantinnerezo/livewire-alert/tree/2.2.7" + }, + "funding": [ + { + "url": "https://www.paypal.com/paypalme/jantinn", + "type": "custom" + } + ], + "time": "2023-02-15T18:05:31+00:00" + }, { "name": "jaybizzle/crawler-detect", - "version": "v1.2.115", + "version": "v1.2.116", "source": { "type": "git", "url": "https://github.com/JayBizzle/Crawler-Detect.git", - "reference": "4531e4a70d55d10cbe7d41ac1ff0d75a5fe2ef1e" + "reference": "97e9fe30219e60092e107651abb379a38b342921" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/JayBizzle/Crawler-Detect/zipball/4531e4a70d55d10cbe7d41ac1ff0d75a5fe2ef1e", - "reference": "4531e4a70d55d10cbe7d41ac1ff0d75a5fe2ef1e", + "url": "https://api.github.com/repos/JayBizzle/Crawler-Detect/zipball/97e9fe30219e60092e107651abb379a38b342921", + "reference": "97e9fe30219e60092e107651abb379a38b342921", "shasum": "" }, "require": { @@ -3202,9 +3272,9 @@ ], "support": { "issues": "https://github.com/JayBizzle/Crawler-Detect/issues", - "source": "https://github.com/JayBizzle/Crawler-Detect/tree/v1.2.115" + "source": "https://github.com/JayBizzle/Crawler-Detect/tree/v1.2.116" }, - "time": "2023-06-05T21:32:18+00:00" + "time": "2023-07-21T15:49:49+00:00" }, { "name": "jean85/pretty-package-versions", @@ -3642,16 +3712,16 @@ }, { "name": "laravel/framework", - "version": "v9.52.10", + "version": "v9.52.14", "source": { "type": "git", "url": "https://github.com/laravel/framework.git", - "reference": "858add225ce88a76c43aec0e7866288321ee0ee9" + "reference": "5366a9035100f858589e1b43bbcb134ffcc81a73" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/framework/zipball/858add225ce88a76c43aec0e7866288321ee0ee9", - "reference": "858add225ce88a76c43aec0e7866288321ee0ee9", + "url": "https://api.github.com/repos/laravel/framework/zipball/5366a9035100f858589e1b43bbcb134ffcc81a73", + "reference": "5366a9035100f858589e1b43bbcb134ffcc81a73", "shasum": "" }, "require": { @@ -3836,7 +3906,7 @@ "issues": "https://github.com/laravel/framework/issues", "source": "https://github.com/laravel/framework" }, - "time": "2023-06-27T13:25:54+00:00" + "time": "2023-08-02T14:58:02+00:00" }, { "name": "laravel/sanctum", @@ -3906,16 +3976,16 @@ }, { "name": "laravel/serializable-closure", - "version": "v1.3.0", + "version": "v1.3.1", "source": { "type": "git", "url": "https://github.com/laravel/serializable-closure.git", - "reference": "f23fe9d4e95255dacee1bf3525e0810d1a1b0f37" + "reference": "e5a3057a5591e1cfe8183034b0203921abe2c902" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/serializable-closure/zipball/f23fe9d4e95255dacee1bf3525e0810d1a1b0f37", - "reference": "f23fe9d4e95255dacee1bf3525e0810d1a1b0f37", + "url": "https://api.github.com/repos/laravel/serializable-closure/zipball/e5a3057a5591e1cfe8183034b0203921abe2c902", + "reference": "e5a3057a5591e1cfe8183034b0203921abe2c902", "shasum": "" }, "require": { @@ -3962,7 +4032,7 @@ "issues": "https://github.com/laravel/serializable-closure/issues", "source": "https://github.com/laravel/serializable-closure" }, - "time": "2023-01-30T18:31:20+00:00" + "time": "2023-07-14T13:56:28+00:00" }, { "name": "laravel/slack-notification-channel", @@ -4027,16 +4097,16 @@ }, { "name": "laravel/socialite", - "version": "v5.6.3", + "version": "v5.8.0", "source": { "type": "git", "url": "https://github.com/laravel/socialite.git", - "reference": "00ea7f8630673ea49304fc8a9fca5a64eb838c7e" + "reference": "50148edf24b6cd3e428aa9bc06a5d915b24376bb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/socialite/zipball/00ea7f8630673ea49304fc8a9fca5a64eb838c7e", - "reference": "00ea7f8630673ea49304fc8a9fca5a64eb838c7e", + "url": "https://api.github.com/repos/laravel/socialite/zipball/50148edf24b6cd3e428aa9bc06a5d915b24376bb", + "reference": "50148edf24b6cd3e428aa9bc06a5d915b24376bb", "shasum": "" }, "require": { @@ -4093,7 +4163,7 @@ "issues": "https://github.com/laravel/socialite/issues", "source": "https://github.com/laravel/socialite" }, - "time": "2023-06-06T13:42:43+00:00" + "time": "2023-07-14T14:22:58+00:00" }, { "name": "laravel/tinker", @@ -4501,16 +4571,16 @@ }, { "name": "league/glide", - "version": "2.2.4", + "version": "2.3.0", "source": { "type": "git", "url": "https://github.com/thephpleague/glide.git", - "reference": "d31132bf5651d5abeef345ff523cd9cf2575b971" + "reference": "2ff92c8f1edc80b74e2d3c5efccfc7223f74d407" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/glide/zipball/d31132bf5651d5abeef345ff523cd9cf2575b971", - "reference": "d31132bf5651d5abeef345ff523cd9cf2575b971", + "url": "https://api.github.com/repos/thephpleague/glide/zipball/2ff92c8f1edc80b74e2d3c5efccfc7223f74d407", + "reference": "2ff92c8f1edc80b74e2d3c5efccfc7223f74d407", "shasum": "" }, "require": { @@ -4560,32 +4630,32 @@ ], "support": { "issues": "https://github.com/thephpleague/glide/issues", - "source": "https://github.com/thephpleague/glide/tree/2.2.4" + "source": "https://github.com/thephpleague/glide/tree/2.3.0" }, - "time": "2023-04-18T18:42:22+00:00" + "time": "2023-07-08T06:26:07+00:00" }, { "name": "league/mime-type-detection", - "version": "1.11.0", + "version": "1.13.0", "source": { "type": "git", "url": "https://github.com/thephpleague/mime-type-detection.git", - "reference": "ff6248ea87a9f116e78edd6002e39e5128a0d4dd" + "reference": "a6dfb1194a2946fcdc1f38219445234f65b35c96" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/mime-type-detection/zipball/ff6248ea87a9f116e78edd6002e39e5128a0d4dd", - "reference": "ff6248ea87a9f116e78edd6002e39e5128a0d4dd", + "url": "https://api.github.com/repos/thephpleague/mime-type-detection/zipball/a6dfb1194a2946fcdc1f38219445234f65b35c96", + "reference": "a6dfb1194a2946fcdc1f38219445234f65b35c96", "shasum": "" }, "require": { "ext-fileinfo": "*", - "php": "^7.2 || ^8.0" + "php": "^7.4 || ^8.0" }, "require-dev": { "friendsofphp/php-cs-fixer": "^3.2", "phpstan/phpstan": "^0.12.68", - "phpunit/phpunit": "^8.5.8 || ^9.3" + "phpunit/phpunit": "^8.5.8 || ^9.3 || ^10.0" }, "type": "library", "autoload": { @@ -4606,7 +4676,7 @@ "description": "Mime-type detection for Flysystem", "support": { "issues": "https://github.com/thephpleague/mime-type-detection/issues", - "source": "https://github.com/thephpleague/mime-type-detection/tree/1.11.0" + "source": "https://github.com/thephpleague/mime-type-detection/tree/1.13.0" }, "funding": [ { @@ -4618,7 +4688,7 @@ "type": "tidelift" } ], - "time": "2022-04-17T13:12:02+00:00" + "time": "2023-08-05T12:09:49+00:00" }, { "name": "league/oauth1-client", @@ -4768,16 +4838,16 @@ }, { "name": "livewire/livewire", - "version": "v2.12.3", + "version": "v2.12.5", "source": { "type": "git", "url": "https://github.com/livewire/livewire.git", - "reference": "019b1e69d8cd8c7e749eba7a38e4fa69ecbc8f74" + "reference": "96a249f5ab51d8377817d802f91d1e440869c1d6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/livewire/livewire/zipball/019b1e69d8cd8c7e749eba7a38e4fa69ecbc8f74", - "reference": "019b1e69d8cd8c7e749eba7a38e4fa69ecbc8f74", + "url": "https://api.github.com/repos/livewire/livewire/zipball/96a249f5ab51d8377817d802f91d1e440869c1d6", + "reference": "96a249f5ab51d8377817d802f91d1e440869c1d6", "shasum": "" }, "require": { @@ -4829,7 +4899,7 @@ "description": "A front-end framework for Laravel.", "support": { "issues": "https://github.com/livewire/livewire/issues", - "source": "https://github.com/livewire/livewire/tree/v2.12.3" + "source": "https://github.com/livewire/livewire/tree/v2.12.5" }, "funding": [ { @@ -4837,20 +4907,20 @@ "type": "github" } ], - "time": "2023-03-03T20:12:38+00:00" + "time": "2023-08-02T06:31:31+00:00" }, { "name": "lorisleiva/laravel-actions", - "version": "v2.6.0", + "version": "v2.7.0", "source": { "type": "git", "url": "https://github.com/lorisleiva/laravel-actions.git", - "reference": "23439c9294d9bfc668f28f849c5df4ba88bdc4cd" + "reference": "0b1896c69d7977058ef2a63fb37a8ed0f6d71a9a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/lorisleiva/laravel-actions/zipball/23439c9294d9bfc668f28f849c5df4ba88bdc4cd", - "reference": "23439c9294d9bfc668f28f849c5df4ba88bdc4cd", + "url": "https://api.github.com/repos/lorisleiva/laravel-actions/zipball/0b1896c69d7977058ef2a63fb37a8ed0f6d71a9a", + "reference": "0b1896c69d7977058ef2a63fb37a8ed0f6d71a9a", "shasum": "" }, "require": { @@ -4904,7 +4974,7 @@ ], "support": { "issues": "https://github.com/lorisleiva/laravel-actions/issues", - "source": "https://github.com/lorisleiva/laravel-actions/tree/v2.6.0" + "source": "https://github.com/lorisleiva/laravel-actions/tree/v2.7.0" }, "funding": [ { @@ -4912,7 +4982,7 @@ "type": "github" } ], - "time": "2023-06-11T17:25:21+00:00" + "time": "2023-07-27T20:29:23+00:00" }, { "name": "lorisleiva/lody", @@ -5069,16 +5139,16 @@ }, { "name": "masterminds/html5", - "version": "2.8.0", + "version": "2.8.1", "source": { "type": "git", "url": "https://github.com/Masterminds/html5-php.git", - "reference": "3c5d5a56d56f48a1ca08a0670f0f80c1dad368f3" + "reference": "f47dcf3c70c584de14f21143c55d9939631bc6cf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Masterminds/html5-php/zipball/3c5d5a56d56f48a1ca08a0670f0f80c1dad368f3", - "reference": "3c5d5a56d56f48a1ca08a0670f0f80c1dad368f3", + "url": "https://api.github.com/repos/Masterminds/html5-php/zipball/f47dcf3c70c584de14f21143c55d9939631bc6cf", + "reference": "f47dcf3c70c584de14f21143c55d9939631bc6cf", "shasum": "" }, "require": { @@ -5130,9 +5200,9 @@ ], "support": { "issues": "https://github.com/Masterminds/html5-php/issues", - "source": "https://github.com/Masterminds/html5-php/tree/2.8.0" + "source": "https://github.com/Masterminds/html5-php/tree/2.8.1" }, - "time": "2023-04-26T07:27:39+00:00" + "time": "2023-05-10T11:58:31+00:00" }, { "name": "maxmind-db/reader", @@ -5574,20 +5644,20 @@ }, { "name": "nette/utils", - "version": "v4.0.0", + "version": "v4.0.1", "source": { "type": "git", "url": "https://github.com/nette/utils.git", - "reference": "cacdbf5a91a657ede665c541eda28941d4b09c1e" + "reference": "9124157137da01b1f5a5a22d6486cb975f26db7e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nette/utils/zipball/cacdbf5a91a657ede665c541eda28941d4b09c1e", - "reference": "cacdbf5a91a657ede665c541eda28941d4b09c1e", + "url": "https://api.github.com/repos/nette/utils/zipball/9124157137da01b1f5a5a22d6486cb975f26db7e", + "reference": "9124157137da01b1f5a5a22d6486cb975f26db7e", "shasum": "" }, "require": { - "php": ">=8.0 <8.3" + "php": ">=8.0 <8.4" }, "conflict": { "nette/finder": "<3", @@ -5595,7 +5665,7 @@ }, "require-dev": { "jetbrains/phpstorm-attributes": "dev-master", - "nette/tester": "^2.4", + "nette/tester": "^2.5", "phpstan/phpstan": "^1.0", "tracy/tracy": "^2.9" }, @@ -5655,9 +5725,9 @@ ], "support": { "issues": "https://github.com/nette/utils/issues", - "source": "https://github.com/nette/utils/tree/v4.0.0" + "source": "https://github.com/nette/utils/tree/v4.0.1" }, - "time": "2023-02-02T10:41:53+00:00" + "time": "2023-07-30T15:42:21+00:00" }, { "name": "nicmart/tree", @@ -6204,16 +6274,16 @@ }, { "name": "php-http/discovery", - "version": "1.19.0", + "version": "1.19.1", "source": { "type": "git", "url": "https://github.com/php-http/discovery.git", - "reference": "1856a119a0b0ba8da8b5c33c080aa7af8fac25b4" + "reference": "57f3de01d32085fea20865f9b16fb0e69347c39e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-http/discovery/zipball/1856a119a0b0ba8da8b5c33c080aa7af8fac25b4", - "reference": "1856a119a0b0ba8da8b5c33c080aa7af8fac25b4", + "url": "https://api.github.com/repos/php-http/discovery/zipball/57f3de01d32085fea20865f9b16fb0e69347c39e", + "reference": "57f3de01d32085fea20865f9b16fb0e69347c39e", "shasum": "" }, "require": { @@ -6276,9 +6346,9 @@ ], "support": { "issues": "https://github.com/php-http/discovery/issues", - "source": "https://github.com/php-http/discovery/tree/1.19.0" + "source": "https://github.com/php-http/discovery/tree/1.19.1" }, - "time": "2023-06-19T08:45:36+00:00" + "time": "2023-07-11T07:02:26+00:00" }, { "name": "php-http/httplug", @@ -7060,16 +7130,16 @@ }, { "name": "psy/psysh", - "version": "v0.11.18", + "version": "v0.11.20", "source": { "type": "git", "url": "https://github.com/bobthecow/psysh.git", - "reference": "4f00ee9e236fa6a48f4560d1300b9c961a70a7ec" + "reference": "0fa27040553d1d280a67a4393194df5228afea5b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/bobthecow/psysh/zipball/4f00ee9e236fa6a48f4560d1300b9c961a70a7ec", - "reference": "4f00ee9e236fa6a48f4560d1300b9c961a70a7ec", + "url": "https://api.github.com/repos/bobthecow/psysh/zipball/0fa27040553d1d280a67a4393194df5228afea5b", + "reference": "0fa27040553d1d280a67a4393194df5228afea5b", "shasum": "" }, "require": { @@ -7130,9 +7200,9 @@ ], "support": { "issues": "https://github.com/bobthecow/psysh/issues", - "source": "https://github.com/bobthecow/psysh/tree/v0.11.18" + "source": "https://github.com/bobthecow/psysh/tree/v0.11.20" }, - "time": "2023-05-23T02:31:11+00:00" + "time": "2023-07-31T14:32:22+00:00" }, { "name": "qcod/laravel-gamify", @@ -7735,16 +7805,16 @@ }, { "name": "sentry/sentry", - "version": "3.20.1", + "version": "3.21.0", "source": { "type": "git", "url": "https://github.com/getsentry/sentry-php.git", - "reference": "644ad9768c18139a80ac510090fad000d9ffd8a4" + "reference": "624aafc22b84b089ffa43b71fb01e0096505ec4f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/getsentry/sentry-php/zipball/644ad9768c18139a80ac510090fad000d9ffd8a4", - "reference": "644ad9768c18139a80ac510090fad000d9ffd8a4", + "url": "https://api.github.com/repos/getsentry/sentry-php/zipball/624aafc22b84b089ffa43b71fb01e0096505ec4f", + "reference": "624aafc22b84b089ffa43b71fb01e0096505ec4f", "shasum": "" }, "require": { @@ -7788,11 +7858,6 @@ "monolog/monolog": "Allow sending log messages to Sentry by using the included Monolog handler." }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.13.x-dev" - } - }, "autoload": { "files": [ "src/functions.php" @@ -7824,7 +7889,7 @@ ], "support": { "issues": "https://github.com/getsentry/sentry-php/issues", - "source": "https://github.com/getsentry/sentry-php/tree/3.20.1" + "source": "https://github.com/getsentry/sentry-php/tree/3.21.0" }, "funding": [ { @@ -7836,7 +7901,7 @@ "type": "custom" } ], - "time": "2023-06-26T11:01:40+00:00" + "time": "2023-07-31T15:31:24+00:00" }, { "name": "sentry/sentry-laravel", @@ -8052,16 +8117,16 @@ }, { "name": "spatie/browsershot", - "version": "3.58.0", + "version": "3.58.2", "source": { "type": "git", "url": "https://github.com/spatie/browsershot.git", - "reference": "aab060f4d7dddc8eda034481691b3b087f438a2e" + "reference": "6503b2b429e10ff28a4cdb9fffaecc25ba6d032c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/spatie/browsershot/zipball/aab060f4d7dddc8eda034481691b3b087f438a2e", - "reference": "aab060f4d7dddc8eda034481691b3b087f438a2e", + "url": "https://api.github.com/repos/spatie/browsershot/zipball/6503b2b429e10ff28a4cdb9fffaecc25ba6d032c", + "reference": "6503b2b429e10ff28a4cdb9fffaecc25ba6d032c", "shasum": "" }, "require": { @@ -8106,7 +8171,7 @@ "webpage" ], "support": { - "source": "https://github.com/spatie/browsershot/tree/3.58.0" + "source": "https://github.com/spatie/browsershot/tree/3.58.2" }, "funding": [ { @@ -8114,7 +8179,7 @@ "type": "github" } ], - "time": "2023-06-30T08:52:18+00:00" + "time": "2023-07-27T07:51:54+00:00" }, { "name": "spatie/crawler", @@ -8260,16 +8325,16 @@ }, { "name": "spatie/image", - "version": "2.2.6", + "version": "2.2.7", "source": { "type": "git", "url": "https://github.com/spatie/image.git", - "reference": "f72ca52acd77ca03b7843a0f86e2411ce90aecfc" + "reference": "2f802853aab017aa615224daae1588054b5ab20e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/spatie/image/zipball/f72ca52acd77ca03b7843a0f86e2411ce90aecfc", - "reference": "f72ca52acd77ca03b7843a0f86e2411ce90aecfc", + "url": "https://api.github.com/repos/spatie/image/zipball/2f802853aab017aa615224daae1588054b5ab20e", + "reference": "2f802853aab017aa615224daae1588054b5ab20e", "shasum": "" }, "require": { @@ -8278,7 +8343,7 @@ "ext-mbstring": "*", "league/glide": "^2.2.2", "php": "^8.0", - "spatie/image-optimizer": "^1.1", + "spatie/image-optimizer": "^1.7", "spatie/temporary-directory": "^1.0|^2.0", "symfony/process": "^3.0|^4.0|^5.0|^6.0" }, @@ -8313,7 +8378,7 @@ "spatie" ], "support": { - "source": "https://github.com/spatie/image/tree/2.2.6" + "source": "https://github.com/spatie/image/tree/2.2.7" }, "funding": [ { @@ -8325,20 +8390,20 @@ "type": "github" } ], - "time": "2023-05-06T10:20:33+00:00" + "time": "2023-07-24T13:54:13+00:00" }, { "name": "spatie/image-optimizer", - "version": "1.6.4", + "version": "1.7.1", "source": { "type": "git", "url": "https://github.com/spatie/image-optimizer.git", - "reference": "d997e01ba980b2769ddca2f00badd3b80c2a2512" + "reference": "af179994e2d2413e4b3ba2d348d06b4eaddbeb30" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/spatie/image-optimizer/zipball/d997e01ba980b2769ddca2f00badd3b80c2a2512", - "reference": "d997e01ba980b2769ddca2f00badd3b80c2a2512", + "url": "https://api.github.com/repos/spatie/image-optimizer/zipball/af179994e2d2413e4b3ba2d348d06b4eaddbeb30", + "reference": "af179994e2d2413e4b3ba2d348d06b4eaddbeb30", "shasum": "" }, "require": { @@ -8378,9 +8443,9 @@ ], "support": { "issues": "https://github.com/spatie/image-optimizer/issues", - "source": "https://github.com/spatie/image-optimizer/tree/1.6.4" + "source": "https://github.com/spatie/image-optimizer/tree/1.7.1" }, - "time": "2023-03-10T08:43:19+00:00" + "time": "2023-07-27T07:57:32+00:00" }, { "name": "spatie/invade", @@ -8624,16 +8689,16 @@ }, { "name": "spatie/laravel-medialibrary", - "version": "10.10.1", + "version": "10.11.2", "source": { "type": "git", "url": "https://github.com/spatie/laravel-medialibrary.git", - "reference": "84f7bb253bc7b9498ff2cd0d74f82e88d299c517" + "reference": "bac32801073bd9446277cdeb174cf4327ea28aef" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/spatie/laravel-medialibrary/zipball/84f7bb253bc7b9498ff2cd0d74f82e88d299c517", - "reference": "84f7bb253bc7b9498ff2cd0d74f82e88d299c517", + "url": "https://api.github.com/repos/spatie/laravel-medialibrary/zipball/bac32801073bd9446277cdeb174cf4327ea28aef", + "reference": "bac32801073bd9446277cdeb174cf4327ea28aef", "shasum": "" }, "require": { @@ -8649,7 +8714,7 @@ "intervention/image": "^2.7", "maennchen/zipstream-php": "^2.0|^3.0", "php": "^8.0", - "spatie/image": "^2.2.2", + "spatie/image": "^2.2.7", "spatie/temporary-directory": "^2.0", "symfony/console": "^6.0" }, @@ -8717,7 +8782,7 @@ ], "support": { "issues": "https://github.com/spatie/laravel-medialibrary/issues", - "source": "https://github.com/spatie/laravel-medialibrary/tree/10.10.1" + "source": "https://github.com/spatie/laravel-medialibrary/tree/10.11.2" }, "funding": [ { @@ -8729,7 +8794,7 @@ "type": "github" } ], - "time": "2023-06-29T07:18:20+00:00" + "time": "2023-07-27T08:00:59+00:00" }, { "name": "spatie/laravel-package-tools", @@ -9357,16 +9422,16 @@ }, { "name": "symfony/console", - "version": "v6.3.0", + "version": "v6.3.2", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "8788808b07cf0bdd6e4b7fdd23d8ddb1470c83b7" + "reference": "aa5d64ad3f63f2e48964fc81ee45cb318a723898" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/8788808b07cf0bdd6e4b7fdd23d8ddb1470c83b7", - "reference": "8788808b07cf0bdd6e4b7fdd23d8ddb1470c83b7", + "url": "https://api.github.com/repos/symfony/console/zipball/aa5d64ad3f63f2e48964fc81ee45cb318a723898", + "reference": "aa5d64ad3f63f2e48964fc81ee45cb318a723898", "shasum": "" }, "require": { @@ -9427,7 +9492,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v6.3.0" + "source": "https://github.com/symfony/console/tree/v6.3.2" }, "funding": [ { @@ -9443,20 +9508,20 @@ "type": "tidelift" } ], - "time": "2023-05-29T12:49:39+00:00" + "time": "2023-07-19T20:17:28+00:00" }, { "name": "symfony/css-selector", - "version": "v6.3.0", + "version": "v6.3.2", "source": { "type": "git", "url": "https://github.com/symfony/css-selector.git", - "reference": "88453e64cd86c5b60e8d2fb2c6f953bbc353ffbf" + "reference": "883d961421ab1709877c10ac99451632a3d6fa57" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/css-selector/zipball/88453e64cd86c5b60e8d2fb2c6f953bbc353ffbf", - "reference": "88453e64cd86c5b60e8d2fb2c6f953bbc353ffbf", + "url": "https://api.github.com/repos/symfony/css-selector/zipball/883d961421ab1709877c10ac99451632a3d6fa57", + "reference": "883d961421ab1709877c10ac99451632a3d6fa57", "shasum": "" }, "require": { @@ -9492,7 +9557,7 @@ "description": "Converts CSS selectors to XPath expressions", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/css-selector/tree/v6.3.0" + "source": "https://github.com/symfony/css-selector/tree/v6.3.2" }, "funding": [ { @@ -9508,7 +9573,7 @@ "type": "tidelift" } ], - "time": "2023-03-20T16:43:42+00:00" + "time": "2023-07-12T16:00:22+00:00" }, { "name": "symfony/deprecation-contracts", @@ -9646,16 +9711,16 @@ }, { "name": "symfony/error-handler", - "version": "v6.3.0", + "version": "v6.3.2", "source": { "type": "git", "url": "https://github.com/symfony/error-handler.git", - "reference": "99d2d814a6351461af350ead4d963bd67451236f" + "reference": "85fd65ed295c4078367c784e8a5a6cee30348b7a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/error-handler/zipball/99d2d814a6351461af350ead4d963bd67451236f", - "reference": "99d2d814a6351461af350ead4d963bd67451236f", + "url": "https://api.github.com/repos/symfony/error-handler/zipball/85fd65ed295c4078367c784e8a5a6cee30348b7a", + "reference": "85fd65ed295c4078367c784e8a5a6cee30348b7a", "shasum": "" }, "require": { @@ -9700,7 +9765,7 @@ "description": "Provides tools to manage errors and ease debugging PHP code", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/error-handler/tree/v6.3.0" + "source": "https://github.com/symfony/error-handler/tree/v6.3.2" }, "funding": [ { @@ -9716,20 +9781,20 @@ "type": "tidelift" } ], - "time": "2023-05-10T12:03:13+00:00" + "time": "2023-07-16T17:05:46+00:00" }, { "name": "symfony/event-dispatcher", - "version": "v6.3.0", + "version": "v6.3.2", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "3af8ac1a3f98f6dbc55e10ae59c9e44bfc38dfaa" + "reference": "adb01fe097a4ee930db9258a3cc906b5beb5cf2e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/3af8ac1a3f98f6dbc55e10ae59c9e44bfc38dfaa", - "reference": "3af8ac1a3f98f6dbc55e10ae59c9e44bfc38dfaa", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/adb01fe097a4ee930db9258a3cc906b5beb5cf2e", + "reference": "adb01fe097a4ee930db9258a3cc906b5beb5cf2e", "shasum": "" }, "require": { @@ -9780,7 +9845,7 @@ "description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/event-dispatcher/tree/v6.3.0" + "source": "https://github.com/symfony/event-dispatcher/tree/v6.3.2" }, "funding": [ { @@ -9796,7 +9861,7 @@ "type": "tidelift" } ], - "time": "2023-04-21T14:41:17+00:00" + "time": "2023-07-06T06:56:43+00:00" }, { "name": "symfony/event-dispatcher-contracts", @@ -9876,16 +9941,16 @@ }, { "name": "symfony/finder", - "version": "v6.3.0", + "version": "v6.3.3", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "d9b01ba073c44cef617c7907ce2419f8d00d75e2" + "reference": "9915db259f67d21eefee768c1abcf1cc61b1fc9e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/d9b01ba073c44cef617c7907ce2419f8d00d75e2", - "reference": "d9b01ba073c44cef617c7907ce2419f8d00d75e2", + "url": "https://api.github.com/repos/symfony/finder/zipball/9915db259f67d21eefee768c1abcf1cc61b1fc9e", + "reference": "9915db259f67d21eefee768c1abcf1cc61b1fc9e", "shasum": "" }, "require": { @@ -9920,7 +9985,7 @@ "description": "Finds files and directories via an intuitive fluent interface", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/finder/tree/v6.3.0" + "source": "https://github.com/symfony/finder/tree/v6.3.3" }, "funding": [ { @@ -9936,20 +10001,20 @@ "type": "tidelift" } ], - "time": "2023-04-02T01:25:41+00:00" + "time": "2023-07-31T08:31:44+00:00" }, { "name": "symfony/http-client", - "version": "v6.3.1", + "version": "v6.3.2", "source": { "type": "git", "url": "https://github.com/symfony/http-client.git", - "reference": "1c828a06aef2f5eeba42026dfc532d4fc5406123" + "reference": "15f9f4bad62bfcbe48b5dedd866f04a08fc7ff00" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-client/zipball/1c828a06aef2f5eeba42026dfc532d4fc5406123", - "reference": "1c828a06aef2f5eeba42026dfc532d4fc5406123", + "url": "https://api.github.com/repos/symfony/http-client/zipball/15f9f4bad62bfcbe48b5dedd866f04a08fc7ff00", + "reference": "15f9f4bad62bfcbe48b5dedd866f04a08fc7ff00", "shasum": "" }, "require": { @@ -10012,7 +10077,7 @@ "http" ], "support": { - "source": "https://github.com/symfony/http-client/tree/v6.3.1" + "source": "https://github.com/symfony/http-client/tree/v6.3.2" }, "funding": [ { @@ -10028,7 +10093,7 @@ "type": "tidelift" } ], - "time": "2023-06-24T11:51:27+00:00" + "time": "2023-07-05T08:41:27+00:00" }, { "name": "symfony/http-client-contracts", @@ -10110,16 +10175,16 @@ }, { "name": "symfony/http-foundation", - "version": "v6.3.1", + "version": "v6.3.2", "source": { "type": "git", "url": "https://github.com/symfony/http-foundation.git", - "reference": "e0ad0d153e1c20069250986cd9e9dd1ccebb0d66" + "reference": "43ed99d30f5f466ffa00bdac3f5f7aa9cd7617c3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/e0ad0d153e1c20069250986cd9e9dd1ccebb0d66", - "reference": "e0ad0d153e1c20069250986cd9e9dd1ccebb0d66", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/43ed99d30f5f466ffa00bdac3f5f7aa9cd7617c3", + "reference": "43ed99d30f5f466ffa00bdac3f5f7aa9cd7617c3", "shasum": "" }, "require": { @@ -10167,7 +10232,7 @@ "description": "Defines an object-oriented layer for the HTTP specification", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-foundation/tree/v6.3.1" + "source": "https://github.com/symfony/http-foundation/tree/v6.3.2" }, "funding": [ { @@ -10183,20 +10248,20 @@ "type": "tidelift" } ], - "time": "2023-06-24T11:51:27+00:00" + "time": "2023-07-23T21:58:39+00:00" }, { "name": "symfony/http-kernel", - "version": "v6.3.1", + "version": "v6.3.3", "source": { "type": "git", "url": "https://github.com/symfony/http-kernel.git", - "reference": "161e16fd2e35fb4881a43bc8b383dfd5be4ac374" + "reference": "d3b567f0addf695e10b0c6d57564a9bea2e058ee" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/161e16fd2e35fb4881a43bc8b383dfd5be4ac374", - "reference": "161e16fd2e35fb4881a43bc8b383dfd5be4ac374", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/d3b567f0addf695e10b0c6d57564a9bea2e058ee", + "reference": "d3b567f0addf695e10b0c6d57564a9bea2e058ee", "shasum": "" }, "require": { @@ -10280,7 +10345,7 @@ "description": "Provides a structured process for converting a Request into a Response", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-kernel/tree/v6.3.1" + "source": "https://github.com/symfony/http-kernel/tree/v6.3.3" }, "funding": [ { @@ -10296,7 +10361,7 @@ "type": "tidelift" } ], - "time": "2023-06-26T06:07:32+00:00" + "time": "2023-07-31T10:33:00+00:00" }, { "name": "symfony/mailer", @@ -10380,16 +10445,16 @@ }, { "name": "symfony/mailgun-mailer", - "version": "v6.3.0", + "version": "v6.3.2", "source": { "type": "git", "url": "https://github.com/symfony/mailgun-mailer.git", - "reference": "2fafefe8683a93155aceb6cca622c7cee2e27174" + "reference": "df371e42a4c2a78a28c8de910f96949040e308fd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/mailgun-mailer/zipball/2fafefe8683a93155aceb6cca622c7cee2e27174", - "reference": "2fafefe8683a93155aceb6cca622c7cee2e27174", + "url": "https://api.github.com/repos/symfony/mailgun-mailer/zipball/df371e42a4c2a78a28c8de910f96949040e308fd", + "reference": "df371e42a4c2a78a28c8de910f96949040e308fd", "shasum": "" }, "require": { @@ -10429,7 +10494,7 @@ "description": "Symfony Mailgun Mailer Bridge", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/mailgun-mailer/tree/v6.3.0" + "source": "https://github.com/symfony/mailgun-mailer/tree/v6.3.2" }, "funding": [ { @@ -10445,24 +10510,25 @@ "type": "tidelift" } ], - "time": "2023-05-02T16:15:19+00:00" + "time": "2023-07-20T10:26:17+00:00" }, { "name": "symfony/mime", - "version": "v6.3.0", + "version": "v6.3.3", "source": { "type": "git", "url": "https://github.com/symfony/mime.git", - "reference": "7b5d2121858cd6efbed778abce9cfdd7ab1f62ad" + "reference": "9a0cbd52baa5ba5a5b1f0cacc59466f194730f98" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/mime/zipball/7b5d2121858cd6efbed778abce9cfdd7ab1f62ad", - "reference": "7b5d2121858cd6efbed778abce9cfdd7ab1f62ad", + "url": "https://api.github.com/repos/symfony/mime/zipball/9a0cbd52baa5ba5a5b1f0cacc59466f194730f98", + "reference": "9a0cbd52baa5ba5a5b1f0cacc59466f194730f98", "shasum": "" }, "require": { "php": ">=8.1", + "symfony/deprecation-contracts": "^2.5|^3", "symfony/polyfill-intl-idn": "^1.10", "symfony/polyfill-mbstring": "^1.0" }, @@ -10471,7 +10537,7 @@ "phpdocumentor/reflection-docblock": "<3.2.2", "phpdocumentor/type-resolver": "<1.4.0", "symfony/mailer": "<5.4", - "symfony/serializer": "<6.2" + "symfony/serializer": "<6.2.13|>=6.3,<6.3.2" }, "require-dev": { "egulias/email-validator": "^2.1.10|^3.1|^4", @@ -10480,7 +10546,7 @@ "symfony/dependency-injection": "^5.4|^6.0", "symfony/property-access": "^5.4|^6.0", "symfony/property-info": "^5.4|^6.0", - "symfony/serializer": "^6.2" + "symfony/serializer": "~6.2.13|^6.3.2" }, "type": "library", "autoload": { @@ -10512,7 +10578,7 @@ "mime-type" ], "support": { - "source": "https://github.com/symfony/mime/tree/v6.3.0" + "source": "https://github.com/symfony/mime/tree/v6.3.3" }, "funding": [ { @@ -10528,7 +10594,7 @@ "type": "tidelift" } ], - "time": "2023-04-28T15:57:00+00:00" + "time": "2023-07-31T07:08:24+00:00" }, { "name": "symfony/options-resolver", @@ -11334,16 +11400,16 @@ }, { "name": "symfony/process", - "version": "v6.3.0", + "version": "v6.3.2", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "8741e3ed7fe2e91ec099e02446fb86667a0f1628" + "reference": "c5ce962db0d9b6e80247ca5eb9af6472bd4d7b5d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/8741e3ed7fe2e91ec099e02446fb86667a0f1628", - "reference": "8741e3ed7fe2e91ec099e02446fb86667a0f1628", + "url": "https://api.github.com/repos/symfony/process/zipball/c5ce962db0d9b6e80247ca5eb9af6472bd4d7b5d", + "reference": "c5ce962db0d9b6e80247ca5eb9af6472bd4d7b5d", "shasum": "" }, "require": { @@ -11375,7 +11441,7 @@ "description": "Executes commands in sub-processes", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/process/tree/v6.3.0" + "source": "https://github.com/symfony/process/tree/v6.3.2" }, "funding": [ { @@ -11391,25 +11457,26 @@ "type": "tidelift" } ], - "time": "2023-05-19T08:06:44+00:00" + "time": "2023-07-12T16:00:22+00:00" }, { "name": "symfony/psr-http-message-bridge", - "version": "v2.2.0", + "version": "v2.3.1", "source": { "type": "git", "url": "https://github.com/symfony/psr-http-message-bridge.git", - "reference": "28a732c05bbad801304ad5a5c674cf2970508993" + "reference": "581ca6067eb62640de5ff08ee1ba6850a0ee472e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/psr-http-message-bridge/zipball/28a732c05bbad801304ad5a5c674cf2970508993", - "reference": "28a732c05bbad801304ad5a5c674cf2970508993", + "url": "https://api.github.com/repos/symfony/psr-http-message-bridge/zipball/581ca6067eb62640de5ff08ee1ba6850a0ee472e", + "reference": "581ca6067eb62640de5ff08ee1ba6850a0ee472e", "shasum": "" }, "require": { "php": ">=7.2.5", "psr/http-message": "^1.0 || ^2.0", + "symfony/deprecation-contracts": "^2.5 || ^3.0", "symfony/http-foundation": "^5.4 || ^6.0" }, "require-dev": { @@ -11428,7 +11495,7 @@ "type": "symfony-bridge", "extra": { "branch-alias": { - "dev-main": "2.2-dev" + "dev-main": "2.3-dev" } }, "autoload": { @@ -11463,7 +11530,7 @@ ], "support": { "issues": "https://github.com/symfony/psr-http-message-bridge/issues", - "source": "https://github.com/symfony/psr-http-message-bridge/tree/v2.2.0" + "source": "https://github.com/symfony/psr-http-message-bridge/tree/v2.3.1" }, "funding": [ { @@ -11479,24 +11546,25 @@ "type": "tidelift" } ], - "time": "2023-04-21T08:40:19+00:00" + "time": "2023-07-26T11:53:26+00:00" }, { "name": "symfony/routing", - "version": "v6.3.1", + "version": "v6.3.3", "source": { "type": "git", "url": "https://github.com/symfony/routing.git", - "reference": "d37ad1779c38b8eb71996d17dc13030dcb7f9cf5" + "reference": "e7243039ab663822ff134fbc46099b5fdfa16f6a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/routing/zipball/d37ad1779c38b8eb71996d17dc13030dcb7f9cf5", - "reference": "d37ad1779c38b8eb71996d17dc13030dcb7f9cf5", + "url": "https://api.github.com/repos/symfony/routing/zipball/e7243039ab663822ff134fbc46099b5fdfa16f6a", + "reference": "e7243039ab663822ff134fbc46099b5fdfa16f6a", "shasum": "" }, "require": { - "php": ">=8.1" + "php": ">=8.1", + "symfony/deprecation-contracts": "^2.5|^3" }, "conflict": { "doctrine/annotations": "<1.12", @@ -11545,7 +11613,7 @@ "url" ], "support": { - "source": "https://github.com/symfony/routing/tree/v6.3.1" + "source": "https://github.com/symfony/routing/tree/v6.3.3" }, "funding": [ { @@ -11561,7 +11629,7 @@ "type": "tidelift" } ], - "time": "2023-06-05T15:30:22+00:00" + "time": "2023-07-31T07:08:24+00:00" }, { "name": "symfony/service-contracts", @@ -11647,16 +11715,16 @@ }, { "name": "symfony/string", - "version": "v6.3.0", + "version": "v6.3.2", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "f2e190ee75ff0f5eced645ec0be5c66fac81f51f" + "reference": "53d1a83225002635bca3482fcbf963001313fb68" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/f2e190ee75ff0f5eced645ec0be5c66fac81f51f", - "reference": "f2e190ee75ff0f5eced645ec0be5c66fac81f51f", + "url": "https://api.github.com/repos/symfony/string/zipball/53d1a83225002635bca3482fcbf963001313fb68", + "reference": "53d1a83225002635bca3482fcbf963001313fb68", "shasum": "" }, "require": { @@ -11713,7 +11781,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v6.3.0" + "source": "https://github.com/symfony/string/tree/v6.3.2" }, "funding": [ { @@ -11729,24 +11797,25 @@ "type": "tidelift" } ], - "time": "2023-03-21T21:06:29+00:00" + "time": "2023-07-05T08:41:27+00:00" }, { "name": "symfony/translation", - "version": "v6.3.0", + "version": "v6.3.3", "source": { "type": "git", "url": "https://github.com/symfony/translation.git", - "reference": "f72b2cba8f79dd9d536f534f76874b58ad37876f" + "reference": "3ed078c54bc98bbe4414e1e9b2d5e85ed5a5c8bd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation/zipball/f72b2cba8f79dd9d536f534f76874b58ad37876f", - "reference": "f72b2cba8f79dd9d536f534f76874b58ad37876f", + "url": "https://api.github.com/repos/symfony/translation/zipball/3ed078c54bc98bbe4414e1e9b2d5e85ed5a5c8bd", + "reference": "3ed078c54bc98bbe4414e1e9b2d5e85ed5a5c8bd", "shasum": "" }, "require": { "php": ">=8.1", + "symfony/deprecation-contracts": "^2.5|^3", "symfony/polyfill-mbstring": "~1.0", "symfony/translation-contracts": "^2.5|^3.0" }, @@ -11807,7 +11876,7 @@ "description": "Provides tools to internationalize your application", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/translation/tree/v6.3.0" + "source": "https://github.com/symfony/translation/tree/v6.3.3" }, "funding": [ { @@ -11823,7 +11892,7 @@ "type": "tidelift" } ], - "time": "2023-05-19T12:46:45+00:00" + "time": "2023-07-31T07:08:24+00:00" }, { "name": "symfony/translation-contracts", @@ -11979,20 +12048,21 @@ }, { "name": "symfony/var-dumper", - "version": "v6.3.1", + "version": "v6.3.3", "source": { "type": "git", "url": "https://github.com/symfony/var-dumper.git", - "reference": "c81268d6960ddb47af17391a27d222bd58cf0515" + "reference": "77fb4f2927f6991a9843633925d111147449ee7a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/c81268d6960ddb47af17391a27d222bd58cf0515", - "reference": "c81268d6960ddb47af17391a27d222bd58cf0515", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/77fb4f2927f6991a9843633925d111147449ee7a", + "reference": "77fb4f2927f6991a9843633925d111147449ee7a", "shasum": "" }, "require": { "php": ">=8.1", + "symfony/deprecation-contracts": "^2.5|^3", "symfony/polyfill-mbstring": "~1.0" }, "conflict": { @@ -12001,6 +12071,7 @@ "require-dev": { "ext-iconv": "*", "symfony/console": "^5.4|^6.0", + "symfony/http-kernel": "^5.4|^6.0", "symfony/process": "^5.4|^6.0", "symfony/uid": "^5.4|^6.0", "twig/twig": "^2.13|^3.0.4" @@ -12041,7 +12112,7 @@ "dump" ], "support": { - "source": "https://github.com/symfony/var-dumper/tree/v6.3.1" + "source": "https://github.com/symfony/var-dumper/tree/v6.3.3" }, "funding": [ { @@ -12057,7 +12128,7 @@ "type": "tidelift" } ], - "time": "2023-06-21T12:08:28+00:00" + "time": "2023-07-31T07:08:24+00:00" }, { "name": "tgalopin/html-sanitizer", @@ -12740,16 +12811,16 @@ "packages-dev": [ { "name": "barryvdh/laravel-debugbar", - "version": "v3.8.1", + "version": "v3.8.2", "source": { "type": "git", "url": "https://github.com/barryvdh/laravel-debugbar.git", - "reference": "aff3235fecb4104203b1e62c32239c56530eee32" + "reference": "56a2dc1da9d3219164074713983eef68996386cf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/barryvdh/laravel-debugbar/zipball/aff3235fecb4104203b1e62c32239c56530eee32", - "reference": "aff3235fecb4104203b1e62c32239c56530eee32", + "url": "https://api.github.com/repos/barryvdh/laravel-debugbar/zipball/56a2dc1da9d3219164074713983eef68996386cf", + "reference": "56a2dc1da9d3219164074713983eef68996386cf", "shasum": "" }, "require": { @@ -12808,7 +12879,7 @@ ], "support": { "issues": "https://github.com/barryvdh/laravel-debugbar/issues", - "source": "https://github.com/barryvdh/laravel-debugbar/tree/v3.8.1" + "source": "https://github.com/barryvdh/laravel-debugbar/tree/v3.8.2" }, "funding": [ { @@ -12820,7 +12891,7 @@ "type": "github" } ], - "time": "2023-02-21T14:21:02+00:00" + "time": "2023-07-26T04:57:49+00:00" }, { "name": "barryvdh/laravel-ide-helper", @@ -13261,16 +13332,16 @@ }, { "name": "filp/whoops", - "version": "2.15.2", + "version": "2.15.3", "source": { "type": "git", "url": "https://github.com/filp/whoops.git", - "reference": "aac9304c5ed61bf7b1b7a6064bf9806ab842ce73" + "reference": "c83e88a30524f9360b11f585f71e6b17313b7187" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/filp/whoops/zipball/aac9304c5ed61bf7b1b7a6064bf9806ab842ce73", - "reference": "aac9304c5ed61bf7b1b7a6064bf9806ab842ce73", + "url": "https://api.github.com/repos/filp/whoops/zipball/c83e88a30524f9360b11f585f71e6b17313b7187", + "reference": "c83e88a30524f9360b11f585f71e6b17313b7187", "shasum": "" }, "require": { @@ -13320,7 +13391,7 @@ ], "support": { "issues": "https://github.com/filp/whoops/issues", - "source": "https://github.com/filp/whoops/tree/2.15.2" + "source": "https://github.com/filp/whoops/tree/2.15.3" }, "funding": [ { @@ -13328,7 +13399,7 @@ "type": "github" } ], - "time": "2023-04-12T12:00:00+00:00" + "time": "2023-07-13T12:00:00+00:00" }, { "name": "hamcrest/hamcrest-php", @@ -13383,16 +13454,16 @@ }, { "name": "laravel/pint", - "version": "v1.10.3", + "version": "v1.10.5", "source": { "type": "git", "url": "https://github.com/laravel/pint.git", - "reference": "c472786bca01e4812a9bb7933b23edfc5b6877b7" + "reference": "a458fb057bfa2f5a09888a8aa349610be807b0c3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/pint/zipball/c472786bca01e4812a9bb7933b23edfc5b6877b7", - "reference": "c472786bca01e4812a9bb7933b23edfc5b6877b7", + "url": "https://api.github.com/repos/laravel/pint/zipball/a458fb057bfa2f5a09888a8aa349610be807b0c3", + "reference": "a458fb057bfa2f5a09888a8aa349610be807b0c3", "shasum": "" }, "require": { @@ -13403,9 +13474,9 @@ "php": "^8.1.0" }, "require-dev": { - "friendsofphp/php-cs-fixer": "^3.18.0", + "friendsofphp/php-cs-fixer": "^3.21.1", "illuminate/view": "^10.5.1", - "laravel-zero/framework": "^10.0.2", + "laravel-zero/framework": "^10.1.1", "mockery/mockery": "^1.5.1", "nunomaduro/larastan": "^2.5.1", "nunomaduro/termwind": "^1.15.1", @@ -13445,20 +13516,20 @@ "issues": "https://github.com/laravel/pint/issues", "source": "https://github.com/laravel/pint" }, - "time": "2023-06-20T15:55:03+00:00" + "time": "2023-07-14T10:26:01+00:00" }, { "name": "laravel/sail", - "version": "v1.23.0", + "version": "v1.23.1", "source": { "type": "git", "url": "https://github.com/laravel/sail.git", - "reference": "a2e046f748e87d3ef8b2b381e0e5c5a11f34e46b" + "reference": "62582606f80466aa81fba40b193b289106902853" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/sail/zipball/a2e046f748e87d3ef8b2b381e0e5c5a11f34e46b", - "reference": "a2e046f748e87d3ef8b2b381e0e5c5a11f34e46b", + "url": "https://api.github.com/repos/laravel/sail/zipball/62582606f80466aa81fba40b193b289106902853", + "reference": "62582606f80466aa81fba40b193b289106902853", "shasum": "" }, "require": { @@ -13510,7 +13581,7 @@ "issues": "https://github.com/laravel/sail/issues", "source": "https://github.com/laravel/sail" }, - "time": "2023-06-16T21:20:12+00:00" + "time": "2023-06-28T18:31:28+00:00" }, { "name": "maximebf/debugbar", @@ -13580,37 +13651,33 @@ }, { "name": "mockery/mockery", - "version": "1.6.2", + "version": "1.6.5", "source": { "type": "git", "url": "https://github.com/mockery/mockery.git", - "reference": "13a7fa2642c76c58fa2806ef7f565344c817a191" + "reference": "68782e943f9ffcbc72bda08aedabe73fecb50041" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/mockery/mockery/zipball/13a7fa2642c76c58fa2806ef7f565344c817a191", - "reference": "13a7fa2642c76c58fa2806ef7f565344c817a191", + "url": "https://api.github.com/repos/mockery/mockery/zipball/68782e943f9ffcbc72bda08aedabe73fecb50041", + "reference": "68782e943f9ffcbc72bda08aedabe73fecb50041", "shasum": "" }, "require": { "hamcrest/hamcrest-php": "^2.0.1", "lib-pcre": ">=7.0", - "php": "^7.4 || ^8.0" + "php": ">=7.3" }, "conflict": { "phpunit/phpunit": "<8.0" }, "require-dev": { - "phpunit/phpunit": "^8.5 || ^9.3", - "psalm/plugin-phpunit": "^0.18", - "vimeo/psalm": "^5.9" + "phpunit/phpunit": "^8.5 || ^9.6.10", + "psalm/plugin-phpunit": "^0.18.4", + "symplify/easy-coding-standard": "^11.5.0", + "vimeo/psalm": "^4.30" }, "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.6.x-dev" - } - }, "autoload": { "files": [ "library/helpers.php", @@ -13628,12 +13695,20 @@ { "name": "Pádraic Brady", "email": "padraic.brady@gmail.com", - "homepage": "http://blog.astrumfutura.com" + "homepage": "https://github.com/padraic", + "role": "Author" }, { "name": "Dave Marshall", "email": "dave.marshall@atstsolutions.co.uk", - "homepage": "http://davedevelopment.co.uk" + "homepage": "https://davedevelopment.co.uk", + "role": "Developer" + }, + { + "name": "Nathanael Esayeas", + "email": "nathanael.esayeas@protonmail.com", + "homepage": "https://github.com/ghostwriter", + "role": "Lead Developer" } ], "description": "Mockery is a simple yet flexible PHP mock object framework", @@ -13651,10 +13726,13 @@ "testing" ], "support": { + "docs": "https://docs.mockery.io/", "issues": "https://github.com/mockery/mockery/issues", - "source": "https://github.com/mockery/mockery/tree/1.6.2" + "rss": "https://github.com/mockery/mockery/releases.atom", + "security": "https://github.com/mockery/mockery/security/advisories", + "source": "https://github.com/mockery/mockery" }, - "time": "2023-06-07T09:07:52+00:00" + "time": "2023-08-06T00:30:34+00:00" }, { "name": "myclabs/deep-copy", @@ -13805,16 +13883,16 @@ }, { "name": "nunomaduro/larastan", - "version": "v2.6.3", + "version": "v2.6.4", "source": { "type": "git", "url": "https://github.com/nunomaduro/larastan.git", - "reference": "73e5be5f5c732212ce6ca77ffd2753a136f36a23" + "reference": "6c5e8820f3db6397546f3ce48520af9d312aed27" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nunomaduro/larastan/zipball/73e5be5f5c732212ce6ca77ffd2753a136f36a23", - "reference": "73e5be5f5c732212ce6ca77ffd2753a136f36a23", + "url": "https://api.github.com/repos/nunomaduro/larastan/zipball/6c5e8820f3db6397546f3ce48520af9d312aed27", + "reference": "6c5e8820f3db6397546f3ce48520af9d312aed27", "shasum": "" }, "require": { @@ -13877,7 +13955,7 @@ ], "support": { "issues": "https://github.com/nunomaduro/larastan/issues", - "source": "https://github.com/nunomaduro/larastan/tree/v2.6.3" + "source": "https://github.com/nunomaduro/larastan/tree/v2.6.4" }, "funding": [ { @@ -13897,27 +13975,27 @@ "type": "patreon" } ], - "time": "2023-06-13T21:39:27+00:00" + "time": "2023-07-29T12:13:13+00:00" }, { "name": "pestphp/pest", - "version": "v1.23.0", + "version": "v1.23.1", "source": { "type": "git", "url": "https://github.com/pestphp/pest.git", - "reference": "061c9de301531e500a8157b476a5899361e60068" + "reference": "5c56ad8772b89611c72a07e23f6e30aa29dc677a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/pestphp/pest/zipball/061c9de301531e500a8157b476a5899361e60068", - "reference": "061c9de301531e500a8157b476a5899361e60068", + "url": "https://api.github.com/repos/pestphp/pest/zipball/5c56ad8772b89611c72a07e23f6e30aa29dc677a", + "reference": "5c56ad8772b89611c72a07e23f6e30aa29dc677a", "shasum": "" }, "require": { "nunomaduro/collision": "^5.11.0|^6.4.0", "pestphp/pest-plugin": "^1.1.0", "php": "^7.3 || ^8.0", - "phpunit/phpunit": "^9.6.7" + "phpunit/phpunit": "^9.6.10" }, "require-dev": { "illuminate/console": "^8.83.27", @@ -13978,7 +14056,7 @@ ], "support": { "issues": "https://github.com/pestphp/pest/issues", - "source": "https://github.com/pestphp/pest/tree/v1.23.0" + "source": "https://github.com/pestphp/pest/tree/v1.23.1" }, "funding": [ { @@ -13990,7 +14068,7 @@ "type": "github" } ], - "time": "2023-04-19T20:10:22+00:00" + "time": "2023-07-12T19:42:47+00:00" }, { "name": "pestphp/pest-plugin", @@ -14511,16 +14589,16 @@ }, { "name": "phpstan/phpdoc-parser", - "version": "1.22.1", + "version": "1.23.1", "source": { "type": "git", "url": "https://github.com/phpstan/phpdoc-parser.git", - "reference": "65c39594fbd8c67abfc68bb323f86447bab79cc0" + "reference": "846ae76eef31c6d7790fac9bc399ecee45160b26" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/65c39594fbd8c67abfc68bb323f86447bab79cc0", - "reference": "65c39594fbd8c67abfc68bb323f86447bab79cc0", + "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/846ae76eef31c6d7790fac9bc399ecee45160b26", + "reference": "846ae76eef31c6d7790fac9bc399ecee45160b26", "shasum": "" }, "require": { @@ -14552,22 +14630,22 @@ "description": "PHPDoc parser with support for nullable, intersection and generic types", "support": { "issues": "https://github.com/phpstan/phpdoc-parser/issues", - "source": "https://github.com/phpstan/phpdoc-parser/tree/1.22.1" + "source": "https://github.com/phpstan/phpdoc-parser/tree/1.23.1" }, - "time": "2023-06-29T20:46:06+00:00" + "time": "2023-08-03T16:32:59+00:00" }, { "name": "phpstan/phpstan", - "version": "1.10.25", + "version": "1.10.27", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "578f4e70d117f9a90699324c555922800ac38d8c" + "reference": "a9f44dcea06f59d1363b100bb29f297b311fa640" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/578f4e70d117f9a90699324c555922800ac38d8c", - "reference": "578f4e70d117f9a90699324c555922800ac38d8c", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/a9f44dcea06f59d1363b100bb29f297b311fa640", + "reference": "a9f44dcea06f59d1363b100bb29f297b311fa640", "shasum": "" }, "require": { @@ -14616,20 +14694,20 @@ "type": "tidelift" } ], - "time": "2023-07-06T12:11:37+00:00" + "time": "2023-08-05T09:57:55+00:00" }, { "name": "phpunit/php-code-coverage", - "version": "9.2.26", + "version": "9.2.27", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "443bc6912c9bd5b409254a40f4b0f4ced7c80ea1" + "reference": "b0a88255cb70d52653d80c890bd7f38740ea50d1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/443bc6912c9bd5b409254a40f4b0f4ced7c80ea1", - "reference": "443bc6912c9bd5b409254a40f4b0f4ced7c80ea1", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/b0a88255cb70d52653d80c890bd7f38740ea50d1", + "reference": "b0a88255cb70d52653d80c890bd7f38740ea50d1", "shasum": "" }, "require": { @@ -14685,7 +14763,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.26" + "security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy", + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.27" }, "funding": [ { @@ -14693,7 +14772,7 @@ "type": "github" } ], - "time": "2023-03-06T12:58:08+00:00" + "time": "2023-07-26T13:44:30+00:00" }, { "name": "phpunit/php-file-iterator", @@ -14938,16 +15017,16 @@ }, { "name": "phpunit/phpunit", - "version": "9.6.9", + "version": "9.6.10", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "a9aceaf20a682aeacf28d582654a1670d8826778" + "reference": "a6d351645c3fe5a30f5e86be6577d946af65a328" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/a9aceaf20a682aeacf28d582654a1670d8826778", - "reference": "a9aceaf20a682aeacf28d582654a1670d8826778", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/a6d351645c3fe5a30f5e86be6577d946af65a328", + "reference": "a6d351645c3fe5a30f5e86be6577d946af65a328", "shasum": "" }, "require": { @@ -15021,7 +15100,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", "security": "https://github.com/sebastianbergmann/phpunit/security/policy", - "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.9" + "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.10" }, "funding": [ { @@ -15037,7 +15116,7 @@ "type": "tidelift" } ], - "time": "2023-06-11T06:13:56+00:00" + "time": "2023-07-10T04:04:23+00:00" }, { "name": "sebastian/cli-parser", @@ -15545,16 +15624,16 @@ }, { "name": "sebastian/global-state", - "version": "5.0.5", + "version": "5.0.6", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "0ca8db5a5fc9c8646244e629625ac486fa286bf2" + "reference": "bde739e7565280bda77be70044ac1047bc007e34" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/0ca8db5a5fc9c8646244e629625ac486fa286bf2", - "reference": "0ca8db5a5fc9c8646244e629625ac486fa286bf2", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bde739e7565280bda77be70044ac1047bc007e34", + "reference": "bde739e7565280bda77be70044ac1047bc007e34", "shasum": "" }, "require": { @@ -15597,7 +15676,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/global-state/issues", - "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.5" + "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.6" }, "funding": [ { @@ -15605,7 +15684,7 @@ "type": "github" } ], - "time": "2022-02-14T08:28:10+00:00" + "time": "2023-08-02T09:26:13+00:00" }, { "name": "sebastian/lines-of-code", @@ -16067,16 +16146,16 @@ }, { "name": "spatie/flare-client-php", - "version": "1.4.1", + "version": "1.4.2", "source": { "type": "git", "url": "https://github.com/spatie/flare-client-php.git", - "reference": "943894c6a6b00501365ac0b91ae0dce56f2226fa" + "reference": "5f2c6a7a0d2c1d90c12559dc7828fd942911a544" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/spatie/flare-client-php/zipball/943894c6a6b00501365ac0b91ae0dce56f2226fa", - "reference": "943894c6a6b00501365ac0b91ae0dce56f2226fa", + "url": "https://api.github.com/repos/spatie/flare-client-php/zipball/5f2c6a7a0d2c1d90c12559dc7828fd942911a544", + "reference": "5f2c6a7a0d2c1d90c12559dc7828fd942911a544", "shasum": "" }, "require": { @@ -16125,7 +16204,7 @@ ], "support": { "issues": "https://github.com/spatie/flare-client-php/issues", - "source": "https://github.com/spatie/flare-client-php/tree/1.4.1" + "source": "https://github.com/spatie/flare-client-php/tree/1.4.2" }, "funding": [ { @@ -16133,7 +16212,7 @@ "type": "github" } ], - "time": "2023-07-06T09:29:49+00:00" + "time": "2023-07-28T08:07:24+00:00" }, { "name": "spatie/ignition", @@ -16377,20 +16456,21 @@ }, { "name": "symfony/yaml", - "version": "v6.3.0", + "version": "v6.3.3", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "a9a8337aa641ef2aa39c3e028f9107ec391e5927" + "reference": "e23292e8c07c85b971b44c1c4b87af52133e2add" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/a9a8337aa641ef2aa39c3e028f9107ec391e5927", - "reference": "a9a8337aa641ef2aa39c3e028f9107ec391e5927", + "url": "https://api.github.com/repos/symfony/yaml/zipball/e23292e8c07c85b971b44c1c4b87af52133e2add", + "reference": "e23292e8c07c85b971b44c1c4b87af52133e2add", "shasum": "" }, "require": { "php": ">=8.1", + "symfony/deprecation-contracts": "^2.5|^3", "symfony/polyfill-ctype": "^1.8" }, "conflict": { @@ -16428,7 +16508,7 @@ "description": "Loads and dumps YAML files", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/yaml/tree/v6.3.0" + "source": "https://github.com/symfony/yaml/tree/v6.3.3" }, "funding": [ { @@ -16444,7 +16524,7 @@ "type": "tidelift" } ], - "time": "2023-04-28T13:28:14+00:00" + "time": "2023-07-31T07:08:24+00:00" }, { "name": "theseer/tokenizer", @@ -16498,12 +16578,12 @@ } ], "aliases": [], - "minimum-stability": "stable", + "minimum-stability": "dev", "stability-flags": [], "prefer-stable": true, "prefer-lowest": false, "platform": { - "php": "^8.2", + "php": "^8.1", "ext-fileinfo": "*", "ext-json": "*" }, diff --git a/package.json b/package.json index f90a5ca..f1c9a08 100644 --- a/package.json +++ b/package.json @@ -33,7 +33,10 @@ "tippy.js": "^6.3.7" }, "dependencies": { + "@alpinejs/collapse": "^3.12.3", + "@alpinejs/focus": "^3.12.3", "@alpinejs/intersect": "^3.6.1", + "@fortawesome/fontawesome-free": "^6.4.2", "@headlessui/react": "^1.7.2", "@heroicons/react": "^2.0.11", "@ryangjchandler/alpine-tooltip": "^1.2.0", @@ -49,6 +52,7 @@ "htm": "^3.1.0", "intl-tel-input": "^17.0.13", "laravel-vite-plugin": "^0.7.8", + "perfect-scrollbar": "^1.5.5", "preact": "^10.5.15", "vite": "^4.4.6" } diff --git a/resources/css/base.css b/resources/css/base.css index e4d9405..7b41243 100644 --- a/resources/css/base.css +++ b/resources/css/base.css @@ -35,3 +35,13 @@ input { width: 100%; } animation-duration: 50s; animation-delay: 750ms; } + +.toggle-checkbox:checked { + @apply right-0 border-green-400; + right: 0; + border-color: #68D391; +} +.toggle-checkbox:checked + .toggle-label { + @apply bg-green-400; + background-color: #68D391; +} diff --git a/resources/css/select.css b/resources/css/select.css new file mode 100644 index 0000000..6373b15 --- /dev/null +++ b/resources/css/select.css @@ -0,0 +1,62 @@ +.select2 { + @apply w-full border-0 placeholder-gray-300 text-gray-600 bg-white rounded text-sm shadow focus:outline-none focus:ring !important; +} + +.select2-dropdown { + @apply absolute block w-auto box-border bg-white shadow-lg border-gray-200 z-50 float-left; +} + +.select2-container--default .select2-selection--single { + @apply border-0 h-11 flex items-center text-sm +} + +.select2-container--default .select2-selection--multiple { + @apply border-0 text-sm +} + + +.select2-container--default.select2-container--focus .select2-selection--single, +.select2-container--default.select2-container--focus .select2-selection--multiple { + @apply border-0 outline-none ring ring-blue-600 +} + +.select2-container--default .select2-selection--single .select2-selection__arrow { + top: 9px; +} + +.select2-container .select2-selection--single .select2-selection__rendered { + @apply px-3 py-3 text-gray-600 +} + +.select2-container .select2-selection--multiple .select2-selection__rendered { + @apply px-3 py-2 text-gray-600 +} + +.select2-container--default .select2-selection--single .select2-selection__rendered { + line-height: inherit; +} + +.select2-selection__choice { + @apply text-xs font-semibold inline-block py-1 px-2 rounded text-indigo-600 bg-indigo-200 border-0 !important; +} + +.select2-selection__choice span { + @apply text-white !important; +} + +.select2-search__field:focus { + outline: none; +} + +.select2-container--default .select2-selection--single .select2-selection__clear { + @apply text-pink-500 ml-1 !important +} + +.select2-container--default .select2-selection--multiple .select2-selection__choice__remove { + @apply text-indigo-600 mr-1 !important +} + +.select-all, .deselect-all { + @apply cursor-pointer; + font-size: 0.5rem !important; +} diff --git a/resources/css/theme.css b/resources/css/theme.css new file mode 100644 index 0000000..0c8d00c --- /dev/null +++ b/resources/css/theme.css @@ -0,0 +1,311 @@ +.row { + @apply w-full mb-12 px-4 +} + +.card { + @apply relative flex flex-col min-w-0 break-words w-full mb-6 shadow-lg rounded-lg border-0 +} + +.card .card-header { + @apply rounded-t bg-white mb-0 px-6 py-6 +} + +.card .card-header-container { + @apply text-center flex justify-between +} + +.card .card-title { + @apply text-gray-700 text-xl font-bold +} + +.card .card-body { + @apply flex-auto px-4 lg:px-10 py-10 pt-0 +} + +.card .card-controls { + @apply flex-auto px-4 lg:px-10 py-3 +} + +.card .card-table { + @apply py-3 pt-0 +} + +.btn { + @apply font-bold border-transparent uppercase justify-center text-xs px-4 py-2 rounded shadow hover:shadow-md outline-none focus:outline-none focus:ring-2 focus:ring-offset-2 mr-1 ease-linear transition-all duration-150 cursor-pointer; +} + +.btn-sm { + @apply py-1 px-2 +} + +.btn.btn-primary { + @apply bg-pink-500 text-white active:bg-pink-600 focus:ring-pink-500 +} + +.btn.btn-indigo { + @apply bg-indigo-500 text-white active:bg-indigo-600 focus:ring-indigo-500 +} + +.btn.btn-secondary { + @apply text-gray-500 bg-white hover:bg-gray-50 active:bg-gray-100 focus:ring-indigo-500 +} + +.btn.btn-success { + @apply bg-green-500 text-white active:bg-green-600 focus:ring-green-500 +} + +.btn.btn-warning { + @apply bg-yellow-500 text-white active:bg-yellow-600 focus:ring-yellow-500 +} + +.btn.btn-danger { + @apply bg-red-500 text-white active:bg-red-600 focus:ring-red-500 +} + +.btn.btn-info { + @apply bg-blue-500 text-white active:bg-blue-600 focus:ring-blue-500 +} + + +.sidebar-nav-active { + @apply text-xs uppercase py-3 font-bold block text-pink-500 +} + +.sidebar-nav-active > i { + @apply mr-2 text-sm opacity-75 +} + +.sidebar-nav-active:hover { + @apply text-pink-600 +} + +.sidebar-nav { + @apply text-xs uppercase py-3 font-bold block text-gray-800 +} + +.sidebar-nav > i { + @apply mr-2 text-sm text-gray-400 +} + +.sidebar-nav:hover { + @apply text-gray-600 +} + +.form-group { + @apply mt-4 +} + +.form-group:first-of-type { + @apply mt-0 +} + +.validation-message { + display: none; + @apply text-red-500 +} + +.form-group.invalid input, +.form-group.invalid select, +.form-group.invalid textarea { + @apply border-red-500 !important; +} + +.form-group.invalid .validation-message { + display: block !important; +} + +.form-label { + @apply block uppercase text-gray-600 text-xs font-bold mb-2 +} + +.form-control { + @apply w-full +} + +input[type=text].form-control, +input[type=email].form-control, +input[type=number].form-control, +input[type=password].form-control, +textarea.form-control { + @apply border-0 px-3 py-3 placeholder-gray-300 text-gray-600 bg-white rounded text-sm shadow focus:outline-none focus:ring; +} + +.flatpickr input[type=text].form-control { + @apply border-0 px-3 py-3 pl-10 placeholder-gray-300 text-gray-600 bg-white rounded text-sm shadow focus:outline-none focus:ring; +} + +.flatpickr input[type=text].form-control:required { + @apply border-0 px-3 py-3 placeholder-gray-300 text-gray-600 bg-white rounded text-sm shadow focus:outline-none focus:ring; +} + +.table { + @apply items-center table-auto bg-transparent border-collapse +} + +.table th { + @apply align-middle border border-solid text-xs uppercase whitespace-nowrap font-semibold text-left text-gray-500 +} + +.table td { + @apply border-gray-200 +} + +.table.table-index th { + @apply px-6 py-3 border-l-0 border-r-0 border-gray-100 +} + +.table.table-index td { + @apply px-4 py-2 border-t border-dashed +} + +.table.table-view th, +.table.table-view td { + @apply px-6 py-3 border border-solid +} + +.table.table-index > tbody > tr:hover { + @apply bg-gray-50 +} + +.form-group .required::after { + content: " *"; + @apply text-pink-500 +} + +.dropzone .dz-preview .dz-image img { + object-fit: cover; + width: 100%; + height: 100%; +} + +.help-block { + @apply text-gray-600 pt-2 text-sm +} + +.badge { + @apply text-xs font-semibold inline-block py-1 px-2 rounded last:mr-0 mr-1 +} + +.badge-relationship { + @apply text-indigo-600 bg-indigo-200 +} + +.link-light-blue { + @apply text-blue-200 flex items-center hover:underline last:mb-0 mb-1; +} + +.link-light-blue i { + @apply mr-1; +} + +.link-photo { + @apply inline-block last:mr-0 mr-1; +} + +.radio-label { + @apply flex items-center last:mb-0 mb-1 cursor-pointer; +} + +.radio-label input[type=radio] { + @apply mr-2 +} + +.was-validated :invalid ~ .invalid-feedback, +.was-validated :invalid ~ .invalid-tooltip, +.is-invalid ~ .invalid-feedback, +.is-invalid ~ .invalid-tooltip { + display: block; +} + +.was-validated .form-control:invalid, +.form-control.is-invalid { + border-color: #e3342f; + padding-right: calc(1.6em + 0.75rem); + background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%23e3342f' viewBox='0 0 12 12'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23e3342f' stroke='none'/%3e%3c/svg%3e"); + background-repeat: no-repeat; + background-position: right calc(0.4em + 0.1875rem) center; + background-size: calc(0.8em + 0.375rem) calc(0.8em + 0.375rem); +} + +.was-validated .form-control:invalid:focus, +.form-control.is-invalid:focus { + border-color: #e3342f; + box-shadow: 0 0 0 0.2rem rgba(227, 52, 47, 0.25); +} + +.was-validated textarea.form-control:invalid, +textarea.form-control.is-invalid { + padding-right: calc(1.6em + 0.75rem); + background-position: top calc(0.4em + 0.1875rem) right calc(0.4em + 0.1875rem); +} + +.was-validated .custom-select:invalid, +.custom-select.is-invalid { + border-color: #e3342f; + padding-right: calc(0.75em + 2.3125rem); + background: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='4' height='5' viewBox='0 0 4 5'%3e%3cpath fill='%23343a40' d='M2 0L0 2h4zm0 5L0 3h4z'/%3e%3c/svg%3e") no-repeat right 0.75rem center/8px 10px, url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%23e3342f' viewBox='0 0 12 12'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23e3342f' stroke='none'/%3e%3c/svg%3e") #fff no-repeat center right 1.75rem/calc(0.8em + 0.375rem) calc(0.8em + 0.375rem); +} + +.was-validated .custom-select:invalid:focus, +.custom-select.is-invalid:focus { + border-color: #e3342f; + box-shadow: 0 0 0 0.2rem rgba(227, 52, 47, 0.25); +} + +.was-validated .form-check-input:invalid ~ .form-check-label, +.form-check-input.is-invalid ~ .form-check-label { + color: #e3342f; +} + +.was-validated .form-check-input:invalid ~ .invalid-feedback, +.was-validated .form-check-input:invalid ~ .invalid-tooltip, +.form-check-input.is-invalid ~ .invalid-feedback, +.form-check-input.is-invalid ~ .invalid-tooltip { + display: block; +} + +.was-validated .custom-control-input:invalid ~ .custom-control-label, +.custom-control-input.is-invalid ~ .custom-control-label { + color: #e3342f; +} + +.was-validated .custom-control-input:invalid ~ .custom-control-label::before, +.custom-control-input.is-invalid ~ .custom-control-label::before { + border-color: #e3342f; +} + +.was-validated .custom-control-input:invalid:checked ~ .custom-control-label::before, +.custom-control-input.is-invalid:checked ~ .custom-control-label::before { + border-color: #e9605c; + background-color: #e9605c; +} + +.was-validated .custom-control-input:invalid:focus ~ .custom-control-label::before, +.custom-control-input.is-invalid:focus ~ .custom-control-label::before { + box-shadow: 0 0 0 0.2rem rgba(227, 52, 47, 0.25); +} + +.was-validated .custom-control-input:invalid:focus:not(:checked) ~ .custom-control-label::before, +.custom-control-input.is-invalid:focus:not(:checked) ~ .custom-control-label::before { + border-color: #e3342f; +} + +.was-validated .custom-file-input:invalid ~ .custom-file-label, +.custom-file-input.is-invalid ~ .custom-file-label { + border-color: #e3342f; +} + +.was-validated .custom-file-input:invalid:focus ~ .custom-file-label, +.custom-file-input.is-invalid:focus ~ .custom-file-label { + border-color: #e3342f; + box-shadow: 0 0 0 0.2rem rgba(227, 52, 47, 0.25); +} + +.hero img { + height: 65vh; +} + +.heading-container { + height: 65vh; + top: 50px; +} \ No newline at end of file diff --git a/resources/js/app.js b/resources/js/app.js index 48d294e..3d37668 100644 --- a/resources/js/app.js +++ b/resources/js/app.js @@ -1,5 +1,8 @@ import Alpine from 'alpinejs'; import intersect from '@alpinejs/intersect'; +import collapse from '@alpinejs/collapse'; +import focus from "@alpinejs/focus"; + import AlpineFloatingUI from '@awcodes/alpine-floating-ui'; import Tooltip from '@ryangjchandler/alpine-tooltip'; @@ -14,15 +17,140 @@ import './utils/editor'; import './utils/filepond'; import './utils/clipboard'; +import "perfect-scrollbar/css/perfect-scrollbar.css"; +import "../css/theme.css"; + registerHeader(); Alpine.plugin(AlpineFloatingUI); Alpine.plugin(intersect); +Alpine.plugin(collapse) +Alpine.plugin(focus); Alpine.plugin(NotificationsAlpinePlugin); Alpine.plugin(Tooltip); Alpine.data('internationalNumber', internationalNumber); Alpine.data('datepicker', datepicker); +import "@fortawesome/fontawesome-free/css/all.css"; + +import PerfectScrollbar from "perfect-scrollbar"; +window.PerfectScrollbar = PerfectScrollbar; + +Alpine.data("mainState", () => { + const init = function () { + window.addEventListener("scroll", () => { + let st = + window.pageYOffset || document.documentElement.scrollTop; + if (st > lastScrollTop) { + // downscroll + this.scrollingDown = true; + this.scrollingUp = false; + } else { + // upscroll + this.scrollingDown = false; + this.scrollingUp = true; + if (st == 0) { + // reset + this.scrollingDown = false; + this.scrollingUp = false; + } + } + lastScrollTop = st <= 0 ? 0 : st; // For Mobile or negative scrolling + }); + }; + + const scrollToAnchor = (anchor) => { + const element = document.querySelector(anchor); + if (element) { + window.scrollTo({ + top: element.offsetTop, + behavior: 'smooth', + }); + } + }; + + const loadingMask = { + pageLoaded: false, + init() { + window.onload = () => { + this.pageLoaded = true; + }; + this.animateCharge(); + }, + animateCharge() { + setInterval(() => { + this.showText = true; + setTimeout(() => { + this.showText = false; + }, 2000); + }, 4000); + }, + }; + + + const getTheme = () => { + if (window.localStorage.getItem("dark")) { + return JSON.parse(window.localStorage.getItem("dark")); + } + return ( + !!window.matchMedia && + window.matchMedia("(prefers-color-scheme: dark)").matches + ); + }; + const setTheme = (value) => { + window.localStorage.setItem("dark", value); + }; + + const handleOutsideClick = (event) => { + if ( + this.isSidebarOpen && + !event.target.closest(".sidebar") && + !event.target.closest(".sidebar-toggle") + ) { + this.isSidebarOpen = false; + } + }; + + document.addEventListener("click", handleOutsideClick); + + return { + init, + loadingMask, + scrollToAnchor, + isDarkMode: getTheme(), + toggleTheme() { + this.isDarkMode = !this.isDarkMode; + setTheme(this.isDarkMode); + }, + isSidebarOpen: sessionStorage.getItem("sidebarOpen") === "true", + handleSidebarToggle() { + this.isSidebarOpen = !this.isSidebarOpen; + sessionStorage.setItem("sidebarOpen", this.isSidebarOpen.toString()); + }, + closeSidebarOnMobile() { + if (window.innerWidth < 1024) { + this.isSidebarOpen = false; + } + }, + isSidebarHovered: false, + handleSidebarHover(value) { + if (window.innerWidth < 1024) { + return; + } + this.isSidebarHovered = value; + }, + handleWindowResize() { + if (window.innerWidth <= 1024) { + this.isSidebarOpen = false; + } else { + this.isSidebarOpen = true; + } + }, + scrollingDown: false, + scrollingUp: false, + }; +}); + window.Alpine = Alpine; Alpine.start(); diff --git a/resources/views/components/layouts/admin-menu.blade.php b/resources/views/components/layouts/admin-menu.blade.php index f55901d..00cc9b8 100644 --- a/resources/views/components/layouts/admin-menu.blade.php +++ b/resources/views/components/layouts/admin-menu.blade.php @@ -5,7 +5,7 @@ {{ __('Tableau de bord') }} - + {{ __('Analytics') }} @@ -14,7 +14,7 @@ {{ __('Catégories') }} - + {{ __('Soumissions') }} {{--0--}} diff --git a/resources/views/components/layouts/admin.blade.php b/resources/views/components/layouts/admin.blade.php index bde00ad..f52580f 100644 --- a/resources/views/components/layouts/admin.blade.php +++ b/resources/views/components/layouts/admin.blade.php @@ -41,6 +41,11 @@ @livewireScripts @vite('resources/js/app.js') + @livewireScripts + + + + @include('layouts._favicons') diff --git a/routes/admin.php b/routes/admin.php new file mode 100644 index 0000000..1dacf43 --- /dev/null +++ b/routes/admin.php @@ -0,0 +1,26 @@ + 'admin', 'as' => 'admin.'], function (): void { + Route::get('/', Cpanel\DashboardController::class)->name('dashboard'); + Route::get('/dashboard', Cpanel\DashboardController::class)->name('dashboard'); + Route::get('/analytics', Cpanel\AnalyticsController::class)->name('analytics'); + Route::get('/language', LanguageIndex::class)->name('language'); + Route::get('/translation/{code}', EditTranslation::class)->name('translation'); + Route::get('/redirects', RedirectIndex::class)->name('setting.redirects'); + Route::get('/menu-settings', MenuIndex::class)->name('menu-settings.index'); + Route::get('projects', ProjectIndex::class)->name('projects.index'); + Route::prefix('users')->as('users.')->group(function (): void { + Route::get('/', Cpanel\UserController::class)->name('browse'); + }); +}); diff --git a/routes/cpanel.php b/routes/cpanel.php deleted file mode 100644 index ede4523..0000000 --- a/routes/cpanel.php +++ /dev/null @@ -1,28 +0,0 @@ -name('home'); -Route::get('/analytics', Cpanel\AnalyticsController::class)->name('analytics'); - -Route::get('/language', LanguageIndex::class)->name('language'); -Route::get('/translation/{code}', EditTranslation::class)->name('translation'); - -Route::get('/redirects', RedirectIndex::class)->name('setting.redirects'); - -Route::get('/menu-settings', MenuIndex::class)->name('menu-settings.index'); - -Route::get('projects', ProjectIndex::class)->name('projects.index'); - -Route::prefix('users')->as('users.')->group(function (): void { - Route::get('/', Cpanel\UserController::class)->name('browse'); -}); diff --git a/routes/web.php b/routes/web.php index be48244..ef70faf 100644 --- a/routes/web.php +++ b/routes/web.php @@ -109,4 +109,4 @@ Route::get('sponsors', [SponsoringController::class, 'sponsors'])->name('sponsors'); Route::get('callback-payment', NotchPayCallBackController::class)->name('notchpay-callback'); -require __DIR__.'/cpanel.php'; +require __DIR__.'/admin.php'; From d853f155115948b2773aedc6cf476215748948c7 Mon Sep 17 00:00:00 2001 From: Zakarialabib Date: Sun, 6 Aug 2023 19:18:24 +0000 Subject: [PATCH 5/8] Fix code styling --- routes/admin.php | 1 - 1 file changed, 1 deletion(-) diff --git a/routes/admin.php b/routes/admin.php index 1dacf43..cfb6d45 100644 --- a/routes/admin.php +++ b/routes/admin.php @@ -10,7 +10,6 @@ use App\Http\Livewire\Redirects as RedirectIndex; use App\Http\Livewire\Language\EditTranslation; - Route::group(['prefix' => 'admin', 'as' => 'admin.'], function (): void { Route::get('/', Cpanel\DashboardController::class)->name('dashboard'); Route::get('/dashboard', Cpanel\DashboardController::class)->name('dashboard'); From 7aa3beff7d3fd6fc427ad339b7fa17a7590112f0 Mon Sep 17 00:00:00 2001 From: Zakaria Labib <58374576+Zakarialabib@users.noreply.github.com> Date: Sun, 6 Aug 2023 20:21:34 +0100 Subject: [PATCH 6/8] dependency update --- composer.json | 29 ++++++++++++++++++++++------- package.json | 23 +++++++++++++++++++---- 2 files changed, 41 insertions(+), 11 deletions(-) diff --git a/composer.json b/composer.json index 805c775..cb6502f 100644 --- a/composer.json +++ b/composer.json @@ -25,12 +25,9 @@ "laravel-notification-channels/telegram": "^2.1", "laravel-notification-channels/twitter": "^6.2", "laravel/fortify": "^1.17.4", - "laravel/framework": "^9.52.10", - "laravel/sanctum": "^3.2.5", "laravel/slack-notification-channel": "^2.5", "laravel/socialite": "^5.6.3", "laravel/tinker": "^2.8.1", - "livewire/livewire": "^2.12.3", "lorisleiva/laravel-actions": "^2.6", "nnjeim/world": "^1.1.27", "notchpay/notchpay-php": "^1.3", @@ -41,8 +38,6 @@ "socialiteproviders/twitter": "^4.1.2", "spatie/laravel-feed": "^4.2.1", "spatie/laravel-google-fonts": "^1.2.3", - "spatie/laravel-medialibrary": "^10.10.0", - "spatie/laravel-permission": "^5.10.1", "spatie/laravel-sitemap": "^6.3.1", "stevebauman/location": "^6.6.2", "symfony/http-client": "^6.3.1", @@ -50,7 +45,22 @@ "torchlight/torchlight-commonmark": "^0.5.5", "wire-elements/modal": "^1.0.8", "wire-elements/spotlight": "^1.0.7", - "yarri/link-finder": "^2.7.10" + "yarri/link-finder": "^2.7.10", + "guzzlehttp/guzzle": "^7.2", + "intervention/image": "^2.7", + "jantinnerezo/livewire-alert": "^2.2", + "jeroendesloovere/vcard": "^1.7", + "laravel-notification-channels/discord": "^1.5", + "livewire/livewire": "^2.10", + "masbug/flysystem-google-drive-ext": "^2.2", + "simplesoftwareio/simple-qrcode": "~4", + "socialiteproviders/facebook": "^4.1", + "socialiteproviders/google": "^4.1", + "spatie/laravel-backup": "^8.1", + "spatie/laravel-medialibrary": "^10.9", + "spatie/laravel-permission": "^5.5", + "laravel/framework": "^10.10", + "laravel/sanctum": "^3.2" }, "require-dev": { "barryvdh/laravel-debugbar": "^3.8.1", @@ -66,7 +76,11 @@ "pestphp/pest-plugin-livewire": "^1.0", "phpunit/phpunit": "^9.6.9", "spatie/laravel-ignition": "^1.6.4", - "spatie/test-time": "^1.3.2" + "spatie/test-time": "^1.3.2", + "kkomelin/laravel-translatable-string-exporter": "^1.17", + "nunomaduro/phpinsights": "^2.7", + "pestphp/pest": "^2.8", + "pestphp/pest-plugin-faker": "^2.0" }, "autoload": { "files": [ @@ -143,3 +157,4 @@ } ] } + \ No newline at end of file diff --git a/package.json b/package.json index f1c9a08..36e6fb7 100644 --- a/package.json +++ b/package.json @@ -26,11 +26,16 @@ "eslint-plugin-n": "^16.0.1", "eslint-plugin-promise": "^6.1.1", "lodash": "^4.17.19", - "postcss": "^8.4.23", "postcss-loader": "^6.2.1", "postcss-preset-env": "^7.0.1", - "tailwindcss": "^3.3.2", - "tippy.js": "^6.3.7" + "tippy.js": "^6.3.7", + "axios": "^1.1.2", + "laravel-vite-plugin": "^0.7.5", + "prettier": "^2.8.3", + "prettier-plugin-tailwindcss": "^0.2.1", + "tailwindcss-rtl": "^0.9.0", + "vite": "^3.2.7", + "vite-plugin-optimize-css-modules": "^1.0.4" }, "dependencies": { "@alpinejs/collapse": "^3.12.3", @@ -54,6 +59,16 @@ "laravel-vite-plugin": "^0.7.8", "perfect-scrollbar": "^1.5.5", "preact": "^10.5.15", - "vite": "^4.4.6" + "vite": "^4.4.6", + "@alpinejs/collapse": "^3.10.4", + "@alpinejs/focus": "^3.10.4", + "@fortawesome/fontawesome-free": "^6.4.0", + "@tailwindcss/forms": "^0.5.3", + "alpinejs": "^3.5.0", + "perfect-scrollbar": "^1.5.5", + "ponyfill": "^0.0.1", + "select2": "^4.1.0-rc.0", + "sweetalert2": "^11.6.1", + "tailwindcss-tables": "^0.4.0" } } From 8c10cb5ecc1c1476d3779141b8d0d834a861e9de Mon Sep 17 00:00:00 2001 From: Zakaria Labib <58374576+Zakarialabib@users.noreply.github.com> Date: Tue, 17 Oct 2023 15:28:03 +0100 Subject: [PATCH 7/8] Update composer.json --- composer.json | 2 -- 1 file changed, 2 deletions(-) diff --git a/composer.json b/composer.json index 0b7f22e..7d8f515 100644 --- a/composer.json +++ b/composer.json @@ -21,7 +21,6 @@ "francescomalatesta/laravel-feature": "^3.0", "graham-campbell/markdown": "^14.0", "guzzlehttp/guzzle": "^7.7.0", - "jantinnerezo/livewire-alert": "*", "jenssegers/agent": "^2.6.4", "laravel-notification-channels/telegram": "^2.1", "laravel-notification-channels/twitter": "^6.2", @@ -49,7 +48,6 @@ "wire-elements/modal": "^1.0.8", "wire-elements/spotlight": "^1.0.7", "yarri/link-finder": "^2.7.10", - "guzzlehttp/guzzle": "^7.2", "intervention/image": "^2.7", "jantinnerezo/livewire-alert": "^2.2", "jeroendesloovere/vcard": "^1.7", From 2eae524767e546c6b9b6e22d3d9cafda8e4db7e1 Mon Sep 17 00:00:00 2001 From: Zakaria Labib <58374576+Zakarialabib@users.noreply.github.com> Date: Tue, 17 Oct 2023 15:29:04 +0100 Subject: [PATCH 8/8] Update Status.php --- app/Enums/Status.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/Enums/Status.php b/app/Enums/Status.php index 48a4e0c..e5213a0 100644 --- a/app/Enums/Status.php +++ b/app/Enums/Status.php @@ -4,15 +4,15 @@ namespace App\Enums; -enum Status: string +enum Status: int { - case INACTIVE = '0'; + case INACTIVE = 0; - case ACTIVE = '1'; + case ACTIVE = 1; - // case COMPLETED = '2'; + // case COMPLETED = 2; - // case CANCELED = '5'; + // case CANCELED = 5; public static function values(): array {