From 0879b0abf0282614463c03936e7b8a9287d80431 Mon Sep 17 00:00:00 2001 From: Ludovic CANDELLIER Date: Sun, 16 Jul 2023 14:45:42 +0200 Subject: [PATCH] add shipping rules --- app/Console/Commands/addTagGroup.php | 3 +- app/Console/Commands/untranslateShelves.php | 3 +- app/Console/Commands/untranslateTags.php | 3 +- app/Console/Kernel.php | 1 - app/Contracts/Commentator.php | 8 +- .../Admin/Core/CommentsDataTable.php | 5 +- app/Datatables/Botanic/FamiliesDataTable.php | 5 +- app/Datatables/Botanic/GenresDataTable.php | 4 +- app/Datatables/Botanic/SpeciesDataTable.php | 7 +- app/Datatables/Botanic/VarietiesDataTable.php | 6 +- app/Datatables/ParentDataTable.php | 71 ++- .../Shop/ArticleNaturesDataTable.php | 12 +- app/Datatables/Shop/ArticlesDataTable.php | 91 +-- app/Datatables/Shop/CategoriesDataTable.php | 73 +-- .../Shop/CustomerAddressesDataTable.php | 2 +- .../Shop/CustomerDeliveriesDataTable.php | 2 +- .../Shop/CustomerOrdersDataTable.php | 9 +- app/Datatables/Shop/CustomersDataTable.php | 3 +- app/Datatables/Shop/DeliveriesDataTable.php | 12 +- .../Shop/DeliveryPackagesDataTable.php | 27 + .../DeliveryTypeCalculationsDataTable.php | 29 + .../Shop/DeliveryTypesDataTable.php | 25 + app/Datatables/Shop/HomepagesDataTable.php | 3 +- app/Datatables/Shop/InvoicesDataTable.php | 6 +- app/Datatables/Shop/MerchandisesDataTable.php | 7 +- app/Datatables/Shop/OffersDataTable.php | 15 +- app/Datatables/Shop/OrdersDataTable.php | 10 +- app/Datatables/Shop/PackagesDataTable.php | 5 +- .../Shop/PriceGenericCategoriesDataTable.php | 3 +- app/Datatables/Shop/PriceListsDataTable.php | 5 +- app/Datatables/Shop/ProducersDataTable.php | 7 +- app/Datatables/Shop/SaleChannelsDataTable.php | 3 +- app/Datatables/Shop/TagGroupsDataTable.php | 29 +- app/Datatables/Shop/TagsDataTable.php | 5 +- .../Shop/TariffUnitiesDataTable.php | Bin 520 -> 520 bytes app/Datatables/Shop/TariffsDataTable.php | 7 +- app/Datatables/Shop/UnitiesDataTable.php | 2 +- app/Datatables/Shop/VariationsDataTable.php | 4 +- app/Exceptions/Handler.php | 8 +- app/Exports/Botanic/FamiliesExport.php | Bin 332 -> 295 bytes app/Exports/Botanic/GenresExport.php | Bin 328 -> 291 bytes app/Exports/Botanic/SpeciesExport.php | Bin 331 -> 294 bytes app/Exports/Botanic/VarietiesExport.php | Bin 335 -> 298 bytes .../Admin/Auth/ConfirmPasswordController.php | 40 -- .../Admin/Auth/ForgotPasswordController.php | 38 -- .../Admin/Auth/LoginController.php | 35 -- .../Admin/Auth/PasswordSecurityController.php | 71 --- .../Admin/Auth/RegisterController.php | 76 --- .../Admin/Auth/ResetPasswordController.php | 47 -- .../Admin/Auth/VerificationController.php | 41 -- .../Admin/Botanic/FamilyController.php | 8 +- .../Admin/Botanic/GenreController.php | 11 +- .../Admin/Botanic/SpecieController.php | 15 +- .../Admin/Botanic/VarietyController.php | 16 +- .../Admin/Core/App/ApplicationController.php | 14 +- .../Core/App/ApplicationModuleController.php | 15 +- .../Admin/Core/Auth/PermissionController.php | 15 +- .../Admin/Core/Auth/RoleController.php | 21 +- .../Admin/Core/Auth/TeamController.php | 14 +- .../Admin/Core/Auth/UserController.php | 37 +- .../Admin/Core/CommentController.php | 13 +- .../Controllers/Admin/Core/Controller.php | Bin 154 -> 155 bytes .../Core/Mail/MailTemplateController.php | 1 + app/Http/Controllers/Admin/HomeController.php | 2 +- .../Admin/Shop/ArticleController.php | 21 +- .../Admin/Shop/ArticleNatureController.php | 8 +- .../Admin/Shop/CategoryController.php | 14 +- .../Admin/Shop/CustomerAddressController.php | 9 +- .../Admin/Shop/CustomerController.php | 12 +- .../Admin/Shop/DashboardController.php | 3 +- .../Admin/Shop/DeliveryController.php | 12 +- .../Admin/Shop/DeliveryPackageController.php | 59 ++ .../DeliveryTypeCalculationController.php | 59 ++ .../Admin/Shop/DeliveryTypeController.php | 59 ++ .../Controllers/Admin/Shop/HomeController.php | Bin 524 -> 495 bytes .../Admin/Shop/HomepageController.php | 7 +- .../Admin/Shop/InvoiceController.php | 10 +- .../Admin/Shop/InvoiceItemController.php | 8 +- .../Admin/Shop/MerchandiseController.php | 10 +- .../Admin/Shop/OfferController.php | 17 +- .../Admin/Shop/OrderController.php | 10 +- .../Admin/Shop/PackageController.php | 11 +- .../Shop/PriceGenericCategoryController.php | 9 +- .../Admin/Shop/PriceListController.php | 24 +- .../Admin/Shop/PriceListValueController.php | 25 +- .../Admin/Shop/ProducerController.php | 12 +- .../Admin/Shop/SaleChannelController.php | 10 +- .../Controllers/Admin/Shop/TagController.php | 13 +- .../Admin/Shop/TagGroupController.php | 15 +- .../Admin/Shop/TariffController.php | 10 +- .../Admin/Shop/TariffUnityController.php | 12 +- .../Controllers/Admin/Shop/TaxController.php | 6 +- .../Admin/Shop/UnityController.php | 12 +- .../Admin/Shop/VariationController.php | 11 +- .../Controllers/Shop/ArticleController.php | 2 - .../Shop/Auth/ConfirmPasswordController.php | 1 - .../Shop/Auth/ForgotPasswordController.php | 1 - .../Controllers/Shop/Auth/LoginController.php | 7 +- .../Shop/Auth/RegisterController.php | 21 +- .../Shop/Auth/ResetPasswordController.php | 3 +- .../Controllers/Shop/BasketController.php | Bin 2054 -> 2059 bytes .../Controllers/Shop/CategoryController.php | Bin 3509 -> 3497 bytes app/Http/Middleware/Authenticate.php | Bin 468 -> 469 bytes .../Middleware/RedirectIfAuthenticated.php | Bin 608 -> 551 bytes app/Imports/CustomersImport.php | Bin 862 -> 867 bytes app/Menu/Botanic.php | Bin 972 -> 919 bytes app/Menu/Contents.php | Bin 611 -> 610 bytes app/Menu/Customers.php | Bin 455 -> 450 bytes app/Menu/Deliveries.php | Bin 647 -> 639 bytes app/Menu/Merchandises.php | Bin 630 -> 629 bytes app/Menu/Orders.php | Bin 602 -> 578 bytes app/Menu/Settings.php | Bin 0 -> 879 bytes app/Menu/Shop.php | Bin 2075 -> 2050 bytes app/Models/Core/App/Application.php | 4 +- app/Models/Core/App/ApplicationClient.php | 5 +- app/Models/Core/App/ApplicationModule.php | 5 +- app/Models/Core/App/ApplicationPage.php | 4 +- app/Models/Core/Auth/Permission.php | 3 +- app/Models/Core/Auth/RoleUser.php | 4 +- app/Models/Core/Auth/Team.php | 4 +- app/Models/Core/Auth/TeamUser.php | 1 + app/Models/Core/Auth/User.php | 10 +- app/Models/Core/Auth/UserClient.php | 3 +- app/Models/Core/Auth/UserStatus.php | 6 +- app/Models/Core/Auth/UserStatusTeam.php | 6 +- app/Models/Core/Category.php | 3 +- app/Models/Core/Comment.php | 9 +- app/Models/Core/Media.php | 1 - app/Models/Shop/Article.php | 104 ++-- app/Models/Shop/ArticleNature.php | 19 +- app/Models/Shop/ArticlePrice.php | 34 - app/Models/Shop/Basket.php | 2 +- app/Models/Shop/Categorizable.php | 5 +- app/Models/Shop/Category.php | 18 +- app/Models/Shop/Customer.php | 12 +- app/Models/Shop/CustomerAddress.php | 1 + app/Models/Shop/CustomerDelivery.php | 7 +- app/Models/Shop/Delivery.php | 33 +- app/Models/Shop/DeliveryPackage.php | 15 +- app/Models/Shop/DeliveryType.php | 12 +- app/Models/Shop/DeliveryTypeCalculation.php | 20 +- app/Models/Shop/DistributionChannel.php | 3 +- app/Models/Shop/Homepage.php | 2 +- app/Models/Shop/Invoice.php | 4 +- app/Models/Shop/InvoicePayment.php | 3 +- app/Models/Shop/Merchandise.php | 25 +- app/Models/Shop/Offer.php | 34 +- app/Models/Shop/Order.php | 6 +- app/Models/Shop/OrderDetail.php | 1 + app/Models/Shop/Package.php | 3 +- app/Models/Shop/Price.php | 5 +- app/Models/Shop/PriceGenericCategory.php | 1 + app/Models/Shop/PriceList.php | 13 +- app/Models/Shop/PriceListValue.php | 9 +- app/Models/Shop/Producer.php | 13 +- app/Models/Shop/SaleChannel.php | 3 +- app/Models/Shop/Shelve.php | 3 +- app/Models/Shop/Tag.php | 10 +- app/Models/Shop/TagGroup.php | 7 +- app/Models/Shop/Tariff.php | 21 +- app/Models/Shop/TariffUnity.php | 3 +- app/Models/Shop/Tax.php | 1 + app/Models/Shop/Unity.php | 4 +- app/Models/Shop/Variation.php | 10 +- app/Providers/AppServiceProvider.php | 5 +- app/Providers/AuthServiceProvider.php | 1 - app/Repositories/Botanic/Families.php | 14 +- app/Repositories/Botanic/Genres.php | 8 +- app/Repositories/Botanic/Species.php | 14 +- app/Repositories/Botanic/Varieties.php | 15 +- app/Repositories/Cities.php | 29 +- app/Repositories/Config.php | 1 - .../Core/App/ApplicationClients.php | 14 +- .../Core/App/ApplicationModules.php | 4 +- .../Core/App/ApplicationPages.php | 3 + app/Repositories/Core/App/Applications.php | 16 +- app/Repositories/Core/Arrays.php | 14 +- .../Core/Auth/PasswordSecurities.php | 9 +- app/Repositories/Core/Auth/Passwords.php | 17 +- app/Repositories/Core/Auth/Permissions.php | 10 +- app/Repositories/Core/Auth/Roles.php | 14 +- app/Repositories/Core/Auth/Teams.php | 12 +- app/Repositories/Core/Auth/UserClients.php | 25 +- app/Repositories/Core/Auth/Users.php | 43 +- app/Repositories/Core/Categories.php | 12 +- app/Repositories/Core/Comments.php | 16 +- app/Repositories/Core/Database.php | 28 +- app/Repositories/Core/DateCalculation.php | 2 - app/Repositories/Core/DateHelper.php | 24 +- app/Repositories/Core/DateRange.php | 16 +- app/Repositories/Core/DateStats.php | 4 + app/Repositories/Core/DateTime.php | 25 +- app/Repositories/Core/Debug.php | 64 +- app/Repositories/Core/Export.php | 73 ++- app/Repositories/Core/File.php | 4 +- app/Repositories/Core/Geolocation.php | 37 +- app/Repositories/Core/HelperDate.php | 26 +- app/Repositories/Core/Images.php | 2 +- app/Repositories/Core/Medias.php | 26 +- app/Repositories/Core/Menu/Builder.php | 12 +- app/Repositories/Core/Menu/Item.php | 26 +- app/Repositories/Core/Menu/Logs.php | 8 +- app/Repositories/Core/Menu/Menu.php | 33 +- app/Repositories/Core/Menu/Users.php | 12 +- app/Repositories/Core/Number.php | 1 + app/Repositories/Core/PDF.php | 13 +- app/Repositories/Core/Stat.php | 41 +- app/Repositories/Core/Storage.php | 14 +- app/Repositories/Core/Tag.php | 2 + app/Repositories/Core/Trees.php | 24 +- app/Repositories/Core/Upload.php | 34 +- app/Repositories/Core/User/Basket.php | 4 + .../Core/User/Notifications/NewUser.php | 13 +- .../Core/User/Notifications/ResetPassword.php | 3 +- app/Repositories/Core/User/ShopCart.php | 6 +- .../Core/User/ShopCartStorage.php | 13 +- app/Repositories/Shop/ArticleNatures.php | 10 +- app/Repositories/Shop/Articles.php | 64 +- app/Repositories/Shop/Baskets.php | 10 +- app/Repositories/Shop/Categories.php | 16 +- app/Repositories/Shop/CustomerAddresses.php | 4 +- app/Repositories/Shop/CustomerStats.php | 2 +- app/Repositories/Shop/Customers.php | 36 +- app/Repositories/Shop/Dashboards.php | 3 - app/Repositories/Shop/Deliveries.php | 3 + app/Repositories/Shop/DeliveryPackages.php | 44 ++ .../Shop/DeliveryTypeCalculations.php | 44 +- app/Repositories/Shop/DeliveryTypes.php | 31 + app/Repositories/Shop/Homepages.php | 4 +- app/Repositories/Shop/InvoicePayments.php | 4 +- app/Repositories/Shop/InvoiceStats.php | 2 +- app/Repositories/Shop/Invoices.php | 13 +- app/Repositories/Shop/Merchandises.php | 9 +- app/Repositories/Shop/Offers.php | 9 +- app/Repositories/Shop/OrderDetails.php | 2 + app/Repositories/Shop/OrderStats.php | 2 +- app/Repositories/Shop/Orders.php | 18 +- app/Repositories/Shop/Packages.php | 3 +- app/Repositories/Shop/Paybox.php | 16 +- app/Repositories/Shop/PriceListValues.php | 11 +- app/Repositories/Shop/PriceLists.php | 10 +- app/Repositories/Shop/Prices.php | 12 +- app/Repositories/Shop/Producers.php | 6 +- app/Repositories/Shop/SaleChannels.php | 3 + app/Repositories/Shop/Searches.php | 2 - app/Repositories/Shop/TagGroups.php | 19 +- app/Repositories/Shop/Tags.php | 16 +- app/Repositories/Shop/TariffUnities.php | 2 + app/Repositories/Shop/Tariffs.php | 3 + app/Repositories/Shop/Taxes.php | 9 +- .../Shop/Traits/MailCustomers.php | 2 - app/Repositories/Shop/Unities.php | 2 + app/Repositories/Shop/Variations.php | 12 +- app/Repositories/Users.php | 1 + app/Rules/Password.php | 9 +- app/Traits/Auth/SendsPasswordResetEmails.php | 9 +- app/Traits/Model/CanComment.php | 2 +- app/Traits/Model/HasComments.php | 6 +- app/Traits/Model/Imageable.php | 4 +- app/Traits/Repository/Imageable.php | 4 + app/User.php | 22 +- app/View/Composers/Shop/LayoutComposer.php | 2 +- composer.json | 9 +- config/apexcharts.php | 16 +- config/boilerplate/app.php | 8 +- config/boilerplate/auth.php | 8 +- config/boilerplate/laratrust.php | 4 +- config/boilerplate/mediamanager.php | 54 +- config/boilerplate/themes/black.php | 42 +- config/boilerplate/themes/default.php | 42 +- config/boilerplate/themes/green.php | 42 +- config/boilerplate/themes/red.php | 42 +- config/comments.php | 2 +- config/datatables-buttons.php | 24 +- config/datatables-fractal.php | 2 +- config/datatables-html.php | 2 +- config/datatables.php | 36 +- config/debugbar.php | 66 +- config/deploy.php | 18 +- config/dompdf.php | 43 +- config/erd-generator.php | 8 +- config/excel.php | 102 +-- config/flare.php | 6 +- config/generators.config.php | 11 +- config/geocoder.php | 4 +- config/googlmapper.php | 2 +- config/gravatar.php | 38 +- config/httpauth.php | 2 +- config/image.php | 2 +- config/imagecache.php | 2 +- config/insights.php | 10 +- config/javascript.php | 2 +- config/laratrust.php | 12 +- config/laratrust_seeder.php | 10 +- config/laravel-erd.php | 52 +- config/laravel-menu/settings.php | 8 +- config/laravel-menu/views.php | 4 +- config/laravel-widgets.php | 4 +- config/laravolt/avatar.php | 2 +- config/lfm.php | 70 +-- config/log-viewer.php | 68 +- config/mailpreview.php | 9 - config/paybox.php | 12 +- config/shopping_cart.php | 2 +- config/snappy.php | 18 +- config/stats.php | 4 +- ...13_04_09_062329_create_revisions_table.php | 2 +- ...0_212813_create_botanic_families_table.php | 59 +- ..._20_212813_create_botanic_genres_table.php | 61 +- ...20_212813_create_botanic_species_table.php | 81 ++- ..._212813_create_botanic_varieties_table.php | 97 ++- ..._04_20_212813_create_failed_jobs_table.php | 57 +- ...20_04_20_212813_create_mail_logs_table.php | 57 +- ...20_212813_create_password_resets_table.php | 51 +- ...20_212813_create_permission_role_table.php | 51 +- ...20_212813_create_permission_user_table.php | 53 +- ...13_create_permissions_categories_table.php | 51 +- ..._04_20_212813_create_permissions_table.php | 57 +- ...20_04_20_212813_create_role_user_table.php | 53 +- .../2020_04_20_212813_create_roles_table.php | 55 +- ..._shop_article_attribute_families_table.php | 53 +- ...te_shop_article_attribute_values_table.php | 53 +- ...3_create_shop_article_attributes_table.php | 51 +- ...3_create_shop_article_categories_table.php | 51 +- ...3_create_shop_article_components_table.php | 55 +- ...12813_create_shop_article_prices_table.php | 51 +- ...4_20_212813_create_shop_articles_table.php | 55 +- ...20_212813_create_shop_categories_table.php | 53 +- ..._20_212813_create_shop_customers_table.php | 65 +- ...212813_create_shop_invoice_items_table.php | 71 +-- ...4_20_212813_create_shop_invoices_table.php | 61 +- ...12813_create_shop_order_payments_table.php | 51 +- ..._04_20_212813_create_shop_orders_table.php | 51 +- ...212813_create_tagging_tag_groups_table.php | 51 +- ..._20_212813_create_tagging_tagged_table.php | 55 +- ...04_20_212813_create_tagging_tags_table.php | 57 +- ...04_20_212813_create_team_invites_table.php | 61 +- ...20_04_20_212813_create_team_user_table.php | 51 +- .../2020_04_20_212813_create_teams_table.php | 53 +- .../2020_04_20_212813_create_users_table.php | 73 ++- ...d_foreign_keys_to_categorizables_table.php | 52 +- ..._foreign_keys_to_permission_role_table.php | 56 +- ..._foreign_keys_to_permission_user_table.php | 52 +- ..._add_foreign_keys_to_permissions_table.php | 52 +- ...17_add_foreign_keys_to_role_user_table.php | 56 +- ...add_foreign_keys_to_tagging_tags_table.php | 52 +- ...add_foreign_keys_to_team_invites_table.php | 52 +- ...17_add_foreign_keys_to_team_user_table.php | 56 +- ...06_05_192053_create_activity_log_table.php | 4 +- ...021_06_05_192053_create_comments_table.php | 6 +- .../2021_07_25_182012_create_media_table.php | 4 +- ..._29_212813_create_shop_homepages_table.php | 59 +- ...1_05_21_001708_create_categories_table.php | 10 +- ..._21_001709_create_categorizables_table.php | 10 +- .../2021_05_21_001708_create_tags_table.php | 8 +- ...21_05_21_001709_create_taggables_table.php | 10 +- public/index.php | 2 - resources/lang/bg/auth.php | 2 +- resources/lang/bg/pagination.php | 2 +- resources/lang/bg/passwords.php | 8 +- resources/lang/bg/validation-inline.php | 190 +++--- resources/lang/bg/validation.php | 250 ++++---- .../packages/nova/validation-nova-inline.php | 2 +- .../lang/en/packages/nova/validation-nova.php | 2 +- resources/lang/en/validation-inline.php | 198 +++--- resources/lang/es/auth.php | 2 +- resources/lang/es/pagination.php | 2 +- resources/lang/es/passwords.php | 8 +- resources/lang/es/validation-inline.php | 190 +++--- resources/lang/es/validation.php | 258 ++++---- resources/lang/fa/auth.php | 2 +- resources/lang/fa/pagination.php | 2 +- resources/lang/fa/passwords.php | 8 +- resources/lang/fa/validation-inline.php | 190 +++--- resources/lang/fa/validation.php | 258 ++++---- resources/lang/fr/auth.php | 2 +- resources/lang/fr/botanic.php | 108 ++-- resources/lang/fr/customer.php | 52 +- resources/lang/fr/pagination.php | 2 +- resources/lang/fr/passwords.php | 8 +- resources/lang/fr/shop.php | 583 ++++++++++-------- resources/lang/fr/system.php | 4 +- resources/lang/fr/validation-inline.php | 190 +++--- resources/lang/fr/validation.php | 248 ++++---- resources/lang/it/auth.php | 2 +- resources/lang/it/pagination.php | 2 +- resources/lang/it/passwords.php | 8 +- resources/lang/it/validation-inline.php | 190 +++--- resources/lang/it/validation.php | 242 ++++---- resources/lang/tr/auth.php | 2 +- resources/lang/tr/pagination.php | 2 +- resources/lang/tr/passwords.php | 8 +- resources/lang/tr/validation-inline.php | 190 +++--- resources/lang/tr/validation.php | 246 ++++---- .../Shop/CustomerAddresses/list.blade.php | 5 +- .../views/Admin/Shop/Customers/form.blade.php | 234 +++---- .../Shop/DeliveryPackages/create.blade.php | 11 + .../Shop/DeliveryPackages/edit.blade.php | 12 + .../Shop/DeliveryPackages/form.blade.php | 69 +++ .../Shop/DeliveryPackages/list.blade.php | 26 + .../partials/filters.blade.php | 5 + .../Shop/DeliveryPackages/show.blade.php | 36 ++ .../DeliveryTypeCalculations/create.blade.php | 11 + .../DeliveryTypeCalculations/edit.blade.php | 12 + .../DeliveryTypeCalculations/form.blade.php | 69 +++ .../DeliveryTypeCalculations/list.blade.php | 24 + .../partials/filters.blade.php | 5 + .../DeliveryTypeCalculations/show.blade.php | 36 ++ .../Admin/Shop/DeliveryTypes/create.blade.php | 11 + .../Admin/Shop/DeliveryTypes/edit.blade.php | 12 + .../Admin/Shop/DeliveryTypes/form.blade.php | 69 +++ .../Admin/Shop/DeliveryTypes/list.blade.php | 23 + .../DeliveryTypes/partials/filters.blade.php | 5 + .../Admin/Shop/DeliveryTypes/show.blade.php | 36 ++ routes/Admin/Botanic/Families.php | 15 +- routes/Admin/Botanic/Genres.php | 15 +- routes/Admin/Botanic/Species.php | 22 +- routes/Admin/Botanic/Varieties.php | 23 +- routes/Admin/Botanic/route.php | 8 +- routes/Admin/Core/Comments.php | 1 - routes/Admin/Core/route.php | 4 +- routes/Admin/Shop/Articles.php | 4 +- routes/Admin/Shop/CustomerAddresses.php | 13 +- routes/Admin/Shop/Customers.php | 13 +- routes/Admin/Shop/DeliveryPackages.php | 10 + .../Admin/Shop/DeliveryTypeCalculations.php | 10 + routes/Admin/Shop/DeliveryTypes.php | 11 + routes/Admin/Shop/InvoiceItems.php | 1 - routes/Admin/Shop/Invoices.php | 13 +- routes/Admin/Shop/Merchandises.php | 1 - routes/Admin/Shop/Orders.php | 1 - routes/Admin/Shop/Packages.php | 16 +- routes/Admin/Shop/PriceListValues.php | 13 +- routes/Admin/Shop/PriceLists.php | 19 +- routes/Admin/Shop/Producers.php | 1 - routes/Admin/Shop/SaleChannels.php | 12 +- routes/Admin/Shop/TagGroups.php | 1 - routes/Admin/Shop/Tags.php | 1 - routes/Admin/Shop/TariffUnities.php | 2 +- routes/Admin/Shop/Tariffs.php | 15 +- routes/Admin/Shop/Unities.php | 16 +- routes/Admin/Shop/Variations.php | 15 +- routes/Admin/Shop/route.php | 49 +- routes/Admin/route.php | 6 +- routes/Botanic/route.php | 2 +- routes/Shop/Articles.php | 5 +- routes/Shop/Baskets.php | 1 - routes/Shop/Categories.php | 1 - routes/Shop/Invoices.php | 1 - routes/Shop/Offers.php | 1 - routes/Shop/OrderPayments.php | 1 - routes/Shop/Orders.php | 1 - routes/Shop/Searches.php | 1 - routes/Shop/route.php | 20 +- routes/api.php | 2 +- routes/paybox.php | 1 - routes/web.php | 8 +- server.php | 2 - tests/Feature/ExampleTest.php | 1 - 459 files changed, 6219 insertions(+), 5416 deletions(-) create mode 100644 app/Datatables/Shop/DeliveryPackagesDataTable.php create mode 100644 app/Datatables/Shop/DeliveryTypeCalculationsDataTable.php create mode 100644 app/Datatables/Shop/DeliveryTypesDataTable.php delete mode 100644 app/Http/Controllers/Admin/Auth/ConfirmPasswordController.php delete mode 100644 app/Http/Controllers/Admin/Auth/ForgotPasswordController.php delete mode 100644 app/Http/Controllers/Admin/Auth/LoginController.php delete mode 100644 app/Http/Controllers/Admin/Auth/PasswordSecurityController.php delete mode 100644 app/Http/Controllers/Admin/Auth/RegisterController.php delete mode 100644 app/Http/Controllers/Admin/Auth/ResetPasswordController.php delete mode 100644 app/Http/Controllers/Admin/Auth/VerificationController.php create mode 100644 app/Http/Controllers/Admin/Shop/DeliveryPackageController.php create mode 100644 app/Http/Controllers/Admin/Shop/DeliveryTypeCalculationController.php create mode 100644 app/Http/Controllers/Admin/Shop/DeliveryTypeController.php create mode 100644 app/Menu/Settings.php delete mode 100644 app/Models/Shop/ArticlePrice.php create mode 100644 app/Repositories/Shop/DeliveryPackages.php create mode 100644 resources/views/Admin/Shop/DeliveryPackages/create.blade.php create mode 100644 resources/views/Admin/Shop/DeliveryPackages/edit.blade.php create mode 100644 resources/views/Admin/Shop/DeliveryPackages/form.blade.php create mode 100644 resources/views/Admin/Shop/DeliveryPackages/list.blade.php create mode 100644 resources/views/Admin/Shop/DeliveryPackages/partials/filters.blade.php create mode 100644 resources/views/Admin/Shop/DeliveryPackages/show.blade.php create mode 100644 resources/views/Admin/Shop/DeliveryTypeCalculations/create.blade.php create mode 100644 resources/views/Admin/Shop/DeliveryTypeCalculations/edit.blade.php create mode 100644 resources/views/Admin/Shop/DeliveryTypeCalculations/form.blade.php create mode 100644 resources/views/Admin/Shop/DeliveryTypeCalculations/list.blade.php create mode 100644 resources/views/Admin/Shop/DeliveryTypeCalculations/partials/filters.blade.php create mode 100644 resources/views/Admin/Shop/DeliveryTypeCalculations/show.blade.php create mode 100644 resources/views/Admin/Shop/DeliveryTypes/create.blade.php create mode 100644 resources/views/Admin/Shop/DeliveryTypes/edit.blade.php create mode 100644 resources/views/Admin/Shop/DeliveryTypes/form.blade.php create mode 100644 resources/views/Admin/Shop/DeliveryTypes/list.blade.php create mode 100644 resources/views/Admin/Shop/DeliveryTypes/partials/filters.blade.php create mode 100644 resources/views/Admin/Shop/DeliveryTypes/show.blade.php create mode 100644 routes/Admin/Shop/DeliveryPackages.php create mode 100644 routes/Admin/Shop/DeliveryTypeCalculations.php create mode 100644 routes/Admin/Shop/DeliveryTypes.php diff --git a/app/Console/Commands/addTagGroup.php b/app/Console/Commands/addTagGroup.php index 8554121b..77ae2c2b 100644 --- a/app/Console/Commands/addTagGroup.php +++ b/app/Console/Commands/addTagGroup.php @@ -2,13 +2,14 @@ namespace App\Console\Commands; -use Illuminate\Console\Command; use App\Models\Shop\Tag; use App\Repositories\Shop\TagGroups; +use Illuminate\Console\Command; class addTagGroup extends Command { protected $signature = 'addTagGroup'; + protected $description = 'Migrations of tags'; public function __construct() diff --git a/app/Console/Commands/untranslateShelves.php b/app/Console/Commands/untranslateShelves.php index 749fae38..ae721685 100644 --- a/app/Console/Commands/untranslateShelves.php +++ b/app/Console/Commands/untranslateShelves.php @@ -2,12 +2,13 @@ namespace App\Console\Commands; -use Illuminate\Console\Command; use App\Models\Shop\Category; +use Illuminate\Console\Command; class untranslateShelves extends Command { protected $signature = 'untranslateShelves'; + protected $description = 'Migrations of shelves'; public function __construct() diff --git a/app/Console/Commands/untranslateTags.php b/app/Console/Commands/untranslateTags.php index 4a2ba686..347013a0 100644 --- a/app/Console/Commands/untranslateTags.php +++ b/app/Console/Commands/untranslateTags.php @@ -2,12 +2,13 @@ namespace App\Console\Commands; -use Illuminate\Console\Command; use App\Models\Shop\Tag; +use Illuminate\Console\Command; class untranslateTags extends Command { protected $signature = 'untranslateTags'; + protected $description = 'Migrations of tags'; public function __construct() diff --git a/app/Console/Kernel.php b/app/Console/Kernel.php index db7c2e24..89fce550 100644 --- a/app/Console/Kernel.php +++ b/app/Console/Kernel.php @@ -19,7 +19,6 @@ class Kernel extends ConsoleKernel /** * Define the application's command schedule. * - * @param \Illuminate\Console\Scheduling\Schedule $schedule * @return void */ protected function schedule(Schedule $schedule) diff --git a/app/Contracts/Commentator.php b/app/Contracts/Commentator.php index 40e963a4..6007c896 100644 --- a/app/Contracts/Commentator.php +++ b/app/Contracts/Commentator.php @@ -2,14 +2,12 @@ namespace BeyondCode\Comments\Contracts; - interface Commentator { /** * Check if a comment for a specific model needs to be approved. - * @param mixed $model - * @return bool + * + * @param mixed $model */ public function needsCommentApproval($model): bool; - -} \ No newline at end of file +} diff --git a/app/Datatables/Admin/Core/CommentsDataTable.php b/app/Datatables/Admin/Core/CommentsDataTable.php index 3a13339b..a4bdfc01 100644 --- a/app/Datatables/Admin/Core/CommentsDataTable.php +++ b/app/Datatables/Admin/Core/CommentsDataTable.php @@ -2,11 +2,9 @@ namespace App\Datatables\Admin\Core; -use Yajra\DataTables\Html\Column; use App\Datatables\ParentDataTable as DataTable; - use App\Models\Core\Comment; -use App\Repositories\Core\Comments; +use Yajra\DataTables\Html\Column; class CommentsDataTable extends DataTable { @@ -20,6 +18,7 @@ class CommentsDataTable extends DataTable public function query(Comment $model) { $model = $model::with(['user'])->select('*'); + return $this->buildQuery($model); } diff --git a/app/Datatables/Botanic/FamiliesDataTable.php b/app/Datatables/Botanic/FamiliesDataTable.php index 9b6f280a..3959a343 100644 --- a/app/Datatables/Botanic/FamiliesDataTable.php +++ b/app/Datatables/Botanic/FamiliesDataTable.php @@ -2,9 +2,9 @@ namespace App\Datatables\Botanic; -use Yajra\DataTables\Html\Column; use App\Datatables\ParentDataTable as DataTable; use App\Models\Botanic\Family; +use Yajra\DataTables\Html\Column; class FamiliesDataTable extends DataTable { @@ -12,7 +12,8 @@ class FamiliesDataTable extends DataTable public function query(Family $model) { - $model = $model::withCount(['genres','species','varieties']); + $model = $model::withCount(['genres', 'species', 'varieties']); + return $this->buildQuery($model); } diff --git a/app/Datatables/Botanic/GenresDataTable.php b/app/Datatables/Botanic/GenresDataTable.php index 85e41301..747f63d8 100644 --- a/app/Datatables/Botanic/GenresDataTable.php +++ b/app/Datatables/Botanic/GenresDataTable.php @@ -2,9 +2,9 @@ namespace App\Datatables\Botanic; -use Yajra\DataTables\Html\Column; use App\Datatables\ParentDataTable as DataTable; use App\Models\Botanic\Genre; +use Yajra\DataTables\Html\Column; class GenresDataTable extends DataTable { @@ -13,6 +13,7 @@ class GenresDataTable extends DataTable public function query(Genre $model) { $model = $model::with('family')->withCount('species')->withCount('varieties'); + return $this->buildQuery($model); } @@ -23,6 +24,7 @@ class GenresDataTable extends DataTable return $genre->family ? $genre->family->name : ''; }) ->rawColumns(['genre_name', 'action']); + return parent::modifier($datatables); } diff --git a/app/Datatables/Botanic/SpeciesDataTable.php b/app/Datatables/Botanic/SpeciesDataTable.php index 27973b30..a17efcbf 100644 --- a/app/Datatables/Botanic/SpeciesDataTable.php +++ b/app/Datatables/Botanic/SpeciesDataTable.php @@ -2,11 +2,11 @@ namespace App\Datatables\Botanic; -use App\Repositories\Shop\Tags; -use Yajra\DataTables\Html\Column; use App\Datatables\ParentDataTable as DataTable; use App\Models\Botanic\Specie; use App\Repositories\Botanic\Species; +use App\Repositories\Shop\Tags; +use Yajra\DataTables\Html\Column; class SpeciesDataTable extends DataTable { @@ -15,6 +15,7 @@ class SpeciesDataTable extends DataTable public function query(Specie $model) { $model = $model::withCount(['images', 'varieties', 'tags'])->with(['genre', 'image', 'tags']); + return $this->buildQuery($model); } @@ -32,9 +33,11 @@ class SpeciesDataTable extends DataTable foreach ($specie->tags as $tag) { $html .= Tags::getTagHtml($tag); } + return $html; }) ->rawColumns(['thumb', 'tags2', 'genre_name', 'action']); + return parent::modifier($datatables); } diff --git a/app/Datatables/Botanic/VarietiesDataTable.php b/app/Datatables/Botanic/VarietiesDataTable.php index 38d5d5b4..0bc00b1f 100644 --- a/app/Datatables/Botanic/VarietiesDataTable.php +++ b/app/Datatables/Botanic/VarietiesDataTable.php @@ -2,11 +2,11 @@ namespace App\Datatables\Botanic; -use Yajra\DataTables\Html\Column; use App\Datatables\ParentDataTable as DataTable; use App\Models\Botanic\Variety; use App\Repositories\Botanic\Varieties; use App\Repositories\Shop\Tags; +use Yajra\DataTables\Html\Column; class VarietiesDataTable extends DataTable { @@ -15,6 +15,7 @@ class VarietiesDataTable extends DataTable public function query(Variety $model) { $model = $model::joinRelationship('Specie')->select('botanic_varieties.*', 'botanic_species.name as specie_name')->with(['image', 'Specie', 'tags'])->withCount(['Articles', 'tags', 'images']); + return $this->buildQuery($model); } @@ -29,13 +30,14 @@ class VarietiesDataTable extends DataTable foreach ($variety->tags as $tag) { $html .= Tags::getTagHtml($tag); } + return $html; }) ->rawColumns(['thumb', 'tags2', 'action']); + return parent::modifier($datatables); } - protected function getColumns() { return [ diff --git a/app/Datatables/ParentDataTable.php b/app/Datatables/ParentDataTable.php index ca6ae377..fb5a07c2 100644 --- a/app/Datatables/ParentDataTable.php +++ b/app/Datatables/ParentDataTable.php @@ -4,30 +4,38 @@ namespace App\Datatables; use Yajra\DataTables\Html\Button; use Yajra\DataTables\Html\Column; -use Yajra\DataTables\Html\Editor\Editor; -use Yajra\DataTables\Html\Editor\Fields; use Yajra\DataTables\Services\DataTable; class ParentDataTable extends DataTable { public $autoWidth = false; + public $colReorder = false; + public $fixedColumns = false; + public $fixedHeader = false; + public $rowReorder = false; + public $rowReorderSelector; // ['selector' => 'tr'] + public $scrollCollapse = false; + public $scrollX = false; + public $sortedColumn = 0; + public $sortedOrder = 'asc'; + public $stateSave = true; /** - * Build DataTable class. - * - * @param mixed $query Results from query() method. - * @return \Yajra\DataTables\DataTableAbstract - */ + * Build DataTable class. + * + * @param mixed $query Results from query() method. + * @return \Yajra\DataTables\DataTableAbstract + */ public function dataTable($query) { return $this->modifier(datatables()->eloquent($query)); @@ -41,7 +49,7 @@ class ParentDataTable extends DataTable /** * Add buttons DataTable class. * - * @param mixed $query Results from query() method. + * @param mixed $query Results from query() method. * @return \Yajra\DataTables\DataTableAbstract */ public function addButtons($datatables) @@ -54,6 +62,7 @@ class ParentDataTable extends DataTable $buttons = ''; $buttons .= self::getButtonEdit(); $buttons .= self::getButtonDel(); + return $buttons; // return view('components.datatables.buttons.row_action'); } @@ -86,20 +95,20 @@ class ParentDataTable extends DataTable public static function isFilteredByField($field) { - return (request()->has('filters.' . $field)) ? request()->input('filters.'. $field) : (request()->has($field) ? request()->input($field) : false); + return (request()->has('filters.'.$field)) ? request()->input('filters.'.$field) : (request()->has($field) ? request()->input($field) : false); } /** * Get query source of dataTable. * - * @param \App\Family $model + * @param \App\Family $model * @return \Illuminate\Database\Eloquent\Builder */ public function buildQuery($model) { return $model->newQuery(); } - + /** * Optional method if you want to use html builder. * @@ -107,7 +116,7 @@ class ParentDataTable extends DataTable */ public function html() { - return $this->buildHtml(strtolower($this->model_name) . '-table'); + return $this->buildHtml(strtolower($this->model_name).'-table'); } /** @@ -117,19 +126,20 @@ class ParentDataTable extends DataTable */ public function buildHtml($table_id = false, $selector = false) { - $table_id = $table_id ? $table_id : strtolower($this->model_name) . '-table'; - $selector = $selector ? $selector : '#' . $this->model_name . '-filters'; + $table_id = $table_id ? $table_id : strtolower($this->model_name).'-table'; + $selector = $selector ? $selector : '#'.$this->model_name.'-filters'; + return $this->builder() - ->setTableId($table_id) - ->parameters($this->getParameters()) - ->columns($this->getColumns()) - ->ajax([ - 'data' => 'function(d) { d.filters = $("' . $selector . '").serializeJSON(); }', - 'url' => isset($this->url) ? $this->url : '' - ]) - ->dom($this->getDom()) - ->orderBy($this->sortedColumn, $this->sortedOrder) - ->buttons($this->getButtons()); + ->setTableId($table_id) + ->parameters($this->getParameters()) + ->columns($this->getColumns()) + ->ajax([ + 'data' => 'function(d) { d.filters = $("'.$selector.'").serializeJSON(); }', + 'url' => isset($this->url) ? $this->url : '', + ]) + ->dom($this->getDom()) + ->orderBy($this->sortedColumn, $this->sortedOrder) + ->buttons($this->getButtons()); } public function getButtons() @@ -138,7 +148,7 @@ class ParentDataTable extends DataTable // Button::make('export'), Button::make('print'), Button::make('colvis'), - Button::make('columnsToggle') + Button::make('columnsToggle'), ]; } @@ -153,11 +163,12 @@ class ParentDataTable extends DataTable 'searchDelay' => 500, 'scrollX' => $this->scrollX, 'scrollCollapse' => $this->scrollCollapse, - 'stateSave' => $this->stateSave + 'stateSave' => $this->stateSave, ]; if ($this->rowReorder) { $data['rowReorder'] = ['selector' => $this->rowReorderSelector]; } + return $data; } @@ -165,8 +176,9 @@ class ParentDataTable extends DataTable { $dom = ''; // $dom .= $this->getDatatablesHeaderDefault(); - $dom .= "rt"; + $dom .= 'rt'; $dom .= $this->getDatatablesFooterDefault(); + return $dom; } @@ -189,8 +201,9 @@ class ParentDataTable extends DataTable . '<"dt-toolbar-footer"<"col"i><"col pull-right datatable-pager light nopadding-right"p>>'; */ - + $dom = "<'row dt-toolbar-header'<'col-lg-4'l><'col-lg-4'B><'col-lg-4 text-right add'f>>"; + return $dom; // return 't<"row datatable-pager light"<"col-md-12"<"datatable-more-export-buttons filter-buttons pull-left"><"datatable-more-export-favorites-buttons filter-buttons pull-left"><"datatable-more-export-basket-buttons filter-buttons pull-left"><"datatable-download-buttons filter-buttons pull-left">>><"dt-toolbar-footer"<"col-md-6"i><"col-md-6 pull-right datatable-pager light nopadding-right"p>>'; } @@ -217,6 +230,6 @@ class ParentDataTable extends DataTable */ protected function buildFilename($name) { - return $name . '_' . date('YmdHis'); + return $name.'_'.date('YmdHis'); } } diff --git a/app/Datatables/Shop/ArticleNaturesDataTable.php b/app/Datatables/Shop/ArticleNaturesDataTable.php index ae61be14..58e913ef 100644 --- a/app/Datatables/Shop/ArticleNaturesDataTable.php +++ b/app/Datatables/Shop/ArticleNaturesDataTable.php @@ -2,10 +2,10 @@ namespace App\Datatables\Shop; -use Yajra\DataTables\Html\Column; use App\Datatables\ParentDataTable as DataTable; use App\Models\Shop\ArticleNature; use App\Repositories\Shop\ArticleNatures; +use Yajra\DataTables\Html\Column; class ArticleNaturesDataTable extends DataTable { @@ -14,16 +14,18 @@ class ArticleNaturesDataTable extends DataTable public function query(ArticleNature $model) { $model = $model::withCount('Articles'); + return $this->buildQuery($model); } public function modifier($datatables) { $datatables - ->editColumn('product_type', function (ArticleNature $nature) { - return ArticleNatures::getProductTypeName($nature->product_type); - }) - ->rawColumns(['action']); + ->editColumn('product_type', function (ArticleNature $nature) { + return ArticleNatures::getProductTypeName($nature->product_type); + }) + ->rawColumns(['action']); + return parent::modifier($datatables); } diff --git a/app/Datatables/Shop/ArticlesDataTable.php b/app/Datatables/Shop/ArticlesDataTable.php index 9a31ba0f..693a3efb 100644 --- a/app/Datatables/Shop/ArticlesDataTable.php +++ b/app/Datatables/Shop/ArticlesDataTable.php @@ -2,16 +2,16 @@ namespace App\Datatables\Shop; -use Yajra\DataTables\Html\Column; - use App\Datatables\ParentDataTable as DataTable; use App\Models\Shop\Article; use App\Repositories\Shop\Articles; use App\Repositories\Shop\Tags; +use Yajra\DataTables\Html\Column; class ArticlesDataTable extends DataTable { public $model_name = 'articles'; + public $sortedColumn = 2; public function query(Article $model) @@ -20,70 +20,77 @@ class ArticlesDataTable extends DataTable $model = self::filterByArticleNature($model); $model = self::filterByCategory($model); $model = self::filterByTag($model); + return $this->buildQuery($model); } public static function filterByArticleNature($model, $article_nature_id = false) { $article_nature_id = $article_nature_id ? $article_nature_id : self::isFilteredByField('article_nature_id'); + return $article_nature_id ? $model->byArticleNature($article_nature_id) : $model; } public static function filterByCategory($model, $category_id = false) { $category_id = $category_id ? $category_id : self::isFilteredByField('category_id'); + return $category_id ? $model->byCategory($category_id) : $model; } public static function filterByTag($model, $tag_id = false) { $tag_id = $tag_id ? $tag_id : self::isFilteredByField('tag_id'); + return $tag_id ? $model->byTag($tag_id) : $model; } public function modifier($datatables) { $datatables - ->editColumn('visible', function (Article $article) { - return view("components.form.toggle", [ - 'name' => 'visible', - 'value' => $article->visible, - 'on' => __('oui'), - 'off' => __('non'), - 'meta' => 'data-id=' . $article->id, - 'size' => 'sm', - 'class' => 'visible', - ]); - }) - ->editColumn('homepage', function (Article $article) { - return view("components.form.toggle", [ - 'name' => 'homepage', - 'value' => $article->homepage, - 'on' => __('oui'), - 'off' => __('non'), - 'meta' => 'data-id=' . $article->id, - 'size' => 'sm', - 'class' => 'homepage', - ]); - }) - ->editColumn('thumb', function (Article $article) { - $image = Articles::getFullImageByArticle($article); - return Articles::getThumb($image, false); - }) - ->editColumn('article_nature.name', function (Article $article) { - return $article->article_nature ? $article->article_nature->name : ''; - }) - ->editColumn('tags2', function (Article $article) { - $html = ''; - foreach ($article->tags as $tag) { - $html .= Tags::getTagHtml($tag); - } - return $html; - }) - ->editColumn('images_count2', function (Article $article) { - return Articles::countFullImagesByArticle($article); - }) - ->rawColumns(['tags2', 'thumb', 'action']); + ->editColumn('visible', function (Article $article) { + return view('components.form.toggle', [ + 'name' => 'visible', + 'value' => $article->visible, + 'on' => __('oui'), + 'off' => __('non'), + 'meta' => 'data-id='.$article->id, + 'size' => 'sm', + 'class' => 'visible', + ]); + }) + ->editColumn('homepage', function (Article $article) { + return view('components.form.toggle', [ + 'name' => 'homepage', + 'value' => $article->homepage, + 'on' => __('oui'), + 'off' => __('non'), + 'meta' => 'data-id='.$article->id, + 'size' => 'sm', + 'class' => 'homepage', + ]); + }) + ->editColumn('thumb', function (Article $article) { + $image = Articles::getFullImageByArticle($article); + + return Articles::getThumb($image, false); + }) + ->editColumn('article_nature.name', function (Article $article) { + return $article->article_nature ? $article->article_nature->name : ''; + }) + ->editColumn('tags2', function (Article $article) { + $html = ''; + foreach ($article->tags as $tag) { + $html .= Tags::getTagHtml($tag); + } + + return $html; + }) + ->editColumn('images_count2', function (Article $article) { + return Articles::countFullImagesByArticle($article); + }) + ->rawColumns(['tags2', 'thumb', 'action']); + return parent::modifier($datatables); } diff --git a/app/Datatables/Shop/CategoriesDataTable.php b/app/Datatables/Shop/CategoriesDataTable.php index 6b46237a..8e78a910 100644 --- a/app/Datatables/Shop/CategoriesDataTable.php +++ b/app/Datatables/Shop/CategoriesDataTable.php @@ -2,9 +2,9 @@ namespace App\Datatables\Shop; -use Yajra\DataTables\Html\Column; use App\Datatables\ParentDataTable as DataTable; use App\Models\Shop\Category; +use Yajra\DataTables\Html\Column; class CategoriesDataTable extends DataTable { @@ -13,46 +13,49 @@ class CategoriesDataTable extends DataTable public function query(Category $model) { $model = $model::notRoot()->with(['tags.articles'])->withCount(['articles', 'tags']); + return $this->buildQuery($model); } public function modifier($datatables) { $datatables - ->editColumn('name', function (Category $category) { - return $category->name; - }) - ->editColumn('visible', function (Category $category) { - return view("components.form.toggle", [ - 'name' => 'visible', - 'value' => $category->visible, - 'on' => __('oui'), - 'off' => __('non'), - 'meta' => 'data-id=' . $category->id, - 'size' => 'sm', - 'class' => 'visible', - ]); - }) - ->editColumn('homepage', function (Category $category) { - return view("components.form.toggle", [ - 'name' => 'homepage', - 'value' => $category->homepage, - 'on' => __('oui'), - 'off' => __('non'), - 'meta' => 'data-id=' . $category->id, - 'size' => 'sm', - 'class' => 'homepage', - ]); - }) - ->editColumn('articles_tagged_count', function (Category $category) { - $count = 0; - foreach ($category->tags as $tag) { - $nb = collect($tag->articles)->count(); - $count += $nb; - } - return $count; - }) - ->rawColumns(['visible', 'action']); + ->editColumn('name', function (Category $category) { + return $category->name; + }) + ->editColumn('visible', function (Category $category) { + return view('components.form.toggle', [ + 'name' => 'visible', + 'value' => $category->visible, + 'on' => __('oui'), + 'off' => __('non'), + 'meta' => 'data-id='.$category->id, + 'size' => 'sm', + 'class' => 'visible', + ]); + }) + ->editColumn('homepage', function (Category $category) { + return view('components.form.toggle', [ + 'name' => 'homepage', + 'value' => $category->homepage, + 'on' => __('oui'), + 'off' => __('non'), + 'meta' => 'data-id='.$category->id, + 'size' => 'sm', + 'class' => 'homepage', + ]); + }) + ->editColumn('articles_tagged_count', function (Category $category) { + $count = 0; + foreach ($category->tags as $tag) { + $nb = collect($tag->articles)->count(); + $count += $nb; + } + + return $count; + }) + ->rawColumns(['visible', 'action']); + return parent::modifier($datatables); } diff --git a/app/Datatables/Shop/CustomerAddressesDataTable.php b/app/Datatables/Shop/CustomerAddressesDataTable.php index e4d5b2e6..07ce0904 100644 --- a/app/Datatables/Shop/CustomerAddressesDataTable.php +++ b/app/Datatables/Shop/CustomerAddressesDataTable.php @@ -2,9 +2,9 @@ namespace App\Datatables\Shop; -use Yajra\DataTables\Html\Column; use App\Datatables\ParentDataTable as DataTable; use App\Models\Shop\CustomerAddress; +use Yajra\DataTables\Html\Column; class CustomerAddressesDataTable extends DataTable { diff --git a/app/Datatables/Shop/CustomerDeliveriesDataTable.php b/app/Datatables/Shop/CustomerDeliveriesDataTable.php index 76be9e86..0a49b9f6 100644 --- a/app/Datatables/Shop/CustomerDeliveriesDataTable.php +++ b/app/Datatables/Shop/CustomerDeliveriesDataTable.php @@ -2,9 +2,9 @@ namespace App\Datatables\Shop; -use Yajra\DataTables\Html\Column; use App\Datatables\ParentDataTable as DataTable; use App\Models\Shop\Customer; +use Yajra\DataTables\Html\Column; class CustomerDeliveriesDataTable extends DataTable { diff --git a/app/Datatables/Shop/CustomerOrdersDataTable.php b/app/Datatables/Shop/CustomerOrdersDataTable.php index c4c928ec..8655e918 100644 --- a/app/Datatables/Shop/CustomerOrdersDataTable.php +++ b/app/Datatables/Shop/CustomerOrdersDataTable.php @@ -2,25 +2,27 @@ namespace App\Datatables\Shop; -use Yajra\DataTables\Html\Column; - use App\Datatables\ParentDataTable as DataTable; use App\Models\Shop\Order; use App\Repositories\Shop\InvoicePayments; use App\Repositories\Shop\Orders; - +use Yajra\DataTables\Html\Column; class CustomerOrdersDataTable extends DataTable { public $model_name = 'orders'; + public $sortedColumn = 1; + public $sortedOrder = 'desc'; + public $stateSave = true; public function query(Order $model) { $customer_id = Auth::id(); $model = $model->byCustomer($customer_id)->with(['delivery']); + return $this->buildQuery($model); } @@ -37,6 +39,7 @@ class CustomerOrdersDataTable extends DataTable return InvoicePayments::getPaymentType($order->payment_type); }) ->rawColumns(['action']); + return parent::modifier($datatables); } diff --git a/app/Datatables/Shop/CustomersDataTable.php b/app/Datatables/Shop/CustomersDataTable.php index f1df1ff5..ae8563c3 100644 --- a/app/Datatables/Shop/CustomersDataTable.php +++ b/app/Datatables/Shop/CustomersDataTable.php @@ -2,9 +2,9 @@ namespace App\Datatables\Shop; -use Yajra\DataTables\Html\Column; use App\Datatables\ParentDataTable as DataTable; use App\Models\Shop\Customer; +use Yajra\DataTables\Html\Column; class CustomersDataTable extends DataTable { @@ -13,6 +13,7 @@ class CustomersDataTable extends DataTable public function query(Customer $model) { $model = $model->with('addresses'); + return $this->buildQuery($model); } diff --git a/app/Datatables/Shop/DeliveriesDataTable.php b/app/Datatables/Shop/DeliveriesDataTable.php index afbc3258..cc5c57f3 100644 --- a/app/Datatables/Shop/DeliveriesDataTable.php +++ b/app/Datatables/Shop/DeliveriesDataTable.php @@ -2,9 +2,9 @@ namespace App\Datatables\Shop; -use Yajra\DataTables\Html\Column; use App\Datatables\ParentDataTable as DataTable; use App\Models\Shop\Delivery; +use Yajra\DataTables\Html\Column; class DeliveriesDataTable extends DataTable { @@ -13,6 +13,7 @@ class DeliveriesDataTable extends DataTable public function query(Delivery $model) { $model = $model->with('sale_channel'); + return $this->buildQuery($model); } @@ -20,18 +21,19 @@ class DeliveriesDataTable extends DataTable { $datatables ->editColumn('active', function (Delivery $delivery) { - return view("components.form.toggle", [ + return view('components.form.toggle', [ 'value' => $delivery->active, 'on' => __('active'), 'off' => __('inactive'), - 'meta' => 'data-id=' . $delivery->id, + 'meta' => 'data-id='.$delivery->id, 'size' => 'sm', ]); }) ->editColumn('address', function (Delivery $delivery) { - return $delivery->address . ' ' . $delivery->zipcode . ' ' . $delivery->city; + return $delivery->address.' '.$delivery->zipcode.' '.$delivery->city; }) - ->rawColumns(['active', 'address', 'action']); + ->rawColumns(['active', 'address', 'action']); + return parent::modifier($datatables); } diff --git a/app/Datatables/Shop/DeliveryPackagesDataTable.php b/app/Datatables/Shop/DeliveryPackagesDataTable.php new file mode 100644 index 00000000..3686925d --- /dev/null +++ b/app/Datatables/Shop/DeliveryPackagesDataTable.php @@ -0,0 +1,27 @@ +buildQuery($model); + } + + protected function getColumns() + { + return [ + Column::make('weight')->title('Poids'), + Column::make('weight_flyer')->title('Flyer'), + Column::make('weight_packaging')->title('Packaging'), + $this->makeColumnButtons(), + ]; + } +} diff --git a/app/Datatables/Shop/DeliveryTypeCalculationsDataTable.php b/app/Datatables/Shop/DeliveryTypeCalculationsDataTable.php new file mode 100644 index 00000000..cefb0593 --- /dev/null +++ b/app/Datatables/Shop/DeliveryTypeCalculationsDataTable.php @@ -0,0 +1,29 @@ +with('delivery_type'); + + return $this->buildQuery($model); + } + + protected function getColumns() + { + return [ + Column::make('delivery_type.name')->title('Nom'), + Column::make('weight')->title('Poids en g')->addClass('text-right'), + Column::make('price')->title('Prix')->addClass('text-right'), + $this->makeColumnButtons(), + ]; + } +} diff --git a/app/Datatables/Shop/DeliveryTypesDataTable.php b/app/Datatables/Shop/DeliveryTypesDataTable.php new file mode 100644 index 00000000..32cf0c85 --- /dev/null +++ b/app/Datatables/Shop/DeliveryTypesDataTable.php @@ -0,0 +1,25 @@ +buildQuery($model); + } + + protected function getColumns() + { + return [ + Column::make('name')->title('Nom'), + $this->makeColumnButtons(), + ]; + } +} diff --git a/app/Datatables/Shop/HomepagesDataTable.php b/app/Datatables/Shop/HomepagesDataTable.php index 433d64cd..1168fb35 100644 --- a/app/Datatables/Shop/HomepagesDataTable.php +++ b/app/Datatables/Shop/HomepagesDataTable.php @@ -2,9 +2,9 @@ namespace App\Datatables\Shop; -use Yajra\DataTables\Html\Column; use App\Datatables\ParentDataTable as DataTable; use App\Models\Shop\Homepage; +use Yajra\DataTables\Html\Column; class HomepagesDataTable extends DataTable { @@ -18,6 +18,7 @@ class HomepagesDataTable extends DataTable public function modifier($datatables) { $datatables->rawColumns(['text', 'action']); + return parent::modifier($datatables); } diff --git a/app/Datatables/Shop/InvoicesDataTable.php b/app/Datatables/Shop/InvoicesDataTable.php index f6c9c42d..6e4d5f84 100644 --- a/app/Datatables/Shop/InvoicesDataTable.php +++ b/app/Datatables/Shop/InvoicesDataTable.php @@ -2,10 +2,10 @@ namespace App\Datatables\Shop; -use Yajra\DataTables\Html\Column; use App\Datatables\ParentDataTable as DataTable; use App\Models\Shop\Invoice; use App\Repositories\Shop\Invoices; +use Yajra\DataTables\Html\Column; class InvoicesDataTable extends DataTable { @@ -14,6 +14,7 @@ class InvoicesDataTable extends DataTable public function query(Invoice $model) { $model = $model->with('customer'); + return $this->buildQuery($model); } @@ -27,9 +28,10 @@ class InvoicesDataTable extends DataTable return $invoice->created_at->toDateTimeString(); }) ->editColumn('customer.last_name', function (Invoice $invoice) { - return ($invoice->customer ?? false) ? $invoice->customer->last_name . ' ' . $invoice->customer->first_name : ''; + return ($invoice->customer ?? false) ? $invoice->customer->last_name.' '.$invoice->customer->first_name : ''; }) ->rawColumns(['action']); + return parent::modifier($datatables); } diff --git a/app/Datatables/Shop/MerchandisesDataTable.php b/app/Datatables/Shop/MerchandisesDataTable.php index c854acba..3377aa11 100644 --- a/app/Datatables/Shop/MerchandisesDataTable.php +++ b/app/Datatables/Shop/MerchandisesDataTable.php @@ -2,11 +2,11 @@ namespace App\Datatables\Shop; -use Yajra\DataTables\Html\Column; use App\Datatables\ParentDataTable as DataTable; use App\Models\Shop\Merchandise; use App\Repositories\Shop\Merchandises; use App\Repositories\Shop\Tags; +use Yajra\DataTables\Html\Column; class MerchandisesDataTable extends DataTable { @@ -15,10 +15,10 @@ class MerchandisesDataTable extends DataTable public function query(Merchandise $model) { $model = $model::with(['image', 'tags'])->withCount(['Articles', 'tags', 'images']); + return $this->buildQuery($model); } - public function modifier($datatables) { $datatables @@ -30,13 +30,14 @@ class MerchandisesDataTable extends DataTable foreach ($merchandise->tags as $tag) { $html .= Tags::getTagHtml($tag); } + return $html; }) ->rawColumns(['thumb', 'tags2', 'action']); + return parent::modifier($datatables); } - protected function getColumns() { return [ diff --git a/app/Datatables/Shop/OffersDataTable.php b/app/Datatables/Shop/OffersDataTable.php index ea7f1bcf..155047ca 100644 --- a/app/Datatables/Shop/OffersDataTable.php +++ b/app/Datatables/Shop/OffersDataTable.php @@ -2,33 +2,37 @@ namespace App\Datatables\Shop; -use Yajra\DataTables\Html\Column; use App\Datatables\ParentDataTable as DataTable; use App\Models\Shop\Offer; use App\Repositories\Shop\Offers; +use Yajra\DataTables\Html\Column; class OffersDataTable extends DataTable { public $model_name = 'offers'; + public $sortedColumn = 1; public function query(Offer $model) { - $model = $model->with(['article.article_nature', 'variation', 'tariff'])->select($model->getTable() . '.*'); + $model = $model->with(['article.article_nature', 'variation', 'tariff'])->select($model->getTable().'.*'); $model = self::filterByArticleNature($model); $model = self::filterByPackage($model); + return $this->buildQuery($model); } public static function filterByArticleNature($model, $article_nature_id = false) { $article_nature_id = $article_nature_id ? $article_nature_id : self::isFilteredByField('article_nature_id'); + return $article_nature_id ? $model->byArticleNature($article_nature_id) : $model; } public static function filterByPackage($model, $package_id = false) { $package_id = $package_id ? $package_id : self::isFilteredByField('package_id'); + return $package_id ? $model->byPackage($package_id) : $model; } @@ -36,10 +40,10 @@ class OffersDataTable extends DataTable { $datatables ->editColumn('thumb', function (Offer $offer) { - return ''; + return ''; }) ->editColumn('status_id', function (Offer $offer) { - return view("components.form.toggle", [ + return view('components.form.toggle', [ 'name' => 'status_id', 'value' => $offer->status_id, 'on' => __('active'), @@ -49,9 +53,10 @@ class OffersDataTable extends DataTable ]); }) ->editColumn('stock_delayed', function (Offer $offer) { - return $offer->stock_delayed . ' - ' . $offer->delay_type; + return $offer->stock_delayed.' - '.$offer->delay_type; }) ->rawColumns(['active', 'thumb', 'action']); + return parent::modifier($datatables); } diff --git a/app/Datatables/Shop/OrdersDataTable.php b/app/Datatables/Shop/OrdersDataTable.php index 45cde5e2..3f65ebad 100644 --- a/app/Datatables/Shop/OrdersDataTable.php +++ b/app/Datatables/Shop/OrdersDataTable.php @@ -2,23 +2,26 @@ namespace App\Datatables\Shop; -use Yajra\DataTables\Html\Column; - use App\Datatables\ParentDataTable as DataTable; use App\Models\Shop\Order; use App\Repositories\Shop\InvoicePayments; use App\Repositories\Shop\Orders; +use Yajra\DataTables\Html\Column; class OrdersDataTable extends DataTable { public $model_name = 'orders'; + public $sortedColumn = 1; + public $sortedOrder = 'desc'; + public $stateSave = true; public function query(Order $model) { $model = $model->with(['customer', 'delivery']); + return $this->buildQuery($model); } @@ -32,12 +35,13 @@ class OrdersDataTable extends DataTable return $order->created_at->toDateTimeString(); }) ->editColumn('customer.last_name', function (Order $order) { - return $order->customer->last_name . ' ' . $order->customer->first_name; + return $order->customer->last_name.' '.$order->customer->first_name; }) ->editColumn('payment_type', function (Order $order) { return InvoicePayments::getPaymentType($order->payment_type); }) ->rawColumns(['action']); + return parent::modifier($datatables); } diff --git a/app/Datatables/Shop/PackagesDataTable.php b/app/Datatables/Shop/PackagesDataTable.php index 9968e769..2e7c4bd9 100644 --- a/app/Datatables/Shop/PackagesDataTable.php +++ b/app/Datatables/Shop/PackagesDataTable.php @@ -2,9 +2,9 @@ namespace App\Datatables\Shop; -use Yajra\DataTables\Html\Column; use App\Datatables\ParentDataTable as DataTable; use App\Models\Shop\Package; +use Yajra\DataTables\Html\Column; class PackagesDataTable extends DataTable { @@ -12,7 +12,8 @@ class PackagesDataTable extends DataTable public function query(Package $model) { - $model = $model->withCount(['variations','offers']); + $model = $model->withCount(['variations', 'offers']); + return $this->buildQuery($model); } diff --git a/app/Datatables/Shop/PriceGenericCategoriesDataTable.php b/app/Datatables/Shop/PriceGenericCategoriesDataTable.php index a7923cdc..40ddd5df 100644 --- a/app/Datatables/Shop/PriceGenericCategoriesDataTable.php +++ b/app/Datatables/Shop/PriceGenericCategoriesDataTable.php @@ -2,9 +2,9 @@ namespace App\Datatables\Shop; -use Yajra\DataTables\Html\Column; use App\Datatables\ParentDataTable as DataTable; use App\Models\Shop\PriceGenericCategory; +use Yajra\DataTables\Html\Column; class PriceGenericCategoriesDataTable extends DataTable { @@ -13,6 +13,7 @@ class PriceGenericCategoriesDataTable extends DataTable public function query(PriceGenericCategory $model) { $model = $model->withCount('price_generics'); + return $this->buildQuery($model); } diff --git a/app/Datatables/Shop/PriceListsDataTable.php b/app/Datatables/Shop/PriceListsDataTable.php index 0a1fd854..efe43624 100644 --- a/app/Datatables/Shop/PriceListsDataTable.php +++ b/app/Datatables/Shop/PriceListsDataTable.php @@ -2,10 +2,10 @@ namespace App\Datatables\Shop; -use Yajra\DataTables\Html\Column; use App\Datatables\ParentDataTable as DataTable; use App\Models\Shop\PriceList; use App\Repositories\Shop\PriceLists; +use Yajra\DataTables\Html\Column; class PriceListsDataTable extends DataTable { @@ -20,12 +20,14 @@ class PriceListsDataTable extends DataTable { $model = $model->with(['sale_channel', 'price_list_values']); $model = self::filterByTariff($model); + return $this->buildQuery($model); } public static function filterByTariff($model, $tariff_id = false) { $tariff_id = $tariff_id ? $tariff_id : self::isFilteredByField('tariff_id'); + return $tariff_id ? $model->byTariff($tariff_id) : $model; } @@ -39,6 +41,7 @@ class PriceListsDataTable extends DataTable return view('Admin.Shop.PriceLists.partials.table-prices', ['prices' => $price_list['price_list_values']]); }) ->rawColumns(['tariff_id', 'action']); + return parent::modifier($datatables); } diff --git a/app/Datatables/Shop/ProducersDataTable.php b/app/Datatables/Shop/ProducersDataTable.php index 61025d39..c4bd941d 100644 --- a/app/Datatables/Shop/ProducersDataTable.php +++ b/app/Datatables/Shop/ProducersDataTable.php @@ -2,11 +2,11 @@ namespace App\Datatables\Shop; -use Yajra\DataTables\Html\Column; use App\Datatables\ParentDataTable as DataTable; use App\Models\Shop\Producer; use App\Repositories\Shop\Producers; use App\Repositories\Shop\Tags; +use Yajra\DataTables\Html\Column; class ProducersDataTable extends DataTable { @@ -15,10 +15,10 @@ class ProducersDataTable extends DataTable public function query(Producer $model) { $model = $model::with(['image', 'tags'])->withCount(['Merchandises', 'tags', 'images']); + return $this->buildQuery($model); } - public function modifier($datatables) { $datatables @@ -30,13 +30,14 @@ class ProducersDataTable extends DataTable foreach ($producer->tags as $tag) { $html .= Tags::getTagHtml($tag); } + return $html; }) ->rawColumns(['thumb', 'tags2', 'action']); + return parent::modifier($datatables); } - protected function getColumns() { return [ diff --git a/app/Datatables/Shop/SaleChannelsDataTable.php b/app/Datatables/Shop/SaleChannelsDataTable.php index 419a4b0f..24fc7a7a 100644 --- a/app/Datatables/Shop/SaleChannelsDataTable.php +++ b/app/Datatables/Shop/SaleChannelsDataTable.php @@ -2,9 +2,9 @@ namespace App\Datatables\Shop; -use Yajra\DataTables\Html\Column; use App\Datatables\ParentDataTable as DataTable; use App\Models\Shop\SaleChannel; +use Yajra\DataTables\Html\Column; class SaleChannelsDataTable extends DataTable { @@ -13,6 +13,7 @@ class SaleChannelsDataTable extends DataTable public function query(SaleChannel $model) { $model = $model->withCount(['deliveries', 'tariffs']); + return $this->buildQuery($model); } diff --git a/app/Datatables/Shop/TagGroupsDataTable.php b/app/Datatables/Shop/TagGroupsDataTable.php index 5ae6fac9..87866166 100644 --- a/app/Datatables/Shop/TagGroupsDataTable.php +++ b/app/Datatables/Shop/TagGroupsDataTable.php @@ -2,36 +2,39 @@ namespace App\Datatables\Shop; -use Yajra\DataTables\Html\Column; use App\Datatables\ParentDataTable as DataTable; use App\Models\Shop\TagGroup; +use Yajra\DataTables\Html\Column; class TagGroupsDataTable extends DataTable { public $model_name = 'tag_groups'; + public $sortedColumn = 2; public function query(TagGroup $model) { $model = $model::with('article_family')->withCount('tags'); + return $this->buildQuery($model); } public function modifier($datatables) { $datatables - ->editColumn('visible', function (TagGroup $tag_group) { - return view("components.form.toggle", [ - 'name' => 'visible', - 'value' => $tag_group->visible, - 'on' => __('oui'), - 'off' => __('non'), - 'meta' => 'data-id=' . $tag_group->id, - 'size' => 'sm', - 'class' => 'visible', - ]); - }) - ->rawColumns(['visible', 'action']); + ->editColumn('visible', function (TagGroup $tag_group) { + return view('components.form.toggle', [ + 'name' => 'visible', + 'value' => $tag_group->visible, + 'on' => __('oui'), + 'off' => __('non'), + 'meta' => 'data-id='.$tag_group->id, + 'size' => 'sm', + 'class' => 'visible', + ]); + }) + ->rawColumns(['visible', 'action']); + return parent::modifier($datatables); } diff --git a/app/Datatables/Shop/TagsDataTable.php b/app/Datatables/Shop/TagsDataTable.php index a0b480ca..17b6b63d 100644 --- a/app/Datatables/Shop/TagsDataTable.php +++ b/app/Datatables/Shop/TagsDataTable.php @@ -2,18 +2,20 @@ namespace App\Datatables\Shop; -use Yajra\DataTables\Html\Column; use App\Datatables\ParentDataTable as DataTable; use App\Models\Shop\Tag; +use Yajra\DataTables\Html\Column; class TagsDataTable extends DataTable { public $model_name = 'tags'; + public $rowReorder = ['selector' => 'tr']; public function query(Tag $model) { $model = $model::with('tag_group')->withCount(['articles', 'shelves', 'species', 'varieties']); + return $this->buildQuery($model); } @@ -24,6 +26,7 @@ class TagsDataTable extends DataTable return $tag->name; }) ->rawColumns(['active', 'action']); + return parent::modifier($datatables); } diff --git a/app/Datatables/Shop/TariffUnitiesDataTable.php b/app/Datatables/Shop/TariffUnitiesDataTable.php index a759a00d6439de8515738b725c9d356fc6586cb7..dd2963f777fd6cd8f02755443d146962ab6fd7bc 100644 GIT binary patch literal 520 PcmZQz7zLvtz`y_i0tf&B literal 520 zcmZ{gT~EUx6o&8l73X3}*TnsSRcHLT@Ww>rG%?mJv^}*br3eROWA@+WW3JOgxB}ki zd4c0o-D$=Y@6l>rBb;enUUKrYl4#4jZqNl|<YWSHt7kI-OlnFUyNTx?UAA@rS+P z1{DQa1b|!EFDBr6Xi%o2a?Oos+j}Kw^rf}r*21(W(C&G_PeRok7}*yCKeVf)sA1Lz z?IyenP9UQw-Z*demdwi!vaM4!i9x};Lo?2&!f~g`V>D%o5AN5l-gsw1Bc)9HP8_u&2E*)n1Vnu?aUq5h(&Sd$~ XFJ^bSfF%6f5e>>WPPylwi*DIBtkk9q diff --git a/app/Datatables/Shop/TariffsDataTable.php b/app/Datatables/Shop/TariffsDataTable.php index 624158f7..a080f5f1 100644 --- a/app/Datatables/Shop/TariffsDataTable.php +++ b/app/Datatables/Shop/TariffsDataTable.php @@ -2,10 +2,10 @@ namespace App\Datatables\Shop; -use Yajra\DataTables\Html\Column; use App\Datatables\ParentDataTable as DataTable; use App\Models\Shop\Tariff; use App\Repositories\Shop\Tariffs; +use Yajra\DataTables\Html\Column; class TariffsDataTable extends DataTable { @@ -14,6 +14,7 @@ class TariffsDataTable extends DataTable public function query(Tariff $model) { $model = $model->with(['sale_channels'])->withCount(['price_lists', 'offers']); + return $this->buildQuery($model); } @@ -26,11 +27,13 @@ class TariffsDataTable extends DataTable ->editColumn('sale_channels2', function (Tariff $tariff) { $html = ''; foreach ($tariff->sale_channels as $sale_channel) { - $html .= $sale_channel->code . ', '; + $html .= $sale_channel->code.', '; } + return $html; }) ->rawColumns(['sale_channels2', 'action']); + return parent::modifier($datatables); } diff --git a/app/Datatables/Shop/UnitiesDataTable.php b/app/Datatables/Shop/UnitiesDataTable.php index 2295d2b3..ddb734cb 100644 --- a/app/Datatables/Shop/UnitiesDataTable.php +++ b/app/Datatables/Shop/UnitiesDataTable.php @@ -2,9 +2,9 @@ namespace App\Datatables\Shop; -use Yajra\DataTables\Html\Column; use App\Datatables\ParentDataTable as DataTable; use App\Models\Shop\Unity; +use Yajra\DataTables\Html\Column; class UnitiesDataTable extends DataTable { diff --git a/app/Datatables/Shop/VariationsDataTable.php b/app/Datatables/Shop/VariationsDataTable.php index fe179df7..b712f32a 100644 --- a/app/Datatables/Shop/VariationsDataTable.php +++ b/app/Datatables/Shop/VariationsDataTable.php @@ -2,9 +2,9 @@ namespace App\Datatables\Shop; -use Yajra\DataTables\Html\Column; use App\Datatables\ParentDataTable as DataTable; use App\Models\Shop\Variation; +use Yajra\DataTables\Html\Column; class VariationsDataTable extends DataTable { @@ -13,6 +13,7 @@ class VariationsDataTable extends DataTable public function query(Variation $model) { $model = $model->with(['package', 'unity'])->withCount('offers'); + return $this->buildQuery($model); } @@ -23,6 +24,7 @@ class VariationsDataTable extends DataTable return $variation->unity ? $variation->unity->value : ''; }) ->rawColumns(['description', 'action']); + return parent::modifier($datatables); } diff --git a/app/Exceptions/Handler.php b/app/Exceptions/Handler.php index f95b3b3f..d140581e 100644 --- a/app/Exceptions/Handler.php +++ b/app/Exceptions/Handler.php @@ -2,8 +2,8 @@ namespace App\Exceptions; -use Throwable; use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler; +use Throwable; class Handler extends ExceptionHandler { @@ -29,7 +29,7 @@ class Handler extends ExceptionHandler /** * Report or log an exception. * - * @param \Exception $exception + * @param \Exception $exception * @return void * * @throws \Exception @@ -42,8 +42,8 @@ class Handler extends ExceptionHandler /** * Render an exception into an HTTP response. * - * @param \Illuminate\Http\Request $request - * @param \Exception $exception + * @param \Illuminate\Http\Request $request + * @param \Exception $exception * @return \Symfony\Component\HttpFoundation\Response * * @throws \Exception diff --git a/app/Exports/Botanic/FamiliesExport.php b/app/Exports/Botanic/FamiliesExport.php index 2a5e0e2045fb09bd46896204890d98299df4ec11..999ae13fd69e900ec38a7f66b60f3fe7cc7734a9 100644 GIT binary patch literal 295 NcmZQz7zIRx0003e00961 literal 332 zcmaivy>3Gx3`Tc91!MCHxs|FUN~8`Mx^!akC9Z187|M^5sLHz+xJji>Wk3SX=kxLW z5z_$#xqGD!U1wW-_lL)w5zDy9-(px`wL_WphZOuNuz^`HC^^vhUhVP`(7y23%tSMT|>8i6I&sYInFU0m1o`VLKly1@;80J}bOY5)KL diff --git a/app/Exports/Botanic/GenresExport.php b/app/Exports/Botanic/GenresExport.php index a0c0cd99a2d55765109c4a6eff1b889ebd8e1a6a..34473601ad41c9cc6ceda8860af9f0ca7b00642b 100644 GIT binary patch literal 291 NcmZQz7zG4E0003a00961 literal 328 zcmaivu?_+u42E}}f>B@L&cvuu<8XtE6H502dvM0YNronEzrX*_Vi~SM z2m*&3K%-oRptg_TV`8=T3CQSHh|DMt)@El25~_`-6hV*3$>6<~wlW<+x?|5~gtiZj zwxAj#vD!uNjv3?gFFDymZ}H{i6>9+GlV_mK*)$Ih6lWWPeF(K8fspNUHb9FVi8`&hb>IRKP9_38&` z_dp5_MaryhpHnmiddleware('auth'); - } -} diff --git a/app/Http/Controllers/Admin/Auth/ForgotPasswordController.php b/app/Http/Controllers/Admin/Auth/ForgotPasswordController.php deleted file mode 100644 index f5fc50a3..00000000 --- a/app/Http/Controllers/Admin/Auth/ForgotPasswordController.php +++ /dev/null @@ -1,38 +0,0 @@ -middleware('guest'); - } - - public function showLinkRequestForm() - { - $data = \App\Repositories\Config::init(); - return view('auth.passwords.email', $data); - } -} diff --git a/app/Http/Controllers/Admin/Auth/LoginController.php b/app/Http/Controllers/Admin/Auth/LoginController.php deleted file mode 100644 index 60019db4..00000000 --- a/app/Http/Controllers/Admin/Auth/LoginController.php +++ /dev/null @@ -1,35 +0,0 @@ -middleware('guest')->except('logout'); - $this->middleware('guest:web')->except('logout'); - } - - public function showLoginForm() - { - return view('auth.login'); - } - - public function authenticated(Request $request, $user) - { - return redirect()->intended($this->redirectPath()); - } - - public function username() - { - return 'username'; - } -} diff --git a/app/Http/Controllers/Admin/Auth/PasswordSecurityController.php b/app/Http/Controllers/Admin/Auth/PasswordSecurityController.php deleted file mode 100644 index 08203fa1..00000000 --- a/app/Http/Controllers/Admin/Auth/PasswordSecurityController.php +++ /dev/null @@ -1,71 +0,0 @@ -session()->get('password_expired_id'); - if (!isset($password_expired_id)) { - return redirect('/login'); - } - return view('auth.reset_password'); - } - - // reset password - public function resetPassword(Request $request) - { - // check expire id - $password_expired_id = $request->session()->get('password_expired_id'); - if (!isset($password_expired_id)) { - return redirect('/login'); - } - - // validate - $validatedData = $request->validate( - [ - 'current_password' => 'required', - 'new_password' => 'required|string|min:6|confirmed', - ] - ); - - // the requests - $request_current_password = $request->current_password; - $request_new_password = $request->new_password; - $request_new_password_confirm = $request->new_password_confirm; - - // the passwords matches - $user = User::find($password_expired_id); - if (!(Hash::check($request_current_password, $user->password))) { - return redirect()->back()->with("error", "Your current password does not matches with the password you provided. Please try again."); - } - - // current password and new password are same - if (strcmp($request_current_password, $request->new_password) == 0) { - return redirect()->back()->with("error", "New password cannot be same as your current password. Please choose a different password."); - } - - // new password and new password confirm doesn't match - if (strcmp($request_new_password, $request_new_password_confirm) == 1) { - return redirect()->back()->with("error", "New password doesn't match with confirm password."); - } - - // change Password - $user->password = bcrypt($request->new_password); - $user->save(); - - // update password update time - $user->passwordSecurity->password_updated_at = Carbon::now(); - $user->passwordSecurity->save(); - - return redirect('/login')->with("status", "Password changed successfully. Now you can login!"); - } -} diff --git a/app/Http/Controllers/Admin/Auth/RegisterController.php b/app/Http/Controllers/Admin/Auth/RegisterController.php deleted file mode 100644 index e66e2855..00000000 --- a/app/Http/Controllers/Admin/Auth/RegisterController.php +++ /dev/null @@ -1,76 +0,0 @@ -middleware('auth'); - } - - /** - * Get a validator for an incoming registration request. - * - * @param array $data - * @return \Illuminate\Contracts\Validation\Validator - */ - protected function validator(array $data) - { - return Validator::make( - $data, [ - 'name' => 'required|string|max:255', - 'email' => 'required|string|email|max:255|unique:users', - 'password' => 'required|string|min:6|confirmed', - ] - ); - } - - /** - * Create a new user instance after a valid registration. - * - * @param array $data - * @return \App\User - */ - protected function create(array $data) - { - return User::create( - [ - 'name' => $data['name'], - 'email' => $data['email'], - 'password' => Hash::make($data['password']), - ] - ); - } -} diff --git a/app/Http/Controllers/Admin/Auth/ResetPasswordController.php b/app/Http/Controllers/Admin/Auth/ResetPasswordController.php deleted file mode 100644 index a8805215..00000000 --- a/app/Http/Controllers/Admin/Auth/ResetPasswordController.php +++ /dev/null @@ -1,47 +0,0 @@ -middleware('guest'); - } - - public function showResetForm(Request $request, $token = null) - { - $data['token'] = $token; - $data['email'] = $request->email; - return view('auth.passwords.reset', $data); - } -} diff --git a/app/Http/Controllers/Admin/Auth/VerificationController.php b/app/Http/Controllers/Admin/Auth/VerificationController.php deleted file mode 100644 index c99e296d..00000000 --- a/app/Http/Controllers/Admin/Auth/VerificationController.php +++ /dev/null @@ -1,41 +0,0 @@ -middleware('auth'); - $this->middleware('signed')->only('verify'); - $this->middleware('throttle:6,1')->only('verify', 'resend'); - } -} diff --git a/app/Http/Controllers/Admin/Botanic/FamilyController.php b/app/Http/Controllers/Admin/Botanic/FamilyController.php index 297b3167..df9978bb 100644 --- a/app/Http/Controllers/Admin/Botanic/FamilyController.php +++ b/app/Http/Controllers/Admin/Botanic/FamilyController.php @@ -2,10 +2,9 @@ namespace App\Http\Controllers\Admin\Botanic; -use Illuminate\Http\Request; - -use App\Repositories\Botanic\Families; use App\Datatables\Botanic\FamiliesDataTable; +use App\Repositories\Botanic\Families; +use Illuminate\Http\Request; class FamilyController extends Controller { @@ -23,18 +22,21 @@ class FamilyController extends Controller { $data = $request->all(); $ret = Families::store($data); + return redirect()->route('Admin.Botanic.Families.index'); } public function show($id) { $data = Families::get($id); + return view('Admin.Botanic.Families.view', $data); } public function edit($id) { $data['family'] = Families::get($id)->toArray(); + return view('Admin.Botanic.Families.edit', $data); } diff --git a/app/Http/Controllers/Admin/Botanic/GenreController.php b/app/Http/Controllers/Admin/Botanic/GenreController.php index 0f94136d..fa729a6a 100644 --- a/app/Http/Controllers/Admin/Botanic/GenreController.php +++ b/app/Http/Controllers/Admin/Botanic/GenreController.php @@ -2,11 +2,10 @@ namespace App\Http\Controllers\Admin\Botanic; -use Illuminate\Http\Request; - -use App\Repositories\Botanic\Genres; -use App\Repositories\Botanic\Families; use App\Datatables\Botanic\GenresDataTable; +use App\Repositories\Botanic\Families; +use App\Repositories\Botanic\Genres; +use Illuminate\Http\Request; class GenreController extends Controller { @@ -23,6 +22,7 @@ class GenreController extends Controller public function create() { $data['families'] = Families::getOptions(); + return view('Admin.Botanic.Genres.create', $data); } @@ -30,12 +30,14 @@ class GenreController extends Controller { $data = $request->all(); $ret = Genres::store($data); + return redirect()->route('Admin.Botanic.Genres.index'); } public function show($id) { $data['genre'] = Genres::get($id); + return view('Admin.Botanic.Genres.view', $data); } @@ -43,6 +45,7 @@ class GenreController extends Controller { $data['genre'] = Genres::get($id); $data['families'] = Families::getOptions(); + return view('Admin.Botanic.Genres.edit', $data); } diff --git a/app/Http/Controllers/Admin/Botanic/SpecieController.php b/app/Http/Controllers/Admin/Botanic/SpecieController.php index 0fbb93ce..bdb1ba89 100644 --- a/app/Http/Controllers/Admin/Botanic/SpecieController.php +++ b/app/Http/Controllers/Admin/Botanic/SpecieController.php @@ -2,12 +2,11 @@ namespace App\Http\Controllers\Admin\Botanic; -use Illuminate\Http\Request; - -use App\Repositories\Botanic\Species; -use App\Repositories\Botanic\Genres; -use App\Repositories\Shop\TagGroups; use App\Datatables\Botanic\SpeciesDataTable; +use App\Repositories\Botanic\Genres; +use App\Repositories\Botanic\Species; +use App\Repositories\Shop\TagGroups; +use Illuminate\Http\Request; class SpecieController extends Controller { @@ -25,6 +24,7 @@ class SpecieController extends Controller { $data['genres'] = Genres::getOptions(); $data['tags_list'] = TagGroups::getTreeTags(); + return view('Admin.Botanic.Species.create', $data); } @@ -32,12 +32,14 @@ class SpecieController extends Controller { $data = $request->all(); $ret = Species::storeFull($data); + return redirect()->route('Admin.Botanic.Species.index'); } public function show($id) { $data = Species::get($id); + return view('Admin.Botanic.Species.view', $data); } @@ -46,6 +48,7 @@ class SpecieController extends Controller $data['specie'] = Species::getFull($id); $data['genres'] = Genres::getOptions(); $data['tags_list'] = TagGroups::getTreeTags(); + return view('Admin.Botanic.Species.edit', $data); } @@ -59,6 +62,7 @@ class SpecieController extends Controller $id = $id ? $id : $request->input('id'); $data['images'] = Species::getImages($id); $data['can_edit'] = $can_edit; + return view('components.uploader.mini-gallery-items', $data); } @@ -66,6 +70,7 @@ class SpecieController extends Controller { $id = $request->input('id'); $index = $request->input('index'); + return Species::deleteImage($id, $index); } diff --git a/app/Http/Controllers/Admin/Botanic/VarietyController.php b/app/Http/Controllers/Admin/Botanic/VarietyController.php index 82880f34..36bfeac5 100644 --- a/app/Http/Controllers/Admin/Botanic/VarietyController.php +++ b/app/Http/Controllers/Admin/Botanic/VarietyController.php @@ -2,14 +2,11 @@ namespace App\Http\Controllers\Admin\Botanic; -use Illuminate\Http\Request; - -use App\Repositories\Botanic\Varieties; -use App\Repositories\Botanic\Species; -use App\Repositories\Shop\TagGroups; use App\Datatables\Botanic\VarietiesDataTable; - -use App\Models\Shop\Variety; +use App\Repositories\Botanic\Species; +use App\Repositories\Botanic\Varieties; +use App\Repositories\Shop\TagGroups; +use Illuminate\Http\Request; class VarietyController extends Controller { @@ -27,6 +24,7 @@ class VarietyController extends Controller { $data['species'] = Species::getOptions(); $data['tags_list'] = TagGroups::getTreeTags(); + return view('Admin.Botanic.Varieties.create', $data); } @@ -34,6 +32,7 @@ class VarietyController extends Controller { $data = $request->all(); Varieties::storeFull($data); + return redirect()->route('Admin.Botanic.Varieties.index'); } @@ -47,6 +46,7 @@ class VarietyController extends Controller $data['variety'] = Varieties::getFull($id); $data['species'] = Species::getOptions(); $data['tags_list'] = TagGroups::getTreeTags(); + return view('Admin.Botanic.Varieties.edit', $data); } @@ -60,6 +60,7 @@ class VarietyController extends Controller $id = $id ? $id : $request->input('id'); $data['images'] = Varieties::getImages($id); $data['can_edit'] = $can_edit; + return view('components.uploader.mini-gallery-items', $data); } @@ -67,6 +68,7 @@ class VarietyController extends Controller { $id = $request->input('id'); $index = $request->input('index'); + return Varieties::deleteImage($id, $index); } diff --git a/app/Http/Controllers/Admin/Core/App/ApplicationController.php b/app/Http/Controllers/Admin/Core/App/ApplicationController.php index 912a6f29..2a23b66a 100644 --- a/app/Http/Controllers/Admin/Core/App/ApplicationController.php +++ b/app/Http/Controllers/Admin/Core/App/ApplicationController.php @@ -2,20 +2,16 @@ namespace App\Http\Controllers\Admin\Core\App; -use Illuminate\Http\Request; -use Illuminate\Support\Facades\Auth; -use Illuminate\Support\Facades\Storage; - -use Yajra\DataTables\DataTables; - -use App\Repositories\Core\App\Applications; use App\Datatables\Admin\Core\App\ApplicationsDataTable; +use App\Repositories\Core\App\Applications; +use Illuminate\Http\Request; class ApplicationController extends Controller { public function index(ApplicationsDataTable $dataTable) { $data = \App\Repositories\Config::init(); + return $dataTable->render('admin.Core.App.Application.index', $data); } @@ -24,12 +20,14 @@ class ApplicationController extends Controller $id = $id ? $id : $request->input('id'); $data = \App\Repositories\Config::init(); $data = Applications::get($id); + return view('Admin.Core.App.Application.edit', $data); } public function store(Request $request) { Applications::store($request->all()); + return response()->json(['error' => 0]); } @@ -37,12 +35,14 @@ class ApplicationController extends Controller { $id = $id ? $id : $request->input('id'); Applications::destroy($id); + return response()->json(['error' => 0]); } public function toggleActive(Request $request) { $data = Applications::toggle_active($request->input('id'), ($request->input('active') == 'true') ? 1 : 0); + return response()->json(['error' => 0]); } } diff --git a/app/Http/Controllers/Admin/Core/App/ApplicationModuleController.php b/app/Http/Controllers/Admin/Core/App/ApplicationModuleController.php index 62d9df1e..ddfa68ba 100644 --- a/app/Http/Controllers/Admin/Core/App/ApplicationModuleController.php +++ b/app/Http/Controllers/Admin/Core/App/ApplicationModuleController.php @@ -2,19 +2,17 @@ namespace App\Http\Controllers\Admin\Core\App; -use Illuminate\Http\Request; -use Illuminate\Support\Facades\Auth; -use Illuminate\Support\Facades\Storage; - -use App\Repositories\Core\App\Applications; -use App\Repositories\Core\App\ApplicationModules; use App\Datatables\Admin\Core\App\ApplicationModulesDataTable; +use App\Repositories\Core\App\ApplicationModules; +use App\Repositories\Core\App\Applications; +use Illuminate\Http\Request; class ApplicationModuleController extends Controller { public function index(ApplicationModulesDataTable $dataTable) { $data = \App\Repositories\Config::init(); + return $dataTable->render('admin.Core.App.ApplicationModule.index', $data); } @@ -22,6 +20,7 @@ class ApplicationModuleController extends Controller { $data = \App\Repositories\Config::init(); $data['applications'] = Applications::getOptions(); + return view('Admin.Core.App.ApplicationModule.create', $data); } @@ -31,12 +30,14 @@ class ApplicationModuleController extends Controller $data = \App\Repositories\Config::init(); $data = ApplicationModules::get($id)->toArray(); $data['applications'] = Applications::getOptions(); + return view('Admin.Core.App.ApplicationModule.edit', $data); } public function store(Request $request) { ApplicationModules::store($request->all()); + return redirect()->route('admin.Core.App.ApplicationModule.index') ->with('growl', [__('admin.successadd'), 'success']); } @@ -45,12 +46,14 @@ class ApplicationModuleController extends Controller { $id = $id ? $id : $request->input('id'); ApplicationModules::destroy($id); + return response()->json(['error' => 0]); } public function toggleActive(Request $request) { $data = ApplicationModules::toggle_active($request->input('id'), ($request->input('active') == 'true') ? 1 : 0); + return response()->json(['error' => 0]); } } diff --git a/app/Http/Controllers/Admin/Core/Auth/PermissionController.php b/app/Http/Controllers/Admin/Core/Auth/PermissionController.php index 7d1e1c65..acc0767f 100644 --- a/app/Http/Controllers/Admin/Core/Auth/PermissionController.php +++ b/app/Http/Controllers/Admin/Core/Auth/PermissionController.php @@ -2,14 +2,12 @@ namespace App\Http\Controllers\Admin\Core\Auth; -use Illuminate\Http\Request; - -use App\Repositories\Core\App\Applications; +use App\Datatables\Admin\Core\Auth\PermissionsDataTable; use App\Repositories\Core\App\ApplicationModules; +use App\Repositories\Core\App\Applications; use App\Repositories\Core\Auth\Permissions; use App\Repositories\Core\Auth\Users; - -use App\Datatables\Admin\Core\Auth\PermissionsDataTable; +use Illuminate\Http\Request; class PermissionController extends Controller { @@ -21,6 +19,7 @@ class PermissionController extends Controller public function index(PermissionsDataTable $dataTable) { $data = \App\Repositories\Config::init(); + return $dataTable->render('admin.Core.Auth.Permission.index', $data); } @@ -30,6 +29,7 @@ class PermissionController extends Controller $data['roles'] = Users::getRolesToEdit(); $data['applications'] = Applications::getOptions(); $data['application_modules'] = ApplicationModules::getOptions(); + return view('Admin.Core.Auth.Permission.create', $data); } @@ -41,6 +41,7 @@ class PermissionController extends Controller $data['roles'] = Users::getRolesToEdit(); $data['applications'] = Applications::getOptions(); $data['application_modules'] = ApplicationModules::getOptions(); + return view('Admin.Core.Auth.Permission.edit', $data); } @@ -49,7 +50,7 @@ class PermissionController extends Controller $data = $request->all(); unset($data['roles']); unset($data['_token']); - + /* $this->validate($request, [ 'name' => 'required|unique:permissions,name', @@ -60,12 +61,14 @@ class PermissionController extends Controller */ Permissions::store($data); + return redirect()->route('Admin.Core.Auth.Permission.index')->with('growl', [__('permissions.successadd'), 'success']); } public function destroy($id) { Permissions::delete($id); + return response()->json(['error' => 0]); } } diff --git a/app/Http/Controllers/Admin/Core/Auth/RoleController.php b/app/Http/Controllers/Admin/Core/Auth/RoleController.php index 1aa1b383..f6b8e8fe 100644 --- a/app/Http/Controllers/Admin/Core/Auth/RoleController.php +++ b/app/Http/Controllers/Admin/Core/Auth/RoleController.php @@ -2,35 +2,35 @@ namespace App\Http\Controllers\Admin\Core\Auth; +use App\Datatables\Admin\Core\Auth\RolesDataTable; +use App\Models\Core\App\ApplicationModule; +use App\Models\Core\Auth\Permission; +use App\Models\Core\Auth\Role; +use App\Repositories\Core\Auth\Roles; use Illuminate\Http\Request; use Yajra\DataTables\DataTables; -use App\Models\Core\Auth\Role; -use App\Models\Core\Auth\Permission; -use App\Models\Core\App\ApplicationModule; - -use App\Repositories\Core\Auth\Permissions; -use App\Repositories\Core\Auth\Roles; -use App\Datatables\Admin\Core\Auth\RolesDataTable; - class RoleController extends Controller { public function index(RolesDataTable $dataTable) { $data = \App\Repositories\Config::init(); $data['modules'] = ApplicationModule::with('permissions')->get()->toArray(); + return $dataTable->render('admin.Core.Auth.Role.index', $data); } public function getTable(Request $request) { $model = Role::orderBy('name')->get(); + return Datatables::of($model)->make(true); } public function create() { $data = \App\Repositories\Config::init(); + return view('Admin.Core.Auth.Role.create', $data); } @@ -47,6 +47,7 @@ class RoleController extends Controller public function store(Request $request) { Roles::store($request->all()); + return response()->json(['error' => 0]); } @@ -54,6 +55,7 @@ class RoleController extends Controller { $id = $id ? $id : $request->input('id'); Roles::delete($id); + return response()->json(['error' => 0]); } @@ -74,6 +76,7 @@ class RoleController extends Controller // Debug::fdump($permissions); // exit; $data['permissions'] = $data; + return view('Admin.Core.Auth.Role.manage', $data); } @@ -85,12 +88,14 @@ class RoleController extends Controller $permission = Permission::find($key); $role->attachPermission($permission); } + return response()->json(['error' => 0]); } public function toggleActive(Request $request) { $data = Roles::toggle_active($request->input('id'), ($request->input('active') == 'true') ? 1 : 0); + return response()->json(['error' => 0]); } } diff --git a/app/Http/Controllers/Admin/Core/Auth/TeamController.php b/app/Http/Controllers/Admin/Core/Auth/TeamController.php index 2ddec4e8..0fed7793 100644 --- a/app/Http/Controllers/Admin/Core/Auth/TeamController.php +++ b/app/Http/Controllers/Admin/Core/Auth/TeamController.php @@ -3,10 +3,9 @@ namespace App\Http\Controllers\Admin\Core\Auth; use App\Http\Controllers\Controller; +use App\Models\Core\Auth\Team; use Illuminate\Http\Request; use Illuminate\Support\Str; -use App\Models\Core\Auth\Team; -use App\Models\Core\Auth\Role; class TeamController extends Controller { @@ -33,9 +32,9 @@ class TeamController extends Controller $this->validate( $request, [ - 'name' => 'required|unique:teams,name', - 'display_name' => 'required', - 'description' => 'required', + 'name' => 'required|unique:teams,name', + 'display_name' => 'required', + 'description' => 'required', ] ); @@ -49,6 +48,7 @@ class TeamController extends Controller public function edit($id) { $team = Team::find($id); + return view('Admin.Core.Auth.Team.edit', compact('team')); } @@ -56,8 +56,8 @@ class TeamController extends Controller { $this->validate( $request, [ - 'display_name' => 'required', - 'description' => 'required', + 'display_name' => 'required', + 'description' => 'required', ] ); diff --git a/app/Http/Controllers/Admin/Core/Auth/UserController.php b/app/Http/Controllers/Admin/Core/Auth/UserController.php index 392f431e..b82eb6ed 100644 --- a/app/Http/Controllers/Admin/Core/Auth/UserController.php +++ b/app/Http/Controllers/Admin/Core/Auth/UserController.php @@ -2,29 +2,28 @@ namespace App\Http\Controllers\Admin\Core\Auth; -use Illuminate\Support\Facades\Auth; -use Intervention\Image\Facades\Image; +use App\Datatables\Admin\Core\Auth\UsersDataTable; +use App\Models\Core\Auth\User; +use App\Repositories\Core\Auth\Users; use Carbon\Carbon; use Illuminate\Http\Request; +use Illuminate\Support\Facades\Auth; use Illuminate\Support\Str; - -use App\Models\Core\Auth\Role; -use App\Models\Core\Auth\User; - -use App\Repositories\Core\Auth\Users; -use App\Datatables\Admin\Core\Auth\UsersDataTable; +use Intervention\Image\Facades\Image; class UserController extends Controller { public function index(UsersDataTable $dataTable) { $data = \App\Repositories\Config::init(); + return $dataTable->render('admin.Core.Auth.User.index', $data); } public function modalCreate() { $data['roles'] = Users::getRolesToEdit(); + return view('Admin.Core.Auth.User.modal', $data); } @@ -34,6 +33,7 @@ class UserController extends Controller $data['roles'] = Users::getRolesToEdit(); $data['user'] = $user ? $user->toArray() : []; $data['user']['roles'] = $user->roles->pluck('id')->toArray(); + return view('Admin.Core.Auth.User.modal', $data); } @@ -41,6 +41,7 @@ class UserController extends Controller { $data = $request->all(); $ret = Users::store($data); + return response()->json(['code' => '200']); } @@ -48,6 +49,7 @@ class UserController extends Controller { $data = \App\Repositories\Config::init(); $data['roles'] = Users::getRolesToEdit(); + return view('Admin.Core.Auth.User.create', $data); } @@ -75,6 +77,7 @@ class UserController extends Controller $data = \App\Repositories\Config::init(); $data['roles'] = Users::getRolesToEdit(); $data['user'] = Users::get($id); + return view('Admin.Core.Auth.User.edit', $data); } @@ -94,9 +97,9 @@ class UserController extends Controller { $this->validate( $request, [ - 'token' => 'required', - 'password' => 'required|min:8', - 'password_confirmation' => 'required|same:password', + 'token' => 'required', + 'password' => 'required|min:8', + 'password_confirmation' => 'required|same:password', ] ); @@ -119,6 +122,7 @@ class UserController extends Controller $data['user'] = $user ? $user->toArray() : []; $data['user']['name'] = $user->name; $data['user']['avatar'] = Users::getAvatar($user->id); + return view('Admin.Core.Auth.User.modalProfile', $data); } @@ -126,10 +130,10 @@ class UserController extends Controller { $this->validate( $request, [ - 'avatar' => 'mimes:jpeg,png|max:10000', - 'last_name' => 'required', - 'first_name' => 'required', - 'password_confirmation' => 'same:password', + 'avatar' => 'mimes:jpeg,png|max:10000', + 'last_name' => 'required', + 'first_name' => 'required', + 'password_confirmation' => 'same:password', ] ); @@ -138,7 +142,7 @@ class UserController extends Controller if ($avatar && $file = $avatar->isValid()) { $destinationPath = dirname($user->avatar_path); - if (!is_dir($destinationPath)) { + if (! is_dir($destinationPath)) { mkdir($destinationPath, 0766, true); } $extension = $avatar->getClientOriginalExtension(); @@ -178,6 +182,7 @@ class UserController extends Controller public function toggleActive(Request $request) { $data = Users::toggle_active($request->input('id'), ($request->input('active') == 'true') ? 1 : 0); + return response()->json(['error' => 0]); } } diff --git a/app/Http/Controllers/Admin/Core/CommentController.php b/app/Http/Controllers/Admin/Core/CommentController.php index 605ef791..af392b4f 100644 --- a/app/Http/Controllers/Admin/Core/CommentController.php +++ b/app/Http/Controllers/Admin/Core/CommentController.php @@ -2,23 +2,24 @@ namespace App\Http\Controllers\Admin\Core; -use Illuminate\Http\Request; - -use App\Repositories\Core\Comments; use App\Datatables\Admin\Core\CommentsDataTable; +use App\Repositories\Core\Comments; +use Illuminate\Http\Request; class CommentController extends Controller { public function index($model, $model_id) { $data['comments'] = Comments::getCommentsByModel($model, $model_id); + return view('Admin.Core.Comments.partials.list-comments', $data); } - + public function list(CommentsDataTable $dataTable, $model, $model_id) { $data['model'] = $model; $data['model_id'] = $model_id; + return $dataTable->render('Admin.Core.Comment.index', $data); } @@ -26,6 +27,7 @@ class CommentController extends Controller { $data['comment']['commentable_type'] = $model; $data['comment']['commentable_id'] = $model_id; + return view('Admin.Core.Comments.partials.modal', $data); } @@ -33,6 +35,7 @@ class CommentController extends Controller { $id = $id ? $id : $request->input('id'); $data = Comments::get($id); + return view('Admin.Core.Comments.partials.modal', $data); } @@ -40,6 +43,7 @@ class CommentController extends Controller { $data = $request->all(); Comments::store($data); + return response()->json(['error' => 0]); } @@ -47,6 +51,7 @@ class CommentController extends Controller { $id = $id ? $id : $request->input('id'); Comments::destroy($id); + return response()->json(['error' => 0]); } } diff --git a/app/Http/Controllers/Admin/Core/Controller.php b/app/Http/Controllers/Admin/Core/Controller.php index 42ff91c32c4480c11cf6825007167fed6aed78bf..e48ad0328dc071e332343eee067efdca5239ec8d 100644 GIT binary patch literal 155 LcmZQz7_T^_-t0YNA~S4+d^*eeZQ+6&9$+syO8@`> diff --git a/app/Http/Controllers/Admin/Core/Mail/MailTemplateController.php b/app/Http/Controllers/Admin/Core/Mail/MailTemplateController.php index 537f802b..6fcbd0f0 100644 --- a/app/Http/Controllers/Admin/Core/Mail/MailTemplateController.php +++ b/app/Http/Controllers/Admin/Core/Mail/MailTemplateController.php @@ -21,6 +21,7 @@ class MailTemplateController extends Controller public function modalCreate() { $data = MailTemplates::init(); + return view('Admin.Core.Mail.MailTemplate.modal', $data ?? []); } diff --git a/app/Http/Controllers/Admin/HomeController.php b/app/Http/Controllers/Admin/HomeController.php index e3cf9cc0..638d6744 100644 --- a/app/Http/Controllers/Admin/HomeController.php +++ b/app/Http/Controllers/Admin/HomeController.php @@ -2,9 +2,9 @@ namespace App\Http\Controllers\Admin; -use Illuminate\Http\Request; use App\Http\Controllers\Controller; use App\Repositories\Shop\Dashboards; +use Illuminate\Http\Request; class HomeController extends Controller { diff --git a/app/Http/Controllers/Admin/Shop/ArticleController.php b/app/Http/Controllers/Admin/Shop/ArticleController.php index c228eaa7..cace40e8 100644 --- a/app/Http/Controllers/Admin/Shop/ArticleController.php +++ b/app/Http/Controllers/Admin/Shop/ArticleController.php @@ -2,20 +2,19 @@ namespace App\Http\Controllers\Admin\Shop; -use Illuminate\Http\Request; - -use App\Repositories\Shop\Articles; +use App\Datatables\Shop\ArticlesDataTable; use App\Repositories\Shop\ArticleNatures; +use App\Repositories\Shop\Articles; use App\Repositories\Shop\Categories; use App\Repositories\Shop\Tags; - -use App\Datatables\Shop\ArticlesDataTable; +use Illuminate\Http\Request; class ArticleController extends Controller { public function autocomplete(Request $request, $str = false) { $str = $str ? $str : $request->input('q'); + return response()->json(Articles::autocomplete($str)); } @@ -24,12 +23,14 @@ class ArticleController extends Controller $data['article_natures'] = ArticleNatures::getOptions(); $data['categories'] = Categories::getOptions(); $data['tags'] = Tags::getOptionsFullName(); + return $dataTable->render('Admin.Shop.Articles.list', $data); } public function create() { $data = Articles::getMeta(); + return view('Admin.Shop.Articles.create', $data); } @@ -37,18 +38,21 @@ class ArticleController extends Controller { $data = $request->all(); Articles::storeFull($data); + return redirect()->route('Admin.Shop.Articles.index'); } public function show($id) { $data['article'] = Articles::get($id); + return view('Admin.Shop.Articles.view', $data); } public function edit($id) { $data = Articles::getFull($id); + return view('Admin.Shop.Articles.edit', $data); } @@ -60,12 +64,14 @@ class ArticleController extends Controller public function getProductDescription($product_id, $model) { $data['article']['inherited'] = Articles::getInheritedByProduct($product_id, base64_decode($model)); + return view('Admin.Shop.Articles.partials.product.description', $data); } public function getProductTags($product_id, $model) { $data = Articles::getInheritedByProduct($product_id, base64_decode($model)); + return view('Admin.Shop.Articles.partials.product.tags', $data); } @@ -73,6 +79,7 @@ class ArticleController extends Controller { $data['article']['product_id'] = $product_id; $data['no_popup'] = false; + return view('Admin.Shop.Articles.partials.product.images', $data); } @@ -80,6 +87,7 @@ class ArticleController extends Controller { $id = $id ? $id : $request->input('id'); $data['images'] = Articles::getImages($id); + return view('components.uploader.mini-gallery-items', $data); } @@ -87,18 +95,21 @@ class ArticleController extends Controller { $id = $request->input('id'); $index = $request->input('index'); + return Articles::deleteImage($id, $index); } public function toggleVisible(Request $request) { $data = Articles::toggleVisible($request->input('id'), ($request->input('visible') == 'true') ? 1 : 0); + return response()->json(['error' => 0]); } public function toggleHomepage(Request $request) { $data = Articles::toggleHomepage($request->input('id'), ($request->input('homepage') == 'true') ? 1 : 0); + return response()->json(['error' => 0]); } } diff --git a/app/Http/Controllers/Admin/Shop/ArticleNatureController.php b/app/Http/Controllers/Admin/Shop/ArticleNatureController.php index 770fb728..2547a61b 100644 --- a/app/Http/Controllers/Admin/Shop/ArticleNatureController.php +++ b/app/Http/Controllers/Admin/Shop/ArticleNatureController.php @@ -2,10 +2,9 @@ namespace App\Http\Controllers\Admin\Shop; -use Illuminate\Http\Request; - -use App\Repositories\Shop\ArticleNatures; use App\Datatables\Shop\ArticleNaturesDataTable; +use App\Repositories\Shop\ArticleNatures; +use Illuminate\Http\Request; class ArticleNatureController extends Controller { @@ -22,12 +21,14 @@ class ArticleNatureController extends Controller public function store(Request $request) { $ret = ArticleNatures::store($request->all()); + return redirect()->route('Admin.Shop.ArticleNatures.index'); } public function show($id) { $data['article_nature'] = ArticleNatures::get($id); + return view('Admin.Shop.ArticleNatures.view', $data); } @@ -48,6 +49,7 @@ class ArticleNatureController extends Controller public static function getOptions(Request $request) { $data = ArticleNatures::getOptionsByProductTypeModel($request->input('product_type')); + return response()->json(['0' => ''] + $data); } } diff --git a/app/Http/Controllers/Admin/Shop/CategoryController.php b/app/Http/Controllers/Admin/Shop/CategoryController.php index 8c9c4ea1..7449a044 100644 --- a/app/Http/Controllers/Admin/Shop/CategoryController.php +++ b/app/Http/Controllers/Admin/Shop/CategoryController.php @@ -2,11 +2,10 @@ namespace App\Http\Controllers\Admin\Shop; -use Illuminate\Http\Request; - +use App\Datatables\Shop\CategoriesDataTable; use App\Repositories\Shop\Categories; use App\Repositories\Shop\TagGroups; -use App\Datatables\Shop\CategoriesDataTable; +use Illuminate\Http\Request; class CategoryController extends Controller { @@ -22,18 +21,21 @@ class CategoryController extends Controller 'categories' => Categories::getOptions(), 'tags_list' => TagGroups::getTreeTags(), ]; + return view('Admin.Shop.Categories.create', $data); } public function store(Request $request) { $ret = Categories::storeFull($request->all()); + return redirect()->route('Admin.Shop.Categories.index'); } public function show($id) { $data = Categories::get($id); + return view('Admin.Shop.Categories.view', $data); } @@ -42,6 +44,7 @@ class CategoryController extends Controller $data['category'] = Categories::getFull($id); $data['categories'] = Categories::getOptions(); $data['tags_list'] = TagGroups::getTreeTags(); + return view('Admin.Shop.Categories.edit', $data); } @@ -54,6 +57,7 @@ class CategoryController extends Controller { $id = $id ? $id : $request->input('id'); $data['images'] = Categories::getImages($id); + return view('components.uploader.mini-gallery-items', $data); } @@ -61,6 +65,7 @@ class CategoryController extends Controller { $id = $request->input('id'); $index = $request->input('index'); + return Categories::deleteImage($id, $index); } @@ -69,18 +74,21 @@ class CategoryController extends Controller $node_id = $request->input('node_id'); $target_id = $request->input('target_id'); $type = $request->input('type'); + return Categories::moveTree($node_id, $target_id, $type); } public function toggleVisible(Request $request) { $data = Categories::toggle_visible($request->input('id'), ($request->input('visible') == 'true') ? 1 : 0); + return response()->json(['error' => 0]); } public function toggleHomepage(Request $request) { $data = Categories::toggleHomepage($request->input('id'), ($request->input('homepage') == 'true') ? 1 : 0); + return response()->json(['error' => 0]); } } diff --git a/app/Http/Controllers/Admin/Shop/CustomerAddressController.php b/app/Http/Controllers/Admin/Shop/CustomerAddressController.php index 909628d4..11ea7a62 100644 --- a/app/Http/Controllers/Admin/Shop/CustomerAddressController.php +++ b/app/Http/Controllers/Admin/Shop/CustomerAddressController.php @@ -2,16 +2,16 @@ namespace App\Http\Controllers\Admin\Shop; -use Illuminate\Http\Request; - -use App\Repositories\Shop\CustomerAddresses; use App\Datatables\Shop\CustomerAddressesDataTable; +use App\Repositories\Shop\CustomerAddresses; +use Illuminate\Http\Request; class CustomerAddressController extends Controller { public function index(CustomerAddressesDataTable $dataTable) { $data = []; + return $dataTable->render('Admin.Shop.Customers.list', $data); } @@ -23,18 +23,21 @@ class CustomerAddressController extends Controller public function store(Request $request) { $ret = CustomerAddresses::storeFull($request->all()); + return redirect()->route('Admin.Shop.CustomerAddresses.index'); } public function show($id) { $data['customer'] = CustomerAddresses::get($id); + return view('Admin.Shop.CustomerAddresses.view', $data); } public function edit($id) { $data['customer'] = CustomerAddresses::edit($id); + return view('Admin.Shop.CustomerAddresses.edit', $data); } diff --git a/app/Http/Controllers/Admin/Shop/CustomerController.php b/app/Http/Controllers/Admin/Shop/CustomerController.php index 37398c42..91bc41c6 100644 --- a/app/Http/Controllers/Admin/Shop/CustomerController.php +++ b/app/Http/Controllers/Admin/Shop/CustomerController.php @@ -2,36 +2,39 @@ namespace App\Http\Controllers\Admin\Shop; -use Illuminate\Http\Request; - +use App\Datatables\Shop\CustomerAddressesDataTable; +use App\Datatables\Shop\CustomersDataTable; use App\Repositories\Shop\Customers; use App\Repositories\Shop\Deliveries; -use App\Datatables\Shop\CustomersDataTable; -use App\Datatables\Shop\CustomerAddressesDataTable; +use Illuminate\Http\Request; class CustomerController extends Controller { public function index(CustomersDataTable $dataTable) { $data = []; + return $dataTable->render('Admin.Shop.Customers.list', $data); } public function create() { $data['deliveries'] = Deliveries::getOptions(); + return view('Admin.Shop.Customers.create', $data); } public function store(Request $request) { $ret = Customers::storeFull($request->all()); + return redirect()->route('Admin.Shop.Customers.index'); } public function show($id) { $data['customer'] = Customers::get($id); + return view('Admin.Shop.Customers.view', $data); } @@ -41,6 +44,7 @@ class CustomerController extends Controller $data['deliveries'] = Deliveries::getOptions(); $model = new CustomerAddressesDataTable(); $data['customer_addresses'] = $model->html(); + return view('Admin.Shop.Customers.edit', $data); } diff --git a/app/Http/Controllers/Admin/Shop/DashboardController.php b/app/Http/Controllers/Admin/Shop/DashboardController.php index d8647c22..a0a2290d 100644 --- a/app/Http/Controllers/Admin/Shop/DashboardController.php +++ b/app/Http/Controllers/Admin/Shop/DashboardController.php @@ -2,10 +2,9 @@ namespace App\Http\Controllers\Admin\Shop; -use Illuminate\Http\Request; use App\Http\Controllers\Controller; - use App\Repositories\Shop\Dashboards; +use Illuminate\Http\Request; class DashboardController extends Controller { diff --git a/app/Http/Controllers/Admin/Shop/DeliveryController.php b/app/Http/Controllers/Admin/Shop/DeliveryController.php index 7f7e8ba1..d7631113 100644 --- a/app/Http/Controllers/Admin/Shop/DeliveryController.php +++ b/app/Http/Controllers/Admin/Shop/DeliveryController.php @@ -2,35 +2,38 @@ namespace App\Http\Controllers\Admin\Shop; -use Illuminate\Http\Request; - +use App\Datatables\Shop\DeliveriesDataTable; use App\Repositories\Shop\Deliveries; use App\Repositories\Shop\SaleChannels; -use App\Datatables\Shop\DeliveriesDataTable; +use Illuminate\Http\Request; class DeliveryController extends Controller { public function index(DeliveriesDataTable $dataTable) { $data = []; + return $dataTable->render('Admin.Shop.Deliveries.list', $data); } public function create() { $data['sale_channels'] = SaleChannels::getOptions(); + return view('Admin.Shop.Deliveries.create', $data); } public function store(Request $request) { $ret = Deliveries::store($request->all()); + return redirect()->route('Admin.Shop.Deliveries.index'); } public function show($id) { $data['delivery'] = Deliveries::get($id); + return view('Admin.Shop.Deliveries.view', $data); } @@ -38,6 +41,7 @@ class DeliveryController extends Controller { $data['delivery'] = Deliveries::get($id)->toArray(); $data['sale_channels'] = SaleChannels::getOptions(); + return view('Admin.Shop.Deliveries.edit', $data); } @@ -49,7 +53,7 @@ class DeliveryController extends Controller public function toggleActive(Request $request) { $data = Deliveries::toggle_active($request->input('id'), ($request->input('active') == 'true') ? 1 : 0); + return response()->json(['error' => 0]); } - } diff --git a/app/Http/Controllers/Admin/Shop/DeliveryPackageController.php b/app/Http/Controllers/Admin/Shop/DeliveryPackageController.php new file mode 100644 index 00000000..fe209e2f --- /dev/null +++ b/app/Http/Controllers/Admin/Shop/DeliveryPackageController.php @@ -0,0 +1,59 @@ +render('Admin.Shop.DeliveryPackages.list', $data); + } + + public function create() + { + $data['sale_channels'] = SaleChannels::getOptions(); + + return view('Admin.Shop.DeliveryPackages.create', $data); + } + + public function store(Request $request) + { + $ret = DeliveryPackages::store($request->all()); + + return redirect()->route('Admin.Shop.DeliveryPackages.index'); + } + + public function show($id) + { + $data['delivery'] = DeliveryPackages::get($id); + + return view('Admin.Shop.DeliveryPackages.view', $data); + } + + public function edit($id) + { + $data['delivery'] = DeliveryPackages::get($id)->toArray(); + $data['sale_channels'] = SaleChannels::getOptions(); + + return view('Admin.Shop.DeliveryPackages.edit', $data); + } + + public function destroy($id) + { + return DeliveryPackages::destroy($id); + } + + public function toggleActive(Request $request) + { + $data = DeliveryPackages::toggle_active($request->input('id'), ($request->input('active') == 'true') ? 1 : 0); + + return response()->json(['error' => 0]); + } +} diff --git a/app/Http/Controllers/Admin/Shop/DeliveryTypeCalculationController.php b/app/Http/Controllers/Admin/Shop/DeliveryTypeCalculationController.php new file mode 100644 index 00000000..4e9a3eff --- /dev/null +++ b/app/Http/Controllers/Admin/Shop/DeliveryTypeCalculationController.php @@ -0,0 +1,59 @@ +render('Admin.Shop.DeliveryTypeCalculations.list', $data); + } + + public function create() + { + $data = []; + + return view('Admin.Shop.DeliveryTypeCalculations.create', $data); + } + + public function store(Request $request) + { + $ret = DeliveryTypeCalculations::store($request->all()); + + return redirect()->route('Admin.Shop.DeliveryTypeCalculations.index'); + } + + public function show($id) + { + $data['delivery'] = DeliveryTypeCalculations::get($id); + + return view('Admin.Shop.DeliveryTypeCalculations.view', $data); + } + + public function edit($id) + { + $data['delivery'] = DeliveryTypeCalculations::get($id)->toArray(); + $data['sale_channels'] = SaleChannels::getOptions(); + + return view('Admin.Shop.DeliveryTypeCalculations.edit', $data); + } + + public function destroy($id) + { + return DeliveryTypeCalculations::destroy($id); + } + + public function toggleActive(Request $request) + { + $data = DeliveryTypeCalculations::toggle_active($request->input('id'), ($request->input('active') == 'true') ? 1 : 0); + + return response()->json(['error' => 0]); + } +} diff --git a/app/Http/Controllers/Admin/Shop/DeliveryTypeController.php b/app/Http/Controllers/Admin/Shop/DeliveryTypeController.php new file mode 100644 index 00000000..0b7714fc --- /dev/null +++ b/app/Http/Controllers/Admin/Shop/DeliveryTypeController.php @@ -0,0 +1,59 @@ +render('Admin.Shop.DeliveryTypes.list', $data); + } + + public function create() + { + $data['sale_channels'] = SaleChannels::getOptions(); + + return view('Admin.Shop.DeliveryTypes.create', $data); + } + + public function store(Request $request) + { + $ret = DeliveryTypes::store($request->all()); + + return redirect()->route('Admin.Shop.DeliveryTypes.index'); + } + + public function show($id) + { + $data['delivery'] = DeliveryTypes::get($id); + + return view('Admin.Shop.DeliveryTypes.view', $data); + } + + public function edit($id) + { + $data['delivery'] = DeliveryTypes::get($id)->toArray(); + $data['sale_channels'] = SaleChannels::getOptions(); + + return view('Admin.Shop.DeliveryTypes.edit', $data); + } + + public function destroy($id) + { + return DeliveryTypes::destroy($id); + } + + public function toggleActive(Request $request) + { + $data = DeliveryTypes::toggle_active($request->input('id'), ($request->input('active') == 'true') ? 1 : 0); + + return response()->json(['error' => 0]); + } +} diff --git a/app/Http/Controllers/Admin/Shop/HomeController.php b/app/Http/Controllers/Admin/Shop/HomeController.php index ed8e68def7c4960ce8c306c801f4ee361a1093bc..0dfe3156c5cd988dd7f14fc5aaca8aee1561c9e1 100644 GIT binary patch literal 495 NcmZQz7zHCJ1ONf=00961 literal 524 zcmZ`#O=|)%5WVMD%%QNlVEqA>w&KNJ^%{^dnX-Xwk|vX`Q2g&r6AW}>ayr2Ti7x@=E!(zUXkinncmjf>0n{}i7?&8GqQ{Z=%YTi;IXd|C zMvvIC-jI*hD0t6KvGEQLhoY7^X2r94Wn8>}{2#b8Y4O|}tt|~0Y1Uxou9>eY@hs}O zNm+&(fV+}2gyMqLL1XHU9;5y*qr4flZh(rD+~*K{WVtKbP{gC9>IUuo9;UEPe;SM{ QMA9ZwY1mxDOeN0Z8all()); + return redirect()->route('Admin.Shop.Homepages.index'); } @@ -33,6 +33,7 @@ class HomepageController extends Controller public function edit($id) { $data['homepage'] = Homepages::get($id); + return view('Admin.Shop.Homepages.edit', $data); } diff --git a/app/Http/Controllers/Admin/Shop/InvoiceController.php b/app/Http/Controllers/Admin/Shop/InvoiceController.php index d53d981a..98867dfa 100644 --- a/app/Http/Controllers/Admin/Shop/InvoiceController.php +++ b/app/Http/Controllers/Admin/Shop/InvoiceController.php @@ -2,11 +2,10 @@ namespace App\Http\Controllers\Admin\Shop; -use Illuminate\Http\Request; -use App\Http\Controllers\Controller; - -use App\Repositories\Shop\Invoices; use App\Datatables\Shop\InvoicesDataTable; +use App\Http\Controllers\Controller; +use App\Repositories\Shop\Invoices; +use Illuminate\Http\Request; class InvoiceController extends Controller { @@ -23,12 +22,14 @@ class InvoiceController extends Controller public function store(Request $request) { $ret = Invoices::store($request->all()); + return redirect()->route('Admin.Shop.Invoices.index'); } public function show($id) { $data['invoice'] = Invoices::get($id)->toArray(); + return view('Admin.Shop.Invoices.view', $data); } @@ -36,6 +37,7 @@ class InvoiceController extends Controller { $data['invoice'] = Invoices::get($id, ['order.customer', 'order.address', 'order.detail'])->toArray(); $data['statuses'] = Invoices::statuses(); + return view('Admin.Shop.Invoices.edit', $data); } diff --git a/app/Http/Controllers/Admin/Shop/InvoiceItemController.php b/app/Http/Controllers/Admin/Shop/InvoiceItemController.php index 52be1e6c..357f145d 100644 --- a/app/Http/Controllers/Admin/Shop/InvoiceItemController.php +++ b/app/Http/Controllers/Admin/Shop/InvoiceItemController.php @@ -2,9 +2,9 @@ namespace App\Http\Controllers\Admin\Shop; +use App\Http\Controllers\Controller; use App\InvoiceItem; use Illuminate\Http\Request; -use App\Http\Controllers\Controller; class InvoiceItemController extends Controller { @@ -31,7 +31,6 @@ class InvoiceItemController extends Controller /** * Store a newly created resource in storage. * - * @param \Illuminate\Http\Request $request * @return \Illuminate\Http\Response */ public function store(Request $request) @@ -42,7 +41,6 @@ class InvoiceItemController extends Controller /** * Display the specified resource. * - * @param \App\InvoiceItem $invoiceItem * @return \Illuminate\Http\Response */ public function show(InvoiceItem $invoiceItem) @@ -53,7 +51,6 @@ class InvoiceItemController extends Controller /** * Show the form for editing the specified resource. * - * @param \App\InvoiceItem $invoiceItem * @return \Illuminate\Http\Response */ public function edit(InvoiceItem $invoiceItem) @@ -64,8 +61,6 @@ class InvoiceItemController extends Controller /** * Update the specified resource in storage. * - * @param \Illuminate\Http\Request $request - * @param \App\InvoiceItem $invoiceItem * @return \Illuminate\Http\Response */ public function update(Request $request, InvoiceItem $invoiceItem) @@ -76,7 +71,6 @@ class InvoiceItemController extends Controller /** * Remove the specified resource from storage. * - * @param \App\InvoiceItem $invoiceItem * @return \Illuminate\Http\Response */ public function destroy(InvoiceItem $invoiceItem) diff --git a/app/Http/Controllers/Admin/Shop/MerchandiseController.php b/app/Http/Controllers/Admin/Shop/MerchandiseController.php index 1bdd174e..e5c68274 100644 --- a/app/Http/Controllers/Admin/Shop/MerchandiseController.php +++ b/app/Http/Controllers/Admin/Shop/MerchandiseController.php @@ -2,12 +2,11 @@ namespace App\Http\Controllers\Admin\Shop; -use Illuminate\Http\Request; - +use App\Datatables\Shop\MerchandisesDataTable; use App\Repositories\Shop\Merchandises; use App\Repositories\Shop\Producers; use App\Repositories\Shop\TagGroups; -use App\Datatables\Shop\MerchandisesDataTable; +use Illuminate\Http\Request; class MerchandiseController extends Controller { @@ -20,6 +19,7 @@ class MerchandiseController extends Controller { $data['producers_list'] = Producers::getOptions(); $data['tags_list'] = TagGroups::getTreeTags(); + return view('Admin.Shop.Merchandises.create', $data); } @@ -27,6 +27,7 @@ class MerchandiseController extends Controller { $data = $request->all(); Merchandises::storeFull($data); + return redirect()->route('Admin.Shop.Merchandises.index'); } @@ -40,6 +41,7 @@ class MerchandiseController extends Controller $data['merchandise'] = Merchandises::getFull($id); $data['producers_list'] = Producers::getOptions(); $data['tags_list'] = TagGroups::getTreeTags(); + return view('Admin.Shop.Merchandises.edit', $data); } @@ -53,6 +55,7 @@ class MerchandiseController extends Controller $id = $id ? $id : $request->input('id'); $data['images'] = Merchandises::getImages($id); $data['can_edit'] = $can_edit; + return view('components.uploader.mini-gallery-items', $data); } @@ -60,6 +63,7 @@ class MerchandiseController extends Controller { $id = $request->input('id'); $index = $request->input('index'); + return Merchandises::deleteImage($id, $index); } diff --git a/app/Http/Controllers/Admin/Shop/OfferController.php b/app/Http/Controllers/Admin/Shop/OfferController.php index 85452d81..13b6b32f 100644 --- a/app/Http/Controllers/Admin/Shop/OfferController.php +++ b/app/Http/Controllers/Admin/Shop/OfferController.php @@ -2,16 +2,15 @@ namespace App\Http\Controllers\Admin\Shop; -use Illuminate\Http\Request; +use App\Datatables\Shop\OffersDataTable; use App\Http\Controllers\Controller; - -use App\Repositories\Shop\Articles; use App\Repositories\Shop\ArticleNatures; +use App\Repositories\Shop\Articles; use App\Repositories\Shop\Offers; use App\Repositories\Shop\Packages; use App\Repositories\Shop\Tariffs; use App\Repositories\Shop\Variations; -use App\Datatables\Shop\OffersDataTable; +use Illuminate\Http\Request; class OfferController extends Controller { @@ -19,6 +18,7 @@ class OfferController extends Controller { $data['article_natures'] = ArticleNatures::getOptions(); $data['packages'] = Packages::getOptions(); + return $dataTable->render('Admin.Shop.Offers.list', $data ?? []); } @@ -27,6 +27,7 @@ class OfferController extends Controller $data['articles'] = Articles::getOptionsWithNature(); $data['tariffs'] = Tariffs::getOptions(); $data['variations'] = Variations::getOptions(); + return view('Admin.Shop.Offers.create', $data); } @@ -36,6 +37,7 @@ class OfferController extends Controller $data['articles'] = Articles::getOptionsWithNature(); $data['tariffs'] = Tariffs::getOptions(); $data['variations'] = Variations::getOptions(); + return view('Admin.Shop.Offers.edit', $data); } @@ -43,12 +45,14 @@ class OfferController extends Controller { $data = $request->all(); $ret = Offers::store($data); + return redirect()->route('Admin.Shop.Offers.index'); } public function show($id) { $data['offer'] = Offers::get($id)->toArray(); + return view('Admin.Shop.Offers.view', $data); } @@ -60,25 +64,28 @@ class OfferController extends Controller public function previewArticle($id) { $data['article'] = Articles::getArticle($id); + return view('Admin.Shop.Offers.partials.article', $data); } public function previewVariation($id) { $data['variation'] = Variations::get($id)->toArray(); + return view('Admin.Shop.Offers.partials.variation', $data); } public function previewTariff($id) { $data['tariff'] = Tariffs::getPrices($id); + return view('Admin.Shop.Offers.partials.tariff', $data); } public function toggleActive(Request $request) { $data = Offers::toggle_active($request->input('id'), ($request->input('status_id') == 'true') ? 1 : 0); + return response()->json(['error' => 0]); } - } diff --git a/app/Http/Controllers/Admin/Shop/OrderController.php b/app/Http/Controllers/Admin/Shop/OrderController.php index 8b1c5aed..c18b896e 100644 --- a/app/Http/Controllers/Admin/Shop/OrderController.php +++ b/app/Http/Controllers/Admin/Shop/OrderController.php @@ -2,11 +2,10 @@ namespace App\Http\Controllers\Admin\Shop; -use Illuminate\Http\Request; -use App\Http\Controllers\Controller; - -use App\Repositories\Shop\Orders; use App\Datatables\Shop\OrdersDataTable; +use App\Http\Controllers\Controller; +use App\Repositories\Shop\Orders; +use Illuminate\Http\Request; class OrderController extends Controller { @@ -23,18 +22,21 @@ class OrderController extends Controller public function show($id) { $data = Orders::get($id); + return view('Admin.Shop.Orders.view', $data); } public function edit($id) { $data = Orders::edit($id); + return view('Admin.Shop.Orders.edit', $data); } public function store(Request $request) { $ret = Orders::store($request->all()); + return redirect()->route('Admin.Shop.Orders.index'); } diff --git a/app/Http/Controllers/Admin/Shop/PackageController.php b/app/Http/Controllers/Admin/Shop/PackageController.php index 3fcd696c..78c13612 100644 --- a/app/Http/Controllers/Admin/Shop/PackageController.php +++ b/app/Http/Controllers/Admin/Shop/PackageController.php @@ -2,42 +2,46 @@ namespace App\Http\Controllers\Admin\Shop; -use Illuminate\Http\Request; +use App\Datatables\Shop\PackagesDataTable; use App\Http\Controllers\Controller; - use App\Repositories\Shop\ArticleNatures; use App\Repositories\Shop\Packages; -use App\Datatables\Shop\PackagesDataTable; +use Illuminate\Http\Request; class PackageController extends Controller { public function index(PackagesDataTable $dataTable) { $data['families'] = ArticleNatures::getOptions(); + return $dataTable->render('Admin.Shop.Packages.list', $data); } public function getOptionsByFamily(Request $request) { $id = $request->input('family_id'); + return response()->json(Packages::getSelectByFamily($id)); } public function create() { $data['families'] = ArticleNatures::getOptions(); + return view('Admin.Shop.Packages.create', $data); } public function store(Request $request) { $ret = Packages::store($request->all()); + return redirect()->route('Admin.Shop.Packages.index'); } public function show($id) { $data = Packages::get($id); + return view('Admin.Shop.Packages.view', $data); } @@ -45,6 +49,7 @@ class PackageController extends Controller { $data['package'] = Packages::get($id); $data['families'] = ArticleNatures::getOptions(); + return view('Admin.Shop.Packages.edit', $data); } diff --git a/app/Http/Controllers/Admin/Shop/PriceGenericCategoryController.php b/app/Http/Controllers/Admin/Shop/PriceGenericCategoryController.php index 646408d1..f4fc6542 100644 --- a/app/Http/Controllers/Admin/Shop/PriceGenericCategoryController.php +++ b/app/Http/Controllers/Admin/Shop/PriceGenericCategoryController.php @@ -2,12 +2,11 @@ namespace App\Http\Controllers\Admin\Shop; -use Illuminate\Http\Request; +use App\Datatables\Shop\PriceGenericCategoriesDataTable; use App\Http\Controllers\Controller; - use App\Repositories\Shop\ArticleNatures; use App\Repositories\Shop\PriceGenericCategories; -use App\Datatables\Shop\PriceGenericCategoriesDataTable; +use Illuminate\Http\Request; class PriceGenericCategoryController extends Controller { @@ -19,6 +18,7 @@ class PriceGenericCategoryController extends Controller public function create() { $data['families'] = ArticleNatures::getOptions(); + return view('Admin.Shop.PriceGenericCategories.create', $data); } @@ -26,18 +26,21 @@ class PriceGenericCategoryController extends Controller { $data['families'] = ArticleNatures::getOptions(); $data['generic_category'] = PriceGenericCategories::get($id)->toArray(); + return view('Admin.Shop.PriceGenericCategories.edit', $data); } public function store(Request $request) { $ret = PriceGenericCategories::store($request->all()); + return redirect()->route('Admin.Shop.PriceGenericCategories.index'); } public function show($id) { $data = PriceGenericCategories::get($id); + return view('Admin.Shop.PriceGenericCategories.view', $data); } diff --git a/app/Http/Controllers/Admin/Shop/PriceListController.php b/app/Http/Controllers/Admin/Shop/PriceListController.php index 8818ab74..21ad147c 100644 --- a/app/Http/Controllers/Admin/Shop/PriceListController.php +++ b/app/Http/Controllers/Admin/Shop/PriceListController.php @@ -2,22 +2,20 @@ namespace App\Http\Controllers\Admin\Shop; -use Illuminate\Http\Request; -use App\Http\Controllers\Controller; - -use App\Models\Shop\PriceList; -use App\Repositories\Shop\PriceLists; -use App\Repositories\Shop\Taxes; -use App\Repositories\Shop\Tariffs; -use App\Repositories\Shop\SaleChannels; -use App\Repositories\Shop\Unities; use App\Datatables\Shop\PriceListsDataTable; +use App\Http\Controllers\Controller; +use App\Repositories\Shop\PriceLists; +use App\Repositories\Shop\SaleChannels; +use App\Repositories\Shop\Tariffs; +use App\Repositories\Shop\Taxes; +use Illuminate\Http\Request; class PriceListController extends Controller { public function index(PriceListsDataTable $dataTable) { $data = []; + return $dataTable->render('Admin.Shop.PriceLists.list', $data); } @@ -25,6 +23,7 @@ class PriceListController extends Controller { $data = []; $data['sale_channels'] = SaleChannels::getOptions(); + return view('Admin.Shop.PriceLists.create', $data); } @@ -32,6 +31,7 @@ class PriceListController extends Controller { $data['price_list'] = PriceLists::get($id); $data['sale_channels'] = SaleChannels::getOptions(); + return view('Admin.Shop.PriceLists.edit', $data); } @@ -43,6 +43,7 @@ class PriceListController extends Controller $data['sale_channels'] = SaleChannels::getOptions(); $data['statuses'] = Tariffs::getStatuses(); $data['taxes'] = Taxes::getOptions(); + return view('Admin.Shop.PriceLists.modal', $data); } @@ -52,12 +53,14 @@ class PriceListController extends Controller $data['sale_channels'] = SaleChannels::getOptions(); $data['statuses'] = Tariffs::getStatuses(); $data['taxes'] = Taxes::getOptions(); + return view('Admin.Shop.PriceLists.modal', $data); } public function store(Request $request) { $ret = PriceLists::store($request->all()); + return redirect()->route('Admin.Shop.PriceLists.index'); } @@ -65,12 +68,14 @@ class PriceListController extends Controller { $data = $request->all(); $ret = PriceLists::store($data); + return response()->json(['code' => '200']); } public function show($id) { $data = PriceLists::get($id); + return view('Admin.Shop.PriceLists.view', $data); } @@ -82,6 +87,7 @@ class PriceListController extends Controller public function getPrice($id) { $data['generic'] = PriceLists::getFull($id); + return view('Admin.Shop.PriceLists.partials.table-prices', $data); } } diff --git a/app/Http/Controllers/Admin/Shop/PriceListValueController.php b/app/Http/Controllers/Admin/Shop/PriceListValueController.php index 7b3d038a..966b04a7 100644 --- a/app/Http/Controllers/Admin/Shop/PriceListValueController.php +++ b/app/Http/Controllers/Admin/Shop/PriceListValueController.php @@ -2,22 +2,21 @@ namespace App\Http\Controllers\Admin\Shop; -use Illuminate\Http\Request; -use App\Http\Controllers\Controller; - -use App\Models\Shop\PriceListValue; -use App\Repositories\Shop\PriceListValues; -use App\Repositories\Shop\PriceListValueCategories; -use App\Repositories\Shop\Taxes; -use App\Repositories\Shop\Packages; -use App\Repositories\Shop\Unities; use App\Datatables\Shop\PriceListValuesDataTable; +use App\Http\Controllers\Controller; +use App\Repositories\Shop\Packages; +use App\Repositories\Shop\PriceListValueCategories; +use App\Repositories\Shop\PriceListValues; +use App\Repositories\Shop\Taxes; +use App\Repositories\Shop\Unities; +use Illuminate\Http\Request; class PriceListValueController extends Controller { public function index(PriceListValuesDataTable $dataTable) { $data['categories'] = PriceListValueCategories::getOptions(); + return $dataTable->render('Admin.Shop.PriceListValues.list', $data); } @@ -26,6 +25,7 @@ class PriceListValueController extends Controller $data['unities'] = Unities::getOptions(); $data['taxes_options'] = Taxes::getOptions(); $data['categories'] = PriceListValueCategories::getOptions(); + return view('Admin.Shop.PriceListValues.create', $data); } @@ -36,18 +36,21 @@ class PriceListValueController extends Controller $data['unities'] = ($data['packages']['id'] ?? false) ? Unities::getSelectByPackage($data['packages']['id']) : []; $data['taxes_options'] = Taxes::getOptions(); $data['categories'] = PriceListValueCategories::getOptions(); + return view('Admin.Shop.PriceListValues.edit', $data); } public function store(Request $request) { $ret = PriceListValues::store($request->all()); + return redirect()->route('Admin.Shop.PriceListValues.index'); } public function show($id) { $data = PriceListValues::get($id); + return view('Admin.Shop.PriceListValues.view', $data); } @@ -59,14 +62,14 @@ class PriceListValueController extends Controller public function getPrice($id) { $data['generic'] = PriceListValues::getFull($id); + return view('Admin.Shop.PriceListValues.partials.table-prices', $data); } public function addPrice($index) { $data['index'] = $index; + return view('Admin.Shop.PriceListValues.partials.row_price', $data); } - - } diff --git a/app/Http/Controllers/Admin/Shop/ProducerController.php b/app/Http/Controllers/Admin/Shop/ProducerController.php index 5e425e3d..a0761cb9 100644 --- a/app/Http/Controllers/Admin/Shop/ProducerController.php +++ b/app/Http/Controllers/Admin/Shop/ProducerController.php @@ -2,13 +2,10 @@ namespace App\Http\Controllers\Admin\Shop; -use Illuminate\Http\Request; - +use App\Datatables\Shop\ProducersDataTable; use App\Repositories\Shop\Producers; use App\Repositories\Shop\TagGroups; -use App\Datatables\Shop\ProducersDataTable; - -use App\Models\Shop\Producer; +use Illuminate\Http\Request; class ProducerController extends Controller { @@ -20,6 +17,7 @@ class ProducerController extends Controller public function create() { $data['tags_list'] = TagGroups::getTreeTags(); + return view('Admin.Shop.Producers.create', $data); } @@ -27,6 +25,7 @@ class ProducerController extends Controller { $data = $request->all(); Producers::storeFull($data); + return redirect()->route('Admin.Shop.Producers.index'); } @@ -39,6 +38,7 @@ class ProducerController extends Controller { $data['producer'] = Producers::getFull($id); $data['tags_list'] = TagGroups::getTreeTags(); + return view('Admin.Shop.Producers.edit', $data); } @@ -52,6 +52,7 @@ class ProducerController extends Controller $id = $id ? $id : $request->input('id'); $data['images'] = Producers::getImages($id); $data['can_edit'] = $can_edit; + return view('components.uploader.mini-gallery-items', $data); } @@ -59,6 +60,7 @@ class ProducerController extends Controller { $id = $request->input('id'); $index = $request->input('index'); + return Producers::deleteImage($id, $index); } diff --git a/app/Http/Controllers/Admin/Shop/SaleChannelController.php b/app/Http/Controllers/Admin/Shop/SaleChannelController.php index ad4078a8..548048d1 100644 --- a/app/Http/Controllers/Admin/Shop/SaleChannelController.php +++ b/app/Http/Controllers/Admin/Shop/SaleChannelController.php @@ -2,11 +2,10 @@ namespace App\Http\Controllers\Admin\Shop; -use Illuminate\Http\Request; -use App\Http\Controllers\Controller; - -use App\Repositories\Shop\SaleChannels; use App\Datatables\Shop\SaleChannelsDataTable; +use App\Http\Controllers\Controller; +use App\Repositories\Shop\SaleChannels; +use Illuminate\Http\Request; class SaleChannelController extends Controller { @@ -23,18 +22,21 @@ class SaleChannelController extends Controller public function store(Request $request) { $ret = SaleChannels::store($request->all()); + return redirect()->route('Admin.Shop.SaleChannels.index'); } public function show($id) { $data['sale_channel'] = SaleChannels::get($id); + return view('Admin.Shop.SaleChannels.view', $data); } public function edit($id) { $data['sale_channel'] = SaleChannels::get($id); + return view('Admin.Shop.SaleChannels.edit', $data); } diff --git a/app/Http/Controllers/Admin/Shop/TagController.php b/app/Http/Controllers/Admin/Shop/TagController.php index 3a84a42f..0917e984 100644 --- a/app/Http/Controllers/Admin/Shop/TagController.php +++ b/app/Http/Controllers/Admin/Shop/TagController.php @@ -2,12 +2,11 @@ namespace App\Http\Controllers\Admin\Shop; -use Illuminate\Http\Request; -use App\Http\Controllers\Controller; - -use App\Repositories\Shop\Tags; -use App\Repositories\Shop\TagGroups; use App\Datatables\Shop\TagsDataTable; +use App\Http\Controllers\Controller; +use App\Repositories\Shop\TagGroups; +use App\Repositories\Shop\Tags; +use Illuminate\Http\Request; class TagController extends Controller { @@ -20,18 +19,21 @@ class TagController extends Controller { $data = []; $data['tag_groups'] = TagGroups::getOptions(); + return view('Admin.Shop.Tags.create', $data); } public function store(Request $request) { $ret = Tags::store($request->all()); + return redirect()->route('Admin.Shop.Tags.index'); } public function show($id) { $data = Tags::get($id); + return view('Admin.Shop.Tags.view', $data); } @@ -39,6 +41,7 @@ class TagController extends Controller { $data = Tags::get($id); $data['tag_groups'] = TagGroups::getOptions(); + return view('Admin.Shop.Tags.edit', $data); } diff --git a/app/Http/Controllers/Admin/Shop/TagGroupController.php b/app/Http/Controllers/Admin/Shop/TagGroupController.php index bed1887a..86e9f2c1 100644 --- a/app/Http/Controllers/Admin/Shop/TagGroupController.php +++ b/app/Http/Controllers/Admin/Shop/TagGroupController.php @@ -2,12 +2,11 @@ namespace App\Http\Controllers\Admin\Shop; -use Illuminate\Http\Request; -use App\Http\Controllers\Controller; - -use App\Repositories\Shop\TagGroups; -use App\Repositories\Shop\ArticleNatures; use App\Datatables\Shop\TagGroupsDataTable; +use App\Http\Controllers\Controller; +use App\Repositories\Shop\ArticleNatures; +use App\Repositories\Shop\TagGroups; +use Illuminate\Http\Request; class TagGroupController extends Controller { @@ -19,18 +18,21 @@ class TagGroupController extends Controller public function create() { $data['article_families'] = ArticleNatures::getOptions(); + return view('Admin.Shop.TagGroups.create', $data); } public function store(Request $request) { $ret = TagGroups::store($request->all()); + return redirect()->route('Admin.Shop.TagGroups.index'); } public function show($id) { $data = TagGroups::get($id); + return view('Admin.Shop.TagGroups.view', $data); } @@ -38,6 +40,7 @@ class TagGroupController extends Controller { $data = TagGroups::get($id); $data['article_families'] = ArticleNatures::getOptions(); + return view('Admin.Shop.TagGroups.edit', $data); } @@ -49,7 +52,7 @@ class TagGroupController extends Controller public function toggleVisible(Request $request) { $data = TagGroups::toggleVisible($request->input('id'), ($request->input('visible') == 'true') ? 1 : 0); + return response()->json(['error' => 0]); } - } diff --git a/app/Http/Controllers/Admin/Shop/TariffController.php b/app/Http/Controllers/Admin/Shop/TariffController.php index 15824783..ce089bd0 100644 --- a/app/Http/Controllers/Admin/Shop/TariffController.php +++ b/app/Http/Controllers/Admin/Shop/TariffController.php @@ -2,19 +2,19 @@ namespace App\Http\Controllers\Admin\Shop; -use Illuminate\Http\Request; - +use App\Datatables\Shop\PriceListsDataTable; +use App\Datatables\Shop\TariffsDataTable; use App\Repositories\Shop\SaleChannels; use App\Repositories\Shop\Tariffs; use App\Repositories\Shop\TariffUnities; -use App\Datatables\Shop\TariffsDataTable; -use App\Datatables\Shop\PriceListsDataTable; +use Illuminate\Http\Request; class TariffController extends Controller { public function autocomplete(Request $request, $str = false) { $str = $str ? $str : $request->input('q'); + return response()->json(Tariffs::autocomplete($str)); } @@ -38,6 +38,7 @@ class TariffController extends Controller public function show($id) { $data['tariff'] = Tariffs::getFull($id); + return view('Admin.Shop.Tariffs.view', $data); } @@ -57,6 +58,7 @@ class TariffController extends Controller public function store(Request $request) { $ret = Tariffs::store($request->all()); + return redirect()->route('Admin.Shop.Tariffs.index'); } diff --git a/app/Http/Controllers/Admin/Shop/TariffUnityController.php b/app/Http/Controllers/Admin/Shop/TariffUnityController.php index e7ec849e..7a22b63d 100644 --- a/app/Http/Controllers/Admin/Shop/TariffUnityController.php +++ b/app/Http/Controllers/Admin/Shop/TariffUnityController.php @@ -2,13 +2,10 @@ namespace App\Http\Controllers\Admin\Shop; -use Illuminate\Http\Request; -use App\Http\Controllers\Controller; - -use App\Repositories\Shop\ArticleNatures; -use App\Repositories\Shop\Packages; -use App\Repositories\Shop\TariffUnities; use App\Datatables\Shop\TariffUnitiesDataTable; +use App\Http\Controllers\Controller; +use App\Repositories\Shop\TariffUnities; +use Illuminate\Http\Request; class TariffUnityController extends Controller { @@ -25,18 +22,21 @@ class TariffUnityController extends Controller public function store(Request $request) { $ret = TariffUnities::store($request->all()); + return redirect()->route('Admin.Shop.TariffUnities.index'); } public function show($id) { $data = TariffUnities::get($id); + return view('Admin.Shop.TariffUnities.view', $data); } public function edit($id) { $data['tariff_unity'] = TariffUnities::get($id)->toArray(); + return view('Admin.Shop.TariffUnities.edit', $data); } diff --git a/app/Http/Controllers/Admin/Shop/TaxController.php b/app/Http/Controllers/Admin/Shop/TaxController.php index 8e00145f..3851024f 100644 --- a/app/Http/Controllers/Admin/Shop/TaxController.php +++ b/app/Http/Controllers/Admin/Shop/TaxController.php @@ -2,10 +2,9 @@ namespace App\Http\Controllers\Admin\Shop; -use Illuminate\Http\Request; use App\Http\Controllers\Controller; - use App\Repositories\Shop\Taxes; +use Illuminate\Http\Request; class TaxController extends Controller { @@ -22,18 +21,21 @@ class TaxController extends Controller public function store(Request $request) { $ret = Taxes::store($request->all()); + return redirect()->route('Admin.Shop.Taxes.index'); } public function show($id) { $data = Taxes::get($id); + return view('Admin.Shop.Taxes.view', $data); } public function edit($id) { $data = Taxes::get($id); + return view('Admin.Shop.Taxes.edit', $data); } diff --git a/app/Http/Controllers/Admin/Shop/UnityController.php b/app/Http/Controllers/Admin/Shop/UnityController.php index 7053e962..310f305d 100644 --- a/app/Http/Controllers/Admin/Shop/UnityController.php +++ b/app/Http/Controllers/Admin/Shop/UnityController.php @@ -2,13 +2,10 @@ namespace App\Http\Controllers\Admin\Shop; -use Illuminate\Http\Request; -use App\Http\Controllers\Controller; - -use App\Repositories\Shop\ArticleNatures; -use App\Repositories\Shop\Packages; -use App\Repositories\Shop\Unities; use App\Datatables\Shop\UnitiesDataTable; +use App\Http\Controllers\Controller; +use App\Repositories\Shop\Unities; +use Illuminate\Http\Request; class UnityController extends Controller { @@ -30,18 +27,21 @@ class UnityController extends Controller public function store(Request $request) { $ret = Unities::store($request->all()); + return redirect()->route('Admin.Shop.Unities.index'); } public function show($id) { $data = Unities::get($id); + return view('Admin.Shop.Unities.view', $data); } public function edit($id) { $data['unity'] = Unities::get($id)->toArray(); + return view('Admin.Shop.Unities.edit', $data); } diff --git a/app/Http/Controllers/Admin/Shop/VariationController.php b/app/Http/Controllers/Admin/Shop/VariationController.php index a6af071c..3f9a4d52 100644 --- a/app/Http/Controllers/Admin/Shop/VariationController.php +++ b/app/Http/Controllers/Admin/Shop/VariationController.php @@ -2,19 +2,18 @@ namespace App\Http\Controllers\Admin\Shop; -use Illuminate\Http\Request; - +use App\Datatables\Shop\VariationsDataTable; use App\Repositories\Shop\Packages; use App\Repositories\Shop\Unities; use App\Repositories\Shop\Variations; - -use App\Datatables\Shop\VariationsDataTable; +use Illuminate\Http\Request; class VariationController extends Controller { public function autocomplete(Request $request, $str = false) { $str = $str ? $str : $request->input('q'); + return response()->json(Variations::autocomplete($str)); } @@ -27,6 +26,7 @@ class VariationController extends Controller { $data['packages'] = Packages::getOptions(); $data['unities'] = Unities::getOptions(); + return view('Admin.Shop.Variations.create', $data); } @@ -35,18 +35,21 @@ class VariationController extends Controller $data['variation'] = Variations::get($id); $data['packages'] = Packages::getOptions(); $data['unities'] = Unities::getOptions(); + return view('Admin.Shop.Variations.edit', $data); } public function store(Request $request) { $ret = Variations::store($request->all()); + return redirect()->route('Admin.Shop.Variations.index'); } public function show($id) { $data = Variations::get($id); + return view('Admin.Shop.Variations.view', $data); } diff --git a/app/Http/Controllers/Shop/ArticleController.php b/app/Http/Controllers/Shop/ArticleController.php index 1390e1a4..b8c790dd 100644 --- a/app/Http/Controllers/Shop/ArticleController.php +++ b/app/Http/Controllers/Shop/ArticleController.php @@ -2,9 +2,7 @@ namespace App\Http\Controllers\Shop; -use Illuminate\Http\Request; use App\Http\Controllers\Controller; - use App\Repositories\Shop\Articles; use App\Repositories\Shop\Categories; diff --git a/app/Http/Controllers/Shop/Auth/ConfirmPasswordController.php b/app/Http/Controllers/Shop/Auth/ConfirmPasswordController.php index 038cbf3b..1bcd08ee 100644 --- a/app/Http/Controllers/Shop/Auth/ConfirmPasswordController.php +++ b/app/Http/Controllers/Shop/Auth/ConfirmPasswordController.php @@ -3,7 +3,6 @@ namespace App\Http\Controllers\Shop\Auth; use App\Http\Controllers\Controller; -use App\Providers\RouteServiceProvider; use Illuminate\Foundation\Auth\ConfirmsPasswords; class ConfirmPasswordController extends Controller diff --git a/app/Http/Controllers/Shop/Auth/ForgotPasswordController.php b/app/Http/Controllers/Shop/Auth/ForgotPasswordController.php index e348a1d7..2c645084 100644 --- a/app/Http/Controllers/Shop/Auth/ForgotPasswordController.php +++ b/app/Http/Controllers/Shop/Auth/ForgotPasswordController.php @@ -3,7 +3,6 @@ namespace App\Http\Controllers\Shop\Auth; use App\Http\Controllers\Controller; - use Illuminate\Foundation\Auth\SendsPasswordResetEmails; use Illuminate\Support\Facades\Auth; use Illuminate\Support\Facades\Password; diff --git a/app/Http/Controllers/Shop/Auth/LoginController.php b/app/Http/Controllers/Shop/Auth/LoginController.php index efb894f1..57d0c78e 100644 --- a/app/Http/Controllers/Shop/Auth/LoginController.php +++ b/app/Http/Controllers/Shop/Auth/LoginController.php @@ -4,8 +4,8 @@ namespace App\Http\Controllers\Shop\Auth; use App\Http\Controllers\Controller; use Illuminate\Foundation\Auth\AuthenticatesUsers; -use Illuminate\Support\Facades\Auth; use Illuminate\Http\Request; +use Illuminate\Support\Facades\Auth; class LoginController extends Controller { @@ -31,14 +31,16 @@ class LoginController extends Controller public function login(Request $request) { $credentials = $request->validate([ - 'email' => 'required|email', + 'email' => 'required|email', 'password' => 'required|string', ]); if ($this->guard()->attempt($credentials, $request->get('remember'))) { $request->session()->regenerate(); + return (back()->getTargetUrl() == route('Shop.login')) ? redirect()->intended(route('home')) : back(); } + return back()->withInput($request->only('email', 'remember')); } @@ -47,6 +49,7 @@ class LoginController extends Controller $sessionKey = $this->guard()->getName(); $this->guard()->logout(); $request->session()->forget($sessionKey); + return redirect()->route('home'); } diff --git a/app/Http/Controllers/Shop/Auth/RegisterController.php b/app/Http/Controllers/Shop/Auth/RegisterController.php index a488eaed..d6d797d1 100644 --- a/app/Http/Controllers/Shop/Auth/RegisterController.php +++ b/app/Http/Controllers/Shop/Auth/RegisterController.php @@ -3,22 +3,14 @@ namespace App\Http\Controllers\Shop\Auth; use App\Http\Controllers\Controller; -use Carbon\Carbon; -use Illuminate\Contracts\Foundation\Application; -use Illuminate\Contracts\View\Factory; -use Illuminate\Contracts\View\View; +use App\Repositories\Shop\CustomerAddresses; +use App\Repositories\Shop\Customers; use Illuminate\Foundation\Auth\EmailVerificationRequest; use Illuminate\Foundation\Auth\RegistersUsers; -use Illuminate\Http\RedirectResponse; use Illuminate\Http\Request; -use Illuminate\Routing\Redirector; use Illuminate\Support\Facades\Auth; use Illuminate\Support\Facades\Validator; use Sebastienheyd\Boilerplate\Rules\Password; -use App\Repositories\Shop\Customers; -use App\Repositories\Shop\CustomerAddresses; - -use App\Models\Shop\Customer; class RegisterController extends Controller { @@ -39,10 +31,10 @@ class RegisterController extends Controller protected function validator(array $data) { return Validator::make($data, [ - 'last_name' => 'required|max:255', + 'last_name' => 'required|max:255', 'first_name' => 'required|max:255', - 'email' => 'required|email|max:255|unique:shop_customers,email,NULL,id,deleted_at,NULL', - 'password' => ['required', 'confirmed', new Password()], + 'email' => 'required|email|max:255|unique:shop_customers,email,NULL,id,deleted_at,NULL', + 'password' => ['required', 'confirmed', new Password()], ]); } @@ -55,6 +47,7 @@ class RegisterController extends Controller { $user = Customers::create($data); CustomerAddresses::add($user->id, $data); + return $user; } @@ -70,12 +63,14 @@ class RegisterController extends Controller public function emailVerifyRequest(EmailVerificationRequest $request) { $request->fulfill(); + return redirect(route(config('boilerplate.app.redirectTo', 'boilerplate.dashboard'))); } public function emailSendVerification(Request $request) { $request->user()->sendEmailVerificationNotification(); + return back()->with('message', 'Verification link sent!'); } } diff --git a/app/Http/Controllers/Shop/Auth/ResetPasswordController.php b/app/Http/Controllers/Shop/Auth/ResetPasswordController.php index 11b1dba0..4268d9b9 100644 --- a/app/Http/Controllers/Shop/Auth/ResetPasswordController.php +++ b/app/Http/Controllers/Shop/Auth/ResetPasswordController.php @@ -3,11 +3,10 @@ namespace App\Http\Controllers\Shop\Auth; use App\Http\Controllers\Controller; +use Illuminate\Foundation\Auth\ResetsPasswords; use Illuminate\Http\Request; use Illuminate\Support\Facades\Auth; use Illuminate\Support\Facades\Password; -use Illuminate\Foundation\Auth\ResetsPasswords; -use App\Rules\Password as PasswordRules; class ResetPasswordController extends Controller { diff --git a/app/Http/Controllers/Shop/BasketController.php b/app/Http/Controllers/Shop/BasketController.php index f775aecfd996d94dbda81eb43f1f1c9c8b995ad2..e115c0f74626ee1a13cb705b9973edbf986d06ff 100644 GIT binary patch literal 2059 ccmZQz7zLvtFd71*Aut*OqaiRF0wXvC00;{J0RR91 literal 2054 zcmd5-%Wm5+5WMRvcrZY@u#GfFC$W(RD4J7>1U=b-K}+jKjYKkhGzkL#dzYjhtS!4K z&_jI?3~_fjGyBl_Tt3Jo;j98JSq9`%%HVNM|0x1>J%ax-dc&pz$gN%WoQ#zvzl7gmZW81v(zfo6QC}9gFzH z^dp#~AvY>N4C1I@c9NA$YZA~p5d>Zg@LZGbRq~b){7Jhmi;Qe6&rBgW`3~l*Dl$lG zlgK~?w}w7EB)P{|e8Q7u+!W@uFQGZ3Lo%O}k5QI% zY%nEQIGwfxTLL38Xwrw{nU7x?_5yi_qQF?i3Afc6Id6ojm`U3#@_`I|+K8Oigttkr zJ1ozGwf~JhR_55(eU^rkVCaUG8usj{du}@IWc8Vf{syep8`5h|C305Q_VnTGbr3RV zi_k0d{`V4pwq=>NAXru-E|p@hY1~jDf9)s71H4mEgi$xf&jOxP>PB@^V@xEDbb+=_ zB3TrzaF@15^!gA8r3d8p(Z!w)*T(V=Q>!7~MJ9swWZ(SL&!batuGThqZ!rG3R^e9nA9qG1w*;mdxpA?YZ9JYa9FVAyEtUpXS{R9y z5s$#z0<-`Nik~RAv;DOAPlm7hbsj^7@62?{;o1KUsL@?@b$VR-y9RI~o4(&E*nR`V Jj%<@{@(UmleN6xW diff --git a/app/Http/Controllers/Shop/CategoryController.php b/app/Http/Controllers/Shop/CategoryController.php index 46f0e4c7e86968549cc1e3a4fe34837d0065ae83..027439c09137e299113890503b08e481462606b4 100644 GIT binary patch literal 3497 mcmeIuF#!Mo0K%a4Pi+kkh(KY$fB^#r3>YwAz<>b*R|5kLsQ>{0 literal 3509 zcmcgvOOMkq5WeSE7-^-X61%)^yL4A&5swQXwi1W!s!Ee-YeRTg613T8_}+q$7ix0Qxd$>3Wc3;9N^n^<95noF(ny{aAbODW79j({%N= zsoEN$I##b!iN6Knt6*k563t9$<`|?Q_aT*SLlmQ|NQGbqW!s0y;HQK#$Ei-f=vTz> zsoO=tGq!BYO!BH^yv*TeGQfkK2dj&G^X%N$dVvEvvUvt?Qc@X7HdOG4`r>*-Sn zCv{WhZ6@b(TLVJ5%ATLEKz`B|Q#2R?)G-kjJ$bvS69?1;t*03#gkyE?-*ya;y3fgt z5n1ikIKAX$-O40(E%w6hQ7QCCUhID0Wb2uTK7OGhcg6U^<@)1ti5oDv?E=^@N&m5x zshEu~-P8pxcb+l?LCmwNEv2ut7_sqq%$^N}L5^N1q?xOcxP5xp>rO88>;hI!?gB-u zS`hzP54%twRKqqVE$sI{QNq>55lP&0nXQApHI$ev#oCSqY@p0Q#ODrdKtPL-j!6)8mvQmgfU0S1#^uKAQFcds?Kc!(j#7k|zv$2D0TEK6w&^ z;~txTe}^FCgV#uB6X@cds%Yq4Io&P{rqoT3Qr&hYBtdtqt24d7(^X(^+M-D8D|+O#4A^#wS6c(TJ&Kldf%|qlUu@@1buaWSV_Jpoa`cTxT~&JA>{C%g z*(08@E3`Iu$BsG}uC9k5X18~qqfNrNIYWa^GF^$efC4fJ`LHfz5-Tx+B@HdT+QhWJ zb`Kz?)eT^(-O_N%1NWp}*J=aY$dtKap}GS+LC1C2KJw9^J4@jGUNj$agYRSKLxz5FVw()uV+VQODPa~JKR-_N<(9RL6T diff --git a/app/Http/Middleware/Authenticate.php b/app/Http/Middleware/Authenticate.php index aeb9d809e6e940b3287c57dc440eb1aacb108727..e67818196a92f83e3191196ec087614d8f96bb5a 100644 GIT binary patch literal 469 NcmZQz7zM*F1ONfm00961 literal 468 zcmY*U%TB{E5WM><1_`N2BCY{%N! zDd4-SE^c+?Bw6Vi%OgDuwPAor7zHkkp zWF9SsDFsvBKo%xgma%#^gvc*$Sc~j6%X9c<1D{gqH2&@jBG3P=c}pWR4$qK(9Q9!9T3V&RH%c8W9KoPOUW;R z_}OwJ1&3X!c@Rc}s?BH2Iktx@XR1*{wQSATwH4*!OUSqdUBm1`X$EvjVGa|xgWGA- zVW72*D)Yg`B}Sb*R#Q@$jgajOdPCtF5>0pC>$at`S!27eISi%Kps|956fu(QWT-Z^ zIy?27!R(>4c3O6P&elHy?Ky1}T_?y+I3E(uI=qC&JP^ZV(2#8%dLIKwn*IpO<1-CN z9@9%8F2a65#P_PBOrT?e{SIBE35SXaIq24&({8pfdgv;k#I}}@>r;-S_MHyoK>h$Q Ci}ZB> diff --git a/app/Menu/Botanic.php b/app/Menu/Botanic.php index 3b283d29be2e00325bc53a328f224489e0d000d0..fcc9d8f66d6acfdfef6801bd8222bb9faa0c9ef1 100644 GIT binary patch literal 919 ScmZQz7zLvtFd71bECc`pmjD3( literal 972 zcmbW0%T59@6o&VGiY`n#7$EVoLotx3ap4Bk4a1^z4xzEr)?SRp@ILY!yqN8DfC-6< zp{vQv|Mh(5TUTK6REx~Ha0FSiJpF#QoLf!(N!h%}IL9XDt$j6EcFj`OtRVW{O zE($P%DjU%WXl1!mhJ(#tEf^avVuD(W$I4O38Tvsu9PJl^GraVYIj$rw={scgb@;3d z2AwLG(vhfM_J*`5GLr84@IbnFMmSTF;M*Z40_c+9c|s!;PjAQrvPk90@i%2c1KD*a zc&2!>(u+EPT}&Qm$%OzLtM1d0B1U-!$zfEKT=wg3`xO#~(dV*&FVfv(^G@g`^!^D? z%SoiO8Tki2Co!BvFM{aKbN_G{&5`gUNYhF;0Vl}TU{m$7mFm6K+h5j7cB+A$HrgH8 k)V*q@`$i4lZrpa$W*H&`;cq%+8xCw!I__;;hc#NGKZ^$&p#T5? diff --git a/app/Menu/Contents.php b/app/Menu/Contents.php index b328a0ffae767c0e29fb24202799f8f3a3f64047..462c83b3bbd73182851246497acb4b7087719801 100644 GIT binary patch literal 610 QcmZQz7zLvtK+6yS00LqF0RR91 literal 611 zcmb7>Jx{|h6h(LciZ>uRL1`oySb(6m3k+Rox2A&|zY>eYw*0||Q2#r&167KO1RgxZ z_q==T+}!C_6CzoUR8}a#7Ga57W}QIU;ybTrN_1#+#~h|mJ@caDXhOK@ zn6)rh(xG&gd=Lmr`)wy0*m>DFp(OO|8M7}2&iYW3r`(W^MEW?X80Q%shIva1SX0p` zN#V8vD)BX_YBUr!10KP+CY1u=2inM4N6HOA%p6aizbqzH<`e)7o<`BY0yy!>v%|Ngo_t&8iDici3K@UuHd7jQWI-0Ru1 z&O75Jm6|QG6%Q^AI8|J!UfX)xIbY9DVkh1cF*v7`jllri$G7s#rL-6+00K^}lmYptO}L0Upoq zyL<2M_TJTwF(VrEPE-gp=ZXcI?uN0>BP?+vd{Ag=e3!-CDvhnvBH$n@=AF_KTM}1V zcn^=LRgbMg&psH?bKOR(3bvi8g0co0@rub81s4qsN(bGjj>J%$=0eJZFRVll5}`*E zkWXO6Rb>r_yBxR=wne@k`AEh$%@uK8X!K=6G(Y{eE%{BZQ?fh~hZA4y5j%mhq(W_7 z7CV+zEsR0!v$!svlAV2z*o(KeBbS4@nQWBFmJwYN`tVIEBk_$-j<|J7acMn0K5d_4 qi)6*m@s|{MnvWr_{u)B=uagB8^zS45oHhGLfCKu}eq7s*?bs(ruE1vi diff --git a/app/Menu/Merchandises.php b/app/Menu/Merchandises.php index 8edd1ae9f297a9dddb0b0d2884b951464356c519..2fedf276d0f259c25035be221f85d4e82c31ea6d 100644 GIT binary patch literal 629 QcmZQz7zLvtK<5wu00MOY0RR91 literal 630 zcmb7=K}*9h6vyxR6z?FUmA2r)lUmts9tz^Ttz%@#+Zt?>kTjymzPm{)TPY0OJBI)7 zy z*NVbZ3Dh;(7^x2VjvXj$#x0SLlb15k-9(4Z1KI}j*EmA0U_)5<0YyAZ*7x9%cK&TLroLDLLH_TN2CCF%r0bCr+x zIp@i_x^b-|#BdGXaRGGhTyqa5%m@h{=nA&n4+=~Rud-QK)j{t%K0pjLi=a9QJ%&Zc zy{8X7o;-OY6qgIzP6@gTMhwats`(zW4}zX)Y?8;^lpcwAS=L<2jNMwTxsl*mLDx(P zYZ$$*Df6v$PMPNt#r80;%~WK>$5qw}VH-Wz=~KMUF7jFIJI2%Iv-Oird_li!r1Xfg z-i84tskzk3R4Y`grV&&M)n8bVh)s_F!Z{pZxqBSJY|VaB=lGqn{)grr)(-tNtkm-t X%cVJ3CBXmHGjU%{FHZ-0BuDZNoiwYl diff --git a/app/Menu/Settings.php b/app/Menu/Settings.php new file mode 100644 index 0000000000000000000000000000000000000000..7f407871072a1c9ef87ed6815c571886263716b4 GIT binary patch literal 879 ScmZQz7zLvtFd71M3IPBEZvX)R literal 0 HcmV?d00001 diff --git a/app/Menu/Shop.php b/app/Menu/Shop.php index a55b69a560fb192369ca66a01beac3fd165372f1..95a2cd9dfaa61ed0cdd15910abb4ee743e2b6371 100644 GIT binary patch literal 2050 ccmZQz7zLvtFd71*Aut*OqaiRF0wXU300;sA0RR91 literal 2075 zcmbW2(N5bi6o&8f6uy|`c515u69SEODjPz(*g(+jhH_z?lhz`&E!#mu6A#35@M0V% zapz7*iJO~B>HpcEPweB9FM6f3OtLjt%{Y*m){7q?t4~>0Ss>SN$E*_|SMZoGPL(LZ z=#n|8LyOZ&lsOm-^O9Lhu2)KDe=~xQuI@^~Nl{7egpy>+ksB(wl9YU&5^8aLE#z{{nQ@fdHbZ#WKjW!D)Mx1be<*{RgZ&|z zHraT(xoW8qp)=zIFTwhWH&KsJqbl^NHD>u*$cbOZd}=*6+?HUEcK%BW_ww9s)$~s3@g0tP(=P+ObelongsTo(\App\Models\Core\App\Application::class)->withDefault(['name' => '']); diff --git a/app/Models/Core/Auth/RoleUser.php b/app/Models/Core/Auth/RoleUser.php index 8912eb66..edf3a85d 100644 --- a/app/Models/Core/Auth/RoleUser.php +++ b/app/Models/Core/Auth/RoleUser.php @@ -1,4 +1,5 @@ belongsTo(\App\Models\Core\Auth\User::class); diff --git a/app/Models/Core/Auth/Team.php b/app/Models/Core/Auth/Team.php index 4933fb7f..726d6902 100644 --- a/app/Models/Core/Auth/Team.php +++ b/app/Models/Core/Auth/Team.php @@ -2,15 +2,15 @@ namespace App\Models\Core\Auth; -use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\SoftDeletes; - use Laratrust\Models\LaratrustTeam; class Team extends LaratrustTeam { use SoftDeletes; + protected $connection = 'mysql'; + public $timestamps = false; public function users() diff --git a/app/Models/Core/Auth/TeamUser.php b/app/Models/Core/Auth/TeamUser.php index 62130150..124fad5e 100644 --- a/app/Models/Core/Auth/TeamUser.php +++ b/app/Models/Core/Auth/TeamUser.php @@ -7,6 +7,7 @@ use Illuminate\Database\Eloquent\Model; class TeamUser extends Model { protected $table = 'team_user'; + protected $connection = 'mysql'; public function user() diff --git a/app/Models/Core/Auth/User.php b/app/Models/Core/Auth/User.php index 185ca6b2..88e70ff1 100644 --- a/app/Models/Core/Auth/User.php +++ b/app/Models/Core/Auth/User.php @@ -2,19 +2,19 @@ namespace App\Models\Core\Auth; -use Carbon\Carbon; -use Illuminate\Contracts\Auth\MustVerifyEmail; -use Yadahan\AuthenticationLog\AuthenticationLogable; -// use HighIdeas\UsersOnline\Traits\UsersOnlineTrait; use Sebastienheyd\Boilerplate\Models\User as parentUser; +// use HighIdeas\UsersOnline\Traits\UsersOnlineTrait; +use Yadahan\AuthenticationLog\AuthenticationLogable; class User extends parentUser { // use UserHasTeams, UsersOnlineTrait; use AuthenticationLogable; - + protected $fillable = ['active', 'last_name', 'first_name', 'username', 'email', 'password', 'remember_token', 'last_login']; + protected $hidden = ['password', 'remember_token']; + protected $casts = [ 'email_verified_at' => 'datetime', 'settings' => 'array', diff --git a/app/Models/Core/Auth/UserClient.php b/app/Models/Core/Auth/UserClient.php index b20589ab..01831e26 100644 --- a/app/Models/Core/Auth/UserClient.php +++ b/app/Models/Core/Auth/UserClient.php @@ -3,12 +3,13 @@ namespace App\Models\Core\Auth; use Illuminate\Database\Eloquent\Model; -use Illuminate\Database\Eloquent\SoftDeletes; class UserClient extends Model { protected $connection = 'system'; + protected $guarded = []; + public $timestamps = false; public function client() diff --git a/app/Models/Core/Auth/UserStatus.php b/app/Models/Core/Auth/UserStatus.php index 55de889c..88d757a1 100644 --- a/app/Models/Core/Auth/UserStatus.php +++ b/app/Models/Core/Auth/UserStatus.php @@ -1,4 +1,5 @@ 'boolean' + 'is_approved' => 'boolean', ]; public function scopeApproved($query) @@ -39,7 +39,7 @@ class Comment extends Model return $this; } - + public function disapprove() { $this->update([ @@ -55,11 +55,10 @@ class Comment extends Model return config('comments.user_model'); } - if (!is_null(config('auth.providers.users.model'))) { + if (! is_null(config('auth.providers.users.model'))) { return config('auth.providers.users.model'); } throw new Exception('Could not determine the commentator model name.'); } - } diff --git a/app/Models/Core/Media.php b/app/Models/Core/Media.php index f773f7a4..0eef22c8 100644 --- a/app/Models/Core/Media.php +++ b/app/Models/Core/Media.php @@ -3,7 +3,6 @@ namespace App\Models\Core; use Illuminate\Database\Eloquent\Model; -use Illuminate\Database\Eloquent\SoftDeletes; class Media extends Model { diff --git a/app/Models/Shop/Article.php b/app/Models/Shop/Article.php index 60de690f..e5c698ce 100644 --- a/app/Models/Shop/Article.php +++ b/app/Models/Shop/Article.php @@ -2,30 +2,51 @@ namespace App\Models\Shop; -use Illuminate\Database\Eloquent\Model; -use Illuminate\Database\Eloquent\SoftDeletes; - -use Spatie\MediaLibrary\HasMedia; -use Rinvex\Categories\Traits\Categorizable; -use Rinvex\Tags\Traits\Taggable; -use Kirschbaum\PowerJoins\PowerJoins; -use Fico7489\Laravel\EloquentJoin\Traits\EloquentJoin; -use Wildside\Userstamps\Userstamps; -use Staudenmeir\EloquentHasManyDeep\HasRelationships; - +use App\Models\Botanic\Specie; +use App\Models\Botanic\Variety; use App\Traits\Model\HasComments; use App\Traits\Model\Imageable; - -use App\Models\Botanic\Variety; -use App\Models\Botanic\Specie; +use Fico7489\Laravel\EloquentJoin\Traits\EloquentJoin; +use Illuminate\Database\Eloquent\Model; +use Illuminate\Database\Eloquent\SoftDeletes; +use Kirschbaum\PowerJoins\PowerJoins; +use Rinvex\Categories\Traits\Categorizable; +use Rinvex\Tags\Traits\Taggable; +use Spatie\MediaLibrary\HasMedia; +use Staudenmeir\EloquentHasManyDeep\HasRelationships; +use \Venturecraft\Revisionable\RevisionableTrait; +use Wildside\Userstamps\Userstamps; class Article extends Model implements HasMedia { - use Categorizable, EloquentJoin, HasComments, HasRelationships, Imageable, Powerjoins, Taggable, SoftDeletes, UserStamps; + use Categorizable; + use EloquentJoin; + use HasComments; + use HasRelationships; + use Imageable; + use Powerjoins; + use RevisionableTrait; + use Taggable; + use SoftDeletes; + use UserStamps; protected $guarded = ['id']; + protected $table = 'shop_articles'; + protected $revisionEnabled = true; + + protected $keepRevisionOf = [ + 'article_nature_id', + 'product_type', + 'product_id', + 'ref', + 'name', + 'description', + 'visible', + 'homepage', + ]; + public function article_nature() { return $this->belongsTo(ArticleNature::class); @@ -84,54 +105,55 @@ class Article extends Model implements HasMedia public function scopeByArticle($query, $id) { - return $query->where($this->table . '.id', $id); + return $query->where($this->table.'.id', $id); } public function scopeByAutocomplete($query, $str) { - return $query->where($this->table . '.name', 'LIKE', '%' . $str .'%'); + return $query->where($this->table.'.name', 'LIKE', '%'.$str.'%'); } public function scopeSearch($query, $str) { - return $query->where($this->table . '.name', 'LIKE', '%' . $str .'%'); + return $query->where($this->table.'.name', 'LIKE', '%'.$str.'%'); } public function scopeByArticleNature($query, $id) { - return $id ? $query->where($this->table . '.article_nature_id', $id) : $query; + return $id ? $query->where($this->table.'.article_nature_id', $id) : $query; } public function scopeByArticleNatures($query, $ids) { - return $ids ? $query->whereIn($this->table . '.article_nature_id', $ids) : $query; + return $ids ? $query->whereIn($this->table.'.article_nature_id', $ids) : $query; } - public function scopeByCategories($query, $categories_id) + public function scopeByCategories($query, $categoriesId) { - return $categories_id ? $query->whereHas('categories', function ($query) use ($categories_id) { - $query->whereIn('id', $categories_id); + return $categoriesId ? $query->whereHas('categories', function ($query) use ($categoriesId) { + $query->whereIn('id', $categoriesId); }) : $query; } - public function scopeByCategoryParent($query, $category_id) + public function scopeByCategoryParent($query, $categoryId) { - $category = Category::find($category_id); - return $category_id ? $query->whereHas('categories', function ($query) use ($category) { + $category = Category::find($categoryId); + + return $categoryId ? $query->whereHas('categories', function ($query) use ($category) { $query->where('_lft', '>=', $category->_lft)->where('_rgt', '<=', $category->_rgt); }) : $query; } - public function scopeByCategory($query, $category_id) + public function scopeByCategory($query, $categoryId) { - return $category_id ? $query->whereHas('categories', function ($query) use ($category_id) { - $query->where('id', $category_id); + return $categoryId ? $query->whereHas('categories', function ($query) use ($categoryId) { + $query->where('id', $categoryId); }) : $query; } public function scopeBotanic($query) { - return $query->whereIn($this->table . '.product_type', [Variety::class, Specie::class]); + return $query->whereIn($this->table.'.product_type', [Variety::class, Specie::class]); } public function scopeMerchandise($query) @@ -141,18 +163,18 @@ class Article extends Model implements HasMedia public function scopeByProduct($query, $model) { - return $model ? $query->where($this->table . '.product_type', $model) : $query; + return $model ? $query->where($this->table.'.product_type', $model) : $query; } - public function scopeByProductId($query, $product_id) + public function scopeByProductId($query, $productId) { - return $product_id ? $query->where($this->table . '.product_id', $product_id) : $query; + return $productId ? $query->where($this->table.'.product_id', $productId) : $query; } - public function scopeByTag($query, $tag_id) + public function scopeByTag($query, $tagId) { - return $tag_id ? $query->whereHas('tags', function ($query) use ($tag_id) { - $query->where('id', $tag_id); + return $tagId ? $query->whereHas('tags', function ($query) use ($tagId) { + $query->where('id', $tagId); }) : $query; } @@ -177,20 +199,20 @@ class Article extends Model implements HasMedia return $query->has('offers'); } - public function scopeWithAvailableOffers($query, $sale_channel_id = false) + public function scopeWithAvailableOffers($query, $saleChannelId = false) { - return $query->whereHas('offers', function ($query) use ($sale_channel_id) { - $query->active()->byStockAvailable()->bySaleChannel($sale_channel_id); + return $query->whereHas('offers', function ($query) use ($saleChannelId) { + $query->active()->byStockAvailable()->bySaleChannel($saleChannelId); }); } public function scopeVisible($query) { - return $query->where($this->table . '.visible', 1); + return $query->where($this->table.'.visible', 1); } public function scopeHomepage($query) { - return $query->where($this->table . '.homepage', 1); + return $query->where($this->table.'.homepage', 1); } } diff --git a/app/Models/Shop/ArticleNature.php b/app/Models/Shop/ArticleNature.php index 73c86f82..51f0e68e 100644 --- a/app/Models/Shop/ArticleNature.php +++ b/app/Models/Shop/ArticleNature.php @@ -4,17 +4,22 @@ namespace App\Models\Shop; use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\SoftDeletes; - -use Wildside\Userstamps\Userstamps; use Staudenmeir\EloquentHasManyDeep\HasRelationships; +use \Venturecraft\Revisionable\RevisionableTrait; +use Wildside\Userstamps\Userstamps; class ArticleNature extends Model { - use HasRelationships, SoftDeletes, UserStamps; + use HasRelationships, SoftDeletes, RevisionableTrait, UserStamps; protected $guarded = ['id']; + protected $table = 'shop_article_natures'; - + + protected $revisionEnabled = true; + + protected $keepRevisionOf = ['product_type', 'name', 'description']; + public function articles() { return $this->hasMany(Article::class); @@ -22,7 +27,7 @@ class ArticleNature extends Model public function scopeByArticleNature($query, $id) { - return $query->where($this->table . '.id', $id); + return $query->where($this->table.'.id', $id); } public function scopeByBotanic($query) @@ -37,11 +42,11 @@ class ArticleNature extends Model public function scopeByProductType($query, $type) { - return $query->where($this->table . '.product_type', $type); + return $query->where($this->table.'.product_type', $type); } public function scopeByIds($query, $ids) { - return $query->whereIn($this->table . '.id', $ids); + return $query->whereIn($this->table.'.id', $ids); } } diff --git a/app/Models/Shop/ArticlePrice.php b/app/Models/Shop/ArticlePrice.php deleted file mode 100644 index d411a0bb..00000000 --- a/app/Models/Shop/ArticlePrice.php +++ /dev/null @@ -1,34 +0,0 @@ -hasOne(Price::class); - } - - public function article_family() - { - return $this->belongsTo(ArticleNature::class); - } - - public function scopeByQuantity($query, $quantity) - { - return $query->orderBy('quantity', 'desc')->where('quantity', '<', $quantity)->first(); - } - - public function scopeByFamily($query, $id) - { - return $query->where($this->table . '.article_family_value_id', $id); - } -} diff --git a/app/Models/Shop/Basket.php b/app/Models/Shop/Basket.php index af1b70d3..03bd035c 100644 --- a/app/Models/Shop/Basket.php +++ b/app/Models/Shop/Basket.php @@ -6,8 +6,8 @@ use Illuminate\Database\Eloquent\Model; class Basket extends Model { - protected $guarded = ['id']; + protected $table = 'shop_baskets'; public function Offer() diff --git a/app/Models/Shop/Categorizable.php b/app/Models/Shop/Categorizable.php index e5aa54db..4f4cc2fd 100644 --- a/app/Models/Shop/Categorizable.php +++ b/app/Models/Shop/Categorizable.php @@ -25,17 +25,18 @@ class Categorizable extends Model public function scopeByCategory($query, $category_id) { - return $query->where($this->table . '.category_id', $category_id); + return $query->where($this->table.'.category_id', $category_id); } public function scopeByCategories($query, $categories_id) { - return $query->whereIn($this->table . '.category_id', $categories_id); + return $query->whereIn($this->table.'.category_id', $categories_id); } public function scopeByCategoryParent($query, $category_id) { $category = Category::find($category_id); + return $query->whereHas('category', function ($query) use ($category) { return $query->inRange($category->_lft, $category->_rgt); }); diff --git a/app/Models/Shop/Category.php b/app/Models/Shop/Category.php index a6a49aef..10b35aa9 100644 --- a/app/Models/Shop/Category.php +++ b/app/Models/Shop/Category.php @@ -2,23 +2,26 @@ namespace App\Models\Shop; +use App\Repositories\Shop\SaleChannels; use Cesargb\Database\Support\CascadeDelete; +use Illuminate\Database\Eloquent\SoftDeletes; +use Kalnoy\Nestedset\NestedSet; +use Rinvex\Categories\Models\Category as parentCategory; use Rinvex\Tags\Traits\Taggable; use Wildside\Userstamps\Userstamps; -use Rinvex\Categories\Models\Category as parentCategory; -use Kalnoy\Nestedset\NestedSet; - -use App\Repositories\Shop\SaleChannels; - class Category extends parentCategory { - use CascadeDelete, Taggable, Userstamps; + use CascadeDelete, SoftDeletes, Taggable, Userstamps; protected $guarded = ['id']; + protected $table = 'categories'; + public $translatable = []; + protected $cascadeDeleteMorph = ['Articles']; + protected $fillable = [ 'visible', 'homepage', @@ -30,7 +33,6 @@ class Category extends parentCategory NestedSet::PARENT_ID, ]; - public function Articles() { return $this->morphedByMany(Article::class, 'categorizable'); @@ -84,6 +86,7 @@ class Category extends parentCategory public function scopeHasAvailableOffers($query, $sale_channel_id = false) { $sale_channel_id = $sale_channel_id ? $sale_channel_id : SaleChannels::getDefaultID(); + return $query->whereHas('articles', function ($query) use ($sale_channel_id) { $query->WithAvailableOffers($sale_channel_id); }); @@ -92,6 +95,7 @@ class Category extends parentCategory public function scopeHasAvailableOffersByCategoryParent($query, $sale_channel_id = false) { $sale_channel_id = $sale_channel_id ? $sale_channel_id : SaleChannels::getDefaultID(); + return $query->whereHas('articles', function ($query) use ($sale_channel_id) { $query->WithAvailableOffers($sale_channel_id); })->orWhereHas('descendants.articles', function ($query) use ($sale_channel_id) { diff --git a/app/Models/Shop/Customer.php b/app/Models/Shop/Customer.php index 0611d982..17390f53 100644 --- a/app/Models/Shop/Customer.php +++ b/app/Models/Shop/Customer.php @@ -2,30 +2,30 @@ namespace App\Models\Shop; -use Illuminate\Database\Eloquent\Model; +use App\Notifications\ResetPassword; +use App\Notifications\VerifyEmail; use Illuminate\Database\Eloquent\SoftDeletes; use Illuminate\Foundation\Auth\User as Authenticatable; use Illuminate\Notifications\Notifiable; use Yadahan\AuthenticationLog\AuthenticationLogable; -use App\Notifications\NewUser; -use App\Notifications\ResetPassword; -use App\Notifications\VerifyEmail; -use App\Repositories\Core\DateTime; class Customer extends Authenticatable { use AuthenticationLogable, Notifiable, SoftDeletes; protected $guarded = ['id']; + protected $table = 'shop_customers'; + protected $hidden = ['password', 'remember_token']; + protected $casts = ['email_verified_at' => 'datetime']; public function addresses() { return $this->hasMany(CustomerAddress::class); } - + public function customer_deliveries() { return $this->hasMany(CustomerDelivery::class); diff --git a/app/Models/Shop/CustomerAddress.php b/app/Models/Shop/CustomerAddress.php index b2ab9155..fc6fefa7 100644 --- a/app/Models/Shop/CustomerAddress.php +++ b/app/Models/Shop/CustomerAddress.php @@ -7,6 +7,7 @@ use Illuminate\Database\Eloquent\Model; class CustomerAddress extends Model { protected $guarded = ['id']; + protected $table = 'shop_customer_addresses'; public function customer() diff --git a/app/Models/Shop/CustomerDelivery.php b/app/Models/Shop/CustomerDelivery.php index dcf52b19..9143c364 100644 --- a/app/Models/Shop/CustomerDelivery.php +++ b/app/Models/Shop/CustomerDelivery.php @@ -7,13 +7,14 @@ use Illuminate\Database\Eloquent\Model; class CustomerDelivery extends Model { protected $guarded = ['id']; + protected $table = 'shop_customer_deliveries'; public function customer() { return $this->belongsTo(Customer::class); } - + public function delivery() { return $this->belongsTo(Delivery::class); @@ -21,11 +22,11 @@ class CustomerDelivery extends Model public function scopeByCustomer($query, $customer_id) { - return $query->where($this->table . '.customer_id', $customer_id); + return $query->where($this->table.'.customer_id', $customer_id); } public function scopeByDelivery($query, $customer_id) { - return $query->where($this->table . '.delivery_id', $customer_id); + return $query->where($this->table.'.delivery_id', $customer_id); } } diff --git a/app/Models/Shop/Delivery.php b/app/Models/Shop/Delivery.php index 3faec0c3..8912b100 100644 --- a/app/Models/Shop/Delivery.php +++ b/app/Models/Shop/Delivery.php @@ -3,12 +3,35 @@ namespace App\Models\Shop; use Illuminate\Database\Eloquent\Model; +use Illuminate\Database\Eloquent\SoftDeletes; +use \Venturecraft\Revisionable\RevisionableTrait; +use Wildside\Userstamps\Userstamps; class Delivery extends Model { + use RevisionableTrait, SoftDeletes, Userstamps; + protected $guarded = ['id']; + protected $table = 'shop_deliveries'; - + + protected $revisionEnabled = true; + + protected $keepRevisionOf = [ + 'sale_channel_id', + 'active', + 'is_public', + 'at_house', + 'name', + 'description', + 'address', + 'address2', + 'zipcode', + 'country', + 'event_date_begin', + 'event_date_end', + ]; + public function customers() { return $this->hasMany(Customer::class); @@ -26,17 +49,17 @@ class Delivery extends Model public function scopeByActive($query, $active) { - return $query->where($this->table . '.active', $active); + return $query->where($this->table.'.active', $active); } - public function scopeByPublic($query, $is_public) + public function scopeByPublic($query, $isPublic) { - return $query->where($this->table . '.is_public', $is_public); + return $query->where($this->table.'.is_public', $isPublic); } public function scopeAtHouse($query) { - return $query->where($this->table . '.at_house', 1); + return $query->where($this->table.'.at_house', 1); } public function scopeInactive() diff --git a/app/Models/Shop/DeliveryPackage.php b/app/Models/Shop/DeliveryPackage.php index 7cfadb39..0d416458 100644 --- a/app/Models/Shop/DeliveryPackage.php +++ b/app/Models/Shop/DeliveryPackage.php @@ -3,14 +3,19 @@ namespace App\Models\Shop; use Illuminate\Database\Eloquent\Model; +use Illuminate\Database\Eloquent\SoftDeletes; +use \Venturecraft\Revisionable\RevisionableTrait; +use Wildside\Userstamps\Userstamps; class DeliveryPackage extends Model { + use RevisionableTrait, SoftDeletes, Userstamps; + protected $guarded = ['id']; + protected $table = 'shop_delivery_packages'; - - public function scopeByWeight($query, $weight) - { - return $query->orderBy('weight')->where($this->table . '.weight', '>=', $weight); - } + + protected $revisionEnabled = true; + + protected $keepRevisionOf = ['weight', 'weight_flyer', 'weight_packaging']; } diff --git a/app/Models/Shop/DeliveryType.php b/app/Models/Shop/DeliveryType.php index 874d57a8..34c9632d 100644 --- a/app/Models/Shop/DeliveryType.php +++ b/app/Models/Shop/DeliveryType.php @@ -3,9 +3,19 @@ namespace App\Models\Shop; use Illuminate\Database\Eloquent\Model; +use Illuminate\Database\Eloquent\SoftDeletes; +use \Venturecraft\Revisionable\RevisionableTrait; +use Wildside\Userstamps\Userstamps; class DeliveryType extends Model { + use RevisionableTrait, SoftDeletes, Userstamps; + protected $guarded = ['id']; - protected $table = 'shop_delivery_types'; + + protected $table = 'shop_delivery_types'; + + protected $revisionEnabled = true; + + protected $keepRevisionOf = ['name']; } diff --git a/app/Models/Shop/DeliveryTypeCalculation.php b/app/Models/Shop/DeliveryTypeCalculation.php index 98f35ad9..dc933a55 100644 --- a/app/Models/Shop/DeliveryTypeCalculation.php +++ b/app/Models/Shop/DeliveryTypeCalculation.php @@ -3,24 +3,34 @@ namespace App\Models\Shop; use Illuminate\Database\Eloquent\Model; +use Illuminate\Database\Eloquent\SoftDeletes; +use \Venturecraft\Revisionable\RevisionableTrait; +use Wildside\Userstamps\Userstamps; class DeliveryTypeCalculation extends Model { + use RevisionableTrait, SoftDeletes, Userstamps; + protected $guarded = ['id']; + protected $table = 'shop_delivery_type_calculations'; - - public function DeliveryType() + + protected $revisionEnabled = true; + + protected $keepRevisionOf = ['type_id', 'weight', 'price']; + + public function delivery_type() { - return $this->belongsTo(DeliveryType::class); + return $this->belongsTo(DeliveryType::class, 'type_id'); } public function scopeByDeliveryType($query, $id) { - return $query->where($this->table . '.type_id', $id); + return $query->where($this->table.'.type_id', $id); } public function scopeByWeight($query, $weight) { - return $query->orderBy('weight')->where($this->table . '.weight', '>=', $weight); + return $query->orderBy('weight')->where($this->table.'.weight', '>=', $weight); } } diff --git a/app/Models/Shop/DistributionChannel.php b/app/Models/Shop/DistributionChannel.php index 7e05ba17..77121372 100644 --- a/app/Models/Shop/DistributionChannel.php +++ b/app/Models/Shop/DistributionChannel.php @@ -10,8 +10,9 @@ class DistributionChannel extends Model use HasRelationships; protected $guarded = ['id']; + protected $table = 'shop_distribution_channel'; - + public function tariff_generics() { return $this->hasMany(TariffGeneric::class); diff --git a/app/Models/Shop/Homepage.php b/app/Models/Shop/Homepage.php index e89bb2da..f0410431 100644 --- a/app/Models/Shop/Homepage.php +++ b/app/Models/Shop/Homepage.php @@ -7,6 +7,6 @@ use Illuminate\Database\Eloquent\Model; class Homepage extends Model { protected $guarded = ['id']; - protected $table = 'shop_homepages'; + protected $table = 'shop_homepages'; } diff --git a/app/Models/Shop/Invoice.php b/app/Models/Shop/Invoice.php index 99938065..23318479 100644 --- a/app/Models/Shop/Invoice.php +++ b/app/Models/Shop/Invoice.php @@ -4,7 +4,6 @@ namespace App\Models\Shop; use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\SoftDeletes; - use Venturecraft\Revisionable\RevisionableTrait; use Znck\Eloquent\Traits\BelongsToThrough; @@ -13,8 +12,11 @@ class Invoice extends Model use BelongsToThrough, RevisionableTrait, SoftDeletes; protected $guarded = ['id']; + protected $table = 'shop_invoices'; + protected $revisionCreationsEnabled = false; + protected $keepRevisionOf = ['status', 'total_taxed', 'shipping', 'total_shipped']; public function payments() diff --git a/app/Models/Shop/InvoicePayment.php b/app/Models/Shop/InvoicePayment.php index 95ad21da..56528391 100644 --- a/app/Models/Shop/InvoicePayment.php +++ b/app/Models/Shop/InvoicePayment.php @@ -7,8 +7,9 @@ use Illuminate\Database\Eloquent\Model; class InvoicePayment extends Model { protected $guarded = ['id']; + protected $table = 'shop_invoice_payments'; - + public function invoice() { return $this->belongsTo(Invoice::class); diff --git a/app/Models/Shop/Merchandise.php b/app/Models/Shop/Merchandise.php index dda691a1..af193953 100644 --- a/app/Models/Shop/Merchandise.php +++ b/app/Models/Shop/Merchandise.php @@ -2,23 +2,32 @@ namespace App\Models\Shop; +use App\Traits\Model\Imageable; use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\SoftDeletes; - -use Spatie\MediaLibrary\HasMedia; -use Rinvex\Tags\Traits\Taggable; use Kirschbaum\PowerJoins\PowerJoins; +use Rinvex\Tags\Traits\Taggable; +use Spatie\MediaLibrary\HasMedia; use Wildside\Userstamps\Userstamps; - -use App\Traits\Model\Imageable; +use Venturecraft\Revisionable\RevisionableTrait; class Merchandise extends Model implements HasMedia { - use Imageable, PowerJoins, SoftDeletes, Taggable, UserStamps; + use Imageable, PowerJoins, RevisionableTrait, SoftDeletes, Taggable, UserStamps; protected $guarded = ['id']; + protected $table = 'shop_merchandises'; + protected $revisionEnabled = true; + + protected $keepRevisionOf = [ + 'producer_id', + 'name', + 'description', + 'plus', + ]; + public function Articles() { return $this->morphMany(Article::class, 'product'); @@ -34,8 +43,8 @@ class Merchandise extends Model implements HasMedia return $this->morphToMany(Tag::class, 'taggable'); } - public function scopeByProducer($query, $producer_id) + public function scopeByProducer($query, $producerId) { - return $query->where('producer_id', $producer_id); + return $query->where('producer_id', $producerId); } } diff --git a/app/Models/Shop/Offer.php b/app/Models/Shop/Offer.php index b62e10d0..627a55ac 100644 --- a/app/Models/Shop/Offer.php +++ b/app/Models/Shop/Offer.php @@ -2,19 +2,19 @@ namespace App\Models\Shop; -use Illuminate\Database\Eloquent\Model; - -use Znck\Eloquent\Traits\BelongsToThrough; use App\Traits\Model\HasComments; +use Illuminate\Database\Eloquent\Model; use Staudenmeir\EloquentHasManyDeep\HasRelationships; +use Znck\Eloquent\Traits\BelongsToThrough; class Offer extends Model { use BelongsToThrough, HasComments, HasRelationships; - + protected $guarded = ['id']; + protected $table = 'shop_offers'; - + public function article() { return $this->belongsTo(Article::class); @@ -80,37 +80,37 @@ class Offer extends Model public function scopeByArticle($query, $id) { - return $query->where($this->table . '.article_id', $id); + return $query->where($this->table.'.article_id', $id); } public function scopeByArticles($query, $ids) { - return $query->whereIn($this->table . '.article_id', $ids); + return $query->whereIn($this->table.'.article_id', $ids); } public function scopeByID($query, $id) { - return $query->where($this->table . '.id', $id); + return $query->where($this->table.'.id', $id); } public function scopeByOffer($query, $id) { - return $query->where($this->table . '.id', $id); + return $query->where($this->table.'.id', $id); } public function scopeByStatus($query, $id) { - return $query->where($this->table . '.status_id', $id); + return $query->where($this->table.'.status_id', $id); } public function scopeByVariation($query, $id) { - return $query->where($this->table . '.variation_id', $id); + return $query->where($this->table.'.variation_id', $id); } public function scopeByStockAvailable($query) { - return $query->where($this->table . '.stock_current', '>', 0); + return $query->where($this->table.'.stock_current', '>', 0); } public function scopeByArticleNature($query, $article_nature_id) @@ -165,16 +165,16 @@ class Offer extends Model public function scopeWithPriceListsBySaleChannel($query, $sale_channel_id) { return $query->with([ - 'price_lists' => function($query) use ($sale_channel_id) { + 'price_lists' => function ($query) use ($sale_channel_id) { $query->bySaleChannel($sale_channel_id); - } + }, ]); } public function scopeWithPriceListValuesBySaleChannel($query, $sale_channel_id) { return $query->with([ - 'price_list_values' => function($query) use ($sale_channel_id) { + 'price_list_values' => function ($query) use ($sale_channel_id) { $query->bySaleChannel($sale_channel_id); }, ]); @@ -183,10 +183,10 @@ class Offer extends Model public function scopeWithPriceBySaleChannelByQuantity($query, $sale_channel_id, $quantity = 1) { return $query->with([ - 'price_lists' => function($query) use ($sale_channel_id) { + 'price_lists' => function ($query) use ($sale_channel_id) { $query->bySaleChannel($sale_channel_id); }, - 'price_lists.price_list_values' => function($query) use ($quantity) { + 'price_lists.price_list_values' => function ($query) use ($quantity) { $query->byQuantity($quantity); }, ]); diff --git a/app/Models/Shop/Order.php b/app/Models/Shop/Order.php index 50002554..a6b0b419 100644 --- a/app/Models/Shop/Order.php +++ b/app/Models/Shop/Order.php @@ -4,7 +4,6 @@ namespace App\Models\Shop; use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\SoftDeletes; - use Venturecraft\Revisionable\RevisionableTrait; class Order extends Model @@ -12,8 +11,11 @@ class Order extends Model use RevisionableTrait, SoftDeletes; protected $guarded = ['id']; + protected $table = 'shop_orders'; + protected $revisionCreationsEnabled = false; + protected $keepRevisionOf = ['customer_address_id', 'delivery_id', 'payment_type', 'status']; public function customer() @@ -55,7 +57,7 @@ class Order extends Model { return $query->where('uuid', $uuid); } - + public function scopeByCustomer($query, $customer_id) { return $query->where('customer_id', $customer_id); diff --git a/app/Models/Shop/OrderDetail.php b/app/Models/Shop/OrderDetail.php index 066ffbb0..0b602599 100644 --- a/app/Models/Shop/OrderDetail.php +++ b/app/Models/Shop/OrderDetail.php @@ -7,6 +7,7 @@ use Illuminate\Database\Eloquent\Model; class OrderDetail extends Model { protected $guarded = ['id']; + protected $table = 'shop_order_details'; public function order() diff --git a/app/Models/Shop/Package.php b/app/Models/Shop/Package.php index b8e0a01a..6a8e12bb 100644 --- a/app/Models/Shop/Package.php +++ b/app/Models/Shop/Package.php @@ -7,6 +7,7 @@ use Illuminate\Database\Eloquent\Model; class Package extends Model { protected $guarded = ['id']; + protected $table = 'shop_packages'; public function article_family() @@ -31,6 +32,6 @@ class Package extends Model public function scopeByArticleNature($query, $id) { - return $query->where($this->table . '.article_family_id', $id); + return $query->where($this->table.'.article_family_id', $id); } } diff --git a/app/Models/Shop/Price.php b/app/Models/Shop/Price.php index d06ecf1e..22d313e8 100644 --- a/app/Models/Shop/Price.php +++ b/app/Models/Shop/Price.php @@ -10,6 +10,7 @@ class Price extends Model use HasRelationships; protected $guarded = ['id']; + protected $table = 'shop_prices'; public function article() @@ -24,11 +25,11 @@ class Price extends Model public function scopeByArticle($query, $id) { - return $query->where($this->table . '.article_id', $id); + return $query->where($this->table.'.article_id', $id); } public function scopeByArticleNature($query, $id) { - return $query->where($this->table . '.article_family_id', $id); + return $query->where($this->table.'.article_family_id', $id); } } diff --git a/app/Models/Shop/PriceGenericCategory.php b/app/Models/Shop/PriceGenericCategory.php index 7b90ef90..04185a2e 100644 --- a/app/Models/Shop/PriceGenericCategory.php +++ b/app/Models/Shop/PriceGenericCategory.php @@ -7,6 +7,7 @@ use Illuminate\Database\Eloquent\Model; class PriceGenericCategory extends Model { protected $guarded = ['id']; + protected $table = 'shop_price_generic_categories'; public function article_family() diff --git a/app/Models/Shop/PriceList.php b/app/Models/Shop/PriceList.php index b6ba3d50..114e066e 100644 --- a/app/Models/Shop/PriceList.php +++ b/app/Models/Shop/PriceList.php @@ -2,17 +2,16 @@ namespace App\Models\Shop; -use Illuminate\Database\Eloquent\Model; - -use Znck\Eloquent\Traits\BelongsToThrough; - use App\Traits\Model\HasComments; +use Illuminate\Database\Eloquent\Model; +use Znck\Eloquent\Traits\BelongsToThrough; class PriceList extends Model { use BelongsToThrough, HasComments; protected $guarded = ['id']; + protected $table = 'shop_price_lists'; public function tariff() @@ -37,17 +36,17 @@ class PriceList extends Model public function scopeByTariff($query, $id) { - return $query->where($this->table . '.tariff_id', $id); + return $query->where($this->table.'.tariff_id', $id); } public function scopeBySaleChannel($query, $id) { - return $query->where($this->table . '.sale_channel_id', $id); + return $query->where($this->table.'.sale_channel_id', $id); } public function scopeByStatus($query, $id) { - return $query->where($this->table . '.status_id', $id); + return $query->where($this->table.'.status_id', $id); } public function scopeActive($query) diff --git a/app/Models/Shop/PriceListValue.php b/app/Models/Shop/PriceListValue.php index ecab9985..5f91450f 100644 --- a/app/Models/Shop/PriceListValue.php +++ b/app/Models/Shop/PriceListValue.php @@ -4,7 +4,6 @@ namespace App\Models\Shop; use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\SoftDeletes; - use Wildside\Userstamps\Userstamps; use Znck\Eloquent\Traits\BelongsToThrough; @@ -13,6 +12,7 @@ class PriceListValue extends Model use BelongsToThrough, SoftDeletes, Userstamps; protected $guarded = ['id']; + protected $table = 'shop_price_list_values'; public function price_list() @@ -32,15 +32,16 @@ class PriceListValue extends Model public function scopeByPriceList($query, $id) { - return $query->where($this->table . '.price_list_id', $id); + return $query->where($this->table.'.price_list_id', $id); } public function scopeByQuantity($query, $quantity) { - return $query->orderBy('quantity', 'desc')->where($this->table . '.quantity', '<=', $quantity)->first(); + return $query->orderBy('quantity', 'desc')->where($this->table.'.quantity', '<=', $quantity)->first(); } - public function scopeBySaleChannel($query, $sale_channel_id) { + public function scopeBySaleChannel($query, $sale_channel_id) + { return $query->with([ 'price_list' => function ($query) use ($sale_channel_id) { return $query->bySaleChannel($sale_channel_id); diff --git a/app/Models/Shop/Producer.php b/app/Models/Shop/Producer.php index 17790fee..7804fc36 100644 --- a/app/Models/Shop/Producer.php +++ b/app/Models/Shop/Producer.php @@ -2,28 +2,27 @@ namespace App\Models\Shop; +use App\Traits\Model\Imageable; use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\SoftDeletes; - -use Spatie\MediaLibrary\HasMedia; -use Rinvex\Tags\Traits\Taggable; use Kirschbaum\PowerJoins\PowerJoins; +use Rinvex\Tags\Traits\Taggable; +use Spatie\MediaLibrary\HasMedia; use Wildside\Userstamps\Userstamps; -use App\Traits\Model\Imageable; - class Producer extends Model implements HasMedia { use Imageable, PowerJoins, SoftDeletes, Taggable, UserStamps; protected $guarded = ['id']; + protected $table = 'shop_producers'; public function Articles() { - + } - + public function Merchandises() { return $this->hasMany(Merchandise::class); diff --git a/app/Models/Shop/SaleChannel.php b/app/Models/Shop/SaleChannel.php index 42d57dfb..da3aae6b 100644 --- a/app/Models/Shop/SaleChannel.php +++ b/app/Models/Shop/SaleChannel.php @@ -7,6 +7,7 @@ use Illuminate\Database\Eloquent\Model; class SaleChannel extends Model { protected $guarded = ['id']; + protected $table = 'shop_sale_channels'; public function deliveries() @@ -26,6 +27,6 @@ class SaleChannel extends Model public function scopeByCode($query, $code) { - return $query->where($this->table . '.code', $code); + return $query->where($this->table.'.code', $code); } } diff --git a/app/Models/Shop/Shelve.php b/app/Models/Shop/Shelve.php index 2bdc71c3..4623584d 100644 --- a/app/Models/Shop/Shelve.php +++ b/app/Models/Shop/Shelve.php @@ -10,8 +10,9 @@ class Shelve extends Model use HasRelationships; protected $guarded = ['id']; + protected $table = 'categories'; - + public function articles() { return $this->hasMany(Article::class); diff --git a/app/Models/Shop/Tag.php b/app/Models/Shop/Tag.php index 0c8d8b7d..f57d5a39 100644 --- a/app/Models/Shop/Tag.php +++ b/app/Models/Shop/Tag.php @@ -2,15 +2,14 @@ namespace App\Models\Shop; -use Rinvex\Tags\Models\Tag as parentTag; - use App\Models\Botanic\Specie; use App\Models\Botanic\Variety; +use Rinvex\Tags\Models\Tag as parentTag; class Tag extends parentTag { - protected $guarded = ['id']; + protected $fillable = [ 'slug', 'name', @@ -19,6 +18,7 @@ class Tag extends parentTag 'group', 'tag_group_id', ]; + public $translatable = []; /* @@ -71,12 +71,12 @@ class Tag extends parentTag public function scopeByGroup($query, $id) { - return $query->where($this->table . '.tag_group_id', $id); + return $query->where($this->table.'.tag_group_id', $id); } public function scopeWithCountArticlesByCategory($query, $category_id) { - return $query->withCount(['articles' => function($query) use ($category_id) { + return $query->withCount(['articles' => function ($query) use ($category_id) { $query->byCategoryParent($category_id); }]); } diff --git a/app/Models/Shop/TagGroup.php b/app/Models/Shop/TagGroup.php index ccc9483b..b62ee6d3 100644 --- a/app/Models/Shop/TagGroup.php +++ b/app/Models/Shop/TagGroup.php @@ -2,17 +2,18 @@ namespace App\Models\Shop; +use Dyrynda\Database\Support\CascadeSoftDeletes; use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\SoftDeletes; -use Dyrynda\Database\Support\CascadeSoftDeletes; - class TagGroup extends Model { use CascadeSoftDeletes, SoftDeletes; - + protected $guarded = ['id']; + protected $table = 'tag_groups'; + protected $cascadeDeletes = ['tags']; public function tags() diff --git a/app/Models/Shop/Tariff.php b/app/Models/Shop/Tariff.php index 17484c86..7764c984 100644 --- a/app/Models/Shop/Tariff.php +++ b/app/Models/Shop/Tariff.php @@ -2,25 +2,24 @@ namespace App\Models\Shop; -use Illuminate\Database\Eloquent\Model; - -use Staudenmeir\EloquentHasManyDeep\HasRelationships; -use Kirschbaum\PowerJoins\PowerJoins; - use App\Traits\Model\HasComments; +use Illuminate\Database\Eloquent\Model; +use Kirschbaum\PowerJoins\PowerJoins; +use Staudenmeir\EloquentHasManyDeep\HasRelationships; class Tariff extends Model { use HasComments, HasRelationships, PowerJoins; protected $guarded = ['id']; + protected $table = 'shop_tariffs'; public function offers() { return $this->hasMany(Offer::class); } - + public function sale_channel() { return $this->belongsTo(SaleChannel::class); @@ -48,9 +47,9 @@ class Tariff extends Model public function scopeByAutocomplete($query, $str) { - return $query->where($this->table . '.name', 'LIKE', "%${str}%") - ->orWhere($this->table . '.ref', 'LIKE', "${str}%") - ->orWhere($this->table . '.code', 'LIKE', "${str}%"); + return $query->where($this->table.'.name', 'LIKE', "%${str}%") + ->orWhere($this->table.'.ref', 'LIKE', "${str}%") + ->orWhere($this->table.'.code', 'LIKE', "${str}%"); } public function scopeBySaleChannel($query, $id) @@ -62,12 +61,12 @@ class Tariff extends Model public function scopeBySaleChannelDefault($query, $id) { - return $query->where($this->table . '.sale_channel_id', $id); + return $query->where($this->table.'.sale_channel_id', $id); } public function scopeByStatus($query, $id) { - return $query->where($this->table . '.status_id', $id); + return $query->where($this->table.'.status_id', $id); } public function scopeByOffer($query, $id) diff --git a/app/Models/Shop/TariffUnity.php b/app/Models/Shop/TariffUnity.php index 38ddc57a..7a8ecd88 100644 --- a/app/Models/Shop/TariffUnity.php +++ b/app/Models/Shop/TariffUnity.php @@ -7,8 +7,9 @@ use Illuminate\Database\Eloquent\Model; class TariffUnity extends Model { protected $guarded = ['id']; + protected $table = 'shop_tariff_unities'; - + public function tariffs() { return $this->hasMany(Tariff::class); diff --git a/app/Models/Shop/Tax.php b/app/Models/Shop/Tax.php index 8715945a..1825059a 100644 --- a/app/Models/Shop/Tax.php +++ b/app/Models/Shop/Tax.php @@ -7,6 +7,7 @@ use Illuminate\Database\Eloquent\Model; class Tax extends Model { protected $guarded = ['id']; + protected $table = 'shop_taxes'; public function price() diff --git a/app/Models/Shop/Unity.php b/app/Models/Shop/Unity.php index de66a1c6..845171b2 100644 --- a/app/Models/Shop/Unity.php +++ b/app/Models/Shop/Unity.php @@ -4,7 +4,6 @@ namespace App\Models\Shop; use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\SoftDeletes; - use Znck\Eloquent\Traits\BelongsToThrough; class Unity extends Model @@ -12,6 +11,7 @@ class Unity extends Model use BelongsToThrough, softDeletes; protected $guarded = ['id']; + protected $table = 'shop_unities'; public function package() @@ -26,7 +26,7 @@ class Unity extends Model public function scopeByPackage($query, $id) { - return $query->where($this->table . '.package_id', $id); + return $query->where($this->table.'.package_id', $id); } public function scopeByArticleNature($query, $id) diff --git a/app/Models/Shop/Variation.php b/app/Models/Shop/Variation.php index d6dddcd6..a1be1576 100644 --- a/app/Models/Shop/Variation.php +++ b/app/Models/Shop/Variation.php @@ -2,17 +2,17 @@ namespace App\Models\Shop; -use Illuminate\Database\Eloquent\Model; - use App\Traits\Model\HasComments; +use Illuminate\Database\Eloquent\Model; class Variation extends Model { use HasComments; - + protected $guarded = ['id']; + protected $table = 'shop_variations'; - + public function package() { return $this->belongsTo(Package::class); @@ -30,6 +30,6 @@ class Variation extends Model public function scopeByPackage($query, $package_id) { - return $query->where($this->table . '.package_id', $package_id); + return $query->where($this->table.'.package_id', $package_id); } } diff --git a/app/Providers/AppServiceProvider.php b/app/Providers/AppServiceProvider.php index d062be15..de1e9d20 100644 --- a/app/Providers/AppServiceProvider.php +++ b/app/Providers/AppServiceProvider.php @@ -2,11 +2,10 @@ namespace App\Providers; -use Illuminate\Support\ServiceProvider; +use App\View\Composers\Shop\LayoutComposer; use Illuminate\Support\Facades\Schema; use Illuminate\Support\Facades\View; - -use App\View\Composers\Shop\LayoutComposer; +use Illuminate\Support\ServiceProvider; class AppServiceProvider extends ServiceProvider { diff --git a/app/Providers/AuthServiceProvider.php b/app/Providers/AuthServiceProvider.php index 30490683..b14e5898 100644 --- a/app/Providers/AuthServiceProvider.php +++ b/app/Providers/AuthServiceProvider.php @@ -3,7 +3,6 @@ namespace App\Providers; use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider; -use Illuminate\Support\Facades\Gate; class AuthServiceProvider extends ServiceProvider { diff --git a/app/Repositories/Botanic/Families.php b/app/Repositories/Botanic/Families.php index cd19da2b..79bddce7 100644 --- a/app/Repositories/Botanic/Families.php +++ b/app/Repositories/Botanic/Families.php @@ -2,21 +2,17 @@ namespace App\Repositories\Botanic; -use Illuminate\Support\Facades\Storage; -use Illuminate\Support\Facades\DB; -use Illuminate\Support\Str; - -use Yajra\DataTables\DataTables; -use Maatwebsite\Excel\Facades\Excel; - -use App\Models\Botanic\Family; use App\Exports\Botanic\FamiliesExport; +use App\Models\Botanic\Family; +use Maatwebsite\Excel\Facades\Excel; +use Yajra\DataTables\DataTables; class Families { public static function getDatatable() { $model = Family::orderBy('name'); + return Datatables::of($model)->make(true); } @@ -39,6 +35,7 @@ class Families { $id = isset($data['id']) ? $data['id'] : false; $item = $id ? self::update($data, $id) : self::create($data); + return $item->id; } @@ -52,6 +49,7 @@ class Families $id = $id ? $id : $data['id']; $item = self::get($id); $item->update($data); + return $item; } diff --git a/app/Repositories/Botanic/Genres.php b/app/Repositories/Botanic/Genres.php index bf04c3ea..8d7c91f8 100644 --- a/app/Repositories/Botanic/Genres.php +++ b/app/Repositories/Botanic/Genres.php @@ -2,14 +2,12 @@ namespace App\Repositories\Botanic; -use Maatwebsite\Excel\Facades\Excel; - -use App\Models\Botanic\Genre; use App\Exports\Botanic\GenresExport; +use App\Models\Botanic\Genre; +use Maatwebsite\Excel\Facades\Excel; class Genres { - public static function getOptions() { return Genre::get()->SortBy('name')->pluck('name', 'id')->toArray(); @@ -28,6 +26,7 @@ class Genres public static function store($data) { $item = ($data['id'] ?? false) ? self::update($data) : self::create($data); + return $item->id; } @@ -41,6 +40,7 @@ class Genres $id = $id ? $id : $data['id']; $model = self::get($id); $model->update($data); + return $model; } diff --git a/app/Repositories/Botanic/Species.php b/app/Repositories/Botanic/Species.php index 150ae039..eb346ef6 100644 --- a/app/Repositories/Botanic/Species.php +++ b/app/Repositories/Botanic/Species.php @@ -2,14 +2,11 @@ namespace App\Repositories\Botanic; -use Illuminate\Support\Str; - -use Maatwebsite\Excel\Facades\Excel; - -use App\Repositories\Core\Tag; -use App\Models\Botanic\Specie; use App\Exports\Botanic\SpeciesExport; +use App\Models\Botanic\Specie; +use App\Repositories\Core\Tag; use App\Traits\Repository\Imageable; +use Maatwebsite\Excel\Facades\Excel; class Species { @@ -33,6 +30,7 @@ class Species public static function getTags($id) { $model = self::get($id) ?? false; + return $model ? $model->tags->toArray() : false; } @@ -41,6 +39,7 @@ class Species $specie = self::get($id); $data = $specie->toArray(); $data['tags'] = self::getTagsBySpecie($specie); + return $data; } @@ -49,7 +48,6 @@ class Species return Tag::getTagsByModel($specie); } - public static function get($id) { return Specie::with('tags.tag_group')->find($id); @@ -64,6 +62,7 @@ class Species $specie = self::store($data); self::storeImages($specie, $images); self::storeTags($specie, $tags); + return $specie; } @@ -82,6 +81,7 @@ class Species $id = $id ? $id : $data['id']; $model = self::get($id); $ret = $model->update($data); + return $model; } diff --git a/app/Repositories/Botanic/Varieties.php b/app/Repositories/Botanic/Varieties.php index efc7b278..cc4ea39e 100644 --- a/app/Repositories/Botanic/Varieties.php +++ b/app/Repositories/Botanic/Varieties.php @@ -2,14 +2,11 @@ namespace App\Repositories\Botanic; -use Illuminate\Support\Str; - -use Maatwebsite\Excel\Facades\Excel; - -use App\Repositories\Core\Tag; -use App\Models\Botanic\Variety; use App\Exports\Botanic\VarietiesExport; +use App\Models\Botanic\Variety; +use App\Repositories\Core\Tag; use App\Traits\Repository\Imageable; +use Maatwebsite\Excel\Facades\Excel; class Varieties { @@ -25,9 +22,10 @@ class Varieties $varieties = Variety::with('specie')->get(); $data = []; foreach ($varieties as $variety) { - $data[$variety->id] = (isset($variety->specie->name) ? $variety->specie->name . ' ' : '') . $variety->name; + $data[$variety->id] = (isset($variety->specie->name) ? $variety->specie->name.' ' : '').$variety->name; } asort($data, SORT_NATURAL | SORT_FLAG_CASE); + return $data; } @@ -56,6 +54,7 @@ class Varieties $variety = self::get($id); $data = $variety->toArray(); $data['tags'] = self::getTagsByVariety($variety); + return $data; } @@ -73,6 +72,7 @@ class Varieties $variety = self::store($data); self::storeImages($variety, $images); self::storeTags($variety, $tags); + return $variety; } @@ -91,6 +91,7 @@ class Varieties $id = $id ? $id : $data['id']; $variety = self::get($id); $ret = $variety->update($data); + return $variety; } diff --git a/app/Repositories/Cities.php b/app/Repositories/Cities.php index 2d03a86d..7c5b8e55 100644 --- a/app/Repositories/Cities.php +++ b/app/Repositories/Cities.php @@ -2,10 +2,8 @@ namespace App\Repositories; -use Illuminate\Support\Facades\DB; - -use App\Http\Controllers\Controller; use App\Models\City; +use Illuminate\Support\Facades\DB; class Cities { @@ -22,13 +20,15 @@ class Cities public static function getCPByCity($id) { $ville = self::get($id); - $codes = explode("-", $ville->code_postal); + $codes = explode('-', $ville->code_postal); + return $codes; } public static function getNomByCity($id) { $ville = self::get($id); + return $ville->nom; } @@ -44,23 +44,24 @@ class Cities // dump($adresse); $geocode = app('geocoder')->geocode($adresse)->get(); // dump($geocode); - if (!count($geocode)) { + if (! count($geocode)) { return false; } - // dump($geocode); - $res = $geocode[0]->getCoordinates()->toArray(); - // dump($res); - $latitude = $res[0]; - $longitude = $res[1]; - // dump($latitude); - // dump($longitude); - return ['latitude' => $latitude, 'longitude' => $longitude]; - + // dump($geocode); + $res = $geocode[0]->getCoordinates()->toArray(); + // dump($res); + $latitude = $res[0]; + $longitude = $res[1]; + // dump($latitude); + // dump($longitude); + return ['latitude' => $latitude, 'longitude' => $longitude]; + } public static function getCoordsByCity($id) { $ville = City::find($id); + return ['latitude' => $ville->latitude, 'longitude' => $ville->longitude]; } } diff --git a/app/Repositories/Config.php b/app/Repositories/Config.php index 21e36112..c3b91d57 100644 --- a/app/Repositories/Config.php +++ b/app/Repositories/Config.php @@ -2,7 +2,6 @@ namespace App\Repositories; -use App\Repositories\Users; use App\Repositories\Shop\Categories; use App\Repositories\Shop\Homepages; diff --git a/app/Repositories/Core/App/ApplicationClients.php b/app/Repositories/Core/App/ApplicationClients.php index 4a178cc3..ff6a7d34 100644 --- a/app/Repositories/Core/App/ApplicationClients.php +++ b/app/Repositories/Core/App/ApplicationClients.php @@ -10,7 +10,7 @@ class ApplicationClients public static function associate($client_id, $applications_list) { $applications_existing = self::getApplicationsByClient($client_id); - $applications_list = is_array($applications_list) ? $applications_list : array(); + $applications_list = is_array($applications_list) ? $applications_list : []; if (is_array($applications_existing)) { $applications_new = array_diff($applications_list, $applications_existing); @@ -20,9 +20,9 @@ class ApplicationClients $applications_to_delete = []; } - $history_element_infos = (!empty($applications_new)) ? self::associateApplications($client_id, $applications_new) : false; - $history_element_infos2 = (!empty($applications_to_delete)) ? self::dissociateApplications($client_id, $applications_to_delete) : false; - + $history_element_infos = (! empty($applications_new)) ? self::associateApplications($client_id, $applications_new) : false; + $history_element_infos2 = (! empty($applications_to_delete)) ? self::dissociateApplications($client_id, $applications_to_delete) : false; + $data['nb'] = self::countByClient($client_id); return $data; @@ -42,12 +42,13 @@ class ApplicationClients self::associateApplication($client_id, $application_id); } } + return true; } public static function associateApplication($client_id, $application_id) { - return ApplicationClient::create(['client_id' => $client_id, 'application_id' => $application_id, 'active' => true ]); + return ApplicationClient::create(['client_id' => $client_id, 'application_id' => $application_id, 'active' => true]); } public static function dissociateApplications($client_id, $applications) @@ -56,6 +57,7 @@ class ApplicationClients foreach ($applications as $key => $application_id) { self::dissociateApplication($client_id, $application_id); } + return true; } @@ -86,6 +88,6 @@ class ApplicationClients public static function isActiveByName($name) { - return (!Clients::isClient()) ? true : ApplicationClient::bySlug($name)->byClient(Clients::getId())->first()->active ?? false; + return (! Clients::isClient()) ? true : ApplicationClient::bySlug($name)->byClient(Clients::getId())->first()->active ?? false; } } diff --git a/app/Repositories/Core/App/ApplicationModules.php b/app/Repositories/Core/App/ApplicationModules.php index 92fd808f..a5cada87 100644 --- a/app/Repositories/Core/App/ApplicationModules.php +++ b/app/Repositories/Core/App/ApplicationModules.php @@ -24,6 +24,7 @@ class ApplicationModules public static function store($data) { $id = isset($data['id']) ? $data['id'] : false; + return $id ? self::update($data, $id) : self::create($data); } @@ -35,6 +36,7 @@ class ApplicationModules public static function update($data, $id = false) { $id = $id ? $id : $data['id']; + return self::get($id)->update($data); } @@ -47,7 +49,7 @@ class ApplicationModules { return self::get($id)->name; } - + public static function get($id) { return ApplicationModule::findOrFail($id); diff --git a/app/Repositories/Core/App/ApplicationPages.php b/app/Repositories/Core/App/ApplicationPages.php index fbe40285..e27e6d82 100644 --- a/app/Repositories/Core/App/ApplicationPages.php +++ b/app/Repositories/Core/App/ApplicationPages.php @@ -1,4 +1,5 @@ byApplication($application_id)->bySlug($slug)->first(); + return $app ? $app->toArray() : null; } public static function getActiveByApplication($application_id) { $app = ApplicationPage::active()->byApplication($application_id)->get(); + return $app ? $app->toArray() : null; } } diff --git a/app/Repositories/Core/App/Applications.php b/app/Repositories/Core/App/Applications.php index 352f9eb6..494c5189 100644 --- a/app/Repositories/Core/App/Applications.php +++ b/app/Repositories/Core/App/Applications.php @@ -2,15 +2,12 @@ namespace App\Repositories\Core\App; -use Illuminate\Support\Facades\Route; - use App\Models\Core\App\Application; -use App\Repositories\Core\App\ApplicationPages; use App\Repositories\Languages; +use Illuminate\Support\Facades\Route; class Applications { - public static function getFullBySlug($slug) { return Application::with('clients')->active()->bySlug($slug)->first(); @@ -34,6 +31,7 @@ class Applications public static function store($data) { $id = isset($data['id']) ? $data['id'] : false; + return $id ? self::update($data, $id) : self::create($data); } @@ -47,6 +45,7 @@ class Applications $id = $id ? $id : $data['id']; $item = self::get($id); $item->update($data); + return $item; } @@ -59,7 +58,7 @@ class Applications { return self::get($id)->name; } - + public static function get($id) { return Application::findOrFail($id); @@ -83,6 +82,7 @@ class Applications } $data['langs'] = Languages::getActive(); $data['lang'] = Languages::getCurrent(); + return $data; } @@ -106,11 +106,13 @@ class Applications return Application::active()->bySlug($slug)->first(); } - public static function toggleActive($id, $active) { + public static function toggleActive($id, $active) + { return self::update(['active' => $active], $id); } - public static function toggleVisible($id, $visible) { + public static function toggleVisible($id, $visible) + { return self::update(['visible' => $visible], $id); } } diff --git a/app/Repositories/Core/Arrays.php b/app/Repositories/Core/Arrays.php index 2960f0d7..b536d6d2 100644 --- a/app/Repositories/Core/Arrays.php +++ b/app/Repositories/Core/Arrays.php @@ -14,6 +14,7 @@ class Arrays } } unset($array[$oldkey]); + return $array; } @@ -35,31 +36,32 @@ class Arrays public static function alternate_chunk($array, $parts) { $t = 0; - $result = array(); + $result = []; $max = ceil(count($array) / $parts); foreach (array_chunk($array, $max) as $v) { if ($t < $parts) { $result[] = $v; } else { foreach ($v as $d) { - $result[] = array($d); + $result[] = [$d]; } } $t += count($v); } + return $result; } - - + public static function fill_chunk($array, $parts) { $t = 0; - $result = array_fill(0, $parts - 1, array()); + $result = array_fill(0, $parts - 1, []); $max = ceil(count($array) / $parts); foreach ($array as $v) { - count($result[$t]) >= $max and $t ++; + count($result[$t]) >= $max and $t++; $result[$t][] = $v; } + return $result; } } diff --git a/app/Repositories/Core/Auth/PasswordSecurities.php b/app/Repositories/Core/Auth/PasswordSecurities.php index b7738293..bdf1662c 100644 --- a/app/Repositories/Core/Auth/PasswordSecurities.php +++ b/app/Repositories/Core/Auth/PasswordSecurities.php @@ -2,8 +2,8 @@ namespace App\Repositories\Core\Auth; -use Carbon\Carbon; use App\Models\Core\Auth\PasswordSecurity; +use Carbon\Carbon; class PasswordSecurities { @@ -16,12 +16,13 @@ class PasswordSecurities ]); } - public static function getUserName($id) { + public static function getUserName($id) + { return self::getUser($id)->username; } - public static function getUser($id) { + public static function getUser($id) + { return PasswordSecurity::with('user')->find($id)->user; } - } diff --git a/app/Repositories/Core/Auth/Passwords.php b/app/Repositories/Core/Auth/Passwords.php index 7056ad6e..72f87bdb 100644 --- a/app/Repositories/Core/Auth/Passwords.php +++ b/app/Repositories/Core/Auth/Passwords.php @@ -2,19 +2,6 @@ namespace App\Repositories\Core\Auth; -use Illuminate\Support\Facades\DB; -use Illuminate\Support\Facades\Auth; - -use LangleyFoxall\LaravelNISTPasswordRules\PasswordRules; -use LangleyFoxall\LaravelNISTPasswordRules\ContextSpecificWords; -use LangleyFoxall\LaravelNISTPasswordRules\DerivativesOfContextSpecificWords; -use LangleyFoxall\LaravelNISTPasswordRules\RepetitiveCharacters; -use LangleyFoxall\LaravelNISTPasswordRules\SequentialCharacters; - - - -use App\Repositories\Users; - class Passwords { public static function validator() @@ -27,9 +14,9 @@ class Passwords $validator->setMinSymbols(3); if ($validator->isValid($password)) { - printf('password %s is valid' . PHP_EOL, $password); + printf('password %s is valid'.PHP_EOL, $password); } else { - printf('password %s is invalid' . PHP_EOL, $password); + printf('password %s is invalid'.PHP_EOL, $password); var_dump($validator->getErrors()); } } diff --git a/app/Repositories/Core/Auth/Permissions.php b/app/Repositories/Core/Auth/Permissions.php index 398d5519..1a814bf7 100644 --- a/app/Repositories/Core/Auth/Permissions.php +++ b/app/Repositories/Core/Auth/Permissions.php @@ -1,12 +1,9 @@ make(true); } public static function delete($id) { Users::destroyByUniquePermission($id); + return Permission::destroy($id); } @@ -70,6 +69,7 @@ class Permissions public static function create($data) { $permission = Permission::create($data); + return $permission; } diff --git a/app/Repositories/Core/Auth/Roles.php b/app/Repositories/Core/Auth/Roles.php index f696f781..beca9069 100644 --- a/app/Repositories/Core/Auth/Roles.php +++ b/app/Repositories/Core/Auth/Roles.php @@ -2,21 +2,20 @@ namespace App\Repositories\Core\Auth; -use Illuminate\Support\Facades\DB; +use App\Models\Core\Auth\Role; +use App\Models\Core\Auth\RoleUser; use Illuminate\Support\Facades\Auth; use Laratrust\Traits\LaratrustUserTrait; use Yajra\DataTables\DataTables; -use App\Models\Core\Auth\Role; -use App\Models\Core\Auth\RoleUser; - class Roles { use LaratrustUserTrait; public static function getListByRights() { - $data = (!Auth::user()->hasRole('admin')) ? Role::whereNotIn('name', ['admin'])->get() : Role::all(); + $data = (! Auth::user()->hasRole('admin')) ? Role::whereNotIn('name', ['admin'])->get() : Role::all(); + return $data->pluck('name', 'id')->toArray(); } @@ -32,6 +31,7 @@ class Roles $data['active'] = true; $role = Role::create($data); $role->attachPermissions($permissions); + return $role; } @@ -43,6 +43,7 @@ class Roles $role = self::get($id); $role->update(['name' => $input['name']]); $role->syncPermissions($permissions); + return $role; } @@ -68,6 +69,7 @@ class Roles { $role = self::get($id)->toArray(); $role['permissions'] = self::get($id)->permissions->pluck('id')->toArray(); + return $role; } @@ -89,12 +91,14 @@ class Roles public static function getTable($id) { $datas = Role::orderBy('name', 'asc'); + return Datatables::of($datas)->make(true); } public static function getRolesByUser($user_id = false) { $user_id = $user_id ? $user_id : Users::getId(); + return RoleUser::byUser($user_id); } diff --git a/app/Repositories/Core/Auth/Teams.php b/app/Repositories/Core/Auth/Teams.php index c2f245a8..faf8a2b9 100644 --- a/app/Repositories/Core/Auth/Teams.php +++ b/app/Repositories/Core/Auth/Teams.php @@ -2,15 +2,11 @@ namespace App\Repositories\Core\Auth; -use Illuminate\Support\Facades\DB; -use Illuminate\Support\Facades\Auth; -use Laratrust\Traits\LaratrustUserTrait; -use Yajra\DataTables\DataTables; - use App\Models\Core\Auth\Team; use App\Models\Core\Auth\TeamUser; - use App\Repositories\Users; +use Laratrust\Traits\LaratrustUserTrait; +use Yajra\DataTables\DataTables; class Teams { @@ -19,6 +15,7 @@ class Teams public static function getTeamsByUser($user_id = false) { $user_id = $user_id ? $user_id : Users::getId(); + return TeamUser::byUser($user_id); } @@ -75,12 +72,14 @@ class Teams public static function getTable($id) { $datas = Team::with(['societe'])->withCount(['users']); + return Datatables::of($datas)->make(true); } public static function delete($id) { Users::destroyByUniqueTeam($id); + return Team::destroy($id); } @@ -97,6 +96,7 @@ class Teams if (isset($data['id']) && $data['id']) { return self::update($data); } + return self::create($data); } diff --git a/app/Repositories/Core/Auth/UserClients.php b/app/Repositories/Core/Auth/UserClients.php index e7a2052f..b6412d30 100644 --- a/app/Repositories/Core/Auth/UserClients.php +++ b/app/Repositories/Core/Auth/UserClients.php @@ -2,9 +2,8 @@ namespace App\Repositories\Core\Auth; -use App\Models\Core\Auth\UserClient; use App\Models\Core\Auth\User; - +use App\Models\Core\Auth\UserClient; use App\Repositories\Clients; class UserClients @@ -12,7 +11,7 @@ class UserClients public static function associate($user_id, $clients_list) { $clients_existing = self::getClientsByUser($user_id)->toArray(); - $clients_list = is_array($clients_list) ? $clients_list : array(); + $clients_list = is_array($clients_list) ? $clients_list : []; if (is_array($clients_existing)) { $clients_new = array_diff($clients_list, $clients_existing); @@ -22,9 +21,9 @@ class UserClients $clients_to_delete = $clients_existing; } - $history_element_infos = (!empty($clients_new)) ? self::associateClients($user_id, $clients_new) : false; - $history_element_infos2 = (!empty($clients_to_delete)) ? self::dissociateClients($user_id, $clients_to_delete) : false; - + $history_element_infos = (! empty($clients_new)) ? self::associateClients($user_id, $clients_new) : false; + $history_element_infos2 = (! empty($clients_to_delete)) ? self::dissociateClients($user_id, $clients_to_delete) : false; + // $history_element = $old_translated_name['name']; // $history_element_id = $documentation_category_id; // Histories::insert(190, $history_element_id, $history_element); @@ -41,20 +40,22 @@ class UserClients public static function associateClients($user_id, $clients) { - $history = ""; + $history = ''; foreach ($clients as $key => $client_id) { $client = Clients::get($client_id); if ($client) { self::associate_client($user_id, $client_id); - $history .= $client['name'] . "| "; + $history .= $client['name'].'| '; } } + return $history; } public static function associate_client($user_id, $client_id) { self::copyUser($user_id, $client_id); + return UserClient::create(['user_id' => $user_id, 'client_id' => $client_id]); } @@ -83,7 +84,7 @@ class UserClients $password = $user->password; Clients::switchClient($client_id); $client_user = User::on($connection->tenantName())->withTrashed()->where('username', $user->username)->first(); - if (!$client_user) { + if (! $client_user) { $user = $user->toArray(); $user['password'] = $password; unset($user['id']); @@ -106,17 +107,19 @@ class UserClients public static function dissociateClients($user_id, $clients) { - $history = ""; + $history = ''; foreach ($clients as $key => $client_id) { self::dissociate_client($user_id, $client_id); - $history .= $client['name'] . "| "; + $history .= $client['name'].'| '; } + return $history; } public static function dissociate_client($user_id, $client_id) { self::deleteUser($user_id, $client_id); + return UserClient::byUser($user_id)->byClient($client_id)->delete(); } diff --git a/app/Repositories/Core/Auth/Users.php b/app/Repositories/Core/Auth/Users.php index b7112874..d909fd74 100644 --- a/app/Repositories/Core/Auth/Users.php +++ b/app/Repositories/Core/Auth/Users.php @@ -2,18 +2,15 @@ namespace App\Repositories\Core\Auth; +use App\Models\Core\Auth\RoleUser; +use App\Models\Core\Auth\User; +use App\Repositories\Core\Upload; +use Illuminate\Support\Facades\Auth; use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\Hash; -use Illuminate\Support\Facades\Auth; use Illuminate\Support\Str; - -use Laratrust\Traits\LaratrustUserTrait; use LangleyFoxall\LaravelNISTPasswordRules\PasswordRules; - -use App\Models\Core\Auth\User; -use App\Models\Core\Auth\RoleUser; - -use App\Repositories\Core\Upload; +use Laratrust\Traits\LaratrustUserTrait; class Users { @@ -27,7 +24,7 @@ class Users public static function getInfo($id = false) { $id = $id ? $id : self::getId(); - if (!$id) { + if (! $id) { return false; } $user = self::get($id); @@ -36,6 +33,7 @@ class Users $data['avatar'] = self::getAvatar($id); $data['roles'] = $user->roles->pluck('id')->toArray(); $data['permissions'] = $user->allPermissions()->pluck('id')->toArray(); + return $data; } @@ -46,6 +44,7 @@ class Users } $user = ($data['id'] ?? false) ? self::update($data) : self::create($data); $user->roles()->sync(array_keys($data['roles'] ?? [])); + return $user; } @@ -56,6 +55,7 @@ class Users $data['active'] = true; $user = User::create($data); PasswordSecurities::create($user->id); + return $user; } @@ -64,25 +64,29 @@ class Users $id = $id ? $id : $data['id']; $user = self::get($id); $ret = $user->update($data); + return $user; } public static function get($id = false) { $id = $id ? $id : self::getId(); + return User::findOrFail($id); } public static function getId() { $user = self::getUser(); + return $user ? $user->id : false; } public static function getName($id = false) { $user = $id ? self::get($id) : self::getUser(); - return $user->first_name . ' ' . $user->last_name; + + return $user->first_name.' '.$user->last_name; } public static function getUsername($id = false) @@ -108,6 +112,7 @@ class Users public static function delete($id) { $ret = RoleUser::byUser($id)->delete(); + return User::destroy($id); } @@ -119,6 +124,7 @@ class Users public static function hasRole($role, $user = false) { $user = $user ? $user : self::getUser(); + return $user ? $user->hasRole($role) : false; } @@ -129,14 +135,15 @@ class Users } $user = $user ? $user : self::getUser(); $permissions = self::getPermissions($user); + return $user ? self::checkPermission($permissions, $permission) : false; // TODO why is posing problem ??? - // return $user ? $user->hasPermission($permission) : false; + // return $user ? $user->hasPermission($permission) : false; } public static function checkPermission($permissions, $permission) { - if (!strpos($permission, '*')) { + if (! strpos($permission, '*')) { return in_array($permission, $permissions); } $permission = str_replace('*', '', $permission); @@ -145,12 +152,14 @@ class Users return true; } } + return false; } public static function getRoles($user = false) { $user = $user ? $user : self::getUser(); + return $user ? $user->roles->pluck('name')->toArray() : false; } @@ -158,10 +167,11 @@ class Users { return Roles::getListByRights(); } - + public static function getPermissions($user = false) { $user = $user ? $user : self::getUser(); + return $user ? $user->allPermissions()->pluck('name')->toArray() : false; } @@ -183,11 +193,12 @@ class Users public static function getAvatar($user_id) { $avatar = self::get($user_id)->avatar; - if (!$avatar) { + if (! $avatar) { return '/assets/img/no-avatar.png'; } $path = '/images/avatars/'; - return $path . $avatar; + + return $path.$avatar; } public static function selectOptions() @@ -233,6 +244,7 @@ class Users $file_uploaded = Upload::store($file, $targetDir); $tab = pathinfo($file_uploaded); $response['name'] = $tab['basename']; + return $response; } @@ -244,6 +256,7 @@ class Users public static function update_password($id, $password) { $password = Hash::make($password); + return User::find($id)->update(['password' => $password]); } diff --git a/app/Repositories/Core/Categories.php b/app/Repositories/Core/Categories.php index 0ee02549..2a24bd3f 100644 --- a/app/Repositories/Core/Categories.php +++ b/app/Repositories/Core/Categories.php @@ -2,29 +2,30 @@ namespace App\Repositories\Core; -use App\Repositories\Core\Arrays; use App\Models\Shop\Category; class Categories { - public static function getFancyTree() { $categories = self::getTree(true); $categories = Arrays::changeKeyName($categories, 'title', 'name'); $categories = Arrays::changeKeyName($categories, 'key', 'id'); + return $categories; } public static function getTreeVisibles($withFolder = false) { $categories = self::getCategoryTreeVisibles()->toArray(); + return $categories ? self::getChildren($categories[0]['children'], $withFolder) : []; } public static function getTree($withFolder = false) { $categories = self::getCategoryTree()->toArray(); + return self::getChildren($categories[0]['children'], $withFolder); } @@ -58,6 +59,7 @@ class Categories } // $tree = collect($tree)->sortBy('name')->toArray(); $tree = collect($tree)->toArray(); + return $tree; } @@ -77,15 +79,16 @@ class Categories break; } $category->save(); - return "1"; - } + return '1'; + } public static function create($data) { $parent = ($data['parent_id'] ?? false) ? self::getNode($data['parent_id']) : self::getRoot(); $category = self::getModel()->create(['name' => $data['name']]); $category->appendToNode($parent)->save(); + return $category; } @@ -94,6 +97,7 @@ class Categories $id = $id ? $id : $data['id']; $item = self::getNode($id); $item->update($data); + return $item; } diff --git a/app/Repositories/Core/Comments.php b/app/Repositories/Core/Comments.php index a61e7496..5e2b6595 100644 --- a/app/Repositories/Core/Comments.php +++ b/app/Repositories/Core/Comments.php @@ -2,15 +2,12 @@ namespace App\Repositories\Core; -use BeyondCode\Comments\Comment; +use App\Datatables\Admin\Core\CommentsDataTable; use App\Models\Core\Comment as rawComment; use App\Repositories\Core\Auth\Users; -use App\Datatables\Admin\Core\CommentsDataTable; - class Comments { - public static function get($id) { return rawComment::find($id); @@ -19,12 +16,14 @@ class Comments public static function getDatatable() { $model = new CommentsDataTable(); + return $model->html(); } public static function getCommentsByModel($model, $model_id) { $class = self::getClass($model); + return self::getCommentsByClass($class, $model_id); } @@ -40,14 +39,14 @@ class Comments public static function getClass($model) { - return 'App\Models\\' . str_replace('.', '\\', $model); + return 'App\Models\\'.str_replace('.', '\\', $model); } - + public static function getByModel($model) { return $model ? $model->comments->sortByDesc('updated_at')->toArray() : false; } - + public static function storeComments($model, $comments) { foreach (($comments ?? []) as $comment) { @@ -66,6 +65,7 @@ class Comments unset($data['_token']); $data['commentable_type'] = Comments::getClass($data['commentable_type']); $data['commentable_id'] = (int) $data['commentable_id']; + return $id ? self::update($data, $id) : self::create($data); } @@ -74,6 +74,7 @@ class Comments unset($data['id']); $data['is_approved'] = true; $data['user_id'] = Users::getId(); + return rawComment::create($data); } @@ -82,6 +83,7 @@ class Comments $id = $id ? $id : $data['id']; $model = self::get($id); $model->update($data); + return $model; } diff --git a/app/Repositories/Core/Database.php b/app/Repositories/Core/Database.php index 32725c70..c3194fcc 100644 --- a/app/Repositories/Core/Database.php +++ b/app/Repositories/Core/Database.php @@ -2,8 +2,8 @@ namespace App\Repositories\Core; -use Illuminate\Support\Facades\Schema; use Collective\Html\Eloquent\Form; +use Illuminate\Support\Facades\Schema; class Database { @@ -13,20 +13,21 @@ class Database $data = self::getTableFields($model); foreach ($data as $item) { switch ($item['type']) { - case 'integer': - $form .= Form::number($item['name']); - break; - case 'string': - $form .= Form::number($item['name']); - break; - case 'date': - $form .= Form::date($item['name']); - break; - case 'boolean': - $form .= Form::checkbox($item['name']); - break; + case 'integer': + $form .= Form::number($item['name']); + break; + case 'string': + $form .= Form::number($item['name']); + break; + case 'date': + $form .= Form::date($item['name']); + break; + case 'boolean': + $form .= Form::checkbox($item['name']); + break; } } + return $form; } @@ -40,6 +41,7 @@ class Database $type = Schema::getColumnType($table->getTable(), $column); array_push($data, ['name' => $column, 'type' => $type]); } + return $data; } diff --git a/app/Repositories/Core/DateCalculation.php b/app/Repositories/Core/DateCalculation.php index ba9e4f31..6fb71224 100644 --- a/app/Repositories/Core/DateCalculation.php +++ b/app/Repositories/Core/DateCalculation.php @@ -2,9 +2,7 @@ namespace App\Repositories\Core; -use Illuminate\Support\Str; use Carbon\Carbon; -use Jenssegers\Date\Date; class DateCalculation { diff --git a/app/Repositories/Core/DateHelper.php b/app/Repositories/Core/DateHelper.php index db89a6c1..7d4a7323 100644 --- a/app/Repositories/Core/DateHelper.php +++ b/app/Repositories/Core/DateHelper.php @@ -2,8 +2,7 @@ namespace App\Repositories\Core; -use \Carbon\Carbon; -use \League\Period\Period; +use Carbon\Carbon; class DateHelper { @@ -31,17 +30,18 @@ class DateHelper { $quarter = Carbon::now()->quarter; switch ($quarter) { - case 1: - case 2: - $date = Carbon::now()->startOfYear(); - break; - case 3: - $date = Carbon::now()->startOfQuarter(); - break; - case 4: - $date = Carbon::now()->subMonth(3)->startOfQuarter(); - break; + case 1: + case 2: + $date = Carbon::now()->startOfYear(); + break; + case 3: + $date = Carbon::now()->startOfQuarter(); + break; + case 4: + $date = Carbon::now()->subMonth(3)->startOfQuarter(); + break; } + return $date; } diff --git a/app/Repositories/Core/DateRange.php b/app/Repositories/Core/DateRange.php index 58a3eb1a..6a25c826 100644 --- a/app/Repositories/Core/DateRange.php +++ b/app/Repositories/Core/DateRange.php @@ -3,16 +3,11 @@ namespace App\Repositories\Core; use Carbon\Carbon; -use League\Period\Period; -use League\Period\Duration; -use League\Period\Sequence; -use League\Period\Chart\Dataset; -use function League\Period\duration; use function League\Period\interval_after; +use League\Period\Period; class DateRange { - public static function today() { return self::previousDay(0); @@ -72,6 +67,7 @@ class DateRange foreach ($labels as $label) { $data[$label] = $periods; } + return $data; } @@ -85,6 +81,7 @@ class DateRange $end = $with_actual ? Carbon::now()->endOfMonth() : self::lastMonth(); $begin = ($nb == 1) ? $end->copy()->startOfMonth() : $end->copy()->startOfMonth()->subMonth($nb - 1); $t = self::getPeriodsbyMonth($begin, $end); + return self::getPeriodsbyMonth($begin, $end); } @@ -95,6 +92,7 @@ class DateRange $date = self::DatePointToCarbon($period->getStartDate()); $months[] = DateTime::getMonthName($date); } + return $months; } @@ -104,6 +102,7 @@ class DateRange foreach ($periods as $period) { $months[] = DateTime::getMonthName($period['start']); } + return $months; } @@ -111,6 +110,7 @@ class DateRange { $end = $with_actual ? Carbon::now()->endOfWeek() : self::lastWeek(); $begin = $end->copy()->subWeek($nb); + return self::getPeriodsbyWeek($begin, $end); } @@ -118,6 +118,7 @@ class DateRange { $end = $with_actual ? Carbon::now()->endOfDay() : static::lastDay(); $begin = $end->copy()->subDay($nb); + return self::getPeriodsbyDay($begin, $end); } @@ -156,6 +157,7 @@ class DateRange $date = Carbon::now()->subMonth(3)->startOfQuarter(); break; } + return [$date, $date->addMonth(6)]; } @@ -200,6 +202,7 @@ class DateRange foreach ($period->getDatePeriod($duration) as $day) { $daterange[] = interval_after($day, $duration); } + return $daterange; } @@ -209,6 +212,7 @@ class DateRange foreach ($periods as $period) { $data[] = self::PeriodToCarbon($period); } + return $data; } diff --git a/app/Repositories/Core/DateStats.php b/app/Repositories/Core/DateStats.php index 9d6e6c3f..68587568 100644 --- a/app/Repositories/Core/DateStats.php +++ b/app/Repositories/Core/DateStats.php @@ -11,6 +11,7 @@ trait DateStats { $start = Carbon::now()->startOfMonth($prev); $end = Carbon::now()->endOfMonth($prev); + return self::countByPeriod($start, $end); } @@ -23,12 +24,14 @@ trait DateStats { $start = Carbon::now()->startOfMonth($prev); $end = Carbon::now()->endOfMonth($prev); + return self::avgByPeriod($start, $end, $field); } public static function avgByPeriod($start, $end, $field) { $c = self::countByPeriod($start, $end); + return $c ? round(self::sumByPeriod($start, $end, $field) / $c, 2) : 0; } @@ -36,6 +39,7 @@ trait DateStats { $start = Carbon::now()->startOfMonth($prev); $end = Carbon::now()->endOfMonth($prev); + return self::sumByPeriod($start, $end, $field); } diff --git a/app/Repositories/Core/DateTime.php b/app/Repositories/Core/DateTime.php index a396eab2..a6367f63 100644 --- a/app/Repositories/Core/DateTime.php +++ b/app/Repositories/Core/DateTime.php @@ -2,12 +2,10 @@ namespace App\Repositories\Core; -use Illuminate\Support\Str; use Carbon\Carbon; +use Illuminate\Support\Str; use Jenssegers\Date\Date; -use App\Repositories\Languages; - class DateTime { public static function getMonthName($date, $short = true) @@ -33,22 +31,24 @@ class DateTime public static function DatetoLocale($date = null) { $format = self::getLocaleFormatDate(); - if (!is_null($date) && !empty($date)) { + if (! is_null($date) && ! empty($date)) { $date = Carbon::parse($date)->format($format); } elseif ($date == 'now') { $date = today()->format($format); } + return $date; } public static function DatetimeToLocale($date = null) { $format = self::getLocaleFormatDatetime(); - if (!is_null($date) && !empty($date)) { + if (! is_null($date) && ! empty($date)) { $date = Carbon::parse($date)->format($format); } elseif ($date == 'now') { $date = now()->format($format); } + return $date; } @@ -70,7 +70,8 @@ class DateTime public static function convert($date) { $format = self::getLocaleFormatDate(); - return !empty($date) ? Carbon::createFromFormat($format, $date)->isoFormat('Y-MM-DD') : null; + + return ! empty($date) ? Carbon::createFromFormat($format, $date)->isoFormat('Y-MM-DD') : null; } public static function convertTime($date) @@ -79,17 +80,18 @@ class DateTime if (strlen($date) == 16) { $date .= ':00'; } - return !empty($date) ? Carbon::createFromFormat($format, $date)->isoFormat('Y-MM-DD HH:mm:ss') : null; + + return ! empty($date) ? Carbon::createFromFormat($format, $date)->isoFormat('Y-MM-DD HH:mm:ss') : null; } public static function toFr($date) { - return !empty($date) ? Carbon::parse($date)->isoFormat('DD/MM/Y') : null; + return ! empty($date) ? Carbon::parse($date)->isoFormat('DD/MM/Y') : null; } public static function toFrTime($date) { - return !empty($date) ? Carbon::parse($date)->isoFormat('DD/MM/Y HH:mm:ss') : null; + return ! empty($date) ? Carbon::parse($date)->isoFormat('DD/MM/Y HH:mm:ss') : null; } public static function getYearFromDate($date) @@ -97,10 +99,10 @@ class DateTime // return date_format(DateTime::convert($signature_date), 'Y'); $date = DateTime::convert($date); $date = date_create($date); + return date_format($date, 'Y'); } - public static function getLocaleFormatDate() { $locale = self::getLang(); @@ -112,6 +114,7 @@ class DateTime default: $format = 'Y-m-d'; } + return $format; } @@ -126,6 +129,7 @@ class DateTime default: $format = 'Y-m-d H:i:s'; } + return $format; } @@ -157,6 +161,7 @@ class DateTime public static function getISOFormat($format, $date = false) { $date = $date ? $date : now(); + return Carbon::parse($date)->isoFormat($format); } diff --git a/app/Repositories/Core/Debug.php b/app/Repositories/Core/Debug.php index b812c112..a6363284 100644 --- a/app/Repositories/Core/Debug.php +++ b/app/Repositories/Core/Debug.php @@ -2,15 +2,16 @@ namespace App\Repositories\Core; -use \League\CLImate\CLImate; -use \Timer; +use League\CLImate\CLImate; +use Timer; class Debug { - // $is_debug binaire 0 ou 1 debug, 0 ou 1 force output public static $_instance; + public static $app; + public static $debugbar; private function __construct() @@ -28,9 +29,9 @@ class Debug return class_exists('Clockwork\Support\Laravel\ClockworkServiceProvider') ? true : false; } - public static function start($var = '', $params = array(), $txt = '') + public static function start($var = '', $params = [], $txt = '') { - if (!static::isDebug()) { + if (! static::isDebug()) { return false; } $var = (empty($var)) ? static::getMethod() : $var; @@ -42,7 +43,7 @@ class Debug */ // TODO Fixer la longueur des params string passés if (is_null($params)) { - $params = array(); + $params = []; } Timer::start($var, $params); @@ -58,7 +59,7 @@ class Debug public static function stop($var = '') { - if (!static::isDebug()) { + if (! static::isDebug()) { return false; } $var = (empty($var)) ? static::getMethod() : $var; @@ -97,7 +98,7 @@ class Debug /** * dump un message uniquement si debug est true * - * @param string $msg [description] + * @param string $msg [description] * @return [type] [description] */ public static function message($msg, $cat = '') @@ -110,7 +111,7 @@ class Debug /** * force la sortie d'un dump, sans passer par la debugbar ou test si debug est true * - * @param string $msg [description] + * @param string $msg [description] * @return [type] [description] */ public static function fdump($msg, $cat = '') @@ -122,7 +123,7 @@ class Debug * dump un message suivant le handler de sortie prévu (log, debugbar, cli, ...) * * @param [type] $msg [description] - * @param boolean $force si true, force la sortie en output direct + * @param bool $force si true, force la sortie en output direct * @return [type] [description] */ public static function dump($msg, $cat = '', $force = false) @@ -133,18 +134,19 @@ class Debug dump($msg); } - if (!self::isDebug()){ - return;} - if (static::isCLI()) { - self::dumpCli($msg, $cat); - } - if (static::isDebugbar()) { - self::dumpDebugbar($msg, $cat); - } - if (static::isClockwork()) { - self::dumpClockwork($msg, $cat); - } - + if (! self::isDebug()) { + return; + } + if (static::isCLI()) { + self::dumpCli($msg, $cat); + } + if (static::isDebugbar()) { + self::dumpDebugbar($msg, $cat); + } + if (static::isClockwork()) { + self::dumpClockwork($msg, $cat); + } + } public static function dumpDebugbar($msg, $cat = '', $force = false) @@ -199,10 +201,11 @@ class Debug $is_debug = false; } } else { - dump("la isDebug::165"); + dump('la isDebug::165'); dump($caller); $is_debug = true; } + return $is_debug; } @@ -212,8 +215,8 @@ class Debug $backtrace = debug_backtrace(); $backtrace = array_reverse($backtrace); foreach ($backtrace as $item) { - $caller = isset($item['class']) ? $item['class'] . $item['type'] . $item['function'] : $item['function']; - $place = isset($item['file']) ? $item['file'] . ' at ' . $item['line'] : ''; + $caller = isset($item['class']) ? $item['class'].$item['type'].$item['function'] : $item['function']; + $place = isset($item['file']) ? $item['file'].' at '.$item['line'] : ''; $txt .= "$caller | $place \n"; } static::dump($txt, '', $force); @@ -222,12 +225,12 @@ class Debug public static function getLocation() { - return static::getMethod() . ' at ' . static::getFile() . ' line ' . static::getLine(); + return static::getMethod().' at '.static::getFile().' line '.static::getLine(); } public static function getMethod() { - return (static::getClass() . static::getType() . static::getFunction()); + return static::getClass().static::getType().static::getFunction(); } public static function getClass() @@ -269,6 +272,7 @@ class Debug while ($backtrace[$k]['class'] == 'App\Repositories\Core\Debug') { $k++; } + return (object) $backtrace[$k]; } @@ -280,6 +284,7 @@ class Debug while ($backtrace[$k]['class'] == 'App\Repositories\Core\Debug') { $k++; } + return (object) $backtrace[$k - 1]; } @@ -288,14 +293,15 @@ class Debug $backtrace = debug_backtrace(); $object = isset($backtrace[0]['object']) ? $backtrace[0]['object'] : null; $k = 1; - while (isset($backtrace[$k]) && (!isset($backtrace[$k]['object']) || $object === $backtrace[$k]['object'])) { + while (isset($backtrace[$k]) && (! isset($backtrace[$k]['object']) || $object === $backtrace[$k]['object'])) { $k++; } + return isset($backtrace[$k]['object']) ? $backtrace[$k]['object'] : null; } public static function isCLI() { - return (PHP_SAPI == 'cli'); + return PHP_SAPI == 'cli'; } } diff --git a/app/Repositories/Core/Export.php b/app/Repositories/Core/Export.php index 5cf9a4c3..40881e60 100644 --- a/app/Repositories/Core/Export.php +++ b/app/Repositories/Core/Export.php @@ -5,11 +5,17 @@ namespace App\Repositories\Core; class Export { public $xls; + public $sheet; + public $filename; + public $stockage; + public $lig; + public $nb; + public $debug; public function __construct() @@ -75,16 +81,18 @@ class Export if (isset($options[$key])) { $txt = $options[$key][$txt]; } - if (!isset($multioptions[$key])){ - $this->writeCell($this->lig, $col, $txt); - $this->nb++; - $col++; - continue;} - $tabs = self::getReverseMultiOptions($txt); - foreach ($tabs as $key2 => $value) { - $txt .= $multioptions[$key][$key2] . '\n'; - } - + if (! isset($multioptions[$key])) { + $this->writeCell($this->lig, $col, $txt); + $this->nb++; + $col++; + + continue; + } + $tabs = self::getReverseMultiOptions($txt); + foreach ($tabs as $key2 => $value) { + $txt .= $multioptions[$key][$key2].'\n'; + } + $this->writeCell($this->lig, $col, $txt); $this->nb++; $col++; @@ -104,41 +112,43 @@ class Export { // Redirect output to a client’s web browser (Excel5) header('Content-Type: application/vnd.ms-excel'); - header('Content-Disposition: attachment;filename="' . $this->filename . '"'); + header('Content-Disposition: attachment;filename="'.$this->filename.'"'); header('Cache-Control: max-age=0'); // If you're serving to IE 9, then the following may be needed // header('Cache-Control: max-age=1'); // If you're serving to IE over SSL, then the following may be needed header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); // Date in the past - header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT'); // always modified + header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); // always modified header('Cache-Control: cache, must-revalidate'); // HTTP/1.1 header('Pragma: public'); // HTTP/1.0 } public function close() { - if ($this->debug){ - return;} - // Debug::message($this->xls); - $objWriter = PHPExcel_IOFactory::createWriter($this->xls, 'Excel2007'); - // Debug::message($objWriter); - // exit; - if (!$this->stockage) { - $this->header(); - $objWriter->save('php://output'); - } else { - // $objWriter->save(str_replace('.php', '.xlsx', __FILE__)); - $objWriter->save('text.xlsx'); - } - + if ($this->debug) { + return; + } + // Debug::message($this->xls); + $objWriter = PHPExcel_IOFactory::createWriter($this->xls, 'Excel2007'); + // Debug::message($objWriter); + // exit; + if (! $this->stockage) { + $this->header(); + $objWriter->save('php://output'); + } else { + // $objWriter->save(str_replace('.php', '.xlsx', __FILE__)); + $objWriter->save('text.xlsx'); + } + } public function conv($lig, $col) { $c = static::convColtoTxt($col); $lig = $this->lig; - return ("$c$lig"); + + return "$c$lig"; } public function convColtoTxt($col) @@ -151,22 +161,25 @@ class Export $c = ''; } $c .= chr(65 + $col1); - return ($c); + + return $c; } public function getOption($var) { $data = $this->init(); - return ($data[$var . '_options']); + + return $data[$var.'_options']; } public function getOptions($data) { - $options = array(); + $options = []; foreach ($data as $key => $value) { $var = substr($key, 0, -8); $options[$var] = $value; } + return $options; } } diff --git a/app/Repositories/Core/File.php b/app/Repositories/Core/File.php index ef7f5c7e..19dbab60 100644 --- a/app/Repositories/Core/File.php +++ b/app/Repositories/Core/File.php @@ -3,7 +3,6 @@ namespace App\Repositories\Core; use Illuminate\Support\Facades\Storage; - use SoftCreatR\MimeDetector\MimeDetector; use SoftCreatR\MimeDetector\MimeDetectorException; @@ -32,6 +31,7 @@ class File public static function deleteDir($dir) { Storage::deleteDirectory($dir); + return true; } @@ -65,7 +65,7 @@ class File try { return (new MimeDetector())->setFile($file)->getFileType(); } catch (MimeDetectorException $e) { - die('An error occured while trying to load the given file.'); + exit('An error occured while trying to load the given file.'); } } } diff --git a/app/Repositories/Core/Geolocation.php b/app/Repositories/Core/Geolocation.php index ee714900..624b4366 100644 --- a/app/Repositories/Core/Geolocation.php +++ b/app/Repositories/Core/Geolocation.php @@ -6,25 +6,26 @@ class Geolocation { public static function getCoords($address, $zipcode, $city) { - if (!(!empty($address) && !empty($zipcode) && !empty($city))){ - return;} - $address = $address . ' , ' . $city . ' ' . $zipcode . ' , ' . 'France'; - - $geocode = app('geocoder')->geocode($address)->get(); - - if (!count($geocode)) { - return false; - } - $res = $geocode[0]->getCoordinates()->toArray(); - // dump($res); - $longitude = $res[0]; - $latitude = $res[1]; - // dump($latitude); - // dump($longitude); - // exit; - return ['latitude' => $latitude, 'longitude' => $longitude]; - + if (! (! empty($address) && ! empty($zipcode) && ! empty($city))) { + return; } + $address = $address.' , '.$city.' '.$zipcode.' , '.'France'; + + $geocode = app('geocoder')->geocode($address)->get(); + + if (! count($geocode)) { + return false; + } + $res = $geocode[0]->getCoordinates()->toArray(); + // dump($res); + $longitude = $res[0]; + $latitude = $res[1]; + // dump($latitude); + // dump($longitude); + // exit; + return ['latitude' => $latitude, 'longitude' => $longitude]; + + } public static function autocomplete($query) { diff --git a/app/Repositories/Core/HelperDate.php b/app/Repositories/Core/HelperDate.php index 3a5a1c43..7b216679 100644 --- a/app/Repositories/Core/HelperDate.php +++ b/app/Repositories/Core/HelperDate.php @@ -10,22 +10,22 @@ class HelperDate public static function toLocaleFormat($date) { - if (!(!is_null($date) && !empty($date))) { + if (! (! is_null($date) && ! empty($date))) { return $date; } $locale = session('locale'); switch ($locale) { - case 'fr': - $format = 'd/m/Y'; - break; - case 'en': - $format = 'Y-m-d'; - break; - default: - $format = 'Y-m-d'; + case 'fr': + $format = 'd/m/Y'; + break; + case 'en': + $format = 'Y-m-d'; + break; + default: + $format = 'Y-m-d'; } $date = Carbon::parse($date)->format($format); - + return $date; } @@ -41,9 +41,10 @@ class HelperDate public static function frenchDate($d) { - if (!$d) { + if (! $d) { return null; } + return Carbon::createFromFormat('d/m/Y', $d)->format('Y-m-d'); } @@ -54,6 +55,7 @@ class HelperDate $data[$field] = static::frenchDate($data[$field]); } } + return $data; } @@ -62,6 +64,7 @@ class HelperDate if ($d && $d != '0000-00-00') { return Carbon::createFromFormat('Y-m-d', $d)->format('d/m/Y'); } + return $d; } @@ -72,6 +75,7 @@ class HelperDate $data[$field] = static::toFrenchDate($data[$field]); } } + return $data; } } diff --git a/app/Repositories/Core/Images.php b/app/Repositories/Core/Images.php index 3aa4031c..bb121725 100644 --- a/app/Repositories/Core/Images.php +++ b/app/Repositories/Core/Images.php @@ -6,5 +6,5 @@ use App\Traits\Repository\Imageable; class Images { - use Imageable; + use Imageable; } diff --git a/app/Repositories/Core/Medias.php b/app/Repositories/Core/Medias.php index 35c1acd5..432ea179 100644 --- a/app/Repositories/Core/Medias.php +++ b/app/Repositories/Core/Medias.php @@ -4,22 +4,23 @@ namespace App\Repositories\Core; class Medias { - public static function getImage($model, $conversion = 'normal', $collection = 'images') { $img = $model->getMedia($collection)->first(); + return $img ? $img->getUrl($conversion) : false; } - + public static function getImages($model) { - if (!$model) { + if (! $model) { return false; } $model->getMedia(); foreach ($model->media as $key => $media) { $model->media[$key]['url'] = $media->getUrl(); } + return $model->media; } @@ -42,6 +43,7 @@ class Medias public static function deleteImages($model, $collection = 'images') { $ret = $model->clearMediaCollection($collection); + return true; } @@ -49,38 +51,41 @@ class Medias { $model->getMedia(); $ret = $model->media[$index]->delete(); + return true; } public static function buildURL($image, $conversion = '') { - return self::getPath($image) . self::getConversion($image, $conversion); + return self::getPath($image).self::getConversion($image, $conversion); } public static function getPath($image) { $model = basename(str_replace('\\', '/', $image->model_type)); - return '/storage/' . $model . '/' . $image->collection_name . '/' . $image->id; + + return '/storage/'.$model.'/'.$image->collection_name.'/'.$image->id; } public static function getConversion($image, $conversion = '') { // return $conversion ? '/conversions/' . $image->name . '-' . $conversion . self::getExtension($image->file_name) : $image->file_name; - return $conversion ? '/conversions/' . $image->name . '-' . $conversion . '.jpg' : $image->file_name; + return $conversion ? '/conversions/'.$image->name.'-'.$conversion.'.jpg' : $image->file_name; } public static function getExtension($filename) { - return '.' . pathinfo($filename, PATHINFO_EXTENSION); + return '.'.pathinfo($filename, PATHINFO_EXTENSION); } public static function getImageSrc($image) { - if (!$image) { + if (! $image) { return null; } $id = $image['id']; $filename = self::getFilename($image); + return "/storage/$id/$filename"; } @@ -101,13 +106,14 @@ class Medias public static function getSrcByType($image, $type) { - return $image ? '/storage/' . $image['id'] . '/conversions/' . self::getFilename($image, $type) : false; + return $image ? '/storage/'.$image['id'].'/conversions/'.self::getFilename($image, $type) : false; } public static function getFilename($image, $type = false) { $image['name'] = self::convertName($image['name']); - return $image['name'] . ($type ? '-' . $type : '') . self::getExtension($image['file_name']); + + return $image['name'].($type ? '-'.$type : '').self::getExtension($image['file_name']); } public static function convertName($name) diff --git a/app/Repositories/Core/Menu/Builder.php b/app/Repositories/Core/Menu/Builder.php index 70130341..b7d31e8b 100644 --- a/app/Repositories/Core/Menu/Builder.php +++ b/app/Repositories/Core/Menu/Builder.php @@ -6,8 +6,6 @@ use Auth; use Illuminate\Support\Collection; use Lavary\Menu\Builder as LavaryMenuBuilder; -use App\Repositories\Users; - /** * Class Builder. * @@ -20,9 +18,8 @@ class Builder extends LavaryMenuBuilder /** * Adds an item to the menu. * - * @param string $title - * @param string $options - * + * @param string $title + * @param string $options * @return \Lavary\Menu\Item|Item */ public function add($title, $options = '') @@ -65,8 +62,7 @@ class Builder extends LavaryMenuBuilder * * @param $id Id of the menu item to attach to * @param $title Title of the sub item - * @param string $options - * + * @param string $options * @return Lavary\Menu\Item */ public function addTo($id, $title, $options = '') @@ -74,7 +70,7 @@ class Builder extends LavaryMenuBuilder $parent = $this->whereId($id)->first(); if (isset($parent)) { - if (!isset($this->root[$parent->id])) { + if (! isset($this->root[$parent->id])) { $parent->attr(['url' => '#', 'class' => 'treeview']); // $str = ''; // $parent->append($str); diff --git a/app/Repositories/Core/Menu/Item.php b/app/Repositories/Core/Menu/Item.php index 449292c6..e550c20c 100644 --- a/app/Repositories/Core/Menu/Item.php +++ b/app/Repositories/Core/Menu/Item.php @@ -9,7 +9,6 @@ class Item extends LavaryMenuItem /** * Set the item icon using font-awesome. * - * @param $icon * * @return self */ @@ -23,7 +22,6 @@ class Item extends LavaryMenuItem /** * Set the item order. * - * @param $order * * @return self */ @@ -37,29 +35,29 @@ class Item extends LavaryMenuItem /** * Make the item active. * - * @param string|array $routes - * + * @param string|array $routes * @return self */ public function activeIfRoute($routes = null) { - if (!empty($routes)) { + if (! empty($routes)) { if (is_string($routes)) { $routes = [$routes]; } foreach ($routes as $pattern) { $arr = [$pattern]; - if (!if_route_pattern($arr)){ - continue;} - $this->activate(); - - if (strstr($this->title, 'circle-o')) { - $this->title = str_replace('fa-circle-o', 'fa-dot-circle-o', $this->title); - } - // dump($this); - return $this; + if (! if_route_pattern($arr)) { + continue; } + $this->activate(); + + if (strstr($this->title, 'circle-o')) { + $this->title = str_replace('fa-circle-o', 'fa-dot-circle-o', $this->title); + } + // dump($this); + return $this; + } return $this; } diff --git a/app/Repositories/Core/Menu/Logs.php b/app/Repositories/Core/Menu/Logs.php index 36cbee13..3038d70f 100644 --- a/app/Repositories/Core/Menu/Logs.php +++ b/app/Repositories/Core/Menu/Logs.php @@ -14,16 +14,16 @@ class Logs $menu->addTo( 'logs', __('boilerplate::logs.menu.stats'), [ - 'route' => 'boilerplate.logs.dashboard', - 'permission' => 'logs', ] + 'route' => 'boilerplate.logs.dashboard', + 'permission' => 'logs', ] ) ->order(1110) ->activeIfRoute('boilerplate.logs.dashboard'); $menu->addTo( 'logs', __('boilerplate::logs.menu.reports'), [ - 'route' => 'boilerplate.logs.list', - 'permission' => 'logs', ] + 'route' => 'boilerplate.logs.list', + 'permission' => 'logs', ] ) ->order(1120) ->activeIfRoute(['boilerplate.logs.list', 'boilerplate.logs.show', 'boilerplate.logs.filter']); diff --git a/app/Repositories/Core/Menu/Menu.php b/app/Repositories/Core/Menu/Menu.php index c2634e87..9f7fb4d9 100644 --- a/app/Repositories/Core/Menu/Menu.php +++ b/app/Repositories/Core/Menu/Menu.php @@ -9,21 +9,22 @@ class Menu extends LavaryMenu { public function make($name, $callback) { - if (!is_callable($callback)){ - return;} - if (!array_key_exists($name, $this->menu)) { - $this->menu[$name] = new Builder($name, $this->loadConf($name)); - } - - // Registering the items - call_user_func($callback, $this->menu[$name]); - - // Storing each menu instance in the collection - $this->collection->put($name, $this->menu[$name]); - - // Make the instance available in all views - View::share($name, $this->menu[$name]); - - return $this->menu[$name]; + if (! is_callable($callback)) { + return; } + if (! array_key_exists($name, $this->menu)) { + $this->menu[$name] = new Builder($name, $this->loadConf($name)); + } + + // Registering the items + call_user_func($callback, $this->menu[$name]); + + // Storing each menu instance in the collection + $this->collection->put($name, $this->menu[$name]); + + // Make the instance available in all views + View::share($name, $this->menu[$name]); + + return $this->menu[$name]; + } } diff --git a/app/Repositories/Core/Menu/Users.php b/app/Repositories/Core/Menu/Users.php index 1352151d..e7549d0b 100644 --- a/app/Repositories/Core/Menu/Users.php +++ b/app/Repositories/Core/Menu/Users.php @@ -14,22 +14,22 @@ class Users $menu->addTo( 'access', __('boilerplate::users.list.title'), [ - 'route' => 'boilerplate.users.index', - 'permission' => 'users_crud', ] + 'route' => 'boilerplate.users.index', + 'permission' => 'users_crud', ] ) ->activeIfRoute(['boilerplate.users.index', 'boilerplate.users.edit']); $menu->addTo( 'access', __('boilerplate::users.create.title'), [ - 'route' => 'boilerplate.users.create', - 'permission' => 'users_crud', ] + 'route' => 'boilerplate.users.create', + 'permission' => 'users_crud', ] ) ->activeIfRoute('boilerplate.users.create'); $menu->addTo( 'access', __('boilerplate::layout.role_management'), [ - 'route' => 'boilerplate.roles.index', - 'permission' => 'roles_crud', ] + 'route' => 'boilerplate.roles.index', + 'permission' => 'roles_crud', ] ) ->activeIfRoute('boilerplate.roles.*'); diff --git a/app/Repositories/Core/Number.php b/app/Repositories/Core/Number.php index 21e8492b..bc506024 100644 --- a/app/Repositories/Core/Number.php +++ b/app/Repositories/Core/Number.php @@ -16,6 +16,7 @@ class Number $formatter->setLanguageManager($languageManager); $price = $formatter->format($value, '0,0'); + return $price; } } diff --git a/app/Repositories/Core/PDF.php b/app/Repositories/Core/PDF.php index 52df7bba..ed025c6d 100644 --- a/app/Repositories/Core/PDF.php +++ b/app/Repositories/Core/PDF.php @@ -3,9 +3,9 @@ namespace App\Repositories\Core; use Barryvdh\DomPDF\Facade\Pdf as DomPDF; +use Barryvdh\Snappy\Facades\SnappyPdf; use GravityMedia\Ghostscript\Ghostscript; use Mpdf\Mpdf; -use Barryvdh\Snappy\Facades\SnappyPdf; use Symfony\Component\Process\Process; class PDF @@ -18,15 +18,13 @@ class PDF ->waitUntilNetworkIdle() ->format('A4') ->showBackground() - ->savePdf("temp.pdf"); - + ->savePdf('temp.pdf'); + $postRoute = URL::signedRoute('orderinvoices.store', ['order' => $this->order]); Http::attach('invoice', file_get_contents('temp.pdf'), $filename) ->post($postRoute) ->throw(); - } - catch (\Exception $exception ) - { + } catch (\Exception $exception) { Log::error($exception); } } @@ -35,6 +33,7 @@ class PDF { \Debugbar::disable(); $pdf = DomPDF::loadView($view, $data); + return $pdf->download($filename); } @@ -42,12 +41,14 @@ class PDF { $mpdf = new Mpdf(); $mpdf->WriteHTML($html); + return $mpdf->Output(); } public static function convertURL($url) { $pdf = SnappyPdf::loadFile($url); + return $pdf->download('invoice.pdf'); } diff --git a/app/Repositories/Core/Stat.php b/app/Repositories/Core/Stat.php index ff519dbc..e7fcdca6 100644 --- a/app/Repositories/Core/Stat.php +++ b/app/Repositories/Core/Stat.php @@ -7,6 +7,7 @@ use Carbon\Carbon; class Stat { public static $is_debug = false; + public static $force_output = true; public static function getNewByPeriod($model, $start, $end) @@ -45,6 +46,7 @@ class Stat $var_option = $var; } $options = self::getOption($var_option); + return self::getStatsbyMultiOptions($var, $options); } @@ -53,6 +55,7 @@ class Stat $count = self::getModel() ->whereBetween($var, $begin, $end) ->count(); + return $count; } @@ -64,10 +67,9 @@ class Stat ->groupBy($var) ->get(); // var_Debug::message($data); - return ($data); + return $data; } - public static function getStatsbyOptions($var, $var_option = '') { if (empty($var_option)) { @@ -81,7 +83,7 @@ class Stat $data[] = ['y' => $y, 'name' => $value]; } // var_Debug::message($data); - return ($data); + return $data; } public static function getCountbyOption($var) @@ -98,7 +100,8 @@ class Stat $data[$key] = (int) $data[$key]->nb; } } - return ($data); + + return $data; } public static function getStatsbyMultiOptions($var, $options) @@ -107,7 +110,8 @@ class Stat $nb = self::getCountbyBin($var, $key); $data[] = ['y' => $nb, 'name' => $value]; } - return ($data); + + return $data; } public static function getCountbyBin($var, $value) @@ -116,27 +120,28 @@ class Stat $count = self::getModel() ->where($var, '&', $bit) ->count(); + return $count; } - public static function getStatsbyPeriod($begin = '', $end = '', $period = 'days') { $end = Carbon::now(); $begin = Carbon::now()->subMonth(1); switch ($period) { - case 'days': - $periods = DateRange::getPeriodsbyDay($begin, $end); - break; - case 'months': - $periods = DateRange::getPeriodsbyMonth($begin, $end); - break; - case 'weeks': - $periods = DateRange::getPeriodsbyWeek($begin, $end); - break; - default: + case 'days': + $periods = DateRange::getPeriodsbyDay($begin, $end); + break; + case 'months': + $periods = DateRange::getPeriodsbyMonth($begin, $end); + break; + case 'weeks': + $periods = DateRange::getPeriodsbyWeek($begin, $end); + break; + default: } - return ($periods); + + return $periods; } public static function serializeValues($tab) @@ -154,7 +159,7 @@ class Stat $tab = $collection->pluck($var)->toArray(); } - return implode(",", $tab); + return implode(',', $tab); } public static function avgByVar($tab, $var) diff --git a/app/Repositories/Core/Storage.php b/app/Repositories/Core/Storage.php index d4d7cfbf..5fff1325 100644 --- a/app/Repositories/Core/Storage.php +++ b/app/Repositories/Core/Storage.php @@ -3,13 +3,9 @@ namespace App\Repositories\Core; use Illuminate\Support\Facades\Storage as Storage2; - use Symfony\Component\Process\Exception\ProcessFailedException; use Symfony\Component\Process\Process; -use SoftCreatR\MimeDetector\MimeDetector; -use SoftCreatR\MimeDetector\MimeDetectorException; - class Storage { public static function checkDirOrCreate($dir) @@ -30,18 +26,21 @@ class Storage public static function createDir($dir) { Storage2::makeDirectory($dir); + return true; } public static function deleteDir($dir) { Storage2::deleteDirectory($dir); + return true; } public static function deleteFile($file) { Storage2::delete($file); + return true; } @@ -49,8 +48,8 @@ class Storage { $process = new Process(['srm', $file]); $process->run(); - - if (!$process->isSuccessful()) { + + if (! $process->isSuccessful()) { throw new ProcessFailedException($process); } } @@ -87,7 +86,8 @@ class Storage public static function getFileType($file) { - $file = self::getStoragePath() . $file; + $file = self::getStoragePath().$file; + return File::getFileType($file); } diff --git a/app/Repositories/Core/Tag.php b/app/Repositories/Core/Tag.php index c031e159..5398772c 100644 --- a/app/Repositories/Core/Tag.php +++ b/app/Repositories/Core/Tag.php @@ -7,6 +7,7 @@ class Tag public static function getTagsByModel($model) { $tags = $model->tags; + return $tags ? $tags->pluck('id')->toArray() : null; } @@ -17,6 +18,7 @@ class Tag return (int) $item; } )->toArray() : false; + return $tags ? $model->syncTags($tags, true) : false; } } diff --git a/app/Repositories/Core/Trees.php b/app/Repositories/Core/Trees.php index c166ddd1..1736adca 100644 --- a/app/Repositories/Core/Trees.php +++ b/app/Repositories/Core/Trees.php @@ -7,6 +7,7 @@ class Trees public static function getTree($model) { $tree = $model->orderBy('_lft', 'asc')->get()->toTree()->toArray(); + return self::getChildren($tree[0]['children']); } @@ -23,6 +24,7 @@ class Trees } $tree[] = $leaf; } + return $tree; } @@ -32,25 +34,26 @@ class Trees $item_target = self::getNode($target_id); switch ($type) { - case 'after': - // dump("$node_id After $target_id"); - $item->afterNode($item_target); - break; - case 'inside': - // dump("$node_id inside $target_id"); - $item_target->appendNode($item); - break; + case 'after': + // dump("$node_id After $target_id"); + $item->afterNode($item_target); + break; + case 'inside': + // dump("$node_id inside $target_id"); + $item_target->appendNode($item); + break; } $item->save(); - return "1"; - } + return '1'; + } public static function create($data, $model) { $parent = (isset($data['parent_id']) && $data['parent_id']) ? self::getNode($data['parent_id']) : self::getRoot(); $tree = $model->create(['name' => $data['name']]); $tree->appendToNode($parent)->save(); + return $tree; } @@ -58,6 +61,7 @@ class Trees { $id = $id ? $id : $data['id']; $item = self::get($id); + return $item->update(['name' => $data['name']]); } diff --git a/app/Repositories/Core/Upload.php b/app/Repositories/Core/Upload.php index 9bdcb469..d6948d57 100644 --- a/app/Repositories/Core/Upload.php +++ b/app/Repositories/Core/Upload.php @@ -2,7 +2,6 @@ namespace App\Repositories\Core; -use Illuminate\Http\Request; use Illuminate\Support\Facades\Storage; use Intervention\Image\Facades\Image as Image; @@ -14,6 +13,7 @@ class Upload $data['filetype'] = $file->getClientOriginalExtension(); $data['filesize'] = $file->getSize(); $data['mime'] = $file->getMimeType(); + return $data; } @@ -23,6 +23,7 @@ class Upload $pos = strrpos($file, '/'); $uuid = substr($file, $pos + 1); $uuid = pathinfo($uuid, PATHINFO_FILENAME); + return $uuid; } @@ -35,6 +36,7 @@ class Upload // $path = $request->file('avatar')->storeAs('avatars',$request->user()->id,'s3'); // $path = $request->file('avatar')->storePublicly('avatars', 's3'); $request = Request(); + return $request->has($var) ? basename($request->file($var)->store($path)) : false; } @@ -55,6 +57,7 @@ class Upload { $thumb = self::getThumbPath($file, $sub); $filename = self::getPublicPath($file); + return Image::make($filename)->orientate()->widen($size)->save($thumb); } @@ -63,49 +66,52 @@ class Upload return 'public/' . self::getFilename($file); } */ - + public static function getPublicPath($file) { - return storage_path('app/public/' . self::getFilename($file)); + return storage_path('app/public/'.self::getFilename($file)); } public static function getPrivatePath($file) { - return storage_path('app/' . self::getFilename($file)); + return storage_path('app/'.self::getFilename($file)); } public static function getSrc($file) { - return '/storage/' . self::getFilename($file); + return '/storage/'.self::getFilename($file); } public static function getThumbPath($file) { - return storage_path('app/public/' . self::getThumbFilename($file)); + return storage_path('app/public/'.self::getThumbFilename($file)); } public static function getThumbSrc($file) { - return '/storage/' . self::getThumbFilename($file); + return '/storage/'.self::getThumbFilename($file); } public static function getFilename($file) { $file = (is_array($file)) ? (object) $file : $file; - return $file->filepath . '/' . self::getName($file); + + return $file->filepath.'/'.self::getName($file); } public static function getThumbFilename($file, $sub = false) { $sub = $sub ? $sub : 'thumbs/'; $file = (is_array($file)) ? (object) $file : $file; - return $file->filepath . '/' . $sub . self::getName($file); + + return $file->filepath.'/'.$sub.self::getName($file); } public static function getName($file) { $file = (is_array($file)) ? (object) $file : $file; - return $file->uuid . '.' . strtolower($file->filetype); + + return $file->uuid.'.'.strtolower($file->filetype); } /** @@ -116,9 +122,10 @@ class Upload */ public static function fix($path) { - if (!self::isWindows()) { + if (! self::isWindows()) { return $path; } + return str_replace('/', '\\', $path); } @@ -127,6 +134,7 @@ class Upload if (Storage::exists($dest)) { self::delete($dest); } + return Storage::move($source, $dest); } @@ -144,9 +152,9 @@ class Upload { return is_dir($path) || mkdir($path, $permissions, true); } - + public static function isWindows() { - return (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN'); + return strtoupper(substr(PHP_OS, 0, 3)) === 'WIN'; } } diff --git a/app/Repositories/Core/User/Basket.php b/app/Repositories/Core/User/Basket.php index ced1f73b..14f798a7 100644 --- a/app/Repositories/Core/User/Basket.php +++ b/app/Repositories/Core/User/Basket.php @@ -7,12 +7,14 @@ class Basket public static function first($key) { $data = self::get($key); + return array_shift($data); } public static function last($key) { $data = self::get($key); + return $data ? array_pop($data) : false; } @@ -33,6 +35,7 @@ class Basket array_push($data, $value); self::set($key, $data); } + return count($data); } @@ -42,6 +45,7 @@ class Basket if (($index = array_search($value, $data)) !== false) { unset($data[$index]); } + return self::set($key, $data); } diff --git a/app/Repositories/Core/User/Notifications/NewUser.php b/app/Repositories/Core/User/Notifications/NewUser.php index db379125..c3095c8b 100644 --- a/app/Repositories/Core/User/Notifications/NewUser.php +++ b/app/Repositories/Core/User/Notifications/NewUser.php @@ -13,8 +13,7 @@ class NewUser extends Notification /** * Get the notification's delivery channels. * - * @param mixed $notifiable - * + * @param mixed $notifiable * @return string[] */ public function via($notifiable) @@ -25,8 +24,7 @@ class NewUser extends Notification /** * Get the mail representation of the notification. * - * @param mixed $notifiable - * + * @param mixed $notifiable * @return \Illuminate\Notifications\Messages\MailMessage */ public function toMail($notifiable) @@ -40,7 +38,7 @@ class NewUser extends Notification ->line( __( 'notifications.newuser.intro', [ - 'name' => $currentUser->first_name.' '.$currentUser->last_name, + 'name' => $currentUser->first_name.' '.$currentUser->last_name, ] ) ) @@ -51,7 +49,7 @@ class NewUser extends Notification ->salutation( __( 'notifications.salutation', [ - 'name' => $currentUser->first_name.' '.$currentUser->last_name, + 'name' => $currentUser->first_name.' '.$currentUser->last_name, ] ) ) @@ -61,8 +59,7 @@ class NewUser extends Notification /** * Get the array representation of the notification. * - * @param mixed $notifiable - * + * @param mixed $notifiable * @return array */ public function toArray($notifiable) diff --git a/app/Repositories/Core/User/Notifications/ResetPassword.php b/app/Repositories/Core/User/Notifications/ResetPassword.php index 06daa6ce..fcb02f26 100644 --- a/app/Repositories/Core/User/Notifications/ResetPassword.php +++ b/app/Repositories/Core/User/Notifications/ResetPassword.php @@ -9,8 +9,7 @@ class ResetPassword extends \Illuminate\Auth\Notifications\ResetPassword /** * Get the mail representation of the notification. * - * @param mixed $notifiable - * + * @param mixed $notifiable * @return \Illuminate\Notifications\Messages\MailMessage */ /* diff --git a/app/Repositories/Core/User/ShopCart.php b/app/Repositories/Core/User/ShopCart.php index 2b2694a8..0a34ad6d 100644 --- a/app/Repositories/Core/User/ShopCart.php +++ b/app/Repositories/Core/User/ShopCart.php @@ -2,9 +2,7 @@ namespace App\Repositories\Core\User; -use App\Repositories\Core\Auth\Users; -use Illuminate\Support\Facades\Auth; -use \Cart; +use Cart; class ShopCart { @@ -20,6 +18,7 @@ class ShopCart } else { self::get()->add($item); } + return [ 'count' => self::count(), 'quantity' => self::getTotalQuantity(), @@ -45,6 +44,7 @@ class ShopCart public static function clear() { Cart::clear(); + return self::get()->clear(); } diff --git a/app/Repositories/Core/User/ShopCartStorage.php b/app/Repositories/Core/User/ShopCartStorage.php index eff1438d..5ba6a869 100644 --- a/app/Repositories/Core/User/ShopCartStorage.php +++ b/app/Repositories/Core/User/ShopCartStorage.php @@ -2,10 +2,8 @@ namespace App\Repositories\Core\User; -use Darryldecode\Cart\CartCollection; - use App\Models\Core\CartStorage; -use App\Repositories\Core\Auth\Users; +use Darryldecode\Cart\CartCollection; class ShopCartStorage { @@ -16,11 +14,12 @@ class ShopCartStorage public function get($key) { - if (!$this->has($key)) { + if (! $this->has($key)) { return []; } - return new CartCollection(CartStorage::find($key)->cart_data); - + + return new CartCollection(CartStorage::find($key)->cart_data); + } public function put($key, $value) @@ -31,7 +30,7 @@ class ShopCartStorage } else { CartStorage::create([ 'id' => $key, - 'cart_data' => $value + 'cart_data' => $value, ]); } } diff --git a/app/Repositories/Shop/ArticleNatures.php b/app/Repositories/Shop/ArticleNatures.php index 6dbe7041..e335c8c6 100644 --- a/app/Repositories/Shop/ArticleNatures.php +++ b/app/Repositories/Shop/ArticleNatures.php @@ -2,10 +2,10 @@ namespace App\Repositories\Shop; -use App\Models\Shop\ArticleNature; -use App\Models\Shop\Article; use App\Models\Botanic\Specie; use App\Models\Botanic\Variety; +use App\Models\Shop\Article; +use App\Models\Shop\ArticleNature; use App\Models\Shop\Merchandise; class ArticleNatures @@ -18,6 +18,7 @@ class ArticleNatures public static function getProductType($id) { $type = self::get($id)->product_type ?? false; + return $type ? self::getProductTypes()[$type] : false; } @@ -40,6 +41,7 @@ class ArticleNatures case Merchandise::class: return 2; } + return false; } @@ -61,6 +63,7 @@ class ArticleNatures public static function getOptionsByProductTypeModel($model) { $type = self::getProductTypeByModel($model); + return self::getOptionsByProductType($type); } @@ -87,6 +90,7 @@ class ArticleNatures public static function getNamesByIds($ids) { $names = ArticleNature::byIds($ids)->pluck('name')->toArray(); + return array_map('strtolower', $names); } @@ -98,6 +102,7 @@ class ArticleNatures public static function store($data) { $item = ($data['id'] ?? false) ? self::update($data) : self::create($data); + return $item->id; } @@ -111,6 +116,7 @@ class ArticleNatures $id = $id ? $id : $data['id']; $item = self::get($id); $ret = $item->update($data); + return $item; } diff --git a/app/Repositories/Shop/Articles.php b/app/Repositories/Shop/Articles.php index 9f8df5a1..02d6fa06 100644 --- a/app/Repositories/Shop/Articles.php +++ b/app/Repositories/Shop/Articles.php @@ -2,17 +2,14 @@ namespace App\Repositories\Shop; -use Illuminate\Support\Str; - -use App\Repositories\Core\Tag; -use App\Repositories\Core\Medias; -use App\Repositories\Core\Comments; -use App\Repositories\Botanic\Species; -use App\Repositories\Botanic\Varieties; use App\Models\Shop\Article; use App\Models\Shop\Merchandise; - +use App\Repositories\Botanic\Species; +use App\Repositories\Botanic\Varieties; +use App\Repositories\Core\Comments; +use App\Repositories\Core\Tag; use App\Traits\Repository\Imageable; +use Illuminate\Support\Str; class Articles { @@ -25,6 +22,7 @@ class Articles foreach ($data as $key => $name) { $export[] = ['value' => $key, 'text' => $name]; } + return $export; } @@ -40,6 +38,7 @@ class Articles 'prices' => $offer->tariff->price_lists->first()->price_list_values->toArray(), ]; } + return $data ?? false; } @@ -56,6 +55,7 @@ class Articles $data[strtolower($sibling->article_nature->name)] = $sibling->description; } } + return $data ?? false; } @@ -82,9 +82,10 @@ class Articles { $articles = Article::with(['article_nature'])->get(); foreach ($articles as $article) { - $data[$article->id] = ($article->article_nature->name ?? null) . ' - ' . $article->name; + $data[$article->id] = ($article->article_nature->name ?? null).' - '.$article->name; } asort($data, SORT_NATURAL); + return $data; } @@ -97,6 +98,7 @@ class Articles { $data = self::getArticle($id); $data['offers'] = self::getOffersGroupedByNature($id, $sale_channel_id); + return $data; } @@ -113,6 +115,7 @@ class Articles $data['categories'] = self::getCategoriesNameByArticle($article); $data['tags'] = self::getFullTagsSlugByArticle($article); $data['comments'] = Comments::getByModel($article); + return $data; } @@ -150,6 +153,7 @@ class Articles ($data['plus'] ?? null); */ $data['description'] = $article->description; + return $data; } @@ -166,6 +170,7 @@ class Articles ]), ]; } + return $data ?? []; } @@ -174,10 +179,10 @@ class Articles $articles = self::getArticlesWithOffers($options); foreach ($articles as $article) { $price_lists = $article->offers[0]->tariff->price_lists->toArray(); - if (!count($price_lists)) { + if (! count($price_lists)) { continue; } - if (!is_array($data[$article->name] ?? false)) { + if (! is_array($data[$article->name] ?? false)) { $data[$article->name] = self::getDataForSale($article); } $prices = $price_lists[0]['price_list_values'][0]; @@ -187,6 +192,7 @@ class Articles if ($data ?? false) { ksort($data); } + return $data ?? false; } @@ -236,6 +242,7 @@ class Articles 'offers.tariff.price_lists.price_list_values', 'offers.variation.package', ])->get(); + return $data; } @@ -249,6 +256,7 @@ class Articles $sale_channel_id = $options['sale_channel_id'] ?? SaleChannels::getDefaultID(); $model = self::getModelByOptions($options); $data = $model->withAvailableOffers($sale_channel_id)->get()->pluck('article_nature_id')->unique(); + return array_values($data->toArray()); } @@ -260,6 +268,7 @@ class Articles $type = ArticleNatures::getProductTypeNameByClass($class); $data[$type] = true; } + return array_keys($data); } @@ -268,6 +277,7 @@ class Articles $sale_channel_id = $options['sale_channel_id'] ?? SaleChannels::getDefaultID(); $model = self::getModelByOptions($options); $data = $model->withAvailableOffers($sale_channel_id)->get()->pluck('product_type')->unique(); + return $data->toArray(); } @@ -294,6 +304,7 @@ class Articles $model = $model->merchandise(); break; } + return $model; } @@ -301,6 +312,7 @@ class Articles { $data['article'] = self::getArticleEdit($id); self::getMeta($data); + return $data; } @@ -312,12 +324,14 @@ class Articles $data['categories'] = self::getCategoriesByArticle($article); $data['tags'] = self::getTagsByArticle($article); $data['comments'] = Comments::getByModel($article); + return $data; } public static function getInherited($id) { $article = Article::with('product.tags.tag_group')->findOrFail($id); + return self::getInheritedByProduct($article->product_id, $article->product_type); } @@ -350,10 +364,11 @@ class Articles $data[] = [ 'name' => 'Marchandise', 'description' => $product->description, - 'tags' => $product->tags->toArray() + 'tags' => $product->tags->toArray(), ]; break; } + return $data ?? false; } @@ -370,6 +385,7 @@ class Articles $data['images'] = Merchandises::getImages($product_id); break; } + return $data ?? false; } @@ -398,6 +414,7 @@ class Articles 'App\Models\Botanic\Variety' => 'Variétés', 'App\Models\Shop\Merchandise' => 'Marchandise', ]; + return $data; } @@ -414,6 +431,7 @@ class Articles public static function getProductTypeByCategory($category_id) { $models = self::getProductTypesModelsByCategory($category_id); + return (($models[0] ?? false) == Merchandise::class) ? 'merchandise' : 'botanic'; } @@ -470,10 +488,11 @@ class Articles $data += $article->tags->toArray(); foreach ($data as $tag) { - if (!isset($tags[$tag['group']][$tag['name']])) { + if (! isset($tags[$tag['group']][$tag['name']])) { $tags[$tag['group']][] = $tag['name']; } } + return $tags ?? null; } @@ -490,12 +509,14 @@ class Articles public static function getFullImagesByArticleId($id) { $article = self::get($id); + return $article ? self::getFullImagesByArticle($article) : false; } public static function countFullImagesByArticleId($id) { $article = self::get($id); + return $article ? self::countFullImagesByArticle($article) : 0; } @@ -523,6 +544,7 @@ class Articles $images = count($merchandise->images ?? []) ? $merchandise->images : $images; break; } + return $images; } @@ -548,6 +570,7 @@ class Articles $image = $article->product->image ?? false; break; } + return $image; } @@ -555,26 +578,28 @@ class Articles { $images = $data['images'] ?? false; unset($data['images']); - + $categories = $data['categories'] ?? false; unset($data['categories']); - + $tags = $data['tags'] ?? false; unset($data['tags']); - + $prices = $data['prices'] ?? false; unset($data['prices']); - + $article = self::store($data); self::storeImages($article, $images); self::storeCategories($article, $categories); self::storeTags($article, $tags); + return $article->id; } public static function store($data) { $data['visible'] = $data['visible'] ?? false; + return ($data['id'] ?? false) ? self::update($data) : self::create($data); } @@ -588,6 +613,7 @@ class Articles $id = $id ? $id : $data['id']; $article = self::get($id); $ret = $article->update($data); + return $article; } @@ -598,7 +624,7 @@ class Articles public static function storeCategories($article, $categories) { - if (!$categories) { + if (! $categories) { return false; } $categories = collect($categories)->transform( @@ -606,6 +632,7 @@ class Articles return (int) $item; } )->toArray(); + return $article->syncCategories($categories, true); } @@ -632,6 +659,7 @@ class Articles public static function getHash($id) { $name = self::get($id)->name ?? false; + return $name ? hash('crc32c', Str::slug($name)) : false; } } diff --git a/app/Repositories/Shop/Baskets.php b/app/Repositories/Shop/Baskets.php index 4001f0db..7bed97ef 100644 --- a/app/Repositories/Shop/Baskets.php +++ b/app/Repositories/Shop/Baskets.php @@ -9,10 +9,11 @@ class Baskets { public static function addBasket($offer_id, $quantity = 1, $update = false) { - if (ShopCart::has($offer_id) && !$quantity) { + if (ShopCart::has($offer_id) && ! $quantity) { $ret = ShopCart::remove($offer_id); } $data = $quantity ? self::getBasketData($offer_id, $quantity) : false; + return $data ? ShopCart::add($data, $update) : false; } @@ -28,7 +29,7 @@ class Baskets $prices = Offers::getPrice($item->id, $item->quantity, $sale_channel_id); $detail[] = [ 'offer_id' => (int) $item->id, - 'name' => $offer->article->name . ' (' . $offer->variation->name . ')', + 'name' => $offer->article->name.' ('.$offer->variation->name.')', 'quantity' => (int) $item->quantity, 'price' => (float) $prices->price, 'tax' => $prices->price_taxed - $prices->price, @@ -48,6 +49,7 @@ class Baskets 'shipping' => $shipping, 'total_shipped' => $total_taxed + $shipping, ]; + return $data ?? false; } @@ -68,7 +70,7 @@ class Baskets 'article.image', 'price_lists.price_list_values', ])->withPriceListsBySaleChannel($sale_channel_id) - ->whereIn('id', ShopCart::keys())->get(); + ->whereIn('id', ShopCart::keys())->get(); foreach ($basket as $item) { $offer = $offers->where('id', $item->id)->first(); $article_nature = strtolower($offer->article->article_nature->name); @@ -82,12 +84,14 @@ class Baskets 'latin' => $offer->article->product->specie->latin ?? false, ]; } + return $data ?? false; } public static function getBasketData($id, $quantity = 1) { $offer = Offers::get($id, ['article', 'variation']); + return [ 'id' => $id, 'name' => self::getArticleName($offer), diff --git a/app/Repositories/Shop/Categories.php b/app/Repositories/Shop/Categories.php index ec38bf8d..c9f14e79 100644 --- a/app/Repositories/Shop/Categories.php +++ b/app/Repositories/Shop/Categories.php @@ -3,8 +3,8 @@ namespace App\Repositories\Shop; use App\Models\Shop\Category; -use App\Repositories\Core\Tag; use App\Repositories\Core\Categories as CategoryTrees; +use App\Repositories\Core\Tag; class Categories { @@ -13,6 +13,7 @@ class Categories $category = Articles::get($id)->categories()->first(); $ancestors = self::getAncestorsByCategory($category->id); $ancestors[] = $category->toArray(); + return $ancestors; } @@ -21,6 +22,7 @@ class Categories $category = self::get($id); $ancestors = $category->getAncestors()->toArray(); unset($ancestors[0]); + return $ancestors; } @@ -46,6 +48,7 @@ class Categories $data['name'] = $category->name; $data['description'] = $category->description; $data['tags'] = self::getTagsByCategory($category); + return $data; } @@ -81,16 +84,18 @@ class Categories $tags = $data['tags'] ?? false; unset($data['tags']); - + $category = self::store($data); self::storeImages($category, $images); self::storeTags($category, $tags); + return $category; } public static function store($data) { $id = isset($data['id']) ? $data['id'] : false; + return $id ? self::update($data, $id) : self::create($data); } @@ -116,13 +121,14 @@ class Categories public static function getImages($id) { $category = self::get($id); - if (!$category) { + if (! $category) { return false; } $category->getMedia(); foreach ($category->media as $key => $media) { $category->media[$key]['url'] = $media->getUrl(); } + return $category->media; } @@ -131,7 +137,8 @@ class Categories $category = self::get($id); $category->getMedia(); $ret = $category->media[$index]->delete(); - return "1"; + + return '1'; } public static function moveTree($node_id, $target_id, $type) @@ -149,6 +156,7 @@ class Categories $id = $id ? (int) $id : $data['id']; $category = self::get($id); $ret = $category->update($data); + return $category; } diff --git a/app/Repositories/Shop/CustomerAddresses.php b/app/Repositories/Shop/CustomerAddresses.php index 16f11966..076c09cb 100644 --- a/app/Repositories/Shop/CustomerAddresses.php +++ b/app/Repositories/Shop/CustomerAddresses.php @@ -23,7 +23,7 @@ class CustomerAddresses public static function add($user_id, $data) { - $name = $data['company'] ? $data['company'] : $data['first_name'] . ' ' . $data['last_name']; + $name = $data['company'] ? $data['company'] : $data['first_name'].' '.$data['last_name']; if ($data['use_for_delivery'] ?? false) { return self::store([ 'customer_id' => $user_id, @@ -49,6 +49,7 @@ class CustomerAddresses { $id = $data['id'] ?? false; $item = $id ? self::update($data, $id) : self::create($data); + return $item->id; } @@ -62,6 +63,7 @@ class CustomerAddresses $id = $id ? $id : $data['id']; $delivery = self::get($id); $delivery->update($data); + return $delivery; } diff --git a/app/Repositories/Shop/CustomerStats.php b/app/Repositories/Shop/CustomerStats.php index 11ecb119..0bb11e5e 100644 --- a/app/Repositories/Shop/CustomerStats.php +++ b/app/Repositories/Shop/CustomerStats.php @@ -6,7 +6,7 @@ use Spatie\Stats\BaseStats; class CustomerStats extends BaseStats { - public function getName() : string + public function getName(): string { return 'customers'; } diff --git a/app/Repositories/Shop/Customers.php b/app/Repositories/Shop/Customers.php index 343b817e..2cbdd089 100644 --- a/app/Repositories/Shop/Customers.php +++ b/app/Repositories/Shop/Customers.php @@ -3,14 +3,12 @@ namespace App\Repositories\Shop; use App\Datatables\Shop\CustomerOrdersDataTable; +use App\Models\Shop\Customer; +use App\Repositories\Core\File; use Illuminate\Support\Facades\Auth; use Illuminate\Support\Str; - use Laravolt\Avatar\Avatar; -use App\Repositories\Core\File; -use App\Models\Shop\Customer; - class Customers { public static function count() @@ -32,6 +30,7 @@ class Customers 'deliveries' => Deliveries::getAll('sale_channel')->toArray(), 'orders' => $orders_datatable->html(), ]; + return $data; } @@ -39,16 +38,17 @@ class Customers { $customer = $id ? self::get($id) : self::getAuth(); $file = self::makeAvatarFilename($customer); - if (!File::checkFile($file)) { + if (! File::checkFile($file)) { self::createAvatar($customer); } + return self::getPublic(self::getAvatarFilename($customer)); } public static function createAvatar($customer) { $filename = self::makeAvatarFilename($customer); - $name = $customer->first_name . ' ' . $customer->last_name; + $name = $customer->first_name.' '.$customer->last_name; $avatar = new Avatar(); $ret = $avatar->create($name) ->setBackground('#F2B90F') @@ -58,6 +58,7 @@ class Customers ->setDimension(36) ->setFontSize(16) ->save($filename); + return $ret; } @@ -65,19 +66,21 @@ class Customers { $path = storage_path(self::getStorage()); if (File::checkDirOrCreate($path)) { - $filename = $path . self::getAvatarFilename($customer); + $filename = $path.self::getAvatarFilename($customer); } + return $filename ?? false; } public static function getAvatarFilename($customer) { - return 'user-' . $customer->uuid . '.png'; + return 'user-'.$customer->uuid.'.png'; } public static function getAddresses($id = false) { $customer = self::getWithAddresses($id); + return $customer ? $customer->addresses : false; } @@ -89,7 +92,8 @@ class Customers public static function getName($id = false) { $user = $id ? self::get($id) : self::getAuth(); - return $user ? $user->first_name . ' ' . $user->last_name : ''; + + return $user ? $user->first_name.' '.$user->last_name : ''; } public static function getAuth() @@ -110,6 +114,7 @@ class Customers public static function get($id = false, $relations = false) { $id = $id ? $id : self::getId(); + return $id ? ($relations ? Customer::with($relations)->findOrFail($id) : Customer::findOrFail($id)) : false; } @@ -118,6 +123,7 @@ class Customers $customer = self::get($id, 'addresses'); $data = $customer->toArray(); $data['deliveries'] = $customer->deliveries->pluck('id')->toArray(); + return $data; } @@ -130,6 +136,7 @@ class Customers $customer = self::store($data); self::storeDeliveries($customer, $deliveries); self::storeAddresses($customer, $addresses); + return $customer->id; } @@ -140,7 +147,7 @@ class Customers public static function storeDeliveries($customer, $deliveries) { - if (!$deliveries) { + if (! $deliveries) { return false; } $deliveries = collect($deliveries)->transform( @@ -148,6 +155,7 @@ class Customers return (int) $item; } )->toArray(); + return $customer->deliveries()->sync($deliveries); } @@ -176,6 +184,7 @@ class Customers 'email' => $data['email'], 'password' => bcrypt($data['password']), ]); + return $user; } @@ -184,6 +193,7 @@ class Customers $id = $id ? $id : $data['id']; $customer = self::get($id); $customer->update($data); + return $customer; } @@ -195,13 +205,15 @@ class Customers public static function getStorage($filename = false) { $path = '/app/public/Customers/'; - return $filename ? $path . $filename : $path; + + return $filename ? $path.$filename : $path; } public static function getPublic($filename = false) { $path = '/storage/Customers/'; - return $filename ? $path . $filename : $path; + + return $filename ? $path.$filename : $path; } public static function guard() diff --git a/app/Repositories/Shop/Dashboards.php b/app/Repositories/Shop/Dashboards.php index 46d53b25..ce68bf17 100644 --- a/app/Repositories/Shop/Dashboards.php +++ b/app/Repositories/Shop/Dashboards.php @@ -2,11 +2,8 @@ namespace App\Repositories\Shop; -use App\Models\Shop\Homepage; - class Dashboards { - public static function getStats($start, $end) { return [ diff --git a/app/Repositories/Shop/Deliveries.php b/app/Repositories/Shop/Deliveries.php index efba3df3..7e59d8c1 100644 --- a/app/Repositories/Shop/Deliveries.php +++ b/app/Repositories/Shop/Deliveries.php @@ -14,6 +14,7 @@ class Deliveries public static function getAll($relations = false) { $model = $relations ? Delivery::with($relations) : Delivery::query(); + return $model->orderBy('name', 'asc')->get(); } @@ -31,6 +32,7 @@ class Deliveries { $id = $data['id'] ?? false; $item = $id ? self::update($data, $id) : self::create($data); + return $item->id; } @@ -44,6 +46,7 @@ class Deliveries $id = $id ? $id : $data['id']; $delivery = self::get($id); $delivery->update($data); + return $delivery; } diff --git a/app/Repositories/Shop/DeliveryPackages.php b/app/Repositories/Shop/DeliveryPackages.php new file mode 100644 index 00000000..59c06ac7 --- /dev/null +++ b/app/Repositories/Shop/DeliveryPackages.php @@ -0,0 +1,44 @@ +id; + } + + public static function create($data) + { + return DeliveryPackage::create($data); + } + + public static function update($data, $id = false) + { + $id = $id ? $id : $data['id']; + $item = self::get($id); + $item->update($data); + + return $item; + } + + public static function destroy($id) + { + return DeliveryPackage::destroy($id); + } +} diff --git a/app/Repositories/Shop/DeliveryTypeCalculations.php b/app/Repositories/Shop/DeliveryTypeCalculations.php index 60fb0b12..4aa26945 100644 --- a/app/Repositories/Shop/DeliveryTypeCalculations.php +++ b/app/Repositories/Shop/DeliveryTypeCalculations.php @@ -6,13 +6,49 @@ use App\Models\Shop\DeliveryTypeCalculation; class DeliveryTypeCalculations { - public static function getByDeliveryType($type_id) + public static function getByDeliveryType($typeId) { - return DeliveryTypeCalculation::byDeliveryTpe($type_id)->get(); + return DeliveryTypeCalculation::byDeliveryTpe($typeId)->get(); } - public static function getPrice($type_id, $weight) + public static function getPrice($typeId, $weight) { - return DeliveryTypeCalculation::byDeliveryType($type_id)->byWeight($weight)->get(); + return DeliveryTypeCalculation::byDeliveryType($typeId)->byWeight($weight)->get(); + } + + public static function getOptions() + { + return DeliveryTypeCalculation::pluck('name', 'id'); + } + + public static function get($id) + { + return DeliveryTypeCalculation::find($id); + } + + public static function store($data) + { + $item = ($data['id'] ?? false) ? self::update($data) : self::create($data); + + return $item->id; + } + + public static function create($data) + { + return DeliveryTypeCalculation::create($data); + } + + public static function update($data, $id = false) + { + $id = $id ? $id : $data['id']; + $item = self::get($id); + $item->update($data); + + return $item; + } + + public static function destroy($id) + { + return DeliveryTypeCalculation::destroy($id); } } diff --git a/app/Repositories/Shop/DeliveryTypes.php b/app/Repositories/Shop/DeliveryTypes.php index 7d500aef..e75e01ad 100644 --- a/app/Repositories/Shop/DeliveryTypes.php +++ b/app/Repositories/Shop/DeliveryTypes.php @@ -10,4 +10,35 @@ class DeliveryTypes { return DeliveryType::pluck('name', 'id'); } + + public static function get($id) + { + return DeliveryType::find($id); + } + + public static function store($data) + { + $item = ($data['id'] ?? false) ? self::update($data) : self::create($data); + + return $item->id; + } + + public static function create($data) + { + return DeliveryType::create($data); + } + + public static function update($data, $id = false) + { + $id = $id ? $id : $data['id']; + $item = self::get($id); + $item->update($data); + + return $item; + } + + public static function destroy($id) + { + return DeliveryType::destroy($id); + } } diff --git a/app/Repositories/Shop/Homepages.php b/app/Repositories/Shop/Homepages.php index 16d11a90..ef6c0861 100644 --- a/app/Repositories/Shop/Homepages.php +++ b/app/Repositories/Shop/Homepages.php @@ -6,10 +6,10 @@ use App\Models\Shop\Homepage; class Homepages { - public static function getLast() { $model = Homepage::latest('id')->first(); + return $model ? $model->text : ''; } @@ -36,6 +36,7 @@ class Homepages public static function store($data) { $item = ($data['id'] ?? false) ? self::update($data) : self::create($data); + return $item->id; } @@ -49,6 +50,7 @@ class Homepages $id = $id ? $id : $data['id']; $item = self::get($id); $item->update($data); + return $item; } diff --git a/app/Repositories/Shop/InvoicePayments.php b/app/Repositories/Shop/InvoicePayments.php index dea103e8..8e746001 100644 --- a/app/Repositories/Shop/InvoicePayments.php +++ b/app/Repositories/Shop/InvoicePayments.php @@ -2,13 +2,10 @@ namespace App\Repositories\Shop; -use Illuminate\Support\Str; - use App\Models\Shop\InvoicePayment; class InvoicePayments { - public static function get($id, $relations = false) { return $relations ? InvoicePayment::with($relations)->findOrFail($id) : InvoicePayment::findOrFail($id); @@ -29,6 +26,7 @@ class InvoicePayments $id = $id ? $id : $data['id']; $item = self::get($id); $item->update($data); + return $item; } diff --git a/app/Repositories/Shop/InvoiceStats.php b/app/Repositories/Shop/InvoiceStats.php index 1679d0cb..62a24191 100644 --- a/app/Repositories/Shop/InvoiceStats.php +++ b/app/Repositories/Shop/InvoiceStats.php @@ -6,7 +6,7 @@ use Spatie\Stats\BaseStats; class InvoiceStats extends BaseStats { - public function getName() : string + public function getName(): string { return 'invoices'; } diff --git a/app/Repositories/Shop/Invoices.php b/app/Repositories/Shop/Invoices.php index 78988561..cc5fd687 100644 --- a/app/Repositories/Shop/Invoices.php +++ b/app/Repositories/Shop/Invoices.php @@ -2,9 +2,9 @@ namespace App\Repositories\Shop; -use Illuminate\Support\Str; -use Carbon\Carbon; use App\Models\Shop\Invoice; +use Carbon\Carbon; +use Illuminate\Support\Str; class Invoices { @@ -19,6 +19,7 @@ class Invoices 'order' => $order->toArray(), 'customer' => $customer->toArray(), ]; + return view('Shop.Invoices.mail', $data)->render(); } @@ -30,6 +31,7 @@ class Invoices public static function saveInvoice($order_id, $data) { $data['order_id'] = $order_id; + return self::store($data); } @@ -46,6 +48,7 @@ class Invoices public static function countByMonth() { $start = Carbon::now()->beginOfMonth(); + return Invoice::where('created_at', '>', $start); } @@ -59,6 +62,7 @@ class Invoices InvoiceStats::increase($data['total_taxed']); $data['uuid'] = Str::uuid()->toString(); $data['ref'] = self::getNewRef(); + return Invoice::create($data); } @@ -67,6 +71,7 @@ class Invoices $id = $id ? $id : $data['id']; $item = self::get($id); $item->update($data); + return $item; } @@ -74,13 +79,15 @@ class Invoices { $invoice = self::get($id); InvoiceStats::decrease($invoice->total_priced); + return Invoice::destroy($id); } public static function getNewRef() { - $ref = date('ym') . '00000'; + $ref = date('ym').'00000'; $last_ref = Invoice::orderBy('id', 'desc')->first(); + return $last_ref ? $last_ref->ref + 1 : $ref + 1; } diff --git a/app/Repositories/Shop/Merchandises.php b/app/Repositories/Shop/Merchandises.php index 2351d30f..150fc883 100644 --- a/app/Repositories/Shop/Merchandises.php +++ b/app/Repositories/Shop/Merchandises.php @@ -2,8 +2,8 @@ namespace App\Repositories\Shop; -use App\Repositories\Core\Tag; use App\Models\Shop\Merchandise; +use App\Repositories\Core\Tag; use App\Traits\Repository\Imageable; class Merchandises @@ -17,6 +17,7 @@ class Merchandises foreach ($data as $key => $name) { $export[] = ['value' => $key, 'text' => $name]; } + return $export; } @@ -37,7 +38,7 @@ class Merchandises public static function getStatuses() { - return ['Actif','Suspendu','Invisible','Obsolete']; + return ['Actif', 'Suspendu', 'Invisible', 'Obsolete']; } public static function getAll() @@ -53,6 +54,7 @@ class Merchandises public static function getFull($id) { $data = self::get($id)->toArray(); + return $data; } @@ -65,6 +67,7 @@ class Merchandises { $id = isset($data['id']) ? $data['id'] : false; $item = $id ? self::update($data, $id) : self::create($data); + return $item; } @@ -77,6 +80,7 @@ class Merchandises $merchandise = self::store($data); self::storeImages($merchandise, $images); self::storeTags($merchandise, $tags); + return $merchandise; } @@ -95,6 +99,7 @@ class Merchandises $id = $id ? $id : $data['id']; $item = self::get($id); $item->update($data); + return $item; } diff --git a/app/Repositories/Shop/Offers.php b/app/Repositories/Shop/Offers.php index 41807b8c..b3971ebe 100644 --- a/app/Repositories/Shop/Offers.php +++ b/app/Repositories/Shop/Offers.php @@ -3,7 +3,6 @@ namespace App\Repositories\Shop; use App\Models\Shop\Offer; -use App\Repositories\Core\User\ShopCart; class Offers { @@ -29,6 +28,7 @@ class Offers ])->find($id); $images = Articles::getFullImagesByArticle($offer->article); $offer->article->image = Articles::getPreviewSrc($images[0] ?? false); + return $offer; } @@ -36,6 +36,7 @@ class Offers { $sale_channel_id = $sale_channel_id ? $sale_channel_id : SaleChannels::getDefaultID(); $offer = Offer::withPriceBySaleChannelByQuantity($sale_channel_id, $quantity)->find($id); + return $offer->price_lists->first()->price_list_values->first(); } @@ -57,6 +58,7 @@ class Offers public static function getOffersBySaleChannelRaw($sale_channel_id = false) { $sale_channel_id = $sale_channel_id ? $sale_channel_id : SaleChannels::getDefaultID(); + return Offer::active()->byStockAvailable() ->with([ 'article_nature', @@ -77,9 +79,10 @@ class Offers public static function getThumbSrc(Offer $offer) { $image = $offer->article ? Articles::getFullImageByArticle($offer->article) : false; + return $image ? Articles::getThumbSrc($image) : false; } - + public static function getLast() { return Offer::with(['article.image'])->active()->orderByDesc('updated_at')->get(); @@ -92,6 +95,7 @@ class Offers $offers1 = self::getByCategory($category_id)->toArray(); $offers2 = self::getByTags($tags)->toArray(); $data = array_merge($offers1, $offers2); + return $data; } @@ -130,6 +134,7 @@ class Offers $id = $id ? $id : $data['id']; $item = self::get($id); $item->update($data); + return $item; } diff --git a/app/Repositories/Shop/OrderDetails.php b/app/Repositories/Shop/OrderDetails.php index 61e37604..c1a3dd5c 100644 --- a/app/Repositories/Shop/OrderDetails.php +++ b/app/Repositories/Shop/OrderDetails.php @@ -12,6 +12,7 @@ class OrderDetails $item['order_id'] = $order_id; $detail = self::store($item); } + return true; } @@ -35,6 +36,7 @@ class OrderDetails $id = $id ? $id : $data['id']; $item = self::get($id); $item->update($data); + return $item; } diff --git a/app/Repositories/Shop/OrderStats.php b/app/Repositories/Shop/OrderStats.php index b27cab25..b5c8b704 100644 --- a/app/Repositories/Shop/OrderStats.php +++ b/app/Repositories/Shop/OrderStats.php @@ -6,7 +6,7 @@ use Spatie\Stats\BaseStats; class OrderStats extends BaseStats { - public function getName() : string + public function getName(): string { return 'orders'; } diff --git a/app/Repositories/Shop/Orders.php b/app/Repositories/Shop/Orders.php index fd3414c6..643f0295 100644 --- a/app/Repositories/Shop/Orders.php +++ b/app/Repositories/Shop/Orders.php @@ -2,15 +2,14 @@ namespace App\Repositories\Shop; -use Carbon\Carbon; use App\Mail\Acheminement; use App\Mail\ConfirmationCommande; use App\Mail\Preparation; use App\Models\Shop\Order; use App\Repositories\Core\DateStats; -use Illuminate\Support\Arr; -use Illuminate\Support\Str; +use Carbon\Carbon; use Illuminate\Support\Facades\Mail; +use Illuminate\Support\Str; class Orders { @@ -35,6 +34,7 @@ class Orders unset($data['detail']); unset($data['payment_type']); unset($data['sale_channel_id']); + return ($order && $detail) ? Invoices::saveInvoice($order->id, $data) : false; } @@ -47,6 +47,7 @@ class Orders { $order = self::get($order_id, ['customer', 'address']); $mail = new ConfirmationCommande($order); + return Mail::to($order->customer->email)->send($mail); } @@ -54,6 +55,7 @@ class Orders { $order = self::get($order_id, ['customer', 'address']); $mail = new Preparation($order); + return Mail::to($order->customer->email)->send($mail); } @@ -61,6 +63,7 @@ class Orders { $order = self::get($order_id, ['customer', 'address']); $mail = new Acheminement($order); + return Mail::to($order->customer->email)->send($mail); } @@ -73,6 +76,7 @@ class Orders { $start = Carbon::now()->subHours(24); $end = Carbon::now(); + return Order::preparation()->byPeriod($start, $end, 'updated_at')->count(); } @@ -80,12 +84,14 @@ class Orders { $start = Carbon::now()->subHours(48); $end = Carbon::now(); + return Order::preparation()->byPeriod($start, $end, 'updated_at')->count(); } public static function countInPreparationMore48H() { $start = Carbon::now()->subHours(48); + return Order::preparation()->where('updated_at', '>', $start)->count(); } @@ -120,6 +126,7 @@ class Orders OrderStats::increase(); $data['uuid'] = Str::uuid()->toString(); $data['ref'] = self::getNewRef(); + return Order::create($data); } @@ -128,6 +135,7 @@ class Orders $id = $id ? $id : $data['id']; $item = self::get($id); $item->update($data); + return $item; } @@ -150,6 +158,7 @@ class Orders public static function getStatusByName($name) { $data = array_flip(self::statuses()); + return $data[$name] ?? ''; } @@ -170,8 +179,9 @@ class Orders public static function getNewRef() { - $ref = date('ym') . '00000'; + $ref = date('ym').'00000'; $last_ref = Order::orderBy('id', 'desc')->first(); + return $last_ref ? $last_ref->ref + 1 : $ref + 1; } diff --git a/app/Repositories/Shop/Packages.php b/app/Repositories/Shop/Packages.php index b0cec4b5..2a8932bf 100644 --- a/app/Repositories/Shop/Packages.php +++ b/app/Repositories/Shop/Packages.php @@ -6,7 +6,6 @@ use App\Models\Shop\Package; class Packages { - public static function getOptions() { return Package::orderBy('value', 'asc')->pluck('value', 'id')->toArray(); @@ -31,6 +30,7 @@ class Packages { $id = isset($data['id']) ? $data['id'] : false; $item = $id ? self::update($data) : self::create($data); + return $item->id; } @@ -44,6 +44,7 @@ class Packages $id = $id ? $id : $data['id']; $item = self::get($id); $item->update($data); + return $item; } diff --git a/app/Repositories/Shop/Paybox.php b/app/Repositories/Shop/Paybox.php index fa110120..e93066c5 100644 --- a/app/Repositories/Shop/Paybox.php +++ b/app/Repositories/Shop/Paybox.php @@ -3,14 +3,12 @@ namespace App\Repositories\Shop; use App; - use Devpark\PayboxGateway\Requests\AuthorizationWithCapture; -use Devpark\PayboxGateway\Responses\Verify; use Devpark\PayboxGateway\Requests\Capture; +use Devpark\PayboxGateway\Responses\Verify; class Paybox { - public static function makeAuthorizationRequest($amount, $customer_email = 'test@example.com') { $authorizationRequest = App::make(AuthorizationWithCapture::class); @@ -26,11 +24,10 @@ class Paybox try { $success = $payboxVerify->isSuccess($invoice->total_shipped); if ($success) { - // process order here after making sure it was real payment + // process order here after making sure it was real payment } - echo "OK"; - } - catch (InvalidSignature $e) { + echo 'OK'; + } catch (InvalidSignature $e) { Log::alert('Invalid payment signature detected'); } } @@ -44,10 +41,9 @@ class Paybox ->setPayboxTransactionNumber($payment->transaction_number) ->setDayRequestNumber(2) ->send(); - + if ($response->isSuccess()) { - // process order here + // process order here } } - } diff --git a/app/Repositories/Shop/PriceListValues.php b/app/Repositories/Shop/PriceListValues.php index fa97e36c..ce1bb056 100644 --- a/app/Repositories/Shop/PriceListValues.php +++ b/app/Repositories/Shop/PriceListValues.php @@ -2,20 +2,16 @@ namespace App\Repositories\Shop; -use Illuminate\Support\Facades\DB; -use Illuminate\Support\Str; - -use App\Models\Shop\PriceListValue; -use App\Models\Shop\PriceList; use App\Models\Shop\Offer; +use App\Models\Shop\PriceListValue; class PriceListValues { - public static function getPriceByOffer($offer_id, $quantity = 1, $sale_channel_id = false) { $prices = self::getPricesByOffer($offer_id, $sale_channel_id); $price = $prices ? $prices->where('quantity', '<=', $quantity)->sortByDesc('quantity')->first() : false; + return $price ? $price->price_taxed : false; } @@ -26,6 +22,7 @@ class PriceListValues $sale_channel_id ? $query->bySaleChannel($sale_channel_id) : $query; }, ])->find($offer_id)->price_lists->first(); + return $price_list ? $price_list->price_list_values : false; } @@ -58,6 +55,7 @@ class PriceListValues { $id = isset($data['id']) ? $data['id'] : false; $price = $id ? self::update($data) : self::create($data); + return $price; } @@ -71,6 +69,7 @@ class PriceListValues $id = $id ? $id : $data['id']; $item = self::get($id); $item->update($data); + return $item; } diff --git a/app/Repositories/Shop/PriceLists.php b/app/Repositories/Shop/PriceLists.php index e8a19d36..e0aa0738 100644 --- a/app/Repositories/Shop/PriceLists.php +++ b/app/Repositories/Shop/PriceLists.php @@ -2,15 +2,10 @@ namespace App\Repositories\Shop; -use Illuminate\Support\Facades\Storage; -use Illuminate\Support\Facades\DB; -use Illuminate\Support\Str; - use App\Models\Shop\PriceList; class PriceLists { - public static function getByOfferAndSaleChannel($offer_id, $sale_channel_id) { return PriceList::bySaleChannel($sale_channel_id)->byOffer($offer_id)->get(); @@ -28,7 +23,7 @@ class PriceLists public static function getStatuses() { - return ['Actif','Suspendu','Invisible','Obsolete']; + return ['Actif', 'Suspendu', 'Invisible', 'Obsolete']; } public static function getByTariff($id) @@ -53,6 +48,7 @@ class PriceLists if ($n <= 3) { $price_list['price_list_values'] += array_fill($n, 3 - $n, ''); } + return $price_list; } @@ -78,6 +74,7 @@ class PriceLists unset($data['price_list_values']); $price_list = $id ? self::update($data) : self::create($data); PriceListValues::storePrices($price_list->id, $price_list_values); + return $price_list; } @@ -91,6 +88,7 @@ class PriceLists $id = $id ? $id : $data['id']; $item = self::get($id); $item->update($data); + return $item; } diff --git a/app/Repositories/Shop/Prices.php b/app/Repositories/Shop/Prices.php index ba37439c..bc3ac1bc 100644 --- a/app/Repositories/Shop/Prices.php +++ b/app/Repositories/Shop/Prices.php @@ -2,14 +2,8 @@ namespace App\Repositories\Shop; -use Illuminate\Support\Facades\Storage; -use Illuminate\Support\Facades\DB; -use Illuminate\Support\Str; - -use Yajra\DataTables\DataTables; - -use App\Models\Shop\Article; use App\Models\Shop\Price; +use Yajra\DataTables\DataTables; class Prices { @@ -17,12 +11,14 @@ class Prices { $data['prices'] = Price::byArticle($id)->notGeneric()->get()->toArray(); $data['generics'] = Price::byArticle($id)->generic()->with(['generic.prices', 'generic.category'])->get()->toArray(); + return $data; } public static function getDatatable() { $model = Price::orderBy('name'); + return Datatables::of($model)->make(true); } @@ -40,6 +36,7 @@ class Prices { $id = isset($data['id']) ? $data['id'] : false; $item = $id ? self::update($data) : self::create($data); + return $item->id; } @@ -53,6 +50,7 @@ class Prices $id = $id ? $id : $data['id']; $item = self::get($id); $item->update($data); + return $item; } diff --git a/app/Repositories/Shop/Producers.php b/app/Repositories/Shop/Producers.php index 2ba6fd31..91929c2d 100644 --- a/app/Repositories/Shop/Producers.php +++ b/app/Repositories/Shop/Producers.php @@ -2,8 +2,8 @@ namespace App\Repositories\Shop; -use App\Repositories\Core\Tag; use App\Models\Shop\Producer; +use App\Repositories\Core\Tag; use App\Traits\Repository\Imageable; class Producers @@ -17,6 +17,7 @@ class Producers foreach ($data as $key => $name) { $export[] = ['value' => $key, 'text' => $name]; } + return $export; } @@ -50,6 +51,7 @@ class Producers $producer = self::get($id); $data = $producer->toArray(); $data['tags'] = self::getTagsByProducer($producer); + return $data; } @@ -67,6 +69,7 @@ class Producers $producer = self::store($data); self::storeImages($producer, $images); self::storeTags($producer, $tags); + return $producer; } @@ -85,6 +88,7 @@ class Producers $id = $id ? $id : $data['id']; $item = self::get($id); $item->update($data); + return $item; } diff --git a/app/Repositories/Shop/SaleChannels.php b/app/Repositories/Shop/SaleChannels.php index ac1fca56..9ccb8fe7 100644 --- a/app/Repositories/Shop/SaleChannels.php +++ b/app/Repositories/Shop/SaleChannels.php @@ -9,6 +9,7 @@ class SaleChannels public static function getDefaultID() { $default = self::getDefault(); + return $default ? self::getDefault()->id : false; } @@ -41,6 +42,7 @@ class SaleChannels { $id = isset($data['id']) ? $data['id'] : false; $item = $id ? self::update($data) : self::create($data); + return $item->id; } @@ -54,6 +56,7 @@ class SaleChannels $id = $id ? $id : $data['id']; $item = self::get($id); $item->update($data); + return $item; } diff --git a/app/Repositories/Shop/Searches.php b/app/Repositories/Shop/Searches.php index 42563190..6ce6c7b6 100644 --- a/app/Repositories/Shop/Searches.php +++ b/app/Repositories/Shop/Searches.php @@ -2,8 +2,6 @@ namespace App\Repositories\Shop; -use App\Models\Shop\Article; - class Searches { public static function getResults($options) diff --git a/app/Repositories/Shop/TagGroups.php b/app/Repositories/Shop/TagGroups.php index b538980e..61bb3ab0 100644 --- a/app/Repositories/Shop/TagGroups.php +++ b/app/Repositories/Shop/TagGroups.php @@ -2,14 +2,12 @@ namespace App\Repositories\Shop; -use Illuminate\Support\Str; - -use App\Models\Shop\TagGroup; use App\Models\Shop\Tag; +use App\Models\Shop\TagGroup; +use Illuminate\Support\Str; class TagGroups { - public static function getOptions() { return TagGroup::get()->SortBy('name')->pluck('name', 'id')->toArray(); @@ -21,7 +19,7 @@ class TagGroups $tag_groups = TagGroup::pluck('name', 'id')->toArray(); foreach ($tags as $tag) { $data[$tag['tag_group_id']]['name'] = $tag_groups[$tag['tag_group_id']]; - if (!$tag['articles_count']) { + if (! $tag['articles_count']) { continue; } $data[$tag['tag_group_id']]['tags'][] = [ @@ -30,6 +28,7 @@ class TagGroups 'count' => $tag['articles_count'], ]; } + return $data; } @@ -40,13 +39,14 @@ class TagGroups foreach ($items as $group) { $group_tags = []; foreach ($group->tags as $tag) { - $group_tags[$tag->id] = $group->name . ' - ' . $tag->name; + $group_tags[$tag->id] = $group->name.' - '.$tag->name; } $tags[] = [ - 'label' => $group->name, - 'options' => $group_tags, + 'label' => $group->name, + 'options' => $group_tags, ]; } + return $tags; } @@ -73,12 +73,14 @@ class TagGroups public static function store($data) { $item = ($data['id'] ?? false) ? self::update($data) : self::create($data); + return $item->id; } public static function create($data) { $data['slug'] = Str::slug($data['name']); + return TagGroup::create($data); } @@ -91,6 +93,7 @@ class TagGroups } $model->update($data); Tags::updateGroup($id, $data['name']); + return $model; } diff --git a/app/Repositories/Shop/Tags.php b/app/Repositories/Shop/Tags.php index 6c785be8..8b43e708 100644 --- a/app/Repositories/Shop/Tags.php +++ b/app/Repositories/Shop/Tags.php @@ -2,15 +2,14 @@ namespace App\Repositories\Shop; -use Illuminate\Support\Str; use App\Models\Shop\Tag; +use Illuminate\Support\Str; class Tags { - public static function getTagHtml($tag) { - return '' . self::getFullnameByTag($tag) . ''; + return ''.self::getFullnameByTag($tag).''; } public static function getOptions() @@ -32,8 +31,9 @@ class Tags { $tags = Tag::with('tag_group')->get()->toArray(); foreach ($tags as $tag) { - $data[$tag['id']] = $tag['tag_group']['name'] . '-' . $tag['name']; + $data[$tag['id']] = $tag['tag_group']['name'].'-'.$tag['name']; } + return $data; } @@ -45,12 +45,13 @@ class Tags public static function getFullname($id) { $tag = Tag::with('tag_group')->find($id); + return $tag ? self::getFullnameByTag($tag) : false; } public static function getFullnameByTag($tag) { - return $tag->tag_group->name . '-' . $tag->name; + return $tag->tag_group->name.'-'.$tag->name; } public static function get($id) @@ -61,6 +62,7 @@ class Tags public static function store($data) { $item = ($data['id'] ?? false) ? self::update($data) : self::create($data); + return $item->id; } @@ -70,10 +72,10 @@ class Tags $data['group'] = TagGroups::getName($data['tag_group_id']); $data['sort_order'] = self::getNewOrder($data['tag_group_id']); $tag = Tag::create($data); + return $tag; } - public static function update($data, $id = false) { $id = $id ? $id : $data['id']; @@ -81,6 +83,7 @@ class Tags $data['slug'] = self::buildSlug($data); $data['group'] = TagGroups::getName($data['tag_group_id']); $tag->update($data); + return $tag; } @@ -102,6 +105,7 @@ class Tags public static function getNewOrder($tag_group_id) { $tag = Tag::byGroup($tag_group_id)->orderBy('sort_order', 'desc')->first(); + return $tag ? (int) $tag->sort_order + 1 : 1; } } diff --git a/app/Repositories/Shop/TariffUnities.php b/app/Repositories/Shop/TariffUnities.php index 0a50b37b..826724d1 100644 --- a/app/Repositories/Shop/TariffUnities.php +++ b/app/Repositories/Shop/TariffUnities.php @@ -25,6 +25,7 @@ class TariffUnities { $id = isset($data['id']) ? $data['id'] : false; $item = $id ? self::update($data, $id) : self::create($data); + return $item->id; } @@ -38,6 +39,7 @@ class TariffUnities $id = $id ? $id : $data['id']; $item = self::get($id); $item->update($data); + return $item; } diff --git a/app/Repositories/Shop/Tariffs.php b/app/Repositories/Shop/Tariffs.php index 9d75be82..f5a33e59 100644 --- a/app/Repositories/Shop/Tariffs.php +++ b/app/Repositories/Shop/Tariffs.php @@ -13,6 +13,7 @@ class Tariffs foreach ($data as $key => $name) { $export[] = ['value' => $key, 'text' => $name]; } + return $export; } @@ -55,6 +56,7 @@ class Tariffs { $id = isset($data['id']) ? $data['id'] : false; $item = $id ? self::update($data, $id) : self::create($data); + return $item->id; } @@ -68,6 +70,7 @@ class Tariffs $id = $id ? $id : $data['id']; $item = self::get($id); $item->update($data); + return $item; } diff --git a/app/Repositories/Shop/Taxes.php b/app/Repositories/Shop/Taxes.php index a73c25ff..f4a1e330 100644 --- a/app/Repositories/Shop/Taxes.php +++ b/app/Repositories/Shop/Taxes.php @@ -2,17 +2,10 @@ namespace App\Repositories\Shop; -use Illuminate\Support\Facades\Storage; -use Illuminate\Support\Facades\DB; -use Illuminate\Support\Str; - -use Yajra\DataTables\DataTables; - use App\Models\Shop\Tax; class Taxes { - public static function getOptions() { return Tax::orderBy('value', 'asc')->get()->pluck('value', 'id')->toArray(); @@ -32,6 +25,7 @@ class Taxes { $id = isset($data['id']) ? $data['id'] : false; $item = $id ? self::update($data) : self::create($data); + return $item->id; } @@ -45,6 +39,7 @@ class Taxes $id = $id ? $id : $data['id']; $item = self::get($id); $item->update($data); + return $item; } diff --git a/app/Repositories/Shop/Traits/MailCustomers.php b/app/Repositories/Shop/Traits/MailCustomers.php index 3ae2a99b..dd7767ff 100644 --- a/app/Repositories/Shop/Traits/MailCustomers.php +++ b/app/Repositories/Shop/Traits/MailCustomers.php @@ -2,8 +2,6 @@ namespace App\Repositories\Shop\Traits; -use App\Repositories\Shop\Customers; -use App\Repositories\Core\DateTime; use Illuminate\Mail\Mailables\Address; use Illuminate\Mail\Mailables\Envelope; diff --git a/app/Repositories/Shop/Unities.php b/app/Repositories/Shop/Unities.php index 1a26e2a3..191ee464 100644 --- a/app/Repositories/Shop/Unities.php +++ b/app/Repositories/Shop/Unities.php @@ -35,6 +35,7 @@ class Unities { $id = isset($data['id']) ? $data['id'] : false; $item = $id ? self::update($data, $id) : self::create($data); + return $item->id; } @@ -48,6 +49,7 @@ class Unities $id = $id ? $id : $data['id']; $item = self::get($id); $item->update($data); + return $item; } diff --git a/app/Repositories/Shop/Variations.php b/app/Repositories/Shop/Variations.php index 12e1857f..32e33768 100644 --- a/app/Repositories/Shop/Variations.php +++ b/app/Repositories/Shop/Variations.php @@ -2,9 +2,8 @@ namespace App\Repositories\Shop; -use Illuminate\Support\Str; - use App\Models\Shop\Variation; +use Illuminate\Support\Str; class Variations { @@ -15,6 +14,7 @@ class Variations foreach ($data as $key => $name) { $export[] = ['value' => $key, 'text' => $name]; } + return $export; } @@ -25,6 +25,7 @@ class Variations $data[$variation->id] = self::getName($variation); } natsort($data); + return $data; } @@ -35,12 +36,12 @@ class Variations public static function getName($variation) { - return $variation->package->value . ' ' . $variation->quantity . ' ' . ($variation->unity->value ?? null) . ' ' . Str::limit(strip_tags($variation->description), 15, ' (...)'); + return $variation->package->value.' '.$variation->quantity.' '.($variation->unity->value ?? null).' '.Str::limit(strip_tags($variation->description), 15, ' (...)'); } public static function buildName($data) { - return Packages::getName($data['package_id']) . ' ' . $data['quantity'] . ' ' . Unities::getName($data['unity_id']); + return Packages::getName($data['package_id']).' '.$data['quantity'].' '.Unities::getName($data['unity_id']); } public static function getAll() @@ -62,12 +63,14 @@ class Variations { $id = isset($data['id']) ? $data['id'] : false; $item = $id ? self::update($data) : self::create($data); + return $item->id; } public static function create($data) { $data['name'] = self::buildName($data); + return Variation::create($data); } @@ -77,6 +80,7 @@ class Variations $variation = self::get($id); $data['name'] = self::buildName($data); $variation->update($data); + return $variation; } diff --git a/app/Repositories/Users.php b/app/Repositories/Users.php index ac590d7c..0d113427 100644 --- a/app/Repositories/Users.php +++ b/app/Repositories/Users.php @@ -12,6 +12,7 @@ class Users extends parentUsers $data = parent::getInfo($id); $sale_channel_default = SaleChannels::getDefault(); $data['sale_channel'] = $sale_channel_default ? $sale_channel_default->toArray() : false; + return $data; } } diff --git a/app/Rules/Password.php b/app/Rules/Password.php index 261f38f2..46d05fb3 100644 --- a/app/Rules/Password.php +++ b/app/Rules/Password.php @@ -7,6 +7,7 @@ use Illuminate\Contracts\Validation\Rule; class Password implements Rule { private $length; + private $message; /** @@ -30,10 +31,10 @@ class Password implements Rule { $rules = [ '#.{'.$this->length.',}#' => 'boilerplate::password.rules.length', - '#[a-z]+#' => 'boilerplate::password.rules.letter', - '#[A-Z]+#' => 'boilerplate::password.rules.capital', - '#[0-9]+#' => 'boilerplate::password.rules.number', - '#[^A-Za-z0-9]+#' => 'boilerplate::password.rules.special', + '#[a-z]+#' => 'boilerplate::password.rules.letter', + '#[A-Z]+#' => 'boilerplate::password.rules.capital', + '#[0-9]+#' => 'boilerplate::password.rules.number', + '#[^A-Za-z0-9]+#' => 'boilerplate::password.rules.special', ]; foreach ($rules as $rule => $msg) { diff --git a/app/Traits/Auth/SendsPasswordResetEmails.php b/app/Traits/Auth/SendsPasswordResetEmails.php index d6cdda7a..6e3b3ab0 100644 --- a/app/Traits/Auth/SendsPasswordResetEmails.php +++ b/app/Traits/Auth/SendsPasswordResetEmails.php @@ -22,7 +22,6 @@ trait SendsPasswordResetEmails /** * Send a reset link to the given user. * - * @param \Illuminate\Http\Request $request * @return \Illuminate\Http\RedirectResponse|\Illuminate\Http\JsonResponse */ public function sendResetLinkEmail(Request $request) @@ -44,7 +43,6 @@ trait SendsPasswordResetEmails /** * Validate the email for the given request. * - * @param \Illuminate\Http\Request $request * @return void */ protected function validateEmail(Request $request) @@ -55,7 +53,6 @@ trait SendsPasswordResetEmails /** * Get the needed authentication credentials from the request. * - * @param \Illuminate\Http\Request $request * @return array */ protected function credentials(Request $request) @@ -66,7 +63,6 @@ trait SendsPasswordResetEmails /** * Get the response for a successful password reset link. * - * @param \Illuminate\Http\Request $request * @param string $response * @return \Illuminate\Http\RedirectResponse|\Illuminate\Http\JsonResponse */ @@ -80,7 +76,6 @@ trait SendsPasswordResetEmails /** * Get the response for a failed password reset link. * - * @param \Illuminate\Http\Request $request * @param string $response * @return \Illuminate\Http\RedirectResponse * @@ -95,8 +90,8 @@ trait SendsPasswordResetEmails } return back() - ->withInput($request->only('email')) - ->withErrors(['email' => trans($response)]); + ->withInput($request->only('email')) + ->withErrors(['email' => trans($response)]); } /** diff --git a/app/Traits/Model/CanComment.php b/app/Traits/Model/CanComment.php index bbe78a37..5adb7756 100644 --- a/app/Traits/Model/CanComment.php +++ b/app/Traits/Model/CanComment.php @@ -8,4 +8,4 @@ trait CanComment { return true; } -} \ No newline at end of file +} diff --git a/app/Traits/Model/HasComments.php b/app/Traits/Model/HasComments.php index 75241f1a..a2194fc4 100644 --- a/app/Traits/Model/HasComments.php +++ b/app/Traits/Model/HasComments.php @@ -2,10 +2,9 @@ namespace App\Traits\Model; -use Illuminate\Database\Eloquent\Model; use App\Contracts\Commentator; -use Illuminate\Database\Eloquent\Relations\MorphMany; use App\Models\Core\Comment; +use Illuminate\Database\Eloquent\Model; trait HasComments { @@ -32,5 +31,4 @@ trait HasComments return $this->comments()->save($comment); } - -} \ No newline at end of file +} diff --git a/app/Traits/Model/Imageable.php b/app/Traits/Model/Imageable.php index 6d299e2a..6911bb76 100644 --- a/app/Traits/Model/Imageable.php +++ b/app/Traits/Model/Imageable.php @@ -3,8 +3,8 @@ namespace App\Traits\Model; use Spatie\Image\Manipulations; -use Spatie\MediaLibrary\MediaCollections\Models\Media; use Spatie\MediaLibrary\InteractsWithMedia; +use Spatie\MediaLibrary\MediaCollections\Models\Media; trait Imageable { @@ -20,7 +20,7 @@ trait Imageable return $this->hasOne(Media::class, 'model_id')->where('model_type', get_class($this))->latest(); } - public function registerMediaConversions(Media $media = null) : void + public function registerMediaConversions(Media $media = null): void { $this->addMediaConversion('thumb')->fit(Manipulations::FIT_CROP, 32, 32); $this->addMediaConversion('mini')->fit(Manipulations::FIT_CROP, 96, 96); diff --git a/app/Traits/Repository/Imageable.php b/app/Traits/Repository/Imageable.php index 4fca96a8..35792910 100644 --- a/app/Traits/Repository/Imageable.php +++ b/app/Traits/Repository/Imageable.php @@ -19,6 +19,7 @@ trait Imageable public static function getThumb($image, $with_undefined = true) { $src = self::getThumbSrc($image, $with_undefined); + return $src ? "" : ''; } @@ -30,6 +31,7 @@ trait Imageable public static function getPreview($image, $with_undefined = true) { $src = self::getPreviewSrc($image, $with_undefined); + return $src ? "" : ''; } @@ -41,6 +43,7 @@ trait Imageable public static function getNormal($image, $with_undefined = true) { $src = self::getNormalSrc($image, $with_undefined); + return $src ? "" : ''; } @@ -52,6 +55,7 @@ trait Imageable public static function getImage($image, $with_undefined = true) { $src = self::getImageSrc($image, $with_undefined); + return $src ? "" : ''; } diff --git a/app/User.php b/app/User.php index d8c46aec..6922b568 100644 --- a/app/User.php +++ b/app/User.php @@ -3,15 +3,14 @@ namespace App; use Carbon\Carbon; -use Illuminate\Contracts\Auth\MustVerifyEmail; use Illuminate\Database\Eloquent\SoftDeletes; use Illuminate\Foundation\Auth\User as Authenticatable; use Illuminate\Notifications\Notifiable; -use Yadahan\AuthenticationLog\AuthenticationLogable; use Laratrust\Traits\LaratrustUserTrait; use Mpociot\Teamwork\Traits\UserHasTeams; use Sebastienheyd\Boilerplate\Notifications\NewUser as NewUserNotification; use Sebastienheyd\Boilerplate\Notifications\ResetPassword as ResetPasswordNotification; +use Yadahan\AuthenticationLog\AuthenticationLogable; /** * Sebastienheyd\Boilerplate\Models\User. @@ -46,10 +45,9 @@ use Sebastienheyd\Boilerplate\Notifications\ResetPassword as ResetPasswordNotifi * @method static \Illuminate\Database\Query\Builder|\Sebastienheyd\Boilerplate\Models\User whereRememberToken($value) * @method static \Illuminate\Database\Query\Builder|\Sebastienheyd\Boilerplate\Models\User whereRoleIs($role = '') * @method static \Illuminate\Database\Query\Builder|\Sebastienheyd\Boilerplate\Models\User whereUpdatedAt($value) + * * @mixin \Eloquent */ - - class User extends Authenticatable { use Notifiable; @@ -67,7 +65,6 @@ class User extends Authenticatable protected $hidden = ['password', 'remember_token']; - /** * The attributes that should be cast to native types. * @@ -104,8 +101,7 @@ class User extends Authenticatable /** * Send the password reset notification. * - * @param string $token - * + * @param string $token * @return void */ public function sendPasswordResetNotification($token) @@ -116,7 +112,7 @@ class User extends Authenticatable /** * Send notification when a new user is created. * - * @param string $token + * @param string $token */ public function sendNewUserNotification($token) { @@ -126,7 +122,6 @@ class User extends Authenticatable /** * Return last name in uppercase by default. * - * @param $value * * @return string */ @@ -138,7 +133,6 @@ class User extends Authenticatable /** * Return first name with first char of every word in uppercase. * - * @param $value * * @return string */ @@ -150,13 +144,12 @@ class User extends Authenticatable /** * Return a concatenation of first name and last_name if field name does not exists. * - * @param $value * * @return string */ public function getNameAttribute($value) { - if (!empty($value)) { + if (! empty($value)) { return $value; } @@ -166,9 +159,8 @@ class User extends Authenticatable /** * Return last login date formatted. * - * @param string $format - * @param string $default - * + * @param string $format + * @param string $default * @return mixed|string */ public function getLastLogin($format = 'YYYY-MM-DD HH:mm:ss', $default = '') diff --git a/app/View/Composers/Shop/LayoutComposer.php b/app/View/Composers/Shop/LayoutComposer.php index 3f117bf0..e8fd9a02 100644 --- a/app/View/Composers/Shop/LayoutComposer.php +++ b/app/View/Composers/Shop/LayoutComposer.php @@ -2,8 +2,8 @@ namespace App\View\Composers\Shop; -use Illuminate\View\View; use App\Repositories\Config; +use Illuminate\View\View; class LayoutComposer { diff --git a/composer.json b/composer.json index 1ee1f48a..16bad87d 100644 --- a/composer.json +++ b/composer.json @@ -49,6 +49,7 @@ "laracraft-tech/laravel-date-scopes": "^1.1", "laravel/framework": "^9.0", "laravel/helpers": "^1.1", + "laravel/pint": "^1.10", "laravel/scout": "^9.1", "laravel/tinker": "^2.5", "laravel/ui": "^3.0", @@ -59,7 +60,6 @@ "league/period": "^5.1", "livewire/livewire": "^2.4", "maatwebsite/excel": "^3.1", - "mad-web/laravel-initializer": "^3.3", "moneyphp/money": "^4.1", "mpdf/mpdf": "^8.0", "mpociot/teamwork": "^7.0", @@ -69,7 +69,6 @@ "php-console/php-console": "^3.1", "proengsoft/laravel-jsvalidation": "^4.5", "protonemedia/laravel-cross-eloquent-search": "^3.0", - "protonemedia/laravel-eloquent-where-not": "^1.2", "rahul900day/laravel-captcha": "^1.0", "ralphjsmit/laravel-seo": "^1.0", "reedware/laravel-relation-joins": "^3.0", @@ -117,11 +116,11 @@ "kitloong/laravel-migrations-generator": "^6.0", "mockery/mockery": "^1.4.2", "nunomaduro/collision": "^7.0", - "nunomaduro/larastan": "^2.1", + "nunomaduro/larastan": "^2.6", "nunomaduro/laravel-mojito": "^0.2.6", - "nunomaduro/phpinsights": "^2.6", + "nunomaduro/phpinsights": "^2.8", "orangehill/iseed": "^3.0", - "phpmetrics/phpmetrics": "^2.7", + "phpmetrics/phpmetrics": "^2.8", "phpunit/phpunit": "^9.5", "spatie/laravel-ignition": "^1.0", "spatie/laravel-web-tinker": "^1.7", diff --git a/config/apexcharts.php b/config/apexcharts.php index c2a9158d..e97f2354 100644 --- a/config/apexcharts.php +++ b/config/apexcharts.php @@ -35,19 +35,19 @@ return [ 'colors' => [ '#008FFB', '#00E396', '#feb019', '#ff455f', '#775dd0', '#80effe', - '#0077B5', '#ff6384', '#c9cbcf', '#0057ff', '#00a9f4', '#2ccdc9', '#5e72e4' + '#0077B5', '#ff6384', '#c9cbcf', '#0057ff', '#00a9f4', '#2ccdc9', '#5e72e4', ], 'series' => [], 'dataLabels' => [ - 'enabled' => false + 'enabled' => false, ], 'labels' => [], 'title' => [ - 'text' => [] + 'text' => [], ], 'subtitle' => [ @@ -60,16 +60,16 @@ return [ ], 'grid' => [ - 'show' => true + 'show' => true, ], 'markers' => [ 'size' => 4, 'colors' => [ '#008FFB', '#00E396', '#feb019', '#ff455f', '#775dd0', '#80effe', - '#0077B5', '#ff6384', '#c9cbcf', '#0057ff', '#00a9f4', '#2ccdc9', '#5e72e4' + '#0077B5', '#ff6384', '#c9cbcf', '#0057ff', '#00a9f4', '#2ccdc9', '#5e72e4', ], - 'strokeColors' => "#fff", + 'strokeColors' => '#fff', 'strokeWidth' => 2, 'hover' => [ 'size' => 7, @@ -81,8 +81,8 @@ return [ 'width' => 4, 'colors' => [ '#008FFB', '#00E396', '#feb019', '#ff455f', '#775dd0', '#80effe', - '#0077B5', '#ff6384', '#c9cbcf', '#0057ff', '#00a9f4', '#2ccdc9', '#5e72e4' - ] + '#0077B5', '#ff6384', '#c9cbcf', '#0057ff', '#00a9f4', '#2ccdc9', '#5e72e4', + ], ], ], diff --git a/config/boilerplate/app.php b/config/boilerplate/app.php index a251cf51..e4aea0e5 100644 --- a/config/boilerplate/app.php +++ b/config/boilerplate/app.php @@ -2,20 +2,20 @@ return [ // Backend routes prefix. Ex: "admin" => "http://..../admin" - 'prefix' => 'admin', + 'prefix' => 'admin', // Backend domain if different as current domain. Ex: "admin.mydomain.tld" - 'domain' => '', + 'domain' => '', // Redirect to this route after login 'redirectTo' => 'Admin.home', // Backend locale - 'locale' => config('app.locale'), + 'locale' => config('app.locale'), 'logs' => true, // When set to true, allows admins to view the site as a user of their choice - 'allowImpersonate' => false, + 'allowImpersonate' => false, ]; diff --git a/config/boilerplate/auth.php b/config/boilerplate/auth.php index 0e71e6e7..e8d6ea26 100644 --- a/config/boilerplate/auth.php +++ b/config/boilerplate/auth.php @@ -1,13 +1,13 @@ false, // Allow to register new users on backend login page + 'register' => false, // Allow to register new users on backend login page 'register_role' => 'backend_user', // Given role to new users (except the first one who is admin) - 'providers' => [ + 'providers' => [ 'users' => [ 'driver' => 'eloquent', - 'model' => App\Models\Core\Auth\User::class, - 'table' => 'users', + 'model' => App\Models\Core\Auth\User::class, + 'table' => 'users', ], ], 'throttle' => [ diff --git a/config/boilerplate/laratrust.php b/config/boilerplate/laratrust.php index d10ea08c..b623e035 100644 --- a/config/boilerplate/laratrust.php +++ b/config/boilerplate/laratrust.php @@ -1,7 +1,7 @@ App\Models\Core\Auth\User::class, - 'role' => App\Models\Core\Auth\Role::class, + 'user' => App\Models\Core\Auth\User::class, + 'role' => App\Models\Core\Auth\Role::class, 'permission' => App\Models\Core\Auth\Permission::class, ]; diff --git a/config/boilerplate/mediamanager.php b/config/boilerplate/mediamanager.php index bc78cf3b..826a00fa 100644 --- a/config/boilerplate/mediamanager.php +++ b/config/boilerplate/mediamanager.php @@ -1,12 +1,12 @@ '/storage', + 'base_url' => '/storage', 'tinymce_upload_dir' => 'edition', - 'thumbs_dir' => 'thumbs', - 'hide_thumbs_dir' => true, - 'authorized' => [ - 'size' => '2048', + 'thumbs_dir' => 'thumbs', + 'hide_thumbs_dir' => true, + 'authorized' => [ + 'size' => '2048', 'mimes' => [// @see https://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types) 'jpg', 'jpeg', @@ -34,32 +34,32 @@ return [ 'wmv', ], ], - 'filetypes' => [// Recognized filetypes - 'image' => 'png|jpg|jpeg|gif|svg', - 'word' => 'doc|docx|odt', - 'excel' => 'xls|xlsx|ods', - 'ppt' => 'ppt|pptx', - 'pdf' => 'pdf', - 'code' => 'php|js|java|python|ruby|go|c|cpp|sql|m|h|json|html|aspx', + 'filetypes' => [// Recognized filetypes + 'image' => 'png|jpg|jpeg|gif|svg', + 'word' => 'doc|docx|odt', + 'excel' => 'xls|xlsx|ods', + 'ppt' => 'ppt|pptx', + 'pdf' => 'pdf', + 'code' => 'php|js|java|python|ruby|go|c|cpp|sql|m|h|json|html|aspx', 'archive' => 'zip|tar\.gz|rar|rpm', - 'txt' => 'txt|pac|log|md', - 'audio' => 'mp3|wav|flac|3pg|aa|aac|ape|au|m4a|mpc|ogg', - 'video' => 'mkv|rmvb|flv|mp4|avi|wmv|rm|asf|mpeg', + 'txt' => 'txt|pac|log|md', + 'audio' => 'mp3|wav|flac|3pg|aa|aac|ape|au|m4a|mpc|ogg', + 'video' => 'mkv|rmvb|flv|mp4|avi|wmv|rm|asf|mpeg', ], - 'icons' => [// Icons linked to filetypes - 'file' => 'file', // default - 'image' => 'file-image', - 'word' => 'file-word', - 'excel' => 'file-excel', - 'ppt' => 'file-powerpoint', - 'pdf' => 'file-pdf', - 'code' => 'file-code', + 'icons' => [// Icons linked to filetypes + 'file' => 'file', // default + 'image' => 'file-image', + 'word' => 'file-word', + 'excel' => 'file-excel', + 'ppt' => 'file-powerpoint', + 'pdf' => 'file-pdf', + 'code' => 'file-code', 'archive' => 'file-zip', - 'txt' => 'file-text', - 'audio' => 'file-audio', - 'video' => 'file-video', + 'txt' => 'file-text', + 'audio' => 'file-audio', + 'video' => 'file-video', ], - 'filter' => [ + 'filter' => [ '.gitignore', '.git', '.htaccess', diff --git a/config/boilerplate/themes/black.php b/config/boilerplate/themes/black.php index 724e0ba6..1b0665fc 100644 --- a/config/boilerplate/themes/black.php +++ b/config/boilerplate/themes/black.php @@ -6,45 +6,45 @@ * Shadow : 0-4. */ return [ - 'navbar' => [ - 'bg' => 'gray-dark', - 'type' => 'dark', + 'navbar' => [ + 'bg' => 'gray-dark', + 'type' => 'dark', 'border' => true, - 'user' => [ + 'user' => [ 'visible' => false, - 'shadow' => 0, + 'shadow' => 0, ], ], 'sidebar' => [ - 'type' => 'dark', - 'shadow' => 0, - 'border' => false, + 'type' => 'dark', + 'shadow' => 0, + 'border' => false, 'compact' => false, - 'links' => [ - 'bg' => 'gray-dark', + 'links' => [ + 'bg' => 'gray-dark', 'shadow' => 0, ], - 'brand' => [ - 'bg' => 'gray-dark', + 'brand' => [ + 'bg' => 'gray-dark', 'logo' => [ - 'bg' => 'white', - 'icon' => '', - 'text' => 'BOilerplate', + 'bg' => 'white', + 'icon' => '', + 'text' => 'BOilerplate', 'shadow' => 2, ], ], - 'user' => [ + 'user' => [ 'visible' => true, - 'shadow' => 0, + 'shadow' => 0, ], ], - 'footer' => [ - 'visible' => true, + 'footer' => [ + 'visible' => true, 'vendorname' => 'Boilerplate', 'vendorlink' => '', ], - 'card' => [ - 'outline' => true, + 'card' => [ + 'outline' => true, 'default_color' => 'info', ], ]; diff --git a/config/boilerplate/themes/default.php b/config/boilerplate/themes/default.php index 281d7132..caa0b847 100644 --- a/config/boilerplate/themes/default.php +++ b/config/boilerplate/themes/default.php @@ -6,45 +6,45 @@ * Shadow : 0-4. */ return [ - 'navbar' => [ - 'bg' => 'white', - 'type' => 'light', + 'navbar' => [ + 'bg' => 'white', + 'type' => 'light', 'border' => true, - 'user' => [ + 'user' => [ 'visible' => false, - 'shadow' => 0, + 'shadow' => 0, ], ], 'sidebar' => [ - 'type' => 'dark', - 'shadow' => 4, - 'border' => false, + 'type' => 'dark', + 'shadow' => 4, + 'border' => false, 'compact' => false, - 'links' => [ - 'bg' => 'blue', + 'links' => [ + 'bg' => 'blue', 'shadow' => 1, ], - 'brand' => [ - 'bg' => 'gray-dark', + 'brand' => [ + 'bg' => 'gray-dark', 'logo' => [ - 'bg' => 'blue', - 'icon' => '', - 'text' => 'BOilerplate', + 'bg' => 'blue', + 'icon' => '', + 'text' => 'BOilerplate', 'shadow' => 2, ], ], - 'user' => [ + 'user' => [ 'visible' => true, - 'shadow' => 2, + 'shadow' => 2, ], ], - 'footer' => [ - 'visible' => true, + 'footer' => [ + 'visible' => true, 'vendorname' => 'Boilerplate', 'vendorlink' => '', ], - 'card' => [ - 'outline' => true, + 'card' => [ + 'outline' => true, 'default_color' => 'info', ], ]; diff --git a/config/boilerplate/themes/green.php b/config/boilerplate/themes/green.php index 473de279..b1d20996 100644 --- a/config/boilerplate/themes/green.php +++ b/config/boilerplate/themes/green.php @@ -6,45 +6,45 @@ * Shadow : 0-4. */ return [ - 'navbar' => [ - 'bg' => 'green', - 'type' => 'dark', + 'navbar' => [ + 'bg' => 'green', + 'type' => 'dark', 'border' => true, - 'user' => [ + 'user' => [ 'visible' => true, - 'shadow' => 0, + 'shadow' => 0, ], ], 'sidebar' => [ - 'type' => 'dark', - 'shadow' => 0, - 'border' => true, + 'type' => 'dark', + 'shadow' => 0, + 'border' => true, 'compact' => false, - 'links' => [ - 'bg' => 'green', + 'links' => [ + 'bg' => 'green', 'shadow' => 0, ], - 'brand' => [ - 'bg' => 'green', + 'brand' => [ + 'bg' => 'green', 'logo' => [ - 'bg' => 'green', - 'icon' => '', - 'text' => 'Jardin\'enVie', + 'bg' => 'green', + 'icon' => '', + 'text' => 'Jardin\'enVie', 'shadow' => 2, ], ], - 'user' => [ + 'user' => [ 'visible' => false, - 'shadow' => 2, + 'shadow' => 2, ], ], - 'footer' => [ - 'visible' => true, + 'footer' => [ + 'visible' => true, 'vendorname' => 'JardinEnvie', 'vendorlink' => '', ], - 'card' => [ - 'outline' => true, + 'card' => [ + 'outline' => true, 'default_color' => 'green', ], ]; diff --git a/config/boilerplate/themes/red.php b/config/boilerplate/themes/red.php index 423a80ed..c053521f 100644 --- a/config/boilerplate/themes/red.php +++ b/config/boilerplate/themes/red.php @@ -6,45 +6,45 @@ * Shadow : 0-4. */ return [ - 'navbar' => [ - 'bg' => 'red', - 'type' => 'dark', + 'navbar' => [ + 'bg' => 'red', + 'type' => 'dark', 'border' => true, - 'user' => [ + 'user' => [ 'visible' => true, - 'shadow' => 0, + 'shadow' => 0, ], ], 'sidebar' => [ - 'type' => 'dark', - 'shadow' => 0, - 'border' => true, + 'type' => 'dark', + 'shadow' => 0, + 'border' => true, 'compact' => false, - 'links' => [ - 'bg' => 'red', + 'links' => [ + 'bg' => 'red', 'shadow' => 0, ], - 'brand' => [ - 'bg' => 'red', + 'brand' => [ + 'bg' => 'red', 'logo' => [ - 'bg' => 'white', - 'icon' => '', - 'text' => 'BOilerplate', + 'bg' => 'white', + 'icon' => '', + 'text' => 'BOilerplate', 'shadow' => 2, ], ], - 'user' => [ + 'user' => [ 'visible' => false, - 'shadow' => 2, + 'shadow' => 2, ], ], - 'footer' => [ - 'visible' => true, + 'footer' => [ + 'visible' => true, 'vendorname' => 'Boilerplate', 'vendorlink' => '', ], - 'card' => [ - 'outline' => true, + 'card' => [ + 'outline' => true, 'default_color' => 'red', ], ]; diff --git a/config/comments.php b/config/comments.php index 9c3c85b7..80f765f8 100644 --- a/config/comments.php +++ b/config/comments.php @@ -15,4 +15,4 @@ return [ */ 'user_model' => null, -]; \ No newline at end of file +]; diff --git a/config/datatables-buttons.php b/config/datatables-buttons.php index 54bd7871..31ed4469 100644 --- a/config/datatables-buttons.php +++ b/config/datatables-buttons.php @@ -4,7 +4,7 @@ return [ /* * Namespaces used by the generator. */ - 'namespace' => [ + 'namespace' => [ /* * Base namespace/directory to create the new file. * This is appended on default Laravel namespace. @@ -13,7 +13,7 @@ return [ * With Model: App\User (default model) * Export filename: users_timestamp */ - 'base' => 'DataTables', + 'base' => 'DataTables', /* * Base namespace/directory where your model's are located. @@ -42,12 +42,12 @@ return [ /* * Snappy PDF options. */ - 'snappy' => [ - 'options' => [ - 'no-outline' => true, - 'margin-left' => '0', - 'margin-right' => '0', - 'margin-top' => '10mm', + 'snappy' => [ + 'options' => [ + 'no-outline' => true, + 'margin-left' => '0', + 'margin-right' => '0', + 'margin-top' => '10mm', 'margin-bottom' => '10mm', ], 'orientation' => 'landscape', @@ -56,9 +56,9 @@ return [ /* * Default html builder parameters. */ - 'parameters' => [ - 'dom' => 'Bfrtip', - 'order' => [[0, 'desc']], + 'parameters' => [ + 'dom' => 'Bfrtip', + 'order' => [[0, 'desc']], 'buttons' => [ 'create', 'export', @@ -71,7 +71,7 @@ return [ /* * Generator command default options value. */ - 'generator' => [ + 'generator' => [ /* * Default columns to generate when not set. */ diff --git a/config/datatables-fractal.php b/config/datatables-fractal.php index 25f547a8..39250f1a 100644 --- a/config/datatables-fractal.php +++ b/config/datatables-fractal.php @@ -4,7 +4,7 @@ return [ /* * Request key name to parse includes on fractal. */ - 'includes' => 'include', + 'includes' => 'include', /* * Default fractal serializer. diff --git a/config/datatables-html.php b/config/datatables-html.php index 516d313b..3ea1cc1c 100644 --- a/config/datatables-html.php +++ b/config/datatables-html.php @@ -12,7 +12,7 @@ return [ */ 'table' => [ 'class' => 'table', - 'id' => 'dataTableBuilder', + 'id' => 'dataTableBuilder', ], /* diff --git a/config/datatables.php b/config/datatables.php index 876e7520..f70c1a4a 100644 --- a/config/datatables.php +++ b/config/datatables.php @@ -4,17 +4,17 @@ return [ /* * DataTables search options. */ - 'search' => [ + 'search' => [ /* * Smart search will enclose search keyword with wildcard string "%keyword%". * SQL: column LIKE "%keyword%" */ - 'smart' => true, + 'smart' => true, /* * Multi-term search will explode search keyword using spaces resulting into multiple term search. */ - 'multi_term' => true, + 'multi_term' => true, /* * Case insensitive will search the keyword in lower case format. @@ -26,29 +26,29 @@ return [ * Wild card will add "%" in between every characters of the keyword. * SQL: column LIKE "%k%e%y%w%o%r%d%" */ - 'use_wildcards' => false, + 'use_wildcards' => false, /* * Perform a search which starts with the given keyword. * SQL: column LIKE "keyword%" */ - 'starts_with' => false, + 'starts_with' => false, ], /* * DataTables internal index id response column name. */ - 'index_column' => 'DT_RowIndex', + 'index_column' => 'DT_RowIndex', /* * List of available builders for DataTables. * This is where you can register your custom dataTables builder. */ - 'engines' => [ - 'eloquent' => Yajra\DataTables\EloquentDataTable::class, - 'query' => Yajra\DataTables\QueryDataTable::class, + 'engines' => [ + 'eloquent' => Yajra\DataTables\EloquentDataTable::class, + 'query' => Yajra\DataTables\QueryDataTable::class, 'collection' => Yajra\DataTables\CollectionDataTable::class, - 'resource' => Yajra\DataTables\ApiResourceDataTable::class, + 'resource' => Yajra\DataTables\ApiResourceDataTable::class, ], /* @@ -56,7 +56,7 @@ return [ * This is where you can override which engine a builder should use * Note, only change this if you know what you are doing! */ - 'builders' => [ + 'builders' => [ //Illuminate\Database\Eloquent\Relations\Relation::class => 'eloquent', //Illuminate\Database\Eloquent\Builder::class => 'eloquent', //Illuminate\Database\Query\Builder::class => 'query', @@ -76,28 +76,28 @@ return [ * 'throw' - Throws a \Yajra\DataTables\Exceptions\Exception. Use your custom error handler if needed. * 'custom message' - Any friendly message to be displayed to the user. You can also use translation key. */ - 'error' => env('DATATABLES_ERROR', null), + 'error' => env('DATATABLES_ERROR', null), /* * Default columns definition of dataTable utility functions. */ - 'columns' => [ + 'columns' => [ /* * List of columns hidden/removed on json response. */ - 'excess' => ['rn', 'row_num'], + 'excess' => ['rn', 'row_num'], /* * List of columns to be escaped. If set to *, all columns are escape. * Note: You can set the value to empty array to disable XSS protection. */ - 'escape' => '*', + 'escape' => '*', /* * List of columns that are allowed to display html content. * Note: Adding columns to list will make us available to XSS attacks. */ - 'raw' => ['action'], + 'raw' => ['action'], /* * List of columns are are forbidden from being searched/sorted. @@ -114,8 +114,8 @@ return [ /* * JsonResponse header and options config. */ - 'json' => [ - 'header' => [], + 'json' => [ + 'header' => [], 'options' => 0, ], diff --git a/config/debugbar.php b/config/debugbar.php index e7f6b099..845d1488 100644 --- a/config/debugbar.php +++ b/config/debugbar.php @@ -33,13 +33,13 @@ return [ | */ 'storage' => [ - 'enabled' => true, - 'driver' => 'file', // redis, file, pdo, socket, custom - 'path' => storage_path('debugbar'), // For file driver + 'enabled' => true, + 'driver' => 'file', // redis, file, pdo, socket, custom + 'path' => storage_path('debugbar'), // For file driver 'connection' => null, // Leave null for default connection (Redis/PDO) - 'provider' => '', // Instance of StorageInterface for custom driver - 'hostname' => '127.0.0.1', // Hostname to use with the "socket" driver - 'port' => 2304, // Port to use with the "socket" driver + 'provider' => '', // Instance of StorageInterface for custom driver + 'hostname' => '127.0.0.1', // Hostname to use with the "socket" driver + 'port' => 2304, // Port to use with the "socket" driver ], /* @@ -107,29 +107,29 @@ return [ */ 'collectors' => [ - 'phpinfo' => true, // Php version - 'messages' => true, // Messages - 'time' => true, // Time Datalogger - 'memory' => true, // Memory usage - 'exceptions' => true, // Exception displayer - 'log' => true, // Logs from Monolog (merged in messages if enabled) - 'db' => true, // Show database (PDO) queries and bindings - 'views' => true, // Views with their data - 'route' => true, // Current route information - 'auth' => false, // Display Laravel authentication status - 'gate' => true, // Display Laravel Gate checks - 'session' => true, // Display session data + 'phpinfo' => true, // Php version + 'messages' => true, // Messages + 'time' => true, // Time Datalogger + 'memory' => true, // Memory usage + 'exceptions' => true, // Exception displayer + 'log' => true, // Logs from Monolog (merged in messages if enabled) + 'db' => true, // Show database (PDO) queries and bindings + 'views' => true, // Views with their data + 'route' => true, // Current route information + 'auth' => false, // Display Laravel authentication status + 'gate' => true, // Display Laravel Gate checks + 'session' => true, // Display session data 'symfony_request' => true, // Only one can be enabled.. - 'mail' => true, // Catch mail messages - 'laravel' => false, // Laravel version and environment - 'events' => false, // All events fired + 'mail' => true, // Catch mail messages + 'laravel' => false, // Laravel version and environment + 'events' => false, // All events fired 'default_request' => false, // Regular or special Symfony request logger - 'logs' => false, // Add the latest log messages - 'files' => false, // Show the included files - 'config' => false, // Display config settings - 'cache' => false, // Display cache events - 'models' => true, // Display models - 'livewire' => true, // Display Livewire (when available) + 'logs' => false, // Add the latest log messages + 'files' => false, // Show the included files + 'config' => false, // Display config settings + 'cache' => false, // Display cache events + 'models' => true, // Display models + 'livewire' => true, // Display Livewire (when available) ], /* @@ -146,17 +146,17 @@ return [ 'show_name' => true, // Also show the users name/email in the debugbar ], 'db' => [ - 'with_params' => true, // Render SQL with the parameters substituted - 'backtrace' => true, // Use a backtrace to find the origin of the query in your files. + 'with_params' => true, // Render SQL with the parameters substituted + 'backtrace' => true, // Use a backtrace to find the origin of the query in your files. 'backtrace_exclude_paths' => [], // Paths to exclude from backtrace. (in addition to defaults) - 'timeline' => false, // Add the queries to the timeline - 'duration_background' => true, // Show shaded background on each query relative to how long it took to execute. + 'timeline' => false, // Add the queries to the timeline + 'duration_background' => true, // Show shaded background on each query relative to how long it took to execute. 'explain' => [ // Show EXPLAIN output on queries 'enabled' => false, 'types' => ['SELECT'], // Deprecated setting, is always only SELECT ], - 'hints' => false, // Show hints for common mistakes - 'show_copy' => false, // Show copy button next to the query + 'hints' => false, // Show hints for common mistakes + 'show_copy' => false, // Show copy button next to the query ], 'mail' => [ 'full_log' => false, diff --git a/config/deploy.php b/config/deploy.php index c066d4fa..9334856f 100644 --- a/config/deploy.php +++ b/config/deploy.php @@ -37,7 +37,7 @@ return [ | Hooks |-------------------------------------------------------------------------- | - | Hooks let you customize your deployments conveniently by pushing tasks + | Hooks let you customize your deployments conveniently by pushing tasks | into strategic places of your deployment flow. Each of the official | strategies invoke hooks in different ways to implement their logic. | @@ -48,13 +48,13 @@ return [ 'start' => [ // ], - + // Code and composer vendors are ready but nothing is built. 'build' => [ 'yarn:install', 'yarn:production', ], - + // Deployment is done but not live yet (before symlink) 'ready' => [ 'artisan:storage:link', @@ -63,22 +63,22 @@ return [ 'artisan:config:cache', 'artisan:migrate', ], - + // Deployment is done and live 'done' => [ // ], - + // Deployment succeeded. 'success' => [ // ], - + // Deployment failed. 'fail' => [ // ], - + // After a deployment has been rolled back. 'rollback' => [ // @@ -139,7 +139,7 @@ return [ | Include additional Deployer recipes |-------------------------------------------------------------------------- | - | Here, you can add any third party recipes to provide additional tasks, + | Here, you can add any third party recipes to provide additional tasks, | options and strategies. Therefore, it also allows you to create and | include your own recipes to define more complex deployment flows. | @@ -162,4 +162,4 @@ return [ 'custom_deployer_file' => false, -]; \ No newline at end of file +]; diff --git a/config/dompdf.php b/config/dompdf.php index 9a993058..cb00dcf6 100644 --- a/config/dompdf.php +++ b/config/dompdf.php @@ -1,6 +1,6 @@ false, // Throw an Exception on warnings from dompdf 'orientation' => 'portrait', - 'defines' => array( + 'defines' => [ /** * The location of the DOMPDF font directory * @@ -38,7 +38,7 @@ return array( * Times-Roman, Times-Bold, Times-BoldItalic, Times-Italic, * Symbol, ZapfDingbats. */ - "font_dir" => storage_path('fonts/'), // advised by dompdf (https://github.com/dompdf/dompdf/pull/782) + 'font_dir' => storage_path('fonts/'), // advised by dompdf (https://github.com/dompdf/dompdf/pull/782) /** * The location of the DOMPDF font cache directory @@ -48,7 +48,7 @@ return array( * * Note: This directory must exist and be writable by the webserver process. */ - "font_cache" => storage_path('fonts/'), + 'font_cache' => storage_path('fonts/'), /** * The location of a temporary directory. @@ -57,7 +57,7 @@ return array( * The temporary directory is required to download remote images and when * using the PFDLib back end. */ - "temp_dir" => sys_get_temp_dir(), + 'temp_dir' => sys_get_temp_dir(), /** * ==== IMPORTANT ==== @@ -71,20 +71,19 @@ return array( * direct class use like: * $dompdf = new DOMPDF(); $dompdf->load_html($htmldata); $dompdf->render(); $pdfdata = $dompdf->output(); */ - "chroot" => realpath(base_path()), + 'chroot' => realpath(base_path()), /** * Whether to enable font subsetting or not. */ - "enable_font_subsetting" => false, + 'enable_font_subsetting' => false, /** * The PDF rendering backend to use * * Valid settings are 'PDFLib', 'CPDF' (the bundled R&OS PDF class), 'GD' and * 'auto'. 'auto' will look for PDFLib and use it if found, or if not it will - * fall back on CPDF. 'GD' renders PDFs to graphic files. {@link - * Canvas_Factory} ultimately determines which rendering class to instantiate + * fall back on CPDF. 'GD' renders PDFs to graphic files. {@link * Canvas_Factory} ultimately determines which rendering class to instantiate * based on this setting. * * Both PDFLib & CPDF rendering backends provide sufficient rendering @@ -106,7 +105,7 @@ return array( * @link http://www.ros.co.nz/pdf * @link http://www.php.net/image */ - "pdf_backend" => "CPDF", + 'pdf_backend' => 'CPDF', /** * PDFlib license key @@ -132,7 +131,7 @@ return array( * the desired content might be different (e.g. screen or projection view of html file). * Therefore allow specification of content here. */ - "default_media_type" => "screen", + 'default_media_type' => 'screen', /** * The default paper size. @@ -141,15 +140,16 @@ return array( * * @see CPDF_Adapter::PAPER_SIZES for valid sizes ('letter', 'legal', 'A4', etc.) */ - "default_paper_size" => "a4", + 'default_paper_size' => 'a4', /** * The default font family * * Used if no suitable fonts can be found. This must exist in the font folder. + * * @var string */ - "default_font" => "serif", + 'default_font' => 'serif', /** * Image DPI setting @@ -184,7 +184,7 @@ return array( * * @var int */ - "dpi" => 96, + 'dpi' => 96, /** * Enable inline PHP @@ -198,7 +198,7 @@ return array( * * @var bool */ - "enable_php" => false, + 'enable_php' => false, /** * Enable inline Javascript @@ -208,7 +208,7 @@ return array( * * @var bool */ - "enable_javascript" => true, + 'enable_javascript' => true, /** * Enable remote file access @@ -227,18 +227,17 @@ return array( * * @var bool */ - "enable_remote" => true, + 'enable_remote' => true, /** * A ratio applied to the fonts height to be more like browsers' line height */ - "font_height_ratio" => 1.1, + 'font_height_ratio' => 1.1, /** * Use the more-than-experimental HTML5 Lib parser */ - "enable_html5_parser" => false, - ), + 'enable_html5_parser' => false, + ], - -); +]; diff --git a/config/erd-generator.php b/config/erd-generator.php index 64383edf..c8d88887 100644 --- a/config/erd-generator.php +++ b/config/erd-generator.php @@ -87,19 +87,19 @@ return [ 'pad' => 0.5, 'ranksep' => 2, 'esep' => true, - 'fontname' => 'Helvetica Neue' + 'fontname' => 'Helvetica Neue', ], 'node' => [ 'margin' => 0, 'shape' => 'rectangle', - 'fontname' => 'Helvetica Neue' + 'fontname' => 'Helvetica Neue', ], 'edge' => [ 'color' => '#003049', 'penwidth' => 1.8, - 'fontname' => 'Helvetica Neue' + 'fontname' => 'Helvetica Neue', ], 'relations' => [ @@ -121,6 +121,6 @@ return [ 'arrowhead' => 'crow', 'arrowtail' => 'none', ], - ] + ], ]; diff --git a/config/excel.php b/config/excel.php index c3199b92..57a3c7cf 100644 --- a/config/excel.php +++ b/config/excel.php @@ -14,7 +14,7 @@ return [ | Here you can specify how big the chunk should be. | */ - 'chunk_size' => 1000, + 'chunk_size' => 1000, /* |-------------------------------------------------------------------------- @@ -41,13 +41,13 @@ return [ | Configure e.g. delimiter, enclosure and line ending for CSV exports. | */ - 'csv' => [ - 'delimiter' => ',', - 'enclosure' => '"', - 'line_ending' => PHP_EOL, - 'use_bom' => false, + 'csv' => [ + 'delimiter' => ',', + 'enclosure' => '"', + 'line_ending' => PHP_EOL, + 'use_bom' => false, 'include_separator_line' => false, - 'excel_compatibility' => false, + 'excel_compatibility' => false, ], /* @@ -58,20 +58,20 @@ return [ | Configure e.g. default title, creator, subject,... | */ - 'properties' => [ - 'creator' => '', + 'properties' => [ + 'creator' => '', 'lastModifiedBy' => '', - 'title' => '', - 'description' => '', - 'subject' => '', - 'keywords' => '', - 'category' => '', - 'manager' => '', - 'company' => '', + 'title' => '', + 'description' => '', + 'subject' => '', + 'keywords' => '', + 'category' => '', + 'manager' => '', + 'company' => '', ], ], - 'imports' => [ + 'imports' => [ /* |-------------------------------------------------------------------------- @@ -120,12 +120,12 @@ return [ | Configure e.g. delimiter, enclosure and line ending for CSV imports. | */ - 'csv' => [ - 'delimiter' => ',', - 'enclosure' => '"', + 'csv' => [ + 'delimiter' => ',', + 'enclosure' => '"', 'escape_character' => '\\', - 'contiguous' => false, - 'input_encoding' => 'UTF-8', + 'contiguous' => false, + 'input_encoding' => 'UTF-8', ], /* @@ -136,16 +136,16 @@ return [ | Configure e.g. default title, creator, subject,... | */ - 'properties' => [ - 'creator' => '', + 'properties' => [ + 'creator' => '', 'lastModifiedBy' => '', - 'title' => '', - 'description' => '', - 'subject' => '', - 'keywords' => '', - 'category' => '', - 'manager' => '', - 'company' => '', + 'title' => '', + 'description' => '', + 'subject' => '', + 'keywords' => '', + 'category' => '', + 'manager' => '', + 'company' => '', ], ], @@ -160,21 +160,21 @@ return [ | */ 'extension_detector' => [ - 'xlsx' => Excel::XLSX, - 'xlsm' => Excel::XLSX, - 'xltx' => Excel::XLSX, - 'xltm' => Excel::XLSX, - 'xls' => Excel::XLS, - 'xlt' => Excel::XLS, - 'ods' => Excel::ODS, - 'ots' => Excel::ODS, - 'slk' => Excel::SLK, - 'xml' => Excel::XML, + 'xlsx' => Excel::XLSX, + 'xlsm' => Excel::XLSX, + 'xltx' => Excel::XLSX, + 'xltm' => Excel::XLSX, + 'xls' => Excel::XLS, + 'xlt' => Excel::XLS, + 'ods' => Excel::ODS, + 'ots' => Excel::ODS, + 'slk' => Excel::SLK, + 'xml' => Excel::XML, 'gnumeric' => Excel::GNUMERIC, - 'htm' => Excel::HTML, - 'html' => Excel::HTML, - 'csv' => Excel::CSV, - 'tsv' => Excel::TSV, + 'htm' => Excel::HTML, + 'html' => Excel::HTML, + 'csv' => Excel::CSV, + 'tsv' => Excel::TSV, /* |-------------------------------------------------------------------------- @@ -185,7 +185,7 @@ return [ | Available options: Excel::MPDF | Excel::TCPDF | Excel::DOMPDF | */ - 'pdf' => Excel::DOMPDF, + 'pdf' => Excel::DOMPDF, ], /* @@ -226,7 +226,7 @@ return [ | Drivers: memory|illuminate|batch | */ - 'driver' => 'memory', + 'driver' => 'memory', /* |-------------------------------------------------------------------------- @@ -238,7 +238,7 @@ return [ | Here you can tweak the memory limit to your liking. | */ - 'batch' => [ + 'batch' => [ 'memory_limit' => 60000, ], @@ -289,7 +289,7 @@ return [ | storing reading or downloading. Here you can customize that path. | */ - 'local_path' => storage_path('framework/laravel-excel'), + 'local_path' => storage_path('framework/laravel-excel'), /* |-------------------------------------------------------------------------- @@ -305,8 +305,8 @@ return [ | in conjunction with queued imports and exports. | */ - 'remote_disk' => null, - 'remote_prefix' => null, + 'remote_disk' => null, + 'remote_prefix' => null, /* |-------------------------------------------------------------------------- diff --git a/config/flare.php b/config/flare.php index 6ad79cf2..bae1f00a 100644 --- a/config/flare.php +++ b/config/flare.php @@ -48,15 +48,15 @@ return [ */ 'send_logs_as_events' => true, - + /* |-------------------------------------------------------------------------- | Censor request body fields |-------------------------------------------------------------------------- | - | These fields will be censored from your request when sent to Flare. + | These fields will be censored from your request when sent to Flare. | */ - + 'censor_request_body_fields' => ['password'], ]; diff --git a/config/generators.config.php b/config/generators.config.php index f1141d65..1f6486d8 100644 --- a/config/generators.config.php +++ b/config/generators.config.php @@ -22,21 +22,20 @@ return [ 'view_template_path' => base_path('vendor/oscarafdev/laravel-4-generators/src/Way/Generators/Templates/view.txt'), - /* |-------------------------------------------------------------------------- | Where the generated files will be saved... |-------------------------------------------------------------------------- | */ - 'model_target_path' => app_path(), + 'model_target_path' => app_path(), - 'controller_target_path' => app_path('Http/Controllers'), + 'controller_target_path' => app_path('Http/Controllers'), - 'migration_target_path' => base_path('database/migrations'), + 'migration_target_path' => base_path('database/migrations'), - 'seed_target_path' => base_path('database/seeds'), + 'seed_target_path' => base_path('database/seeds'), - 'view_target_path' => base_path('resources/views') + 'view_target_path' => base_path('resources/views'), ]; diff --git a/config/geocoder.php b/config/geocoder.php index c48c183b..90ccaa03 100644 --- a/config/geocoder.php +++ b/config/geocoder.php @@ -61,7 +61,7 @@ return [ env('GOOGLE_MAPS_LOCALE', 'us'), env('GOOGLE_MAPS_API_KEY'), ], - GeoPlugin::class => [], + GeoPlugin::class => [], ], ], @@ -79,7 +79,7 @@ return [ | Default: Client::class (FQCN for CURL adapter) | */ - 'adapter' => Client::class, + 'adapter' => Client::class, /* |--------------------------------------------------------------------------- diff --git a/config/googlmapper.php b/config/googlmapper.php index dad5eaa9..a6cabaa1 100644 --- a/config/googlmapper.php +++ b/config/googlmapper.php @@ -307,7 +307,7 @@ return [ | hidden and a count is shown. | */ - 'size' => 2 + 'size' => 2, ], diff --git a/config/gravatar.php b/config/gravatar.php index 1d5b318a..39c80441 100644 --- a/config/gravatar.php +++ b/config/gravatar.php @@ -1,23 +1,23 @@ 80, +return [ + // --- The default avatar size + 'size' => 80, - // --- The default avatar to display if we have no results - // (bool) false - // (string) 404 - // (string) mm: (mystery-man) a simple, cartoon-style silhouetted outline of a person (does not vary by email hash). - // (string) identicon: a geometric pattern based on an email hash. - // (string) monsterid: a generated 'monster' with different colors, faces, etc. - // (string) wavatar: generated faces with differing features and backgrounds. - // (string) retro: awesome generated, 8-bit arcade-style pixelated faces. - 'default' => 'identicon', + // --- The default avatar to display if we have no results + // (bool) false + // (string) 404 + // (string) mm: (mystery-man) a simple, cartoon-style silhouetted outline of a person (does not vary by email hash). + // (string) identicon: a geometric pattern based on an email hash. + // (string) monsterid: a generated 'monster' with different colors, faces, etc. + // (string) wavatar: generated faces with differing features and backgrounds. + // (string) retro: awesome generated, 8-bit arcade-style pixelated faces. + 'default' => 'identicon', - // --- Set the type of avatars we allow to show - // - g: suitable for display on all websites with any audience type. - // - pg: may contain rude gestures, provocatively dressed individuals, the lesser swear words, or mild violence. - // - r: may contain such things as harsh profanity, intense violence, nudity, or hard drug use. - // - x: may contain hardcore sexual imagery or extremely disturbing violence. - 'maxRating' => 'g' -); + // --- Set the type of avatars we allow to show + // - g: suitable for display on all websites with any audience type. + // - pg: may contain rude gestures, provocatively dressed individuals, the lesser swear words, or mild violence. + // - r: may contain such things as harsh profanity, intense violence, nudity, or hard drug use. + // - x: may contain hardcore sexual imagery or extremely disturbing violence. + 'maxRating' => 'g', +]; diff --git a/config/httpauth.php b/config/httpauth.php index b809ed9b..73cda407 100644 --- a/config/httpauth.php +++ b/config/httpauth.php @@ -44,6 +44,6 @@ return [ | Password to access the secured realm in combination with the username. | */ - 'password' => '1234' + 'password' => '1234', ]; diff --git a/config/image.php b/config/image.php index 2b1d2c3e..67983819 100644 --- a/config/image.php +++ b/config/image.php @@ -15,6 +15,6 @@ return [ | */ - 'driver' => 'gd' + 'driver' => 'gd', ]; diff --git a/config/imagecache.php b/config/imagecache.php index 7e58961a..d10c4288 100644 --- a/config/imagecache.php +++ b/config/imagecache.php @@ -32,7 +32,7 @@ return [ 'paths' => [ public_path('upload'), - public_path('images') + public_path('images'), ], /* diff --git a/config/insights.php b/config/insights.php index 36b96e69..6c2d7398 100644 --- a/config/insights.php +++ b/config/insights.php @@ -103,11 +103,11 @@ return [ */ 'requirements' => [ -// 'min-quality' => 0, -// 'min-complexity' => 0, -// 'min-architecture' => 0, -// 'min-style' => 0, -// 'disable-security-check' => false, + // 'min-quality' => 0, + // 'min-complexity' => 0, + // 'min-architecture' => 0, + // 'min-style' => 0, + // 'disable-security-check' => false, ], ]; diff --git a/config/javascript.php b/config/javascript.php index a78ffaa4..1b4e376f 100644 --- a/config/javascript.php +++ b/config/javascript.php @@ -25,6 +25,6 @@ return [ | That way, you can access vars, like "SomeNamespace.someVariable." | */ - 'js_namespace' => 'window' + 'js_namespace' => 'window', ]; diff --git a/config/laratrust.php b/config/laratrust.php index 0a6e1d94..3ce7412e 100644 --- a/config/laratrust.php +++ b/config/laratrust.php @@ -184,7 +184,7 @@ return [ */ 'abort' => [ 'code' => 403, - 'message' => 'User does not have any of the necessary access rights.' + 'message' => 'User does not have any of the necessary access rights.', ], /** @@ -197,10 +197,10 @@ return [ 'url' => '/home', 'message' => [ 'key' => 'error', - 'content' => '' - ] - ] - ] + 'content' => '', + ], + ], + ], ], 'teams' => [ @@ -330,5 +330,5 @@ return [ // The user won't be able to delete the role. 'not_deletable' => [], ], - ] + ], ]; diff --git a/config/laratrust_seeder.php b/config/laratrust_seeder.php index dedeefb1..fdf8d6ea 100644 --- a/config/laratrust_seeder.php +++ b/config/laratrust_seeder.php @@ -15,24 +15,24 @@ return [ 'superadministrator' => [ 'users' => 'c,r,u,d', 'payments' => 'c,r,u,d', - 'profile' => 'r,u' + 'profile' => 'r,u', ], 'administrator' => [ 'users' => 'c,r,u,d', - 'profile' => 'r,u' + 'profile' => 'r,u', ], 'user' => [ 'profile' => 'r,u', ], 'role_name' => [ 'module_1_name' => 'c,r,u,d', - ] + ], ], 'permissions_map' => [ 'c' => 'create', 'r' => 'read', 'u' => 'update', - 'd' => 'delete' - ] + 'd' => 'delete', + ], ]; diff --git a/config/laravel-erd.php b/config/laravel-erd.php index 3b6a775c..441a396e 100644 --- a/config/laravel-erd.php +++ b/config/laravel-erd.php @@ -6,35 +6,35 @@ return [ //Example //\App\Http\Middleware\NotFoundWhenProduction::class, ], - 'models_path' => base_path('app/Models'), - 'docs_path' => base_path('docs/erd/'), + 'models_path' => base_path('app/Models'), + 'docs_path' => base_path('docs/erd/'), - "display" => [ - "show_data_type" => false, + 'display' => [ + 'show_data_type' => false, ], - "from_text" => [ - "BelongsTo" => "1..1\nBelongs To", - "BelongsToMany" => "1..*\nBelongs To Many", - "HasMany" => "1..*\nHas Many", - "HasOne" => "1..1\nHas One", - "ManyToMany" => "*..*\nMany To Many", - "ManyToOne" => "*..1\nMany To One", - "OneToMany" => "1..*\nOne To Many", - "OneToOne" => "1..1\nOne To One", - "MorphTo" => "1..1\n", - "MorphToMany" => "1..*\n", + 'from_text' => [ + 'BelongsTo' => "1..1\nBelongs To", + 'BelongsToMany' => "1..*\nBelongs To Many", + 'HasMany' => "1..*\nHas Many", + 'HasOne' => "1..1\nHas One", + 'ManyToMany' => "*..*\nMany To Many", + 'ManyToOne' => "*..1\nMany To One", + 'OneToMany' => "1..*\nOne To Many", + 'OneToOne' => "1..1\nOne To One", + 'MorphTo' => "1..1\n", + 'MorphToMany' => "1..*\n", ], - "to_text" => [ - "BelongsTo" => "", - "BelongsToMany" => "", - "HasMany" => "", - "HasOne" => "", - "ManyToMany" => "", - "ManyToOne" => "", - "OneToMany" => "", - "OneToOne" => "", - "MorphTo" => "", - "MorphToMany" => "", + 'to_text' => [ + 'BelongsTo' => '', + 'BelongsToMany' => '', + 'HasMany' => '', + 'HasOne' => '', + 'ManyToMany' => '', + 'ManyToOne' => '', + 'OneToMany' => '', + 'OneToOne' => '', + 'MorphTo' => '', + 'MorphToMany' => '', ], ]; diff --git a/config/laravel-menu/settings.php b/config/laravel-menu/settings.php index 5fbe5ac6..06b55937 100644 --- a/config/laravel-menu/settings.php +++ b/config/laravel-menu/settings.php @@ -1,7 +1,7 @@ array( +return [ + 'default' => [ 'auto_activate' => true, 'activate_parents' => true, 'active_class' => 'active', @@ -10,5 +10,5 @@ return array( 'rest_base' => '', // string|array 'active_element' => 'item', // item|link 'data-toggle-attribute' => 'data-toggle', - ), -); + ], +]; diff --git a/config/laravel-menu/views.php b/config/laravel-menu/views.php index 93ffa1e3..e136d88d 100644 --- a/config/laravel-menu/views.php +++ b/config/laravel-menu/views.php @@ -1,5 +1,5 @@ 'laravel-menu::bootstrap-navbar-items', -); +]; diff --git a/config/laravel-widgets.php b/config/laravel-widgets.php index ca2e8c03..f3aa5ad2 100644 --- a/config/laravel-widgets.php +++ b/config/laravel-widgets.php @@ -13,10 +13,10 @@ return [ /* * Relative path from the base directory to a regular widget stub. */ - 'widget_stub' => 'vendor/arrilot/laravel-widgets/src/Console/stubs/widget.stub', + 'widget_stub' => 'vendor/arrilot/laravel-widgets/src/Console/stubs/widget.stub', /* * Relative path from the base directory to a plain widget stub. */ - 'widget_plain_stub' => 'vendor/arrilot/laravel-widgets/src/Console/stubs/widget_plain.stub', + 'widget_plain_stub' => 'vendor/arrilot/laravel-widgets/src/Console/stubs/widget_plain.stub', ]; diff --git a/config/laravolt/avatar.php b/config/laravolt/avatar.php index cdb22896..293192ae 100644 --- a/config/laravolt/avatar.php +++ b/config/laravolt/avatar.php @@ -48,7 +48,7 @@ return [ // Fonts used to render text. // If contains more than one fonts, randomly selected based on name supplied - 'fonts' => [__DIR__ . '/../fonts/OpenSans-Bold.ttf', __DIR__ . '/../fonts/rockwell.ttf'], + 'fonts' => [__DIR__.'/../fonts/OpenSans-Bold.ttf', __DIR__.'/../fonts/rockwell.ttf'], // List of foreground colors to be used, randomly selected based on name supplied 'foregrounds' => [ diff --git a/config/lfm.php b/config/lfm.php index 5c418126..baa44d99 100644 --- a/config/lfm.php +++ b/config/lfm.php @@ -15,7 +15,7 @@ return [ |-------------------------------------------------------------------------- */ - 'use_package_routes' => true, + 'use_package_routes' => true, /* |-------------------------------------------------------------------------- @@ -26,18 +26,18 @@ return [ | */ - 'allow_private_folder' => true, + 'allow_private_folder' => true, // Flexible way to customize client folders accessibility // If you want to customize client folders, publish tag="lfm_handler" // Then you can rewrite userField function in App\Handler\ConfigHandler class // And set 'user_field' to App\Handler\ConfigHandler::class // Ex: The private folder of user will be named as the user id. - 'private_folder_name' => UniSharp\LaravelFilemanager\Handlers\ConfigHandler::class, + 'private_folder_name' => UniSharp\LaravelFilemanager\Handlers\ConfigHandler::class, - 'allow_shared_folder' => true, + 'allow_shared_folder' => true, - 'shared_folder_name' => 'shares', + 'shared_folder_name' => 'shares', /* |-------------------------------------------------------------------------- @@ -45,15 +45,15 @@ return [ |-------------------------------------------------------------------------- */ - 'folder_categories' => [ - 'file' => [ - 'folder_name' => 'files', + 'folder_categories' => [ + 'file' => [ + 'folder_name' => 'files', 'startup_view' => 'list', - 'max_size' => 50000, // size in KB + 'max_size' => 50000, // size in KB 'thumb' => true, 'thumb_width' => 80, 'thumb_height' => 80, - 'valid_mime' => [ + 'valid_mime' => [ 'image/jpeg', 'image/pjpeg', 'image/png', @@ -63,13 +63,13 @@ return [ ], ], 'image' => [ - 'folder_name' => 'photos', + 'folder_name' => 'photos', 'startup_view' => 'grid', - 'max_size' => 50000, // size in KB + 'max_size' => 50000, // size in KB 'thumb' => true, 'thumb_width' => 80, 'thumb_height' => 80, - 'valid_mime' => [ + 'valid_mime' => [ 'image/jpeg', 'image/pjpeg', 'image/png', @@ -94,24 +94,24 @@ return [ |-------------------------------------------------------------------------- */ - 'disk' => 'public', + 'disk' => 'public', - 'rename_file' => false, + 'rename_file' => false, - 'rename_duplicates' => false, + 'rename_duplicates' => false, - 'alphanumeric_filename' => false, + 'alphanumeric_filename' => false, - 'alphanumeric_directory' => false, + 'alphanumeric_directory' => false, - 'should_validate_size' => false, + 'should_validate_size' => false, - 'should_validate_mime' => true, + 'should_validate_mime' => true, // behavior on files with identical name // setting it to true cause old file replace with new one // setting it to false show `error-file-exist` error and stop upload - 'over_write_on_duplicate' => false, + 'over_write_on_duplicate' => false, // mimetypes of executables to prevent from uploading 'disallowed_mimetypes' => ['text/x-php', 'text/html', 'text/plain'], @@ -128,18 +128,18 @@ return [ // If true, image thumbnails would be created during upload 'should_create_thumbnails' => true, - 'thumb_folder_name' => 'thumbs', + 'thumb_folder_name' => 'thumbs', // Create thumbnails automatically only for listed types. - 'raster_mimetypes' => [ + 'raster_mimetypes' => [ 'image/jpeg', 'image/pjpeg', 'image/png', ], - 'thumb_img_width' => 200, // px + 'thumb_img_width' => 200, // px - 'thumb_img_height' => 200, // px + 'thumb_img_height' => 200, // px /* |-------------------------------------------------------------------------- @@ -147,18 +147,18 @@ return [ |-------------------------------------------------------------------------- */ - 'file_type_array' => [ - 'pdf' => 'Adobe Acrobat', - 'doc' => 'Microsoft Word', + 'file_type_array' => [ + 'pdf' => 'Adobe Acrobat', + 'doc' => 'Microsoft Word', 'docx' => 'Microsoft Word', - 'xls' => 'Microsoft Excel', + 'xls' => 'Microsoft Excel', 'xlsx' => 'Microsoft Excel', - 'zip' => 'Archive', - 'gif' => 'GIF Image', - 'jpg' => 'JPEG Image', + 'zip' => 'Archive', + 'gif' => 'GIF Image', + 'jpg' => 'JPEG Image', 'jpeg' => 'JPEG Image', - 'png' => 'PNG Image', - 'ppt' => 'Microsoft PowerPoint', + 'png' => 'PNG Image', + 'ppt' => 'Microsoft PowerPoint', 'pptx' => 'Microsoft PowerPoint', ], @@ -173,7 +173,7 @@ return [ | Please note that the 'upload_max_filesize' & 'post_max_size' | directives are not supported. */ - 'php_ini_overrides' => [ + 'php_ini_overrides' => [ 'memory_limit' => '256M', ], ]; diff --git a/config/log-viewer.php b/config/log-viewer.php index 79c4c7b2..0d975e8e 100644 --- a/config/log-viewer.php +++ b/config/log-viewer.php @@ -9,16 +9,16 @@ return [ | ----------------------------------------------------------------- */ - 'storage-path' => storage_path('logs'), + 'storage-path' => storage_path('logs'), /* ----------------------------------------------------------------- | Log files pattern | ----------------------------------------------------------------- */ - 'pattern' => [ - 'prefix' => Filesystem::PATTERN_PREFIX, // 'laravel-' - 'date' => Filesystem::PATTERN_DATE, // '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]' + 'pattern' => [ + 'prefix' => Filesystem::PATTERN_PREFIX, // 'laravel-' + 'date' => Filesystem::PATTERN_DATE, // '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]' 'extension' => Filesystem::PATTERN_EXTENSION, // '.log' ], @@ -30,7 +30,7 @@ return [ | 'pl', 'pt-BR', 'ro', 'ru', 'sv', 'th', 'tr', 'zh-TW', 'zh' */ - 'locale' => 'auto', + 'locale' => 'auto', /* ----------------------------------------------------------------- | Theme @@ -40,18 +40,18 @@ return [ | Make your own theme by adding a folder to the views directory and specifying it here. */ - 'theme' => 'bootstrap-4', + 'theme' => 'bootstrap-4', /* ----------------------------------------------------------------- | Route settings | ----------------------------------------------------------------- */ - 'route' => [ - 'enabled' => true, + 'route' => [ + 'enabled' => true, 'attributes' => [ - 'prefix' => 'log-viewer', + 'prefix' => 'log-viewer', 'middleware' => env('ARCANEDEV_LOGVIEWER_MIDDLEWARE') ? explode(',', env('ARCANEDEV_LOGVIEWER_MIDDLEWARE')) : null, ], @@ -63,15 +63,15 @@ return [ | This defines how many logs & entries are displayed per page. */ - 'per-page' => 30, + 'per-page' => 30, /* ----------------------------------------------------------------- | Download settings | ----------------------------------------------------------------- */ - 'download' => [ - 'prefix' => 'laravel-', + 'download' => [ + 'prefix' => 'laravel-', 'extension' => 'log', ], @@ -81,8 +81,8 @@ return [ | ----------------------------------------------------------------- */ - 'menu' => [ - 'filter-route' => 'log-viewer::logs.filter', + 'menu' => [ + 'filter-route' => 'log-viewer::logs.filter', 'icons-enabled' => true, ], @@ -92,20 +92,20 @@ return [ | ----------------------------------------------------------------- */ - 'icons' => [ + 'icons' => [ /** * Font awesome >= 4.3 * http://fontawesome.io/icons/ */ - 'all' => 'fa fa-fw fa-list', // http://fontawesome.io/icon/list/ + 'all' => 'fa fa-fw fa-list', // http://fontawesome.io/icon/list/ 'emergency' => 'fa fa-fw fa-bug', // http://fontawesome.io/icon/bug/ - 'alert' => 'fa fa-fw fa-bullhorn', // http://fontawesome.io/icon/bullhorn/ - 'critical' => 'fa fa-fw fa-heartbeat', // http://fontawesome.io/icon/heartbeat/ - 'error' => 'fa fa-fw fa-times-circle', // http://fontawesome.io/icon/times-circle/ - 'warning' => 'fa fa-fw fa-exclamation-triangle', // http://fontawesome.io/icon/exclamation-triangle/ - 'notice' => 'fa fa-fw fa-exclamation-circle', // http://fontawesome.io/icon/exclamation-circle/ - 'info' => 'fa fa-fw fa-info-circle', // http://fontawesome.io/icon/info-circle/ - 'debug' => 'fa fa-fw fa-life-ring', // http://fontawesome.io/icon/life-ring/ + 'alert' => 'fa fa-fw fa-bullhorn', // http://fontawesome.io/icon/bullhorn/ + 'critical' => 'fa fa-fw fa-heartbeat', // http://fontawesome.io/icon/heartbeat/ + 'error' => 'fa fa-fw fa-times-circle', // http://fontawesome.io/icon/times-circle/ + 'warning' => 'fa fa-fw fa-exclamation-triangle', // http://fontawesome.io/icon/exclamation-triangle/ + 'notice' => 'fa fa-fw fa-exclamation-circle', // http://fontawesome.io/icon/exclamation-circle/ + 'info' => 'fa fa-fw fa-info-circle', // http://fontawesome.io/icon/info-circle/ + 'debug' => 'fa fa-fw fa-life-ring', // http://fontawesome.io/icon/life-ring/ ], /* ----------------------------------------------------------------- @@ -113,18 +113,18 @@ return [ | ----------------------------------------------------------------- */ - 'colors' => [ - 'levels' => [ - 'empty' => '#D1D1D1', - 'all' => '#8A8A8A', + 'colors' => [ + 'levels' => [ + 'empty' => '#D1D1D1', + 'all' => '#8A8A8A', 'emergency' => '#B71C1C', - 'alert' => '#D32F2F', - 'critical' => '#F44336', - 'error' => '#FF5722', - 'warning' => '#FF9100', - 'notice' => '#4CAF50', - 'info' => '#1976D2', - 'debug' => '#90CAF9', + 'alert' => '#D32F2F', + 'critical' => '#F44336', + 'error' => '#FF5722', + 'warning' => '#FF9100', + 'notice' => '#4CAF50', + 'info' => '#1976D2', + 'debug' => '#90CAF9', ], ], diff --git a/config/mailpreview.php b/config/mailpreview.php index d6a67ac6..e6b2bed0 100644 --- a/config/mailpreview.php +++ b/config/mailpreview.php @@ -9,9 +9,7 @@ return [ * This option determines where all the generated email previews will be * stored for the application. Typically, this is within the storage * directory. However, you may change the location as you desire. - * */ - 'path' => storage_path('email-previews'), /** @@ -22,9 +20,7 @@ return [ * This option determines how long (in seconds) the mail transformer should * keep the generated preview files before deleting them. By default it's * set to 60 seconds, but you can change this to whatever you desire. - * */ - 'maximum_lifetime' => 60, /** @@ -35,9 +31,7 @@ return [ * This option determines if you would like to show a HTML link at the top * left corner of your screen every time and email is sent from your * system, the link will point the browser to the preview file. - * */ - 'show_link_to_preview' => true, /** @@ -46,7 +40,6 @@ return [ * This is a time in milliseconds. * If you use 0 or a negative number it will never be removed. */ - 'popup_timeout' => 8000, /** @@ -58,7 +51,6 @@ return [ * middleware groups that you want to use this package with should * be included. */ - 'middleware_groups' => ['web'], /** @@ -69,7 +61,6 @@ return [ * This option allows for setting middleware for the route that shows a * preview to the mail that was just sent. */ - 'middleware' => [ ], diff --git a/config/paybox.php b/config/paybox.php index 7b2a66f3..0733e286 100644 --- a/config/paybox.php +++ b/config/paybox.php @@ -5,7 +5,7 @@ return [ * Whether test environment is enabled */ 'test' => env('PAYBOX_TEST', false), - + /* * 00103: Paybox Direct * 00104: Paybox Direct Plus @@ -38,7 +38,7 @@ return [ 'hmac_key' => env('PAYBOX_HMAC_KEY', ''), /* - * Paybox public key location - you can get it from + * Paybox public key location - you can get it from * http://www1.paybox.com/wp-content/uploads/2014/03/pubkey.pem */ 'public_key' => storage_path('paybox/pubkey.pem'), @@ -51,7 +51,7 @@ return [ /* * Default return fields when going back from Paybox. You can change here keys as you want, - * you can add also more values from ResponseField class + * you can add also more values from ResponseField class */ 'return_fields' => [ 'amount' => \Bnb\PayboxGateway\ResponseField::AMOUNT, @@ -74,7 +74,7 @@ return [ 'connection' => env('PAYBOX_NOTIFICATIONS_QUEUE_CONNECTION'), 'queue' => env('PAYBOX_NOTIFICATIONS_QUEUE_NAME'), ], - 'retry_after' => (int)env('PAYBOX_NOTIFICATIONS_RETRY_AFTER', 60), + 'retry_after' => (int) env('PAYBOX_NOTIFICATIONS_RETRY_AFTER', 60), 'url' => env('PAYBOX_NOTIFICATIONS_URL'), 'notify_to' => env('PAYBOX_NOTIFICATIONS_NOTIFY_TO'), 'notify_from' => [ @@ -84,9 +84,9 @@ return [ ], /* - * Those are routes names (not urls) where customer will be redirected after payment. If you + * Those are routes names (not urls) where customer will be redirected after payment. If you * want to use custom route with params in url you should set them dynamically when creating - * authorization data. You shouldn't change keys here. Those urls will be later launched using + * authorization data. You shouldn't change keys here. Those urls will be later launched using * GET HTTP request */ 'customer_return_routes_names' => [ diff --git a/config/shopping_cart.php b/config/shopping_cart.php index 985b2507..55d1ee78 100644 --- a/config/shopping_cart.php +++ b/config/shopping_cart.php @@ -33,4 +33,4 @@ return [ * the configuration for cart events */ 'events' => null, -]; \ No newline at end of file +]; diff --git a/config/snappy.php b/config/snappy.php index 46d12ec0..b7c93b2f 100644 --- a/config/snappy.php +++ b/config/snappy.php @@ -10,15 +10,15 @@ return [ | This option contains settings for PDF generation. | | Enabled: - | + | | Whether to load PDF / Image generation. | | Binary: - | + | | The file path of the wkhtmltopdf / wkhtmltoimage executable. | | Timout: - | + | | The amount of time to wait (in seconds) before PDF / Image generation is stopped. | Setting this to false disables the timeout (unlimited processing time). | @@ -32,21 +32,21 @@ return [ | The environment variables to set while running the wkhtmltopdf process. | */ - + 'pdf' => [ 'enabled' => true, - 'binary' => env('WKHTML_PDF_BINARY', '/usr/local/bin/wkhtmltopdf'), + 'binary' => env('WKHTML_PDF_BINARY', '/usr/local/bin/wkhtmltopdf'), 'timeout' => false, 'options' => [], - 'env' => [], + 'env' => [], ], - + 'image' => [ 'enabled' => true, - 'binary' => env('WKHTML_IMG_BINARY', '/usr/local/bin/wkhtmltoimage'), + 'binary' => env('WKHTML_IMG_BINARY', '/usr/local/bin/wkhtmltoimage'), 'timeout' => false, 'options' => [], - 'env' => [], + 'env' => [], ], ]; diff --git a/config/stats.php b/config/stats.php index e0395f72..e4cb339a 100644 --- a/config/stats.php +++ b/config/stats.php @@ -1,4 +1,6 @@ -text('new_value')->nullable(); $table->timestamps(); - $table->index(array('revisionable_id', 'revisionable_type')); + $table->index(['revisionable_id', 'revisionable_type']); }); } diff --git a/database/migrations/2020_04_20_212813_create_botanic_families_table.php b/database/migrations/2020_04_20_212813_create_botanic_families_table.php index c603ffb7..210f4a41 100644 --- a/database/migrations/2020_04_20_212813_create_botanic_families_table.php +++ b/database/migrations/2020_04_20_212813_create_botanic_families_table.php @@ -3,36 +3,33 @@ use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; -class CreateBotanicFamiliesTable extends Migration { - - /** - * Run the migrations. - * - * @return void - */ - public function up() - { - Schema::create('botanic_families', function(Blueprint $table) - { - $table->increments('id'); - $table->string('name', 50)->nullable(); - $table->string('alias', 50)->nullable(); - $table->string('latin', 50)->nullable(); - $table->text('description', 65535)->nullable(); - $table->timestamps(); - $table->softDeletes(); - }); - } - - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::drop('botanic_families'); - } +class CreateBotanicFamiliesTable extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::create('botanic_families', function (Blueprint $table) { + $table->increments('id'); + $table->string('name', 50)->nullable(); + $table->string('alias', 50)->nullable(); + $table->string('latin', 50)->nullable(); + $table->text('description', 65535)->nullable(); + $table->timestamps(); + $table->softDeletes(); + }); + } + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::drop('botanic_families'); + } } diff --git a/database/migrations/2020_04_20_212813_create_botanic_genres_table.php b/database/migrations/2020_04_20_212813_create_botanic_genres_table.php index a40f1974..6ba5e6b8 100644 --- a/database/migrations/2020_04_20_212813_create_botanic_genres_table.php +++ b/database/migrations/2020_04_20_212813_create_botanic_genres_table.php @@ -3,37 +3,34 @@ use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; -class CreateBotanicGenresTable extends Migration { - - /** - * Run the migrations. - * - * @return void - */ - public function up() - { - Schema::create('botanic_genres', function(Blueprint $table) - { - $table->increments('id'); - $table->integer('family_id')->nullable(); - $table->string('name', 50)->nullable(); - $table->string('alias', 50)->nullable(); - $table->string('latin', 50)->nullable(); - $table->text('description', 65535)->nullable(); - $table->timestamps(); - $table->softDeletes(); - }); - } - - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::drop('botanic_genres'); - } +class CreateBotanicGenresTable extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::create('botanic_genres', function (Blueprint $table) { + $table->increments('id'); + $table->integer('family_id')->nullable(); + $table->string('name', 50)->nullable(); + $table->string('alias', 50)->nullable(); + $table->string('latin', 50)->nullable(); + $table->text('description', 65535)->nullable(); + $table->timestamps(); + $table->softDeletes(); + }); + } + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::drop('botanic_genres'); + } } diff --git a/database/migrations/2020_04_20_212813_create_botanic_species_table.php b/database/migrations/2020_04_20_212813_create_botanic_species_table.php index 283790c2..051ea26a 100644 --- a/database/migrations/2020_04_20_212813_create_botanic_species_table.php +++ b/database/migrations/2020_04_20_212813_create_botanic_species_table.php @@ -3,47 +3,44 @@ use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; -class CreateBotanicSpeciesTable extends Migration { - - /** - * Run the migrations. - * - * @return void - */ - public function up() - { - Schema::create('botanic_species', function(Blueprint $table) - { - $table->increments('id'); - $table->integer('genre_id')->unsigned()->nullable(); - $table->string('name', 50)->nullable(); - $table->string('alias', 50)->nullable(); - $table->string('latin', 50)->nullable(); - $table->text('description', 65535)->nullable(); - $table->string('genre_name', 50)->nullable(); - $table->string('subspecies', 50)->nullable(); - $table->boolean('germination_legal')->nullable(); - $table->string('pmg', 50)->nullable(); - $table->string('grow_duration', 50)->nullable(); - $table->string('vegetative_cycle', 50)->nullable(); - $table->string('reglementary_status', 50)->nullable(); - $table->boolean('add_germination')->nullable(); - $table->boolean('add_life_duration')->nullable(); - $table->text('add_diseases', 65535)->nullable(); - $table->timestamps(); - $table->softDeletes(); - }); - } - - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::drop('botanic_species'); - } +class CreateBotanicSpeciesTable extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::create('botanic_species', function (Blueprint $table) { + $table->increments('id'); + $table->integer('genre_id')->unsigned()->nullable(); + $table->string('name', 50)->nullable(); + $table->string('alias', 50)->nullable(); + $table->string('latin', 50)->nullable(); + $table->text('description', 65535)->nullable(); + $table->string('genre_name', 50)->nullable(); + $table->string('subspecies', 50)->nullable(); + $table->boolean('germination_legal')->nullable(); + $table->string('pmg', 50)->nullable(); + $table->string('grow_duration', 50)->nullable(); + $table->string('vegetative_cycle', 50)->nullable(); + $table->string('reglementary_status', 50)->nullable(); + $table->boolean('add_germination')->nullable(); + $table->boolean('add_life_duration')->nullable(); + $table->text('add_diseases', 65535)->nullable(); + $table->timestamps(); + $table->softDeletes(); + }); + } + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::drop('botanic_species'); + } } diff --git a/database/migrations/2020_04_20_212813_create_botanic_varieties_table.php b/database/migrations/2020_04_20_212813_create_botanic_varieties_table.php index 1fbf5700..218d2902 100644 --- a/database/migrations/2020_04_20_212813_create_botanic_varieties_table.php +++ b/database/migrations/2020_04_20_212813_create_botanic_varieties_table.php @@ -3,55 +3,52 @@ use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; -class CreateBotanicVarietiesTable extends Migration { - - /** - * Run the migrations. - * - * @return void - */ - public function up() - { - Schema::create('botanic_varieties', function(Blueprint $table) - { - $table->increments('id'); - $table->integer('specie_id')->unsigned()->nullable(); - $table->string('specie_name', 50)->nullable(); - $table->string('name', 100)->nullable(); - $table->text('description', 65535)->nullable(); - $table->string('range', 50)->nullable(); - $table->string('category', 50)->nullable(); - $table->string('life_duration', 50)->nullable(); - $table->string('packaging', 50)->nullable(); - $table->string('unit', 50)->nullable(); - $table->string('characteristics', 50)->nullable(); - $table->string('nutrition_quality', 50)->nullable(); - $table->string('production_quality', 50)->nullable(); - $table->string('size', 50)->nullable(); - $table->string('maturity', 50)->nullable(); - $table->string('rusticity', 50)->nullable(); - $table->string('color', 50)->nullable(); - $table->string('usage', 50)->nullable(); - $table->string('pot_culture', 50)->nullable(); - $table->string('color_type', 50)->nullable(); - $table->string('plant', 50)->nullable(); - $table->text('description_2', 65535)->nullable(); - $table->text('genre', 65535)->nullable(); - $table->text('specie_latin')->nullable(); - $table->timestamps(); - $table->softDeletes(); - }); - } - - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::drop('botanic_varieties'); - } +class CreateBotanicVarietiesTable extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::create('botanic_varieties', function (Blueprint $table) { + $table->increments('id'); + $table->integer('specie_id')->unsigned()->nullable(); + $table->string('specie_name', 50)->nullable(); + $table->string('name', 100)->nullable(); + $table->text('description', 65535)->nullable(); + $table->string('range', 50)->nullable(); + $table->string('category', 50)->nullable(); + $table->string('life_duration', 50)->nullable(); + $table->string('packaging', 50)->nullable(); + $table->string('unit', 50)->nullable(); + $table->string('characteristics', 50)->nullable(); + $table->string('nutrition_quality', 50)->nullable(); + $table->string('production_quality', 50)->nullable(); + $table->string('size', 50)->nullable(); + $table->string('maturity', 50)->nullable(); + $table->string('rusticity', 50)->nullable(); + $table->string('color', 50)->nullable(); + $table->string('usage', 50)->nullable(); + $table->string('pot_culture', 50)->nullable(); + $table->string('color_type', 50)->nullable(); + $table->string('plant', 50)->nullable(); + $table->text('description_2', 65535)->nullable(); + $table->text('genre', 65535)->nullable(); + $table->text('specie_latin')->nullable(); + $table->timestamps(); + $table->softDeletes(); + }); + } + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::drop('botanic_varieties'); + } } diff --git a/database/migrations/2020_04_20_212813_create_failed_jobs_table.php b/database/migrations/2020_04_20_212813_create_failed_jobs_table.php index 547aa370..8f39c480 100644 --- a/database/migrations/2020_04_20_212813_create_failed_jobs_table.php +++ b/database/migrations/2020_04_20_212813_create_failed_jobs_table.php @@ -3,35 +3,32 @@ use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; -class CreateFailedJobsTable extends Migration { - - /** - * Run the migrations. - * - * @return void - */ - public function up() - { - Schema::create('failed_jobs', function(Blueprint $table) - { - $table->bigInteger('id', true)->unsigned(); - $table->text('connection', 65535); - $table->text('queue', 65535); - $table->text('payload'); - $table->text('exception'); - $table->timestamp('failed_at')->default(DB::raw('CURRENT_TIMESTAMP')); - }); - } - - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::drop('failed_jobs'); - } +class CreateFailedJobsTable extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::create('failed_jobs', function (Blueprint $table) { + $table->bigInteger('id', true)->unsigned(); + $table->text('connection', 65535); + $table->text('queue', 65535); + $table->text('payload'); + $table->text('exception'); + $table->timestamp('failed_at')->default(DB::raw('CURRENT_TIMESTAMP')); + }); + } + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::drop('failed_jobs'); + } } diff --git a/database/migrations/2020_04_20_212813_create_mail_logs_table.php b/database/migrations/2020_04_20_212813_create_mail_logs_table.php index 1be1a777..be2b0713 100644 --- a/database/migrations/2020_04_20_212813_create_mail_logs_table.php +++ b/database/migrations/2020_04_20_212813_create_mail_logs_table.php @@ -3,35 +3,32 @@ use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; -class CreateMailLogsTable extends Migration { - - /** - * Run the migrations. - * - * @return void - */ - public function up() - { - Schema::create('mail_logs', function(Blueprint $table) - { - $table->increments('id'); - $table->string('sent_to')->nullable(); - $table->text('data', 65535); - $table->text('route', 65535); - $table->text('event', 65535); - $table->timestamps(); - }); - } - - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::drop('mail_logs'); - } +class CreateMailLogsTable extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::create('mail_logs', function (Blueprint $table) { + $table->increments('id'); + $table->string('sent_to')->nullable(); + $table->text('data', 65535); + $table->text('route', 65535); + $table->text('event', 65535); + $table->timestamps(); + }); + } + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::drop('mail_logs'); + } } diff --git a/database/migrations/2020_04_20_212813_create_password_resets_table.php b/database/migrations/2020_04_20_212813_create_password_resets_table.php index 2fcab1ae..66b27dfe 100644 --- a/database/migrations/2020_04_20_212813_create_password_resets_table.php +++ b/database/migrations/2020_04_20_212813_create_password_resets_table.php @@ -3,32 +3,29 @@ use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; -class CreatePasswordResetsTable extends Migration { - - /** - * Run the migrations. - * - * @return void - */ - public function up() - { - Schema::create('password_resets', function(Blueprint $table) - { - $table->string('email')->index(); - $table->string('token'); - $table->dateTime('created_at')->nullable(); - }); - } - - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::drop('password_resets'); - } +class CreatePasswordResetsTable extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::create('password_resets', function (Blueprint $table) { + $table->string('email')->index(); + $table->string('token'); + $table->dateTime('created_at')->nullable(); + }); + } + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::drop('password_resets'); + } } diff --git a/database/migrations/2020_04_20_212813_create_permission_role_table.php b/database/migrations/2020_04_20_212813_create_permission_role_table.php index eecec240..3aa6da1e 100644 --- a/database/migrations/2020_04_20_212813_create_permission_role_table.php +++ b/database/migrations/2020_04_20_212813_create_permission_role_table.php @@ -3,32 +3,29 @@ use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; -class CreatePermissionRoleTable extends Migration { - - /** - * Run the migrations. - * - * @return void - */ - public function up() - { - Schema::create('permission_role', function(Blueprint $table) - { - $table->integer('permission_id')->unsigned(); - $table->integer('role_id')->unsigned()->index('permission_role_role_id_foreign'); - $table->primary(['permission_id','role_id']); - }); - } - - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::drop('permission_role'); - } +class CreatePermissionRoleTable extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::create('permission_role', function (Blueprint $table) { + $table->integer('permission_id')->unsigned(); + $table->integer('role_id')->unsigned()->index('permission_role_role_id_foreign'); + $table->primary(['permission_id', 'role_id']); + }); + } + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::drop('permission_role'); + } } diff --git a/database/migrations/2020_04_20_212813_create_permission_user_table.php b/database/migrations/2020_04_20_212813_create_permission_user_table.php index 6b34fa11..52477423 100644 --- a/database/migrations/2020_04_20_212813_create_permission_user_table.php +++ b/database/migrations/2020_04_20_212813_create_permission_user_table.php @@ -3,33 +3,30 @@ use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; -class CreatePermissionUserTable extends Migration { - - /** - * Run the migrations. - * - * @return void - */ - public function up() - { - Schema::create('permission_user', function(Blueprint $table) - { - $table->integer('permission_id')->unsigned(); - $table->integer('user_id')->unsigned(); - $table->string('user_type'); - $table->primary(['permission_id','user_id','user_type']); - }); - } - - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::drop('permission_user'); - } +class CreatePermissionUserTable extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::create('permission_user', function (Blueprint $table) { + $table->integer('permission_id')->unsigned(); + $table->integer('user_id')->unsigned(); + $table->string('user_type'); + $table->primary(['permission_id', 'user_id', 'user_type']); + }); + } + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::drop('permission_user'); + } } diff --git a/database/migrations/2020_04_20_212813_create_permissions_categories_table.php b/database/migrations/2020_04_20_212813_create_permissions_categories_table.php index f714a73e..73480bbf 100644 --- a/database/migrations/2020_04_20_212813_create_permissions_categories_table.php +++ b/database/migrations/2020_04_20_212813_create_permissions_categories_table.php @@ -3,32 +3,29 @@ use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; -class CreatePermissionsCategoriesTable extends Migration { - - /** - * Run the migrations. - * - * @return void - */ - public function up() - { - Schema::create('permissions_categories', function(Blueprint $table) - { - $table->increments('id'); - $table->string('name')->unique(); - $table->string('display_name'); - }); - } - - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::drop('permissions_categories'); - } +class CreatePermissionsCategoriesTable extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::create('permissions_categories', function (Blueprint $table) { + $table->increments('id'); + $table->string('name')->unique(); + $table->string('display_name'); + }); + } + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::drop('permissions_categories'); + } } diff --git a/database/migrations/2020_04_20_212813_create_permissions_table.php b/database/migrations/2020_04_20_212813_create_permissions_table.php index 1c0628bf..b6d3b807 100644 --- a/database/migrations/2020_04_20_212813_create_permissions_table.php +++ b/database/migrations/2020_04_20_212813_create_permissions_table.php @@ -3,35 +3,32 @@ use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; -class CreatePermissionsTable extends Migration { - - /** - * Run the migrations. - * - * @return void - */ - public function up() - { - Schema::create('permissions', function(Blueprint $table) - { - $table->increments('id'); - $table->integer('category_id')->unsigned()->nullable()->index('permissions_category_id_foreign'); - $table->string('name')->unique(); - $table->string('display_name')->nullable(); - $table->string('description')->nullable(); - $table->timestamps(); - }); - } - - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::drop('permissions'); - } +class CreatePermissionsTable extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::create('permissions', function (Blueprint $table) { + $table->increments('id'); + $table->integer('category_id')->unsigned()->nullable()->index('permissions_category_id_foreign'); + $table->string('name')->unique(); + $table->string('display_name')->nullable(); + $table->string('description')->nullable(); + $table->timestamps(); + }); + } + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::drop('permissions'); + } } diff --git a/database/migrations/2020_04_20_212813_create_role_user_table.php b/database/migrations/2020_04_20_212813_create_role_user_table.php index 6b64a4b3..d2211c46 100644 --- a/database/migrations/2020_04_20_212813_create_role_user_table.php +++ b/database/migrations/2020_04_20_212813_create_role_user_table.php @@ -3,33 +3,30 @@ use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; -class CreateRoleUserTable extends Migration { - - /** - * Run the migrations. - * - * @return void - */ - public function up() - { - Schema::create('role_user', function(Blueprint $table) - { - $table->bigInteger('user_id')->unsigned(); - $table->integer('role_id')->unsigned()->index('role_user_role_id_foreign'); - $table->string('user_type'); - $table->primary(['user_id','role_id','user_type']); - }); - } - - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::drop('role_user'); - } +class CreateRoleUserTable extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::create('role_user', function (Blueprint $table) { + $table->bigInteger('user_id')->unsigned(); + $table->integer('role_id')->unsigned()->index('role_user_role_id_foreign'); + $table->string('user_type'); + $table->primary(['user_id', 'role_id', 'user_type']); + }); + } + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::drop('role_user'); + } } diff --git a/database/migrations/2020_04_20_212813_create_roles_table.php b/database/migrations/2020_04_20_212813_create_roles_table.php index 0aa40741..9d3ca1b3 100644 --- a/database/migrations/2020_04_20_212813_create_roles_table.php +++ b/database/migrations/2020_04_20_212813_create_roles_table.php @@ -3,34 +3,31 @@ use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; -class CreateRolesTable extends Migration { - - /** - * Run the migrations. - * - * @return void - */ - public function up() - { - Schema::create('roles', function(Blueprint $table) - { - $table->increments('id'); - $table->string('name')->unique(); - $table->string('display_name')->nullable(); - $table->string('description')->nullable(); - $table->timestamps(); - }); - } - - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::drop('roles'); - } +class CreateRolesTable extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::create('roles', function (Blueprint $table) { + $table->increments('id'); + $table->string('name')->unique(); + $table->string('display_name')->nullable(); + $table->string('description')->nullable(); + $table->timestamps(); + }); + } + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::drop('roles'); + } } diff --git a/database/migrations/2020_04_20_212813_create_shop_article_attribute_families_table.php b/database/migrations/2020_04_20_212813_create_shop_article_attribute_families_table.php index 9789d802..94d462c1 100644 --- a/database/migrations/2020_04_20_212813_create_shop_article_attribute_families_table.php +++ b/database/migrations/2020_04_20_212813_create_shop_article_attribute_families_table.php @@ -3,33 +3,30 @@ use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; -class CreateShopArticleAttributeFamiliesTable extends Migration { - - /** - * Run the migrations. - * - * @return void - */ - public function up() - { - Schema::create('shop_article_attribute_families', function(Blueprint $table) - { - $table->integer('id', true); - $table->string('name', 50)->nullable(); - $table->timestamps(); - $table->softDeletes(); - }); - } - - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::drop('shop_article_attribute_families'); - } +class CreateShopArticleAttributeFamiliesTable extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::create('shop_article_attribute_families', function (Blueprint $table) { + $table->integer('id', true); + $table->string('name', 50)->nullable(); + $table->timestamps(); + $table->softDeletes(); + }); + } + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::drop('shop_article_attribute_families'); + } } diff --git a/database/migrations/2020_04_20_212813_create_shop_article_attribute_values_table.php b/database/migrations/2020_04_20_212813_create_shop_article_attribute_values_table.php index 662c5207..022af308 100644 --- a/database/migrations/2020_04_20_212813_create_shop_article_attribute_values_table.php +++ b/database/migrations/2020_04_20_212813_create_shop_article_attribute_values_table.php @@ -3,33 +3,30 @@ use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; -class CreateShopArticleAttributeValuesTable extends Migration { - - /** - * Run the migrations. - * - * @return void - */ - public function up() - { - Schema::create('shop_article_attribute_values', function(Blueprint $table) - { - $table->integer('id')->unsigned()->nullable(); - $table->integer('attribute_family_id')->unsigned()->nullable(); - $table->boolean('type_value')->nullable()->comment('1 = INT, 2 = DECIMAL, 3 = STRING'); - $table->string('value', 50)->nullable(); - }); - } - - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::drop('shop_article_attribute_values'); - } +class CreateShopArticleAttributeValuesTable extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::create('shop_article_attribute_values', function (Blueprint $table) { + $table->integer('id')->unsigned()->nullable(); + $table->integer('attribute_family_id')->unsigned()->nullable(); + $table->boolean('type_value')->nullable()->comment('1 = INT, 2 = DECIMAL, 3 = STRING'); + $table->string('value', 50)->nullable(); + }); + } + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::drop('shop_article_attribute_values'); + } } diff --git a/database/migrations/2020_04_20_212813_create_shop_article_attributes_table.php b/database/migrations/2020_04_20_212813_create_shop_article_attributes_table.php index 38602737..255fef55 100644 --- a/database/migrations/2020_04_20_212813_create_shop_article_attributes_table.php +++ b/database/migrations/2020_04_20_212813_create_shop_article_attributes_table.php @@ -3,32 +3,29 @@ use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; -class CreateShopArticleAttributesTable extends Migration { - - /** - * Run the migrations. - * - * @return void - */ - public function up() - { - Schema::create('shop_article_attributes', function(Blueprint $table) - { - $table->integer('id')->unsigned()->nullable(); - $table->integer('article_id')->unsigned()->nullable(); - $table->integer('attribute_value_id')->unsigned()->nullable(); - }); - } - - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::drop('shop_article_attributes'); - } +class CreateShopArticleAttributesTable extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::create('shop_article_attributes', function (Blueprint $table) { + $table->integer('id')->unsigned()->nullable(); + $table->integer('article_id')->unsigned()->nullable(); + $table->integer('attribute_value_id')->unsigned()->nullable(); + }); + } + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::drop('shop_article_attributes'); + } } diff --git a/database/migrations/2020_04_20_212813_create_shop_article_categories_table.php b/database/migrations/2020_04_20_212813_create_shop_article_categories_table.php index 662c776a..1f1bfb58 100644 --- a/database/migrations/2020_04_20_212813_create_shop_article_categories_table.php +++ b/database/migrations/2020_04_20_212813_create_shop_article_categories_table.php @@ -3,32 +3,29 @@ use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; -class CreateShopArticleCategoriesTable extends Migration { - - /** - * Run the migrations. - * - * @return void - */ - public function up() - { - Schema::create('shop_article_categories', function(Blueprint $table) - { - $table->increments('id'); - $table->integer('article_id')->unsigned()->nullable(); - $table->integer('category_id')->unsigned()->nullable(); - }); - } - - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::drop('shop_article_categories'); - } +class CreateShopArticleCategoriesTable extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::create('shop_article_categories', function (Blueprint $table) { + $table->increments('id'); + $table->integer('article_id')->unsigned()->nullable(); + $table->integer('category_id')->unsigned()->nullable(); + }); + } + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::drop('shop_article_categories'); + } } diff --git a/database/migrations/2020_04_20_212813_create_shop_article_components_table.php b/database/migrations/2020_04_20_212813_create_shop_article_components_table.php index 56b4ba37..300b6a7b 100644 --- a/database/migrations/2020_04_20_212813_create_shop_article_components_table.php +++ b/database/migrations/2020_04_20_212813_create_shop_article_components_table.php @@ -3,34 +3,31 @@ use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; -class CreateShopArticleComponentsTable extends Migration { - - /** - * Run the migrations. - * - * @return void - */ - public function up() - { - Schema::create('shop_article_components', function(Blueprint $table) - { - $table->increments('id'); - $table->integer('article_id')->unsigned()->nullable(); - $table->string('model')->nullable(); - $table->timestamps(); - $table->softDeletes(); - }); - } - - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::drop('shop_article_components'); - } +class CreateShopArticleComponentsTable extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::create('shop_article_components', function (Blueprint $table) { + $table->increments('id'); + $table->integer('article_id')->unsigned()->nullable(); + $table->string('model')->nullable(); + $table->timestamps(); + $table->softDeletes(); + }); + } + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::drop('shop_article_components'); + } } diff --git a/database/migrations/2020_04_20_212813_create_shop_article_prices_table.php b/database/migrations/2020_04_20_212813_create_shop_article_prices_table.php index 22607384..9dd9a0e9 100644 --- a/database/migrations/2020_04_20_212813_create_shop_article_prices_table.php +++ b/database/migrations/2020_04_20_212813_create_shop_article_prices_table.php @@ -3,32 +3,29 @@ use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; -class CreateShopArticlePricesTable extends Migration { - - /** - * Run the migrations. - * - * @return void - */ - public function up() - { - Schema::create('shop_article_prices', function(Blueprint $table) - { - $table->increments('id'); - $table->integer('article_attribute_id')->unsigned()->nullable(); - $table->decimal('price', 10)->nullable(); - }); - } - - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::drop('shop_article_prices'); - } +class CreateShopArticlePricesTable extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::create('shop_article_prices', function (Blueprint $table) { + $table->increments('id'); + $table->integer('article_attribute_id')->unsigned()->nullable(); + $table->decimal('price', 10)->nullable(); + }); + } + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::drop('shop_article_prices'); + } } diff --git a/database/migrations/2020_04_20_212813_create_shop_articles_table.php b/database/migrations/2020_04_20_212813_create_shop_articles_table.php index 3471f995..cb7e58ca 100644 --- a/database/migrations/2020_04_20_212813_create_shop_articles_table.php +++ b/database/migrations/2020_04_20_212813_create_shop_articles_table.php @@ -3,34 +3,31 @@ use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; -class CreateShopArticlesTable extends Migration { - - /** - * Run the migrations. - * - * @return void - */ - public function up() - { - Schema::create('shop_articles', function(Blueprint $table) - { - $table->increments('id'); - $table->string('name')->nullable(); - $table->text('description')->nullable(); - $table->timestamps(); - $table->softDeletes(); - }); - } - - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::drop('shop_articles'); - } +class CreateShopArticlesTable extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::create('shop_articles', function (Blueprint $table) { + $table->increments('id'); + $table->string('name')->nullable(); + $table->text('description')->nullable(); + $table->timestamps(); + $table->softDeletes(); + }); + } + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::drop('shop_articles'); + } } diff --git a/database/migrations/2020_04_20_212813_create_shop_categories_table.php b/database/migrations/2020_04_20_212813_create_shop_categories_table.php index 4c9d09be..1113b60d 100644 --- a/database/migrations/2020_04_20_212813_create_shop_categories_table.php +++ b/database/migrations/2020_04_20_212813_create_shop_categories_table.php @@ -3,33 +3,30 @@ use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; -class CreateShopCategoriesTable extends Migration { - - /** - * Run the migrations. - * - * @return void - */ - public function up() - { - Schema::create('shop_categories', function(Blueprint $table) - { - $table->increments('id'); - $table->integer('category_id')->unsigned()->nullable(); - $table->string('name', 50)->nullable(); - $table->text('description', 65535)->nullable(); - }); - } - - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::drop('shop_categories'); - } +class CreateShopCategoriesTable extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::create('shop_categories', function (Blueprint $table) { + $table->increments('id'); + $table->integer('category_id')->unsigned()->nullable(); + $table->string('name', 50)->nullable(); + $table->text('description', 65535)->nullable(); + }); + } + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::drop('shop_categories'); + } } diff --git a/database/migrations/2020_04_20_212813_create_shop_customers_table.php b/database/migrations/2020_04_20_212813_create_shop_customers_table.php index ad39187c..be694aea 100644 --- a/database/migrations/2020_04_20_212813_create_shop_customers_table.php +++ b/database/migrations/2020_04_20_212813_create_shop_customers_table.php @@ -3,39 +3,36 @@ use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; -class CreateShopCustomersTable extends Migration { - - /** - * Run the migrations. - * - * @return void - */ - public function up() - { - Schema::create('shop_customers', function(Blueprint $table) - { - $table->increments('id'); - $table->uuid('uuid')->nullable(); - $table->string('first_name')->nullable(); - $table->string('last_name')->nullable(); - $table->string('email')->unique(); - $table->dateTime('email_verified_at')->nullable(); - $table->string('password'); - $table->string('remember_token', 100)->nullable(); - $table->timestamps(); - $table->softDeletes(); - }); - } - - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::drop('shop_customers'); - } +class CreateShopCustomersTable extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::create('shop_customers', function (Blueprint $table) { + $table->increments('id'); + $table->uuid('uuid')->nullable(); + $table->string('first_name')->nullable(); + $table->string('last_name')->nullable(); + $table->string('email')->unique(); + $table->dateTime('email_verified_at')->nullable(); + $table->string('password'); + $table->string('remember_token', 100)->nullable(); + $table->timestamps(); + $table->softDeletes(); + }); + } + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::drop('shop_customers'); + } } diff --git a/database/migrations/2020_04_20_212813_create_shop_invoice_items_table.php b/database/migrations/2020_04_20_212813_create_shop_invoice_items_table.php index ed703b0b..8a4e57be 100644 --- a/database/migrations/2020_04_20_212813_create_shop_invoice_items_table.php +++ b/database/migrations/2020_04_20_212813_create_shop_invoice_items_table.php @@ -3,42 +3,39 @@ use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; -class CreateShopInvoiceItemsTable extends Migration { - - /** - * Run the migrations. - * - * @return void - */ - public function up() - { - Schema::create('shop_invoice_items', function(Blueprint $table) - { - $table->increments('id'); - $table->integer('invoice_id')->nullable(); - $table->integer('product_id')->nullable(); - $table->integer('status')->nullable(); - $table->integer('quantity')->nullable(); - $table->decimal('unit_price', 10); - $table->integer('tax_id')->nullable(); - $table->integer('raw_price')->nullable(); - $table->integer('tax')->nullable(); - $table->integer('total_price')->nullable(); - $table->decimal('discount_percent')->nullable(); - $table->decimal('discount')->nullable(); - $table->timestamps(); - }); - } - - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::drop('shop_invoice_items'); - } +class CreateShopInvoiceItemsTable extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::create('shop_invoice_items', function (Blueprint $table) { + $table->increments('id'); + $table->integer('invoice_id')->nullable(); + $table->integer('product_id')->nullable(); + $table->integer('status')->nullable(); + $table->integer('quantity')->nullable(); + $table->decimal('unit_price', 10); + $table->integer('tax_id')->nullable(); + $table->integer('raw_price')->nullable(); + $table->integer('tax')->nullable(); + $table->integer('total_price')->nullable(); + $table->decimal('discount_percent')->nullable(); + $table->decimal('discount')->nullable(); + $table->timestamps(); + }); + } + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::drop('shop_invoice_items'); + } } diff --git a/database/migrations/2020_04_20_212813_create_shop_invoices_table.php b/database/migrations/2020_04_20_212813_create_shop_invoices_table.php index f330fa8b..23fc2a60 100644 --- a/database/migrations/2020_04_20_212813_create_shop_invoices_table.php +++ b/database/migrations/2020_04_20_212813_create_shop_invoices_table.php @@ -3,37 +3,34 @@ use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; -class CreateShopInvoicesTable extends Migration { - - /** - * Run the migrations. - * - * @return void - */ - public function up() - { - Schema::create('shop_invoices', function(Blueprint $table) - { - $table->increments('id'); - $table->integer('user_id'); - $table->boolean('status_id'); - $table->decimal('subtotal', 10); - $table->decimal('total', 10); - $table->decimal('shipping', 10); - $table->timestamps(); - $table->softDeletes(); - }); - } - - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::drop('shop_invoices'); - } +class CreateShopInvoicesTable extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::create('shop_invoices', function (Blueprint $table) { + $table->increments('id'); + $table->integer('user_id'); + $table->boolean('status_id'); + $table->decimal('subtotal', 10); + $table->decimal('total', 10); + $table->decimal('shipping', 10); + $table->timestamps(); + $table->softDeletes(); + }); + } + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::drop('shop_invoices'); + } } diff --git a/database/migrations/2020_04_20_212813_create_shop_order_payments_table.php b/database/migrations/2020_04_20_212813_create_shop_order_payments_table.php index 8ad0ae2a..ac946f17 100644 --- a/database/migrations/2020_04_20_212813_create_shop_order_payments_table.php +++ b/database/migrations/2020_04_20_212813_create_shop_order_payments_table.php @@ -3,32 +3,29 @@ use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; -class CreateShopOrderPaymentsTable extends Migration { - - /** - * Run the migrations. - * - * @return void - */ - public function up() - { - Schema::create('shop_order_payments', function(Blueprint $table) - { - $table->increments('id'); - $table->integer('order_id')->nullable(); - $table->timestamps(); - }); - } - - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::drop('shop_order_payments'); - } +class CreateShopOrderPaymentsTable extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::create('shop_order_payments', function (Blueprint $table) { + $table->increments('id'); + $table->integer('order_id')->nullable(); + $table->timestamps(); + }); + } + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::drop('shop_order_payments'); + } } diff --git a/database/migrations/2020_04_20_212813_create_shop_orders_table.php b/database/migrations/2020_04_20_212813_create_shop_orders_table.php index a3746ab6..bf23f4be 100644 --- a/database/migrations/2020_04_20_212813_create_shop_orders_table.php +++ b/database/migrations/2020_04_20_212813_create_shop_orders_table.php @@ -3,32 +3,29 @@ use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; -class CreateShopOrdersTable extends Migration { - - /** - * Run the migrations. - * - * @return void - */ - public function up() - { - Schema::create('shop_orders', function(Blueprint $table) - { - $table->increments('id'); - $table->timestamps(); - $table->softDeletes(); - }); - } - - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::drop('shop_orders'); - } +class CreateShopOrdersTable extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::create('shop_orders', function (Blueprint $table) { + $table->increments('id'); + $table->timestamps(); + $table->softDeletes(); + }); + } + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::drop('shop_orders'); + } } diff --git a/database/migrations/2020_04_20_212813_create_tagging_tag_groups_table.php b/database/migrations/2020_04_20_212813_create_tagging_tag_groups_table.php index 12390172..31ebd680 100644 --- a/database/migrations/2020_04_20_212813_create_tagging_tag_groups_table.php +++ b/database/migrations/2020_04_20_212813_create_tagging_tag_groups_table.php @@ -3,32 +3,29 @@ use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; -class CreateTaggingTagGroupsTable extends Migration { - - /** - * Run the migrations. - * - * @return void - */ - public function up() - { - Schema::create('tagging_tag_groups', function(Blueprint $table) - { - $table->increments('id'); - $table->string('slug', 125)->index(); - $table->string('name', 125); - }); - } - - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::drop('tagging_tag_groups'); - } +class CreateTaggingTagGroupsTable extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::create('tagging_tag_groups', function (Blueprint $table) { + $table->increments('id'); + $table->string('slug', 125)->index(); + $table->string('name', 125); + }); + } + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::drop('tagging_tag_groups'); + } } diff --git a/database/migrations/2020_04_20_212813_create_tagging_tagged_table.php b/database/migrations/2020_04_20_212813_create_tagging_tagged_table.php index 11681ff1..18fff707 100644 --- a/database/migrations/2020_04_20_212813_create_tagging_tagged_table.php +++ b/database/migrations/2020_04_20_212813_create_tagging_tagged_table.php @@ -3,34 +3,31 @@ use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; -class CreateTaggingTaggedTable extends Migration { - - /** - * Run the migrations. - * - * @return void - */ - public function up() - { - Schema::create('tagging_tagged', function(Blueprint $table) - { - $table->increments('id'); - $table->integer('taggable_id')->unsigned()->index(); - $table->string('taggable_type', 125)->index(); - $table->string('tag_name', 125); - $table->string('tag_slug', 125)->index(); - }); - } - - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::drop('tagging_tagged'); - } +class CreateTaggingTaggedTable extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::create('tagging_tagged', function (Blueprint $table) { + $table->increments('id'); + $table->integer('taggable_id')->unsigned()->index(); + $table->string('taggable_type', 125)->index(); + $table->string('tag_name', 125); + $table->string('tag_slug', 125)->index(); + }); + } + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::drop('tagging_tagged'); + } } diff --git a/database/migrations/2020_04_20_212813_create_tagging_tags_table.php b/database/migrations/2020_04_20_212813_create_tagging_tags_table.php index a26141f9..ee226835 100644 --- a/database/migrations/2020_04_20_212813_create_tagging_tags_table.php +++ b/database/migrations/2020_04_20_212813_create_tagging_tags_table.php @@ -3,35 +3,32 @@ use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; -class CreateTaggingTagsTable extends Migration { - - /** - * Run the migrations. - * - * @return void - */ - public function up() - { - Schema::create('tagging_tags', function(Blueprint $table) - { - $table->increments('id'); - $table->string('slug', 125)->index(); - $table->string('name', 125); - $table->boolean('suggest')->default(0); - $table->integer('count')->unsigned()->default(0); - $table->integer('tag_group_id')->unsigned()->nullable()->index('tagging_tags_tag_group_id_foreign'); - }); - } - - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::drop('tagging_tags'); - } +class CreateTaggingTagsTable extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::create('tagging_tags', function (Blueprint $table) { + $table->increments('id'); + $table->string('slug', 125)->index(); + $table->string('name', 125); + $table->boolean('suggest')->default(0); + $table->integer('count')->unsigned()->default(0); + $table->integer('tag_group_id')->unsigned()->nullable()->index('tagging_tags_tag_group_id_foreign'); + }); + } + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::drop('tagging_tags'); + } } diff --git a/database/migrations/2020_04_20_212813_create_team_invites_table.php b/database/migrations/2020_04_20_212813_create_team_invites_table.php index 2cf3c8a9..c9c40358 100644 --- a/database/migrations/2020_04_20_212813_create_team_invites_table.php +++ b/database/migrations/2020_04_20_212813_create_team_invites_table.php @@ -3,37 +3,34 @@ use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; -class CreateTeamInvitesTable extends Migration { - - /** - * Run the migrations. - * - * @return void - */ - public function up() - { - Schema::create('team_invites', function(Blueprint $table) - { - $table->increments('id'); - $table->bigInteger('user_id')->unsigned(); - $table->integer('team_id')->unsigned()->index('team_invites_team_id_foreign'); - $table->enum('type', array('invite','request')); - $table->string('email'); - $table->string('accept_token'); - $table->string('deny_token'); - $table->timestamps(); - }); - } - - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::drop('team_invites'); - } +class CreateTeamInvitesTable extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::create('team_invites', function (Blueprint $table) { + $table->increments('id'); + $table->bigInteger('user_id')->unsigned(); + $table->integer('team_id')->unsigned()->index('team_invites_team_id_foreign'); + $table->enum('type', ['invite', 'request']); + $table->string('email'); + $table->string('accept_token'); + $table->string('deny_token'); + $table->timestamps(); + }); + } + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::drop('team_invites'); + } } diff --git a/database/migrations/2020_04_20_212813_create_team_user_table.php b/database/migrations/2020_04_20_212813_create_team_user_table.php index 921a85d2..e68b1ad5 100644 --- a/database/migrations/2020_04_20_212813_create_team_user_table.php +++ b/database/migrations/2020_04_20_212813_create_team_user_table.php @@ -3,32 +3,29 @@ use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; -class CreateTeamUserTable extends Migration { - - /** - * Run the migrations. - * - * @return void - */ - public function up() - { - Schema::create('team_user', function(Blueprint $table) - { - $table->bigInteger('user_id')->unsigned()->index('team_user_user_id_foreign'); - $table->integer('team_id')->unsigned()->index('team_user_team_id_foreign'); - $table->timestamps(); - }); - } - - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::drop('team_user'); - } +class CreateTeamUserTable extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::create('team_user', function (Blueprint $table) { + $table->bigInteger('user_id')->unsigned()->index('team_user_user_id_foreign'); + $table->integer('team_id')->unsigned()->index('team_user_team_id_foreign'); + $table->timestamps(); + }); + } + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::drop('team_user'); + } } diff --git a/database/migrations/2020_04_20_212813_create_teams_table.php b/database/migrations/2020_04_20_212813_create_teams_table.php index 7e09e69a..3a78af2f 100644 --- a/database/migrations/2020_04_20_212813_create_teams_table.php +++ b/database/migrations/2020_04_20_212813_create_teams_table.php @@ -3,33 +3,30 @@ use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; -class CreateTeamsTable extends Migration { - - /** - * Run the migrations. - * - * @return void - */ - public function up() - { - Schema::create('teams', function(Blueprint $table) - { - $table->increments('id'); - $table->integer('owner_id')->unsigned()->nullable(); - $table->string('name'); - $table->timestamps(); - }); - } - - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::drop('teams'); - } +class CreateTeamsTable extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::create('teams', function (Blueprint $table) { + $table->increments('id'); + $table->integer('owner_id')->unsigned()->nullable(); + $table->string('name'); + $table->timestamps(); + }); + } + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::drop('teams'); + } } diff --git a/database/migrations/2020_04_20_212813_create_users_table.php b/database/migrations/2020_04_20_212813_create_users_table.php index 16208513..8bb52431 100644 --- a/database/migrations/2020_04_20_212813_create_users_table.php +++ b/database/migrations/2020_04_20_212813_create_users_table.php @@ -3,43 +3,40 @@ use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; -class CreateUsersTable extends Migration { - - /** - * Run the migrations. - * - * @return void - */ - public function up() - { - Schema::create('users', function(Blueprint $table) - { - $table->bigInteger('id', true)->unsigned(); - $table->boolean('active')->default(0); - $table->string('first_name')->nullable(); - $table->string('last_name')->nullable(); - $table->string('email')->unique(); - $table->dateTime('email_verified_at')->nullable(); - $table->string('password'); - $table->string('remember_token', 100)->nullable(); - $table->timestamps(); - $table->softDeletes(); - $table->dateTime('last_login')->nullable(); - $table->boolean('verified')->default(0); - $table->string('verification_token')->nullable(); - $table->integer('current_team_id')->unsigned()->nullable(); - }); - } - - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::drop('users'); - } +class CreateUsersTable extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::create('users', function (Blueprint $table) { + $table->bigInteger('id', true)->unsigned(); + $table->boolean('active')->default(0); + $table->string('first_name')->nullable(); + $table->string('last_name')->nullable(); + $table->string('email')->unique(); + $table->dateTime('email_verified_at')->nullable(); + $table->string('password'); + $table->string('remember_token', 100)->nullable(); + $table->timestamps(); + $table->softDeletes(); + $table->dateTime('last_login')->nullable(); + $table->boolean('verified')->default(0); + $table->string('verification_token')->nullable(); + $table->integer('current_team_id')->unsigned()->nullable(); + }); + } + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::drop('users'); + } } diff --git a/database/migrations/2020_04_20_212817_add_foreign_keys_to_categorizables_table.php b/database/migrations/2020_04_20_212817_add_foreign_keys_to_categorizables_table.php index 887bf833..4102d537 100644 --- a/database/migrations/2020_04_20_212817_add_foreign_keys_to_categorizables_table.php +++ b/database/migrations/2020_04_20_212817_add_foreign_keys_to_categorizables_table.php @@ -3,33 +3,29 @@ use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; -class AddForeignKeysToCategorizablesTable extends Migration { - - /** - * Run the migrations. - * - * @return void - */ - public function up() - { - Schema::table('categorizables', function(Blueprint $table) - { - $table->foreign('category_id')->references('id')->on('categories')->onUpdate('CASCADE')->onDelete('CASCADE'); - }); - } - - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::table('categorizables', function(Blueprint $table) - { - $table->dropForeign('categorizables_category_id_foreign'); - }); - } +class AddForeignKeysToCategorizablesTable extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::table('categorizables', function (Blueprint $table) { + $table->foreign('category_id')->references('id')->on('categories')->onUpdate('CASCADE')->onDelete('CASCADE'); + }); + } + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('categorizables', function (Blueprint $table) { + $table->dropForeign('categorizables_category_id_foreign'); + }); + } } diff --git a/database/migrations/2020_04_20_212817_add_foreign_keys_to_permission_role_table.php b/database/migrations/2020_04_20_212817_add_foreign_keys_to_permission_role_table.php index be06b508..0de56740 100644 --- a/database/migrations/2020_04_20_212817_add_foreign_keys_to_permission_role_table.php +++ b/database/migrations/2020_04_20_212817_add_foreign_keys_to_permission_role_table.php @@ -3,35 +3,31 @@ use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; -class AddForeignKeysToPermissionRoleTable extends Migration { - - /** - * Run the migrations. - * - * @return void - */ - public function up() - { - Schema::table('permission_role', function(Blueprint $table) - { - $table->foreign('permission_id')->references('id')->on('permissions')->onUpdate('CASCADE')->onDelete('CASCADE'); - $table->foreign('role_id')->references('id')->on('roles')->onUpdate('CASCADE')->onDelete('CASCADE'); - }); - } - - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::table('permission_role', function(Blueprint $table) - { - $table->dropForeign('permission_role_permission_id_foreign'); - $table->dropForeign('permission_role_role_id_foreign'); - }); - } +class AddForeignKeysToPermissionRoleTable extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::table('permission_role', function (Blueprint $table) { + $table->foreign('permission_id')->references('id')->on('permissions')->onUpdate('CASCADE')->onDelete('CASCADE'); + $table->foreign('role_id')->references('id')->on('roles')->onUpdate('CASCADE')->onDelete('CASCADE'); + }); + } + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('permission_role', function (Blueprint $table) { + $table->dropForeign('permission_role_permission_id_foreign'); + $table->dropForeign('permission_role_role_id_foreign'); + }); + } } diff --git a/database/migrations/2020_04_20_212817_add_foreign_keys_to_permission_user_table.php b/database/migrations/2020_04_20_212817_add_foreign_keys_to_permission_user_table.php index 7f76d0c9..0a40fcc4 100644 --- a/database/migrations/2020_04_20_212817_add_foreign_keys_to_permission_user_table.php +++ b/database/migrations/2020_04_20_212817_add_foreign_keys_to_permission_user_table.php @@ -3,33 +3,29 @@ use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; -class AddForeignKeysToPermissionUserTable extends Migration { - - /** - * Run the migrations. - * - * @return void - */ - public function up() - { - Schema::table('permission_user', function(Blueprint $table) - { - $table->foreign('permission_id')->references('id')->on('permissions')->onUpdate('CASCADE')->onDelete('CASCADE'); - }); - } - - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::table('permission_user', function(Blueprint $table) - { - $table->dropForeign('permission_user_permission_id_foreign'); - }); - } +class AddForeignKeysToPermissionUserTable extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::table('permission_user', function (Blueprint $table) { + $table->foreign('permission_id')->references('id')->on('permissions')->onUpdate('CASCADE')->onDelete('CASCADE'); + }); + } + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('permission_user', function (Blueprint $table) { + $table->dropForeign('permission_user_permission_id_foreign'); + }); + } } diff --git a/database/migrations/2020_04_20_212817_add_foreign_keys_to_permissions_table.php b/database/migrations/2020_04_20_212817_add_foreign_keys_to_permissions_table.php index ac305150..916208d3 100644 --- a/database/migrations/2020_04_20_212817_add_foreign_keys_to_permissions_table.php +++ b/database/migrations/2020_04_20_212817_add_foreign_keys_to_permissions_table.php @@ -3,33 +3,29 @@ use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; -class AddForeignKeysToPermissionsTable extends Migration { - - /** - * Run the migrations. - * - * @return void - */ - public function up() - { - Schema::table('permissions', function(Blueprint $table) - { - $table->foreign('category_id')->references('id')->on('permissions_categories')->onUpdate('RESTRICT')->onDelete('SET NULL'); - }); - } - - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::table('permissions', function(Blueprint $table) - { - $table->dropForeign('permissions_category_id_foreign'); - }); - } +class AddForeignKeysToPermissionsTable extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::table('permissions', function (Blueprint $table) { + $table->foreign('category_id')->references('id')->on('permissions_categories')->onUpdate('RESTRICT')->onDelete('SET NULL'); + }); + } + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('permissions', function (Blueprint $table) { + $table->dropForeign('permissions_category_id_foreign'); + }); + } } diff --git a/database/migrations/2020_04_20_212817_add_foreign_keys_to_role_user_table.php b/database/migrations/2020_04_20_212817_add_foreign_keys_to_role_user_table.php index c16eff1d..3b1447df 100644 --- a/database/migrations/2020_04_20_212817_add_foreign_keys_to_role_user_table.php +++ b/database/migrations/2020_04_20_212817_add_foreign_keys_to_role_user_table.php @@ -3,35 +3,31 @@ use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; -class AddForeignKeysToRoleUserTable extends Migration { - - /** - * Run the migrations. - * - * @return void - */ - public function up() - { - Schema::table('role_user', function(Blueprint $table) - { - $table->foreign('role_id')->references('id')->on('roles')->onUpdate('CASCADE')->onDelete('CASCADE'); - $table->foreign('user_id')->references('id')->on('users')->onUpdate('CASCADE')->onDelete('CASCADE'); - }); - } - - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::table('role_user', function(Blueprint $table) - { - $table->dropForeign('role_user_role_id_foreign'); - $table->dropForeign('role_user_user_id_foreign'); - }); - } +class AddForeignKeysToRoleUserTable extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::table('role_user', function (Blueprint $table) { + $table->foreign('role_id')->references('id')->on('roles')->onUpdate('CASCADE')->onDelete('CASCADE'); + $table->foreign('user_id')->references('id')->on('users')->onUpdate('CASCADE')->onDelete('CASCADE'); + }); + } + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('role_user', function (Blueprint $table) { + $table->dropForeign('role_user_role_id_foreign'); + $table->dropForeign('role_user_user_id_foreign'); + }); + } } diff --git a/database/migrations/2020_04_20_212817_add_foreign_keys_to_tagging_tags_table.php b/database/migrations/2020_04_20_212817_add_foreign_keys_to_tagging_tags_table.php index 34d32ebe..9b13efa7 100644 --- a/database/migrations/2020_04_20_212817_add_foreign_keys_to_tagging_tags_table.php +++ b/database/migrations/2020_04_20_212817_add_foreign_keys_to_tagging_tags_table.php @@ -3,33 +3,29 @@ use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; -class AddForeignKeysToTaggingTagsTable extends Migration { - - /** - * Run the migrations. - * - * @return void - */ - public function up() - { - Schema::table('tagging_tags', function(Blueprint $table) - { - $table->foreign('tag_group_id')->references('id')->on('tagging_tag_groups')->onUpdate('RESTRICT')->onDelete('RESTRICT'); - }); - } - - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::table('tagging_tags', function(Blueprint $table) - { - $table->dropForeign('tagging_tags_tag_group_id_foreign'); - }); - } +class AddForeignKeysToTaggingTagsTable extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::table('tagging_tags', function (Blueprint $table) { + $table->foreign('tag_group_id')->references('id')->on('tagging_tag_groups')->onUpdate('RESTRICT')->onDelete('RESTRICT'); + }); + } + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('tagging_tags', function (Blueprint $table) { + $table->dropForeign('tagging_tags_tag_group_id_foreign'); + }); + } } diff --git a/database/migrations/2020_04_20_212817_add_foreign_keys_to_team_invites_table.php b/database/migrations/2020_04_20_212817_add_foreign_keys_to_team_invites_table.php index 174af6ec..7dc849c8 100644 --- a/database/migrations/2020_04_20_212817_add_foreign_keys_to_team_invites_table.php +++ b/database/migrations/2020_04_20_212817_add_foreign_keys_to_team_invites_table.php @@ -3,33 +3,29 @@ use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; -class AddForeignKeysToTeamInvitesTable extends Migration { - - /** - * Run the migrations. - * - * @return void - */ - public function up() - { - Schema::table('team_invites', function(Blueprint $table) - { - $table->foreign('team_id')->references('id')->on('teams')->onUpdate('RESTRICT')->onDelete('CASCADE'); - }); - } - - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::table('team_invites', function(Blueprint $table) - { - $table->dropForeign('team_invites_team_id_foreign'); - }); - } +class AddForeignKeysToTeamInvitesTable extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::table('team_invites', function (Blueprint $table) { + $table->foreign('team_id')->references('id')->on('teams')->onUpdate('RESTRICT')->onDelete('CASCADE'); + }); + } + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('team_invites', function (Blueprint $table) { + $table->dropForeign('team_invites_team_id_foreign'); + }); + } } diff --git a/database/migrations/2020_04_20_212817_add_foreign_keys_to_team_user_table.php b/database/migrations/2020_04_20_212817_add_foreign_keys_to_team_user_table.php index 91a364ba..fa73c516 100644 --- a/database/migrations/2020_04_20_212817_add_foreign_keys_to_team_user_table.php +++ b/database/migrations/2020_04_20_212817_add_foreign_keys_to_team_user_table.php @@ -3,35 +3,31 @@ use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; -class AddForeignKeysToTeamUserTable extends Migration { - - /** - * Run the migrations. - * - * @return void - */ - public function up() - { - Schema::table('team_user', function(Blueprint $table) - { - $table->foreign('team_id')->references('id')->on('teams')->onUpdate('RESTRICT')->onDelete('CASCADE'); - $table->foreign('user_id')->references('id')->on('users')->onUpdate('CASCADE')->onDelete('CASCADE'); - }); - } - - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::table('team_user', function(Blueprint $table) - { - $table->dropForeign('team_user_team_id_foreign'); - $table->dropForeign('team_user_user_id_foreign'); - }); - } +class AddForeignKeysToTeamUserTable extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::table('team_user', function (Blueprint $table) { + $table->foreign('team_id')->references('id')->on('teams')->onUpdate('RESTRICT')->onDelete('CASCADE'); + $table->foreign('user_id')->references('id')->on('users')->onUpdate('CASCADE')->onDelete('CASCADE'); + }); + } + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('team_user', function (Blueprint $table) { + $table->dropForeign('team_user_team_id_foreign'); + $table->dropForeign('team_user_user_id_foreign'); + }); + } } diff --git a/database/migrations/2021_06_05_192053_create_activity_log_table.php b/database/migrations/2021_06_05_192053_create_activity_log_table.php index d2743d38..e6092239 100644 --- a/database/migrations/2021_06_05_192053_create_activity_log_table.php +++ b/database/migrations/2021_06_05_192053_create_activity_log_table.php @@ -1,8 +1,8 @@ increments('id'); - $table->text('text'); - $table->unsignedSmallInteger('created_by')->nullable(); - $table->unsignedSmallInteger('updated_by')->nullable(); - $table->unsignedSmallInteger('deleted_by')->nullable(); - $table->timestamps(); - $table->softDeletes(); - }); - } - - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::drop('shop_homepages'); - } +class CreateShopHomepagesTable extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::create('shop_homepages', function (Blueprint $table) { + $table->increments('id'); + $table->text('text'); + $table->unsignedSmallInteger('created_by')->nullable(); + $table->unsignedSmallInteger('updated_by')->nullable(); + $table->unsignedSmallInteger('deleted_by')->nullable(); + $table->timestamps(); + $table->softDeletes(); + }); + } + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::drop('shop_homepages'); + } } diff --git a/database/migrations/rinvex/laravel-categories/2021_05_21_001708_create_categories_table.php b/database/migrations/rinvex/laravel-categories/2021_05_21_001708_create_categories_table.php index ee1e7aa4..dff9df03 100644 --- a/database/migrations/rinvex/laravel-categories/2021_05_21_001708_create_categories_table.php +++ b/database/migrations/rinvex/laravel-categories/2021_05_21_001708_create_categories_table.php @@ -2,17 +2,15 @@ declare(strict_types=1); -use Kalnoy\Nestedset\NestedSet; -use Illuminate\Support\Facades\Schema; -use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; +use Illuminate\Database\Schema\Blueprint; +use Illuminate\Support\Facades\Schema; +use Kalnoy\Nestedset\NestedSet; class CreateCategoriesTable extends Migration { /** * Run the migrations. - * - * @return void */ public function up(): void { @@ -33,8 +31,6 @@ class CreateCategoriesTable extends Migration /** * Reverse the migrations. - * - * @return void */ public function down(): void { diff --git a/database/migrations/rinvex/laravel-categories/2021_05_21_001709_create_categorizables_table.php b/database/migrations/rinvex/laravel-categories/2021_05_21_001709_create_categorizables_table.php index 0c0a9a2d..f2f0199f 100644 --- a/database/migrations/rinvex/laravel-categories/2021_05_21_001709_create_categorizables_table.php +++ b/database/migrations/rinvex/laravel-categories/2021_05_21_001709_create_categorizables_table.php @@ -2,16 +2,14 @@ declare(strict_types=1); -use Illuminate\Support\Facades\Schema; -use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; +use Illuminate\Database\Schema\Blueprint; +use Illuminate\Support\Facades\Schema; class CreateCategorizablesTable extends Migration { /** * Run the migrations. - * - * @return void */ public function up(): void { @@ -24,14 +22,12 @@ class CreateCategorizablesTable extends Migration // Indexes $table->unique(['category_id', 'categorizable_id', 'categorizable_type'], 'categorizables_ids_type_unique'); $table->foreign('category_id')->references('id')->on(config('rinvex.categories.tables.categories')) - ->onDelete('cascade')->onUpdate('cascade'); + ->onDelete('cascade')->onUpdate('cascade'); }); } /** * Reverse the migrations. - * - * @return void */ public function down(): void { diff --git a/database/migrations/rinvex/laravel-tags/2021_05_21_001708_create_tags_table.php b/database/migrations/rinvex/laravel-tags/2021_05_21_001708_create_tags_table.php index 844eef8d..cce2773f 100644 --- a/database/migrations/rinvex/laravel-tags/2021_05_21_001708_create_tags_table.php +++ b/database/migrations/rinvex/laravel-tags/2021_05_21_001708_create_tags_table.php @@ -2,16 +2,14 @@ declare(strict_types=1); -use Illuminate\Support\Facades\Schema; -use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; +use Illuminate\Database\Schema\Blueprint; +use Illuminate\Support\Facades\Schema; class CreateTagsTable extends Migration { /** * Run the migrations. - * - * @return void */ public function up(): void { @@ -33,8 +31,6 @@ class CreateTagsTable extends Migration /** * Reverse the migrations. - * - * @return void */ public function down(): void { diff --git a/database/migrations/rinvex/laravel-tags/2021_05_21_001709_create_taggables_table.php b/database/migrations/rinvex/laravel-tags/2021_05_21_001709_create_taggables_table.php index de13259c..ee43875a 100644 --- a/database/migrations/rinvex/laravel-tags/2021_05_21_001709_create_taggables_table.php +++ b/database/migrations/rinvex/laravel-tags/2021_05_21_001709_create_taggables_table.php @@ -2,16 +2,14 @@ declare(strict_types=1); -use Illuminate\Support\Facades\Schema; -use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; +use Illuminate\Database\Schema\Blueprint; +use Illuminate\Support\Facades\Schema; class CreateTaggablesTable extends Migration { /** * Run the migrations. - * - * @return void */ public function up(): void { @@ -24,14 +22,12 @@ class CreateTaggablesTable extends Migration // Indexes $table->unique(['tag_id', 'taggable_id', 'taggable_type'], 'taggables_ids_type_unique'); $table->foreign('tag_id')->references('id')->on(config('rinvex.tags.tables.tags')) - ->onDelete('cascade')->onUpdate('cascade'); + ->onDelete('cascade')->onUpdate('cascade'); }); } /** * Reverse the migrations. - * - * @return void */ public function down(): void { diff --git a/public/index.php b/public/index.php index 4584cbcd..e1964675 100644 --- a/public/index.php +++ b/public/index.php @@ -3,10 +3,8 @@ /** * Laravel - A PHP Framework For Web Artisans * - * @package Laravel * @author Taylor Otwell */ - define('LARAVEL_START', microtime(true)); /* diff --git a/resources/lang/bg/auth.php b/resources/lang/bg/auth.php index fbca3221..0d97f8c9 100644 --- a/resources/lang/bg/auth.php +++ b/resources/lang/bg/auth.php @@ -12,7 +12,7 @@ */ return [ - 'failed' => 'Неуспешно удостоверяване на потребител.', + 'failed' => 'Неуспешно удостоверяване на потребител.', 'password' => 'The provided password is incorrect.', 'throttle' => 'Твърде много опити за вход. Моля, опитайте отново след :seconds секунди.', ]; diff --git a/resources/lang/bg/pagination.php b/resources/lang/bg/pagination.php index e7825ec9..07244a29 100644 --- a/resources/lang/bg/pagination.php +++ b/resources/lang/bg/pagination.php @@ -12,6 +12,6 @@ */ return [ - 'next' => 'Напред »', + 'next' => 'Напред »', 'previous' => '« Назад', ]; diff --git a/resources/lang/bg/passwords.php b/resources/lang/bg/passwords.php index 0f0fb278..17ca6b43 100644 --- a/resources/lang/bg/passwords.php +++ b/resources/lang/bg/passwords.php @@ -12,9 +12,9 @@ */ return [ - 'reset' => 'Паролата е нулирана!', - 'sent' => 'Изпратено е напомняне за вашата парола!', + 'reset' => 'Паролата е нулирана!', + 'sent' => 'Изпратено е напомняне за вашата парола!', 'throttled' => 'Моля изчакайте, преди да опитате отново.', - 'token' => 'Този токен за нулиране на парола е невалиден.', - 'user' => 'Потребител с такъв e-mail адрес не може да бъде открит.', + 'token' => 'Този токен за нулиране на парола е невалиден.', + 'user' => 'Потребител с такъв e-mail адрес не може да бъде открит.', ]; diff --git a/resources/lang/bg/validation-inline.php b/resources/lang/bg/validation-inline.php index 761c39d9..bac0952f 100644 --- a/resources/lang/bg/validation-inline.php +++ b/resources/lang/bg/validation-inline.php @@ -12,120 +12,120 @@ */ return [ - 'accepted' => 'Това поле трябва да бъде взето.', - 'active_url' => 'Това е невалиден URL адрес.', - 'after' => 'Това трябва да е датата след :date година.', - 'after_or_equal' => 'Това трябва да бъде датата след или равна на :date.', - 'alpha' => 'Това поле може да съдържа само букви.', - 'alpha_dash' => 'Това поле може да съдържа само букви, цифри, тирета и подчертавания.', - 'alpha_num' => 'Това поле може да съдържа само букви и цифри.', - 'array' => 'Това поле трябва да е масив.', - 'attached' => 'Това поле вече е прикачено.', - 'before' => 'Това трябва да е дата преди :date година.', - 'before_or_equal' => 'Това трябва да е дата преди или равна на :date.', - 'between' => [ - 'array' => 'This content must have between :min and :max items.', - 'file' => 'This file must be between :min and :max kilobytes.', + 'accepted' => 'Това поле трябва да бъде взето.', + 'active_url' => 'Това е невалиден URL адрес.', + 'after' => 'Това трябва да е датата след :date година.', + 'after_or_equal' => 'Това трябва да бъде датата след или равна на :date.', + 'alpha' => 'Това поле може да съдържа само букви.', + 'alpha_dash' => 'Това поле може да съдържа само букви, цифри, тирета и подчертавания.', + 'alpha_num' => 'Това поле може да съдържа само букви и цифри.', + 'array' => 'Това поле трябва да е масив.', + 'attached' => 'Това поле вече е прикачено.', + 'before' => 'Това трябва да е дата преди :date година.', + 'before_or_equal' => 'Това трябва да е дата преди или равна на :date.', + 'between' => [ + 'array' => 'This content must have between :min and :max items.', + 'file' => 'This file must be between :min and :max kilobytes.', 'numeric' => 'This value must be between :min and :max.', - 'string' => 'This string must be between :min and :max characters.', + 'string' => 'This string must be between :min and :max characters.', ], - 'boolean' => 'Това поле трябва да е вярно или невярно.', - 'confirmed' => 'Потвърждението не съвпада.', - 'date' => 'Това не е валидна дата.', - 'date_equals' => 'Това трябва да е дата, равна на :date.', - 'date_format' => 'Това не съответства на формата :format.', - 'different' => 'Тази стойност трябва да се различава от :other.', - 'digits' => 'Това трябва да е :digits цифра.', - 'digits_between' => 'Тя трябва да бъде между :min и :max цифри.', - 'dimensions' => 'Това изображение има невалидни размери.', - 'distinct' => 'Това поле има повтарящо се значение.', - 'email' => 'Това трябва да е валиден имейл адрес.', - 'ends_with' => 'Това трябва да завърши с едно от следните: :values.', - 'exists' => 'Избраната стойност е невалидна.', - 'file' => 'Съдържанието трябва да е файл.', - 'filled' => 'Това поле трябва да има значение.', - 'gt' => [ - 'array' => 'The content must have more than :value items.', - 'file' => 'The file size must be greater than :value kilobytes.', + 'boolean' => 'Това поле трябва да е вярно или невярно.', + 'confirmed' => 'Потвърждението не съвпада.', + 'date' => 'Това не е валидна дата.', + 'date_equals' => 'Това трябва да е дата, равна на :date.', + 'date_format' => 'Това не съответства на формата :format.', + 'different' => 'Тази стойност трябва да се различава от :other.', + 'digits' => 'Това трябва да е :digits цифра.', + 'digits_between' => 'Тя трябва да бъде между :min и :max цифри.', + 'dimensions' => 'Това изображение има невалидни размери.', + 'distinct' => 'Това поле има повтарящо се значение.', + 'email' => 'Това трябва да е валиден имейл адрес.', + 'ends_with' => 'Това трябва да завърши с едно от следните: :values.', + 'exists' => 'Избраната стойност е невалидна.', + 'file' => 'Съдържанието трябва да е файл.', + 'filled' => 'Това поле трябва да има значение.', + 'gt' => [ + 'array' => 'The content must have more than :value items.', + 'file' => 'The file size must be greater than :value kilobytes.', 'numeric' => 'The value must be greater than :value.', - 'string' => 'The string must be greater than :value characters.', + 'string' => 'The string must be greater than :value characters.', ], - 'gte' => [ - 'array' => 'The content must have :value items or more.', - 'file' => 'The file size must be greater than or equal :value kilobytes.', + 'gte' => [ + 'array' => 'The content must have :value items or more.', + 'file' => 'The file size must be greater than or equal :value kilobytes.', 'numeric' => 'The value must be greater than or equal :value.', - 'string' => 'The string must be greater than or equal :value characters.', + 'string' => 'The string must be greater than or equal :value characters.', ], - 'image' => 'Това трябва да е изображение.', - 'in' => 'Избраната стойност е невалидна.', - 'in_array' => 'Тази стойност не съществува в :other.', - 'integer' => 'Това трябва да е цяло число.', - 'ip' => 'Това трябва да е валиден IP адрес.', - 'ipv4' => 'Това трябва да е валиден IPv4 адрес.', - 'ipv6' => 'Това трябва да е валиден IPv6 адрес.', - 'json' => 'Това трябва да е валиден JSON низ.', - 'lt' => [ - 'array' => 'The content must have less than :value items.', - 'file' => 'The file size must be less than :value kilobytes.', + 'image' => 'Това трябва да е изображение.', + 'in' => 'Избраната стойност е невалидна.', + 'in_array' => 'Тази стойност не съществува в :other.', + 'integer' => 'Това трябва да е цяло число.', + 'ip' => 'Това трябва да е валиден IP адрес.', + 'ipv4' => 'Това трябва да е валиден IPv4 адрес.', + 'ipv6' => 'Това трябва да е валиден IPv6 адрес.', + 'json' => 'Това трябва да е валиден JSON низ.', + 'lt' => [ + 'array' => 'The content must have less than :value items.', + 'file' => 'The file size must be less than :value kilobytes.', 'numeric' => 'The value must be less than :value.', - 'string' => 'The string must be less than :value characters.', + 'string' => 'The string must be less than :value characters.', ], - 'lte' => [ - 'array' => 'The content must not have more than :value items.', - 'file' => 'The file size must be less than or equal :value kilobytes.', + 'lte' => [ + 'array' => 'The content must not have more than :value items.', + 'file' => 'The file size must be less than or equal :value kilobytes.', 'numeric' => 'The value must be less than or equal :value.', - 'string' => 'The string must be less than or equal :value characters.', + 'string' => 'The string must be less than or equal :value characters.', ], - 'max' => [ - 'array' => 'The content may not have more than :max items.', - 'file' => 'The file size may not be greater than :max kilobytes.', + 'max' => [ + 'array' => 'The content may not have more than :max items.', + 'file' => 'The file size may not be greater than :max kilobytes.', 'numeric' => 'The value may not be greater than :max.', - 'string' => 'The string may not be greater than :max characters.', + 'string' => 'The string may not be greater than :max characters.', ], - 'mimes' => 'Това трябва да бъде файл тип: :values.', - 'mimetypes' => 'Това трябва да е файл тип: :values.', - 'min' => [ - 'array' => 'The value must have at least :min items.', - 'file' => 'The file size must be at least :min kilobytes.', + 'mimes' => 'Това трябва да бъде файл тип: :values.', + 'mimetypes' => 'Това трябва да е файл тип: :values.', + 'min' => [ + 'array' => 'The value must have at least :min items.', + 'file' => 'The file size must be at least :min kilobytes.', 'numeric' => 'The value must be at least :min.', - 'string' => 'The string must be at least :min characters.', + 'string' => 'The string must be at least :min characters.', ], - 'multiple_of' => 'Тази стойност трябва да бъде кратно на :value', - 'not_in' => 'Избраната стойност е невалидна.', - 'not_regex' => 'Този формат е невалиден.', - 'numeric' => 'Това трябва да е число.', - 'password' => 'Паролата е грешна.', - 'present' => 'Това поле трябва да присъства.', - 'prohibited' => 'Това поле е забранено.', - 'prohibited_if' => 'Това поле е забранено, ако :other е равно на :value.', - 'prohibited_unless' => 'Това поле е забранено, освен ако :other не е в :values.', - 'regex' => 'Този формат е невалиден.', - 'relatable' => 'Това поле може да не е свързано с този ресурс.', - 'required' => 'Това поле е задължително.', - 'required_if' => 'Това поле е задължително, ако :other е равно на :value.', - 'required_unless' => 'Това поле е задължително, освен ако :other не е в :values.', - 'required_with' => 'Това поле е задължително, когато има :values.', - 'required_with_all' => 'Това поле е задължително при наличие на :values.', - 'required_without' => 'Това поле е задължително, ако :values липсва.', + 'multiple_of' => 'Тази стойност трябва да бъде кратно на :value', + 'not_in' => 'Избраната стойност е невалидна.', + 'not_regex' => 'Този формат е невалиден.', + 'numeric' => 'Това трябва да е число.', + 'password' => 'Паролата е грешна.', + 'present' => 'Това поле трябва да присъства.', + 'prohibited' => 'Това поле е забранено.', + 'prohibited_if' => 'Това поле е забранено, ако :other е равно на :value.', + 'prohibited_unless' => 'Това поле е забранено, освен ако :other не е в :values.', + 'regex' => 'Този формат е невалиден.', + 'relatable' => 'Това поле може да не е свързано с този ресурс.', + 'required' => 'Това поле е задължително.', + 'required_if' => 'Това поле е задължително, ако :other е равно на :value.', + 'required_unless' => 'Това поле е задължително, освен ако :other не е в :values.', + 'required_with' => 'Това поле е задължително, когато има :values.', + 'required_with_all' => 'Това поле е задължително при наличие на :values.', + 'required_without' => 'Това поле е задължително, ако :values липсва.', 'required_without_all' => 'Това поле е задължително, ако не присъства нито един от :values.', - 'same' => 'Стойността на това поле трябва да съвпада със стойността от :other.', - 'size' => [ - 'array' => 'The content must contain :size items.', - 'file' => 'The file size must be :size kilobytes.', + 'same' => 'Стойността на това поле трябва да съвпада със стойността от :other.', + 'size' => [ + 'array' => 'The content must contain :size items.', + 'file' => 'The file size must be :size kilobytes.', 'numeric' => 'The value must be :size.', - 'string' => 'The string must be :size characters.', + 'string' => 'The string must be :size characters.', ], - 'starts_with' => 'Това трябва да започне с една от следните точки: :values.', - 'string' => 'Това трябва да е низ.', - 'timezone' => 'Това трябва да е допустима зона.', - 'unique' => 'Това вече е направено.', - 'uploaded' => 'Това не може да бъде изтеглено.', - 'url' => 'Този формат е невалиден.', - 'uuid' => 'Това трябва да е валиден UUID.', - 'custom' => [ + 'starts_with' => 'Това трябва да започне с една от следните точки: :values.', + 'string' => 'Това трябва да е низ.', + 'timezone' => 'Това трябва да е допустима зона.', + 'unique' => 'Това вече е направено.', + 'uploaded' => 'Това не може да бъде изтеглено.', + 'url' => 'Този формат е невалиден.', + 'uuid' => 'Това трябва да е валиден UUID.', + 'custom' => [ 'attribute-name' => [ 'rule-name' => 'custom-message', ], ], - 'attributes' => [], + 'attributes' => [], ]; diff --git a/resources/lang/bg/validation.php b/resources/lang/bg/validation.php index 29138d05..6fafd2bb 100644 --- a/resources/lang/bg/validation.php +++ b/resources/lang/bg/validation.php @@ -12,152 +12,152 @@ */ return [ - 'accepted' => 'Трябва да приемете :attribute.', - 'active_url' => 'Полето :attribute не е валиден URL адрес.', - 'after' => 'Полето :attribute трябва да бъде дата след :date.', - 'after_or_equal' => 'Полето :attribute трябва да бъде дата след или равна на :date.', - 'alpha' => 'Полето :attribute трябва да съдържа само букви.', - 'alpha_dash' => 'Полето :attribute трябва да съдържа само букви, цифри, долна черта и тире.', - 'alpha_num' => 'Полето :attribute трябва да съдържа само букви и цифри.', - 'array' => 'Полето :attribute трябва да бъде масив.', - 'attached' => 'Този номер :attribute вече е прикачен.', - 'before' => 'Полето :attribute трябва да бъде дата преди :date.', - 'before_or_equal' => 'Полето :attribute трябва да бъде дата преди или равна на :date.', - 'between' => [ - 'array' => 'Полето :attribute трябва да има между :min - :max елемента.', - 'file' => 'Полето :attribute трябва да бъде между :min и :max килобайта.', + 'accepted' => 'Трябва да приемете :attribute.', + 'active_url' => 'Полето :attribute не е валиден URL адрес.', + 'after' => 'Полето :attribute трябва да бъде дата след :date.', + 'after_or_equal' => 'Полето :attribute трябва да бъде дата след или равна на :date.', + 'alpha' => 'Полето :attribute трябва да съдържа само букви.', + 'alpha_dash' => 'Полето :attribute трябва да съдържа само букви, цифри, долна черта и тире.', + 'alpha_num' => 'Полето :attribute трябва да съдържа само букви и цифри.', + 'array' => 'Полето :attribute трябва да бъде масив.', + 'attached' => 'Този номер :attribute вече е прикачен.', + 'before' => 'Полето :attribute трябва да бъде дата преди :date.', + 'before_or_equal' => 'Полето :attribute трябва да бъде дата преди или равна на :date.', + 'between' => [ + 'array' => 'Полето :attribute трябва да има между :min - :max елемента.', + 'file' => 'Полето :attribute трябва да бъде между :min и :max килобайта.', 'numeric' => 'Полето :attribute трябва да бъде между :min и :max.', - 'string' => 'Полето :attribute трябва да бъде между :min и :max знака.', + 'string' => 'Полето :attribute трябва да бъде между :min и :max знака.', ], - 'boolean' => 'Полето :attribute трябва да съдържа Да или Не', - 'confirmed' => 'Полето :attribute не е потвърдено.', - 'date' => 'Полето :attribute не е валидна дата.', - 'date_equals' => ':attribute трябва да бъде дата, еднаква с :date.', - 'date_format' => 'Полето :attribute не е във формат :format.', - 'different' => 'Полетата :attribute и :other трябва да са различни.', - 'digits' => 'Полето :attribute трябва да има :digits цифри.', - 'digits_between' => 'Полето :attribute трябва да има между :min и :max цифри.', - 'dimensions' => 'Невалидни размери за снимка :attribute.', - 'distinct' => 'Данните в полето :attribute се дублират.', - 'email' => 'Полето :attribute е в невалиден формат.', - 'ends_with' => ':attribute трябва да завършва с една от следните стойности: :values.', - 'exists' => 'Избранато поле :attribute вече съществува.', - 'file' => 'Полето :attribute трябва да бъде файл.', - 'filled' => 'Полето :attribute е задължително.', - 'gt' => [ - 'array' => ':attribute трябва да разполага с повече от :value елемента.', - 'file' => ':attribute трябва да бъде по-голяма от :valueкилобайта.', + 'boolean' => 'Полето :attribute трябва да съдържа Да или Не', + 'confirmed' => 'Полето :attribute не е потвърдено.', + 'date' => 'Полето :attribute не е валидна дата.', + 'date_equals' => ':attribute трябва да бъде дата, еднаква с :date.', + 'date_format' => 'Полето :attribute не е във формат :format.', + 'different' => 'Полетата :attribute и :other трябва да са различни.', + 'digits' => 'Полето :attribute трябва да има :digits цифри.', + 'digits_between' => 'Полето :attribute трябва да има между :min и :max цифри.', + 'dimensions' => 'Невалидни размери за снимка :attribute.', + 'distinct' => 'Данните в полето :attribute се дублират.', + 'email' => 'Полето :attribute е в невалиден формат.', + 'ends_with' => ':attribute трябва да завършва с една от следните стойности: :values.', + 'exists' => 'Избранато поле :attribute вече съществува.', + 'file' => 'Полето :attribute трябва да бъде файл.', + 'filled' => 'Полето :attribute е задължително.', + 'gt' => [ + 'array' => ':attribute трябва да разполага с повече от :value елемента.', + 'file' => ':attribute трябва да бъде по-голяма от :valueкилобайта.', 'numeric' => ':attribute трябва да бъде по-голямa от :value.', - 'string' => ':attribute трябва да бъде по-голяма от :value знака.', + 'string' => ':attribute трябва да бъде по-голяма от :value знака.', ], - 'gte' => [ - 'array' => ':attribute трябва да разполага с :value елемента или повече.', - 'file' => ':attribute трябва да бъде по-голяма от или равна на :value килобайта.', + 'gte' => [ + 'array' => ':attribute трябва да разполага с :value елемента или повече.', + 'file' => ':attribute трябва да бъде по-голяма от или равна на :value килобайта.', 'numeric' => ':attribute трябва да бъде по-голяма от или равна на :value.', - 'string' => ':attribute трябва да бъде по-голяма от или равна на :valueзнака.', + 'string' => ':attribute трябва да бъде по-голяма от или равна на :valueзнака.', ], - 'image' => 'Полето :attribute трябва да бъде изображение.', - 'in' => 'Избраното поле :attribute е невалидно.', - 'in_array' => 'Полето :attribute не съществува в :other.', - 'integer' => 'Полето :attribute трябва да бъде цяло число.', - 'ip' => 'Полето :attribute трябва да бъде IP адрес.', - 'ipv4' => 'Полето :attribute трябва да бъде IPv4 адрес.', - 'ipv6' => 'Полето :attribute трябва да бъде IPv6 адрес.', - 'json' => 'Полето :attribute трябва да бъде JSON низ.', - 'lt' => [ - 'array' => ':attribute трябва да разполага с по-малко от :value елемента.', - 'file' => ':attribute трябва да бъде по-малка от :value килобайта.', + 'image' => 'Полето :attribute трябва да бъде изображение.', + 'in' => 'Избраното поле :attribute е невалидно.', + 'in_array' => 'Полето :attribute не съществува в :other.', + 'integer' => 'Полето :attribute трябва да бъде цяло число.', + 'ip' => 'Полето :attribute трябва да бъде IP адрес.', + 'ipv4' => 'Полето :attribute трябва да бъде IPv4 адрес.', + 'ipv6' => 'Полето :attribute трябва да бъде IPv6 адрес.', + 'json' => 'Полето :attribute трябва да бъде JSON низ.', + 'lt' => [ + 'array' => ':attribute трябва да разполага с по-малко от :value елемента.', + 'file' => ':attribute трябва да бъде по-малка от :value килобайта.', 'numeric' => ':attribute трябва да бъде по-малка от :value.', - 'string' => ':attribute трябва да бъде по-малка от :value знака.', + 'string' => ':attribute трябва да бъде по-малка от :value знака.', ], - 'lte' => [ - 'array' => ':attribute не трябва да разполага с повече от :value елемента.', - 'file' => ':attribute трябва да бъде по-малка от или равна на :value килобайта.', + 'lte' => [ + 'array' => ':attribute не трябва да разполага с повече от :value елемента.', + 'file' => ':attribute трябва да бъде по-малка от или равна на :value килобайта.', 'numeric' => ':attribute трябва да бъде по-малка от или равна на :value.', - 'string' => ':attribute трябва да бъде по-малка от или равна на :value знака.', + 'string' => ':attribute трябва да бъде по-малка от или равна на :value знака.', ], - 'max' => [ - 'array' => 'Полето :attribute трябва да има по-малко от :max елемента.', - 'file' => 'Полето :attribute трябва да бъде по-малко от :max килобайта.', + 'max' => [ + 'array' => 'Полето :attribute трябва да има по-малко от :max елемента.', + 'file' => 'Полето :attribute трябва да бъде по-малко от :max килобайта.', 'numeric' => 'Полето :attribute трябва да бъде по-малко от :max.', - 'string' => 'Полето :attribute трябва да бъде по-малко от :max знака.', + 'string' => 'Полето :attribute трябва да бъде по-малко от :max знака.', ], - 'mimes' => 'Полето :attribute трябва да бъде файл от тип: :values.', - 'mimetypes' => 'Полето :attribute трябва да бъде файл от тип: :values.', - 'min' => [ - 'array' => 'Полето :attribute трябва има минимум :min елемента.', - 'file' => 'Полето :attribute трябва да бъде минимум :min килобайта.', + 'mimes' => 'Полето :attribute трябва да бъде файл от тип: :values.', + 'mimetypes' => 'Полето :attribute трябва да бъде файл от тип: :values.', + 'min' => [ + 'array' => 'Полето :attribute трябва има минимум :min елемента.', + 'file' => 'Полето :attribute трябва да бъде минимум :min килобайта.', 'numeric' => 'Полето :attribute трябва да бъде минимум :min.', - 'string' => 'Полето :attribute трябва да бъде минимум :min знака.', + 'string' => 'Полето :attribute трябва да бъде минимум :min знака.', ], - 'multiple_of' => 'Числото :attribute трябва да бъде кратно на :value', - 'not_in' => 'Избраното поле :attribute е невалидно.', - 'not_regex' => 'Форматът на :attribute е невалиден.', - 'numeric' => 'Полето :attribute трябва да бъде число.', - 'password' => 'Паролата е грешна.', - 'present' => 'Полето :attribute трябва да съествува.', - 'prohibited' => 'Поле :attribute е забранено.', - 'prohibited_if' => 'Полето :attribute е забранено, когато :other е равно на :value.', - 'prohibited_unless' => 'Полето :attribute е забранено, освен ако :other не е в :values.', - 'regex' => 'Полето :attribute е в невалиден формат.', - 'relatable' => 'Този :attribute може да не е свързан с този ресурс.', - 'required' => 'Полето :attribute е задължително.', - 'required_if' => 'Полето :attribute се изисква, когато :other е :value.', - 'required_unless' => 'Полето :attribute се изисква, освен ако :other не е в :values.', - 'required_with' => 'Полето :attribute се изисква, когато :values има стойност.', - 'required_with_all' => 'Полето :attribute е задължително, когато :values имат стойност.', - 'required_without' => 'Полето :attribute се изисква, когато :values няма стойност.', + 'multiple_of' => 'Числото :attribute трябва да бъде кратно на :value', + 'not_in' => 'Избраното поле :attribute е невалидно.', + 'not_regex' => 'Форматът на :attribute е невалиден.', + 'numeric' => 'Полето :attribute трябва да бъде число.', + 'password' => 'Паролата е грешна.', + 'present' => 'Полето :attribute трябва да съествува.', + 'prohibited' => 'Поле :attribute е забранено.', + 'prohibited_if' => 'Полето :attribute е забранено, когато :other е равно на :value.', + 'prohibited_unless' => 'Полето :attribute е забранено, освен ако :other не е в :values.', + 'regex' => 'Полето :attribute е в невалиден формат.', + 'relatable' => 'Този :attribute може да не е свързан с този ресурс.', + 'required' => 'Полето :attribute е задължително.', + 'required_if' => 'Полето :attribute се изисква, когато :other е :value.', + 'required_unless' => 'Полето :attribute се изисква, освен ако :other не е в :values.', + 'required_with' => 'Полето :attribute се изисква, когато :values има стойност.', + 'required_with_all' => 'Полето :attribute е задължително, когато :values имат стойност.', + 'required_without' => 'Полето :attribute се изисква, когато :values няма стойност.', 'required_without_all' => 'Полето :attribute се изисква, когато никое от полетата :values няма стойност.', - 'same' => 'Полетата :attribute и :other трябва да съвпадат.', - 'size' => [ - 'array' => 'Полето :attribute трябва да има :size елемента.', - 'file' => 'Полето :attribute трябва да бъде :size килобайта.', + 'same' => 'Полетата :attribute и :other трябва да съвпадат.', + 'size' => [ + 'array' => 'Полето :attribute трябва да има :size елемента.', + 'file' => 'Полето :attribute трябва да бъде :size килобайта.', 'numeric' => 'Полето :attribute трябва да бъде :size.', - 'string' => 'Полето :attribute трябва да бъде :size знака.', + 'string' => 'Полето :attribute трябва да бъде :size знака.', ], - 'starts_with' => ':attribute трябва да започва с едно от следните: :values.', - 'string' => 'Полето :attribute трябва да бъде знаков низ.', - 'timezone' => 'Полето :attribute трябва да съдържа валидна часова зона.', - 'unique' => 'Полето :attribute вече съществува.', - 'uploaded' => 'Неуспешно качване на :attribute.', - 'url' => 'Полето :attribute е в невалиден формат.', - 'uuid' => ':attribute трябва да бъде валиден UUID.', - 'custom' => [ + 'starts_with' => ':attribute трябва да започва с едно от следните: :values.', + 'string' => 'Полето :attribute трябва да бъде знаков низ.', + 'timezone' => 'Полето :attribute трябва да съдържа валидна часова зона.', + 'unique' => 'Полето :attribute вече съществува.', + 'uploaded' => 'Неуспешно качване на :attribute.', + 'url' => 'Полето :attribute е в невалиден формат.', + 'uuid' => ':attribute трябва да бъде валиден UUID.', + 'custom' => [ 'attribute-name' => [ 'rule-name' => 'custom-message', ], ], - 'attributes' => [ - 'address' => 'Адрес', - 'age' => 'Възраст', - 'available' => 'Достъпен', - 'city' => 'Град', - 'content' => 'Съдържание', - 'country' => 'Държава', - 'date' => 'Дата', - 'day' => 'Ден', - 'description' => 'Описание', - 'email' => 'E-mail', - 'excerpt' => 'Откъс', - 'first_name' => 'Име', - 'gender' => 'Пол', - 'hour' => 'Час', - 'last_name' => 'Фамилия', - 'message' => 'Съобщение', - 'minute' => 'Минута', - 'mobile' => 'GSM', - 'month' => 'Месец', - 'name' => 'Име', - 'password' => 'Парола', - 'phone' => 'Телефон', + 'attributes' => [ + 'address' => 'Адрес', + 'age' => 'Възраст', + 'available' => 'Достъпен', + 'city' => 'Град', + 'content' => 'Съдържание', + 'country' => 'Държава', + 'date' => 'Дата', + 'day' => 'Ден', + 'description' => 'Описание', + 'email' => 'E-mail', + 'excerpt' => 'Откъс', + 'first_name' => 'Име', + 'gender' => 'Пол', + 'hour' => 'Час', + 'last_name' => 'Фамилия', + 'message' => 'Съобщение', + 'minute' => 'Минута', + 'mobile' => 'GSM', + 'month' => 'Месец', + 'name' => 'Име', + 'password' => 'Парола', + 'phone' => 'Телефон', 'recaptcha_response_field' => 'Рекапча', - 'second' => 'Секунда', - 'sex' => 'Пол', - 'size' => 'Размер', - 'subject' => 'Заглавие', - 'time' => 'Време', - 'title' => 'Заглавие', - 'username' => 'Потребител', - 'year' => 'Година', + 'second' => 'Секунда', + 'sex' => 'Пол', + 'size' => 'Размер', + 'subject' => 'Заглавие', + 'time' => 'Време', + 'title' => 'Заглавие', + 'username' => 'Потребител', + 'year' => 'Година', ], ]; diff --git a/resources/lang/en/packages/nova/validation-nova-inline.php b/resources/lang/en/packages/nova/validation-nova-inline.php index fd254980..60c414fa 100644 --- a/resources/lang/en/packages/nova/validation-nova-inline.php +++ b/resources/lang/en/packages/nova/validation-nova-inline.php @@ -12,6 +12,6 @@ return [ | */ - 'attached' => 'This field is already attached.', + 'attached' => 'This field is already attached.', 'relatable' => 'This field may not be associated with this resource.', ]; diff --git a/resources/lang/en/packages/nova/validation-nova.php b/resources/lang/en/packages/nova/validation-nova.php index b4d6cc71..46db6f2a 100644 --- a/resources/lang/en/packages/nova/validation-nova.php +++ b/resources/lang/en/packages/nova/validation-nova.php @@ -12,6 +12,6 @@ return [ | */ - 'attached' => 'This :attribute is already attached.', + 'attached' => 'This :attribute is already attached.', 'relatable' => 'This :attribute may not be associated with this resource.', ]; diff --git a/resources/lang/en/validation-inline.php b/resources/lang/en/validation-inline.php index 13f569d8..9c3e6304 100644 --- a/resources/lang/en/validation-inline.php +++ b/resources/lang/en/validation-inline.php @@ -12,122 +12,122 @@ return [ | */ - 'accepted' => 'This field must be accepted.', - 'accepted_if' => 'This field must be accepted when :other is :value.', - 'active_url' => 'This is not a valid URL.', - 'after' => 'This must be a date after :date.', - 'after_or_equal' => 'This must be a date after or equal to :date.', - 'alpha' => 'This field must only contain letters.', - 'alpha_dash' => 'This field must only contain letters, numbers, dashes and underscores.', - 'alpha_num' => 'This field must only contain letters and numbers.', - 'array' => 'This field must be an array.', - 'before' => 'This must be a date before :date.', - 'before_or_equal' => 'This must be a date before or equal to :date.', - 'between' => [ - 'array' => 'This content must have between :min and :max items.', - 'file' => 'This file must be between :min and :max kilobytes.', + 'accepted' => 'This field must be accepted.', + 'accepted_if' => 'This field must be accepted when :other is :value.', + 'active_url' => 'This is not a valid URL.', + 'after' => 'This must be a date after :date.', + 'after_or_equal' => 'This must be a date after or equal to :date.', + 'alpha' => 'This field must only contain letters.', + 'alpha_dash' => 'This field must only contain letters, numbers, dashes and underscores.', + 'alpha_num' => 'This field must only contain letters and numbers.', + 'array' => 'This field must be an array.', + 'before' => 'This must be a date before :date.', + 'before_or_equal' => 'This must be a date before or equal to :date.', + 'between' => [ + 'array' => 'This content must have between :min and :max items.', + 'file' => 'This file must be between :min and :max kilobytes.', 'numeric' => 'This value must be between :min and :max.', - 'string' => 'This string must be between :min and :max characters.', + 'string' => 'This string must be between :min and :max characters.', ], - 'boolean' => 'This field must be true or false.', - 'confirmed' => 'The confirmation does not match.', - 'current_password' => 'The password is incorrect.', - 'date' => 'This is not a valid date.', - 'date_equals' => 'This must be a date equal to :date.', - 'date_format' => 'This does not match the format :format.', - 'declined' => 'This value must be declined.', - 'declined_if' => 'This value must be declined when :other is :value.', - 'different' => 'This value must be different from :other.', - 'digits' => 'This must be :digits digits.', - 'digits_between' => 'This must be between :min and :max digits.', - 'dimensions' => 'This image has invalid dimensions.', - 'distinct' => 'This field has a duplicate value.', - 'email' => 'This must be a valid email address.', - 'ends_with' => 'This must end with one of the following: :values.', - 'enum' => 'The selected value is invalid.', - 'exists' => 'The selected value is invalid.', - 'file' => 'The content must be a file.', - 'filled' => 'This field must have a value.', - 'gt' => [ - 'array' => 'The content must have more than :value items.', - 'file' => 'The file size must be greater than :value kilobytes.', + 'boolean' => 'This field must be true or false.', + 'confirmed' => 'The confirmation does not match.', + 'current_password' => 'The password is incorrect.', + 'date' => 'This is not a valid date.', + 'date_equals' => 'This must be a date equal to :date.', + 'date_format' => 'This does not match the format :format.', + 'declined' => 'This value must be declined.', + 'declined_if' => 'This value must be declined when :other is :value.', + 'different' => 'This value must be different from :other.', + 'digits' => 'This must be :digits digits.', + 'digits_between' => 'This must be between :min and :max digits.', + 'dimensions' => 'This image has invalid dimensions.', + 'distinct' => 'This field has a duplicate value.', + 'email' => 'This must be a valid email address.', + 'ends_with' => 'This must end with one of the following: :values.', + 'enum' => 'The selected value is invalid.', + 'exists' => 'The selected value is invalid.', + 'file' => 'The content must be a file.', + 'filled' => 'This field must have a value.', + 'gt' => [ + 'array' => 'The content must have more than :value items.', + 'file' => 'The file size must be greater than :value kilobytes.', 'numeric' => 'The value must be greater than :value.', - 'string' => 'The string must be greater than :value characters.', + 'string' => 'The string must be greater than :value characters.', ], - 'gte' => [ - 'array' => 'The content must have :value items or more.', - 'file' => 'The file size must be greater than or equal to :value kilobytes.', + 'gte' => [ + 'array' => 'The content must have :value items or more.', + 'file' => 'The file size must be greater than or equal to :value kilobytes.', 'numeric' => 'The value must be greater than or equal to :value.', - 'string' => 'The string must be greater than or equal to :value characters.', + 'string' => 'The string must be greater than or equal to :value characters.', ], - 'image' => 'This must be an image.', - 'in' => 'The selected value is invalid.', - 'in_array' => 'This value does not exist in :other.', - 'integer' => 'This must be an integer.', - 'ip' => 'This must be a valid IP address.', - 'ipv4' => 'This must be a valid IPv4 address.', - 'ipv6' => 'This must be a valid IPv6 address.', - 'json' => 'This must be a valid JSON string.', - 'lt' => [ - 'array' => 'The content must have less than :value items.', - 'file' => 'The file size must be less than :value kilobytes.', + 'image' => 'This must be an image.', + 'in' => 'The selected value is invalid.', + 'in_array' => 'This value does not exist in :other.', + 'integer' => 'This must be an integer.', + 'ip' => 'This must be a valid IP address.', + 'ipv4' => 'This must be a valid IPv4 address.', + 'ipv6' => 'This must be a valid IPv6 address.', + 'json' => 'This must be a valid JSON string.', + 'lt' => [ + 'array' => 'The content must have less than :value items.', + 'file' => 'The file size must be less than :value kilobytes.', 'numeric' => 'The value must be less than :value.', - 'string' => 'The string must be less than :value characters.', + 'string' => 'The string must be less than :value characters.', ], - 'lte' => [ - 'array' => 'The content must not have more than :value items.', - 'file' => 'The file size must be less than or equal to :value kilobytes.', + 'lte' => [ + 'array' => 'The content must not have more than :value items.', + 'file' => 'The file size must be less than or equal to :value kilobytes.', 'numeric' => 'The value must be less than or equal to :value.', - 'string' => 'The string must be less than or equal to :value characters.', + 'string' => 'The string must be less than or equal to :value characters.', ], - 'mac_address' => 'The value must be a valid MAC address.', - 'max' => [ - 'array' => 'The content must not have more than :max items.', - 'file' => 'The file size must not be greater than :max kilobytes.', + 'mac_address' => 'The value must be a valid MAC address.', + 'max' => [ + 'array' => 'The content must not have more than :max items.', + 'file' => 'The file size must not be greater than :max kilobytes.', 'numeric' => 'The value must not be greater than :max.', - 'string' => 'The string must not be greater than :max characters.', + 'string' => 'The string must not be greater than :max characters.', ], - 'mimes' => 'This must be a file of type: :values.', - 'mimetypes' => 'This must be a file of type: :values.', - 'min' => [ - 'array' => 'The value must have at least :min items.', - 'file' => 'The file size must be at least :min kilobytes.', + 'mimes' => 'This must be a file of type: :values.', + 'mimetypes' => 'This must be a file of type: :values.', + 'min' => [ + 'array' => 'The value must have at least :min items.', + 'file' => 'The file size must be at least :min kilobytes.', 'numeric' => 'The value must be at least :min.', - 'string' => 'The string must be at least :min characters.', + 'string' => 'The string must be at least :min characters.', ], - 'multiple_of' => 'The value must be a multiple of :value.', - 'not_in' => 'The selected value is invalid.', - 'not_regex' => 'This format is invalid.', - 'numeric' => 'This must be a number.', - 'password' => 'The password is incorrect.', - 'present' => 'This field must be present.', - 'regex' => 'This format is invalid.', - 'required' => 'This field is required.', - 'required_array_keys' => 'This field must contain entries for: :values.', - 'required_if' => 'This field is required when :other is :value.', - 'required_unless' => 'This field is required unless :other is in :values.', - 'required_with' => 'This field is required when :values is present.', - 'required_with_all' => 'This field is required when :values are present.', - 'required_without' => 'This field is required when :values is not present.', + 'multiple_of' => 'The value must be a multiple of :value.', + 'not_in' => 'The selected value is invalid.', + 'not_regex' => 'This format is invalid.', + 'numeric' => 'This must be a number.', + 'password' => 'The password is incorrect.', + 'present' => 'This field must be present.', + 'regex' => 'This format is invalid.', + 'required' => 'This field is required.', + 'required_array_keys' => 'This field must contain entries for: :values.', + 'required_if' => 'This field is required when :other is :value.', + 'required_unless' => 'This field is required unless :other is in :values.', + 'required_with' => 'This field is required when :values is present.', + 'required_with_all' => 'This field is required when :values are present.', + 'required_without' => 'This field is required when :values is not present.', 'required_without_all' => 'This field is required when none of :values are present.', - 'prohibited' => 'This field is prohibited.', - 'prohibited_if' => 'This field is prohibited when :other is :value.', - 'prohibited_unless' => 'This field is prohibited unless :other is in :values.', - 'prohibits' => 'This field prohibits :other from being present.', - 'same' => 'The value of this field must match the one from :other.', - 'size' => [ - 'array' => 'The content must contain :size items.', - 'file' => 'The file size must be :size kilobytes.', + 'prohibited' => 'This field is prohibited.', + 'prohibited_if' => 'This field is prohibited when :other is :value.', + 'prohibited_unless' => 'This field is prohibited unless :other is in :values.', + 'prohibits' => 'This field prohibits :other from being present.', + 'same' => 'The value of this field must match the one from :other.', + 'size' => [ + 'array' => 'The content must contain :size items.', + 'file' => 'The file size must be :size kilobytes.', 'numeric' => 'The value must be :size.', - 'string' => 'The string must be :size characters.', + 'string' => 'The string must be :size characters.', ], - 'starts_with' => 'This must start with one of the following: :values.', - 'string' => 'This must be a string.', - 'timezone' => 'This must be a valid timezone.', - 'unique' => 'This has already been taken.', - 'uploaded' => 'This failed to upload.', - 'url' => 'This must be a valid URL.', - 'uuid' => 'This must be a valid UUID.', + 'starts_with' => 'This must start with one of the following: :values.', + 'string' => 'This must be a string.', + 'timezone' => 'This must be a valid timezone.', + 'unique' => 'This has already been taken.', + 'uploaded' => 'This failed to upload.', + 'url' => 'This must be a valid URL.', + 'uuid' => 'This must be a valid UUID.', /* |-------------------------------------------------------------------------- diff --git a/resources/lang/es/auth.php b/resources/lang/es/auth.php index b8452475..08f81942 100644 --- a/resources/lang/es/auth.php +++ b/resources/lang/es/auth.php @@ -12,7 +12,7 @@ */ return [ - 'failed' => 'Estas credenciales no coinciden con nuestros registros.', + 'failed' => 'Estas credenciales no coinciden con nuestros registros.', 'password' => 'La contraseña ingresada no es correcta.', 'throttle' => 'Demasiados intentos de acceso. Por favor intente nuevamente en :seconds segundos.', ]; diff --git a/resources/lang/es/pagination.php b/resources/lang/es/pagination.php index d8f0d194..7fda4d4a 100644 --- a/resources/lang/es/pagination.php +++ b/resources/lang/es/pagination.php @@ -12,6 +12,6 @@ */ return [ - 'next' => 'Siguiente »', + 'next' => 'Siguiente »', 'previous' => '« Anterior', ]; diff --git a/resources/lang/es/passwords.php b/resources/lang/es/passwords.php index 7745e646..2d80b4ac 100644 --- a/resources/lang/es/passwords.php +++ b/resources/lang/es/passwords.php @@ -12,9 +12,9 @@ */ return [ - 'reset' => '¡Su contraseña ha sido restablecida!', - 'sent' => '¡Le hemos enviado por correo electrónico el enlace para restablecer su contraseña!', + 'reset' => '¡Su contraseña ha sido restablecida!', + 'sent' => '¡Le hemos enviado por correo electrónico el enlace para restablecer su contraseña!', 'throttled' => 'Por favor espere antes de intentar de nuevo.', - 'token' => 'El token de restablecimiento de contraseña es inválido.', - 'user' => 'No encontramos ningún usuario con ese correo electrónico.', + 'token' => 'El token de restablecimiento de contraseña es inválido.', + 'user' => 'No encontramos ningún usuario con ese correo electrónico.', ]; diff --git a/resources/lang/es/validation-inline.php b/resources/lang/es/validation-inline.php index bd3ca8c9..72a9e028 100644 --- a/resources/lang/es/validation-inline.php +++ b/resources/lang/es/validation-inline.php @@ -12,120 +12,120 @@ */ return [ - 'accepted' => 'Este campo debe ser aceptado.', - 'active_url' => 'Esta no es una URL válida.', - 'after' => 'Debe ser una fecha después de :date.', - 'after_or_equal' => 'Debe ser una fecha después o igual a :date.', - 'alpha' => 'Este campo solo puede contener letras.', - 'alpha_dash' => 'Este campo solo puede contener letras, números, guiones y guiones bajos.', - 'alpha_num' => 'Este campo solo puede contener letras y números.', - 'array' => 'Este campo debe ser un array (colección).', - 'attached' => 'Este campo ya se adjuntó.', - 'before' => 'Debe ser una fecha antes de :date.', - 'before_or_equal' => 'Debe ser una fecha anterior o igual a :date.', - 'between' => [ - 'array' => 'El contenido debe tener entre :min y :max elementos.', - 'file' => 'Este archivo debe ser entre :min y :max kilobytes.', + 'accepted' => 'Este campo debe ser aceptado.', + 'active_url' => 'Esta no es una URL válida.', + 'after' => 'Debe ser una fecha después de :date.', + 'after_or_equal' => 'Debe ser una fecha después o igual a :date.', + 'alpha' => 'Este campo solo puede contener letras.', + 'alpha_dash' => 'Este campo solo puede contener letras, números, guiones y guiones bajos.', + 'alpha_num' => 'Este campo solo puede contener letras y números.', + 'array' => 'Este campo debe ser un array (colección).', + 'attached' => 'Este campo ya se adjuntó.', + 'before' => 'Debe ser una fecha antes de :date.', + 'before_or_equal' => 'Debe ser una fecha anterior o igual a :date.', + 'between' => [ + 'array' => 'El contenido debe tener entre :min y :max elementos.', + 'file' => 'Este archivo debe ser entre :min y :max kilobytes.', 'numeric' => 'Este valor debe ser entre :min y :max.', - 'string' => 'El texto debe ser entre :min y :max caracteres.', + 'string' => 'El texto debe ser entre :min y :max caracteres.', ], - 'boolean' => 'El campo debe ser verdadero o falso.', - 'confirmed' => 'La confirmación no coincide.', - 'date' => 'Esta no es una fecha válida.', - 'date_equals' => 'El campo debe ser una fecha igual a :date.', - 'date_format' => 'El campo no corresponde al formato :format.', - 'different' => 'Este valor deben ser diferente de :other.', - 'digits' => 'Debe tener :digits dígitos.', - 'digits_between' => 'Debe tener entre :min y :max dígitos.', - 'dimensions' => 'Las dimensiones de esta imagen son inválidas.', - 'distinct' => 'El campo tiene un valor duplicado.', - 'email' => 'No es un correo válido.', - 'ends_with' => 'Debe finalizar con uno de los siguientes valores: :values.', - 'exists' => 'El valor seleccionado es inválido.', - 'file' => 'El campo debe ser un archivo.', - 'filled' => 'Este campo debe tener un valor.', - 'gt' => [ - 'array' => 'El contenido debe tener mas de :value elementos.', - 'file' => 'El archivo debe ser mayor que :value kilobytes.', + 'boolean' => 'El campo debe ser verdadero o falso.', + 'confirmed' => 'La confirmación no coincide.', + 'date' => 'Esta no es una fecha válida.', + 'date_equals' => 'El campo debe ser una fecha igual a :date.', + 'date_format' => 'El campo no corresponde al formato :format.', + 'different' => 'Este valor deben ser diferente de :other.', + 'digits' => 'Debe tener :digits dígitos.', + 'digits_between' => 'Debe tener entre :min y :max dígitos.', + 'dimensions' => 'Las dimensiones de esta imagen son inválidas.', + 'distinct' => 'El campo tiene un valor duplicado.', + 'email' => 'No es un correo válido.', + 'ends_with' => 'Debe finalizar con uno de los siguientes valores: :values.', + 'exists' => 'El valor seleccionado es inválido.', + 'file' => 'El campo debe ser un archivo.', + 'filled' => 'Este campo debe tener un valor.', + 'gt' => [ + 'array' => 'El contenido debe tener mas de :value elementos.', + 'file' => 'El archivo debe ser mayor que :value kilobytes.', 'numeric' => 'El valor del campo debe ser mayor que :value.', - 'string' => 'El texto debe ser mayor de :value caracteres.', + 'string' => 'El texto debe ser mayor de :value caracteres.', ], - 'gte' => [ - 'array' => 'El contenido debe tener :value elementos o más.', - 'file' => 'El tamaño del archivo debe ser mayor o igual que :value kilobytes.', + 'gte' => [ + 'array' => 'El contenido debe tener :value elementos o más.', + 'file' => 'El tamaño del archivo debe ser mayor o igual que :value kilobytes.', 'numeric' => 'El valor debe ser mayor o igual que :value.', - 'string' => 'El texto debe ser mayor o igual de :value caracteres.', + 'string' => 'El texto debe ser mayor o igual de :value caracteres.', ], - 'image' => 'Esta debe ser una imagen.', - 'in' => 'El valor seleccionado es inválido.', - 'in_array' => 'Este valor no existe en :other.', - 'integer' => 'Esto debe ser un entero.', - 'ip' => 'Debe ser una dirección IP válida.', - 'ipv4' => 'Debe ser una dirección IPv4 válida.', - 'ipv6' => 'Debe ser una dirección IPv6 válida.', - 'json' => 'Debe ser un texto válido en JSON.', - 'lt' => [ - 'array' => 'El contenido debe tener menor de :value elementos.', - 'file' => 'El tamaño del archivo debe ser menor a :value kilobytes.', + 'image' => 'Esta debe ser una imagen.', + 'in' => 'El valor seleccionado es inválido.', + 'in_array' => 'Este valor no existe en :other.', + 'integer' => 'Esto debe ser un entero.', + 'ip' => 'Debe ser una dirección IP válida.', + 'ipv4' => 'Debe ser una dirección IPv4 válida.', + 'ipv6' => 'Debe ser una dirección IPv6 válida.', + 'json' => 'Debe ser un texto válido en JSON.', + 'lt' => [ + 'array' => 'El contenido debe tener menor de :value elementos.', + 'file' => 'El tamaño del archivo debe ser menor a :value kilobytes.', 'numeric' => 'El valor debe ser menor que :value.', - 'string' => 'El texto debe ser menor de :value caracteres.', + 'string' => 'El texto debe ser menor de :value caracteres.', ], - 'lte' => [ - 'array' => 'El contenido no debe tener más de :value elementos.', - 'file' => 'El tamaño del archivo debe ser menor o igual que :value kilobytes.', + 'lte' => [ + 'array' => 'El contenido no debe tener más de :value elementos.', + 'file' => 'El tamaño del archivo debe ser menor o igual que :value kilobytes.', 'numeric' => 'El valor debe ser menor o igual que :value.', - 'string' => 'El texto debe ser menor o igual de :value caracteres.', + 'string' => 'El texto debe ser menor o igual de :value caracteres.', ], - 'max' => [ - 'array' => 'El contenido no debe tener más de :max elementos.', - 'file' => 'El tamaño del archivo no debe ser mayor a :max kilobytes.', + 'max' => [ + 'array' => 'El contenido no debe tener más de :max elementos.', + 'file' => 'El tamaño del archivo no debe ser mayor a :max kilobytes.', 'numeric' => 'El valor no debe ser mayor de :max.', - 'string' => 'El texto no debe ser mayor a :max caracteres.', + 'string' => 'El texto no debe ser mayor a :max caracteres.', ], - 'mimes' => 'Debe ser un archivo de tipo: :values.', - 'mimetypes' => 'Debe ser un archivo de tipo: :values.', - 'min' => [ - 'array' => 'El contenido debe tener al menos :min elementos.', - 'file' => 'El tamaño del archivo debe ser al menos de :min kilobytes.', + 'mimes' => 'Debe ser un archivo de tipo: :values.', + 'mimetypes' => 'Debe ser un archivo de tipo: :values.', + 'min' => [ + 'array' => 'El contenido debe tener al menos :min elementos.', + 'file' => 'El tamaño del archivo debe ser al menos de :min kilobytes.', 'numeric' => 'El valor debe ser al menos de :min.', - 'string' => 'El texto debe ser al menos de :min caracteres.', + 'string' => 'El texto debe ser al menos de :min caracteres.', ], - 'multiple_of' => 'Este valor debe ser múltiplo de :value', - 'not_in' => 'El valor seleccionado es inválido.', - 'not_regex' => 'Este formato es inválido.', - 'numeric' => 'Debe ser un número.', - 'password' => 'La contraseña es incorrecta.', - 'present' => 'Este campo debe estar presente.', - 'prohibited' => 'Este campo está prohibido', - 'prohibited_if' => 'Este campo está prohibido cuando :other es :value.', - 'prohibited_unless' => 'Este campo está prohibido a menos que :other sea :values.', - 'regex' => 'Este formato es inválido.', - 'relatable' => 'Este campo no se puede asociar con este recurso.', - 'required' => 'Este campo es requerido.', - 'required_if' => 'Este campo es requerido cuando :other es :value.', - 'required_unless' => 'Este campo es requerido a menos que :other esté en :values.', - 'required_with' => 'Este campo es requerido cuando :values está presente.', - 'required_with_all' => 'Este campo es requerido cuando :values están presentes.', - 'required_without' => 'Este campo es requerido cuando :values no está presente.', + 'multiple_of' => 'Este valor debe ser múltiplo de :value', + 'not_in' => 'El valor seleccionado es inválido.', + 'not_regex' => 'Este formato es inválido.', + 'numeric' => 'Debe ser un número.', + 'password' => 'La contraseña es incorrecta.', + 'present' => 'Este campo debe estar presente.', + 'prohibited' => 'Este campo está prohibido', + 'prohibited_if' => 'Este campo está prohibido cuando :other es :value.', + 'prohibited_unless' => 'Este campo está prohibido a menos que :other sea :values.', + 'regex' => 'Este formato es inválido.', + 'relatable' => 'Este campo no se puede asociar con este recurso.', + 'required' => 'Este campo es requerido.', + 'required_if' => 'Este campo es requerido cuando :other es :value.', + 'required_unless' => 'Este campo es requerido a menos que :other esté en :values.', + 'required_with' => 'Este campo es requerido cuando :values está presente.', + 'required_with_all' => 'Este campo es requerido cuando :values están presentes.', + 'required_without' => 'Este campo es requerido cuando :values no está presente.', 'required_without_all' => 'Este campo es requerido cuando ninguno de :values están presentes.', - 'same' => 'El valor de este campo debe ser igual a :other.', - 'size' => [ - 'array' => 'El contenido debe tener :size elementos.', - 'file' => 'El tamaño del archivo debe ser de :size kilobytes.', + 'same' => 'El valor de este campo debe ser igual a :other.', + 'size' => [ + 'array' => 'El contenido debe tener :size elementos.', + 'file' => 'El tamaño del archivo debe ser de :size kilobytes.', 'numeric' => 'El valor debe ser :size.', - 'string' => 'El texto debe ser de :size caracteres.', + 'string' => 'El texto debe ser de :size caracteres.', ], - 'starts_with' => 'Debe comenzar con alguno de los siguientes valores: :values.', - 'string' => 'Debe ser un texto.', - 'timezone' => 'Debe ser de una zona horaria válida.', - 'unique' => 'Este campo ya ha sido tomado.', - 'uploaded' => 'Falló al subir.', - 'url' => 'Este formato es inválido.', - 'uuid' => 'Debe ser un UUID válido.', - 'custom' => [ + 'starts_with' => 'Debe comenzar con alguno de los siguientes valores: :values.', + 'string' => 'Debe ser un texto.', + 'timezone' => 'Debe ser de una zona horaria válida.', + 'unique' => 'Este campo ya ha sido tomado.', + 'uploaded' => 'Falló al subir.', + 'url' => 'Este formato es inválido.', + 'uuid' => 'Debe ser un UUID válido.', + 'custom' => [ 'attribute-name' => [ 'rule-name' => 'custom-message', ], ], - 'attributes' => [], + 'attributes' => [], ]; diff --git a/resources/lang/es/validation.php b/resources/lang/es/validation.php index 61c76257..54e0eb3c 100644 --- a/resources/lang/es/validation.php +++ b/resources/lang/es/validation.php @@ -12,158 +12,158 @@ */ return [ - 'accepted' => ':attribute debe ser aceptado.', - 'active_url' => ':attribute no es una URL válida.', - 'after' => ':attribute debe ser una fecha posterior a :date.', - 'after_or_equal' => ':attribute debe ser una fecha posterior o igual a :date.', - 'alpha' => ':attribute sólo debe contener letras.', - 'alpha_dash' => ':attribute sólo debe contener letras, números, guiones y guiones bajos.', - 'alpha_num' => ':attribute sólo debe contener letras y números.', - 'array' => ':attribute debe ser un conjunto.', - 'attached' => 'Este :attribute ya se adjuntó.', - 'before' => ':attribute debe ser una fecha anterior a :date.', - 'before_or_equal' => ':attribute debe ser una fecha anterior o igual a :date.', - 'between' => [ - 'array' => ':attribute tiene que tener entre :min - :max elementos.', - 'file' => ':attribute debe pesar entre :min - :max kilobytes.', + 'accepted' => ':attribute debe ser aceptado.', + 'active_url' => ':attribute no es una URL válida.', + 'after' => ':attribute debe ser una fecha posterior a :date.', + 'after_or_equal' => ':attribute debe ser una fecha posterior o igual a :date.', + 'alpha' => ':attribute sólo debe contener letras.', + 'alpha_dash' => ':attribute sólo debe contener letras, números, guiones y guiones bajos.', + 'alpha_num' => ':attribute sólo debe contener letras y números.', + 'array' => ':attribute debe ser un conjunto.', + 'attached' => 'Este :attribute ya se adjuntó.', + 'before' => ':attribute debe ser una fecha anterior a :date.', + 'before_or_equal' => ':attribute debe ser una fecha anterior o igual a :date.', + 'between' => [ + 'array' => ':attribute tiene que tener entre :min - :max elementos.', + 'file' => ':attribute debe pesar entre :min - :max kilobytes.', 'numeric' => ':attribute tiene que estar entre :min - :max.', - 'string' => ':attribute tiene que tener entre :min - :max caracteres.', + 'string' => ':attribute tiene que tener entre :min - :max caracteres.', ], - 'boolean' => 'El campo :attribute debe tener un valor verdadero o falso.', - 'confirmed' => 'La confirmación de :attribute no coincide.', - 'date' => ':attribute no es una fecha válida.', - 'date_equals' => ':attribute debe ser una fecha igual a :date.', - 'date_format' => ':attribute no corresponde al formato :format.', - 'different' => ':attribute y :other deben ser diferentes.', - 'digits' => ':attribute debe tener :digits dígitos.', - 'digits_between' => ':attribute debe tener entre :min y :max dígitos.', - 'dimensions' => 'Las dimensiones de la imagen :attribute no son válidas.', - 'distinct' => 'El campo :attribute contiene un valor duplicado.', - 'email' => ':attribute no es un correo válido.', - 'ends_with' => 'El campo :attribute debe finalizar con uno de los siguientes valores: :values', - 'exists' => ':attribute es inválido.', - 'file' => 'El campo :attribute debe ser un archivo.', - 'filled' => 'El campo :attribute es obligatorio.', - 'gt' => [ - 'array' => 'El campo :attribute debe tener más de :value elementos.', - 'file' => 'El campo :attribute debe tener más de :value kilobytes.', + 'boolean' => 'El campo :attribute debe tener un valor verdadero o falso.', + 'confirmed' => 'La confirmación de :attribute no coincide.', + 'date' => ':attribute no es una fecha válida.', + 'date_equals' => ':attribute debe ser una fecha igual a :date.', + 'date_format' => ':attribute no corresponde al formato :format.', + 'different' => ':attribute y :other deben ser diferentes.', + 'digits' => ':attribute debe tener :digits dígitos.', + 'digits_between' => ':attribute debe tener entre :min y :max dígitos.', + 'dimensions' => 'Las dimensiones de la imagen :attribute no son válidas.', + 'distinct' => 'El campo :attribute contiene un valor duplicado.', + 'email' => ':attribute no es un correo válido.', + 'ends_with' => 'El campo :attribute debe finalizar con uno de los siguientes valores: :values', + 'exists' => ':attribute es inválido.', + 'file' => 'El campo :attribute debe ser un archivo.', + 'filled' => 'El campo :attribute es obligatorio.', + 'gt' => [ + 'array' => 'El campo :attribute debe tener más de :value elementos.', + 'file' => 'El campo :attribute debe tener más de :value kilobytes.', 'numeric' => 'El campo :attribute debe ser mayor que :value.', - 'string' => 'El campo :attribute debe tener más de :value caracteres.', + 'string' => 'El campo :attribute debe tener más de :value caracteres.', ], - 'gte' => [ - 'array' => 'El campo :attribute debe tener como mínimo :value elementos.', - 'file' => 'El campo :attribute debe tener como mínimo :value kilobytes.', + 'gte' => [ + 'array' => 'El campo :attribute debe tener como mínimo :value elementos.', + 'file' => 'El campo :attribute debe tener como mínimo :value kilobytes.', 'numeric' => 'El campo :attribute debe ser como mínimo :value.', - 'string' => 'El campo :attribute debe tener como mínimo :value caracteres.', + 'string' => 'El campo :attribute debe tener como mínimo :value caracteres.', ], - 'image' => ':attribute debe ser una imagen.', - 'in' => ':attribute es inválido.', - 'in_array' => 'El campo :attribute no existe en :other.', - 'integer' => ':attribute debe ser un número entero.', - 'ip' => ':attribute debe ser una dirección IP válida.', - 'ipv4' => ':attribute debe ser una dirección IPv4 válida.', - 'ipv6' => ':attribute debe ser una dirección IPv6 válida.', - 'json' => 'El campo :attribute debe ser una cadena JSON válida.', - 'lt' => [ - 'array' => 'El campo :attribute debe tener menos de :value elementos.', - 'file' => 'El campo :attribute debe tener menos de :value kilobytes.', + 'image' => ':attribute debe ser una imagen.', + 'in' => ':attribute es inválido.', + 'in_array' => 'El campo :attribute no existe en :other.', + 'integer' => ':attribute debe ser un número entero.', + 'ip' => ':attribute debe ser una dirección IP válida.', + 'ipv4' => ':attribute debe ser una dirección IPv4 válida.', + 'ipv6' => ':attribute debe ser una dirección IPv6 válida.', + 'json' => 'El campo :attribute debe ser una cadena JSON válida.', + 'lt' => [ + 'array' => 'El campo :attribute debe tener menos de :value elementos.', + 'file' => 'El campo :attribute debe tener menos de :value kilobytes.', 'numeric' => 'El campo :attribute debe ser menor que :value.', - 'string' => 'El campo :attribute debe tener menos de :value caracteres.', + 'string' => 'El campo :attribute debe tener menos de :value caracteres.', ], - 'lte' => [ - 'array' => 'El campo :attribute debe tener como máximo :value elementos.', - 'file' => 'El campo :attribute debe tener como máximo :value kilobytes.', + 'lte' => [ + 'array' => 'El campo :attribute debe tener como máximo :value elementos.', + 'file' => 'El campo :attribute debe tener como máximo :value kilobytes.', 'numeric' => 'El campo :attribute debe ser como máximo :value.', - 'string' => 'El campo :attribute debe tener como máximo :value caracteres.', + 'string' => 'El campo :attribute debe tener como máximo :value caracteres.', ], - 'max' => [ - 'array' => ':attribute no debe tener más de :max elementos.', - 'file' => ':attribute no debe ser mayor que :max kilobytes.', + 'max' => [ + 'array' => ':attribute no debe tener más de :max elementos.', + 'file' => ':attribute no debe ser mayor que :max kilobytes.', 'numeric' => ':attribute no debe ser mayor que :max.', - 'string' => ':attribute no debe ser mayor que :max caracteres.', + 'string' => ':attribute no debe ser mayor que :max caracteres.', ], - 'mimes' => ':attribute debe ser un archivo con formato: :values.', - 'mimetypes' => ':attribute debe ser un archivo con formato: :values.', - 'min' => [ - 'array' => ':attribute debe tener al menos :min elementos.', - 'file' => 'El tamaño de :attribute debe ser de al menos :min kilobytes.', + 'mimes' => ':attribute debe ser un archivo con formato: :values.', + 'mimetypes' => ':attribute debe ser un archivo con formato: :values.', + 'min' => [ + 'array' => ':attribute debe tener al menos :min elementos.', + 'file' => 'El tamaño de :attribute debe ser de al menos :min kilobytes.', 'numeric' => 'El tamaño de :attribute debe ser de al menos :min.', - 'string' => ':attribute debe contener al menos :min caracteres.', + 'string' => ':attribute debe contener al menos :min caracteres.', ], - 'multiple_of' => 'El campo :attribute debe ser múltiplo de :value', - 'not_in' => ':attribute es inválido.', - 'not_regex' => 'El formato del campo :attribute no es válido.', - 'numeric' => ':attribute debe ser numérico.', - 'password' => 'La contraseña es incorrecta.', - 'present' => 'El campo :attribute debe estar presente.', - 'prohibited' => 'El campo :attribute está prohibido.', - 'prohibited_if' => 'El campo :attribute está prohibido cuando :other es :value.', - 'prohibited_unless' => 'El campo :attribute está prohibido a menos que :other sea :values.', - 'regex' => 'El formato de :attribute es inválido.', - 'relatable' => 'Este :attribute no se puede asociar con este recurso', - 'required' => 'El campo :attribute es obligatorio.', - 'required_if' => 'El campo :attribute es obligatorio cuando :other es :value.', - 'required_unless' => 'El campo :attribute es obligatorio a menos que :other esté en :values.', - 'required_with' => 'El campo :attribute es obligatorio cuando :values está presente.', - 'required_with_all' => 'El campo :attribute es obligatorio cuando :values están presentes.', - 'required_without' => 'El campo :attribute es obligatorio cuando :values no está presente.', + 'multiple_of' => 'El campo :attribute debe ser múltiplo de :value', + 'not_in' => ':attribute es inválido.', + 'not_regex' => 'El formato del campo :attribute no es válido.', + 'numeric' => ':attribute debe ser numérico.', + 'password' => 'La contraseña es incorrecta.', + 'present' => 'El campo :attribute debe estar presente.', + 'prohibited' => 'El campo :attribute está prohibido.', + 'prohibited_if' => 'El campo :attribute está prohibido cuando :other es :value.', + 'prohibited_unless' => 'El campo :attribute está prohibido a menos que :other sea :values.', + 'regex' => 'El formato de :attribute es inválido.', + 'relatable' => 'Este :attribute no se puede asociar con este recurso', + 'required' => 'El campo :attribute es obligatorio.', + 'required_if' => 'El campo :attribute es obligatorio cuando :other es :value.', + 'required_unless' => 'El campo :attribute es obligatorio a menos que :other esté en :values.', + 'required_with' => 'El campo :attribute es obligatorio cuando :values está presente.', + 'required_with_all' => 'El campo :attribute es obligatorio cuando :values están presentes.', + 'required_without' => 'El campo :attribute es obligatorio cuando :values no está presente.', 'required_without_all' => 'El campo :attribute es obligatorio cuando ninguno de :values está presente.', - 'same' => ':attribute y :other deben coincidir.', - 'size' => [ - 'array' => ':attribute debe contener :size elementos.', - 'file' => 'El tamaño de :attribute debe ser :size kilobytes.', + 'same' => ':attribute y :other deben coincidir.', + 'size' => [ + 'array' => ':attribute debe contener :size elementos.', + 'file' => 'El tamaño de :attribute debe ser :size kilobytes.', 'numeric' => 'El tamaño de :attribute debe ser :size.', - 'string' => ':attribute debe contener :size caracteres.', + 'string' => ':attribute debe contener :size caracteres.', ], - 'starts_with' => 'El campo :attribute debe comenzar con uno de los siguientes valores: :values', - 'string' => 'El campo :attribute debe ser una cadena de caracteres.', - 'timezone' => 'El :attribute debe ser una zona válida.', - 'unique' => 'El campo :attribute ya ha sido registrado.', - 'uploaded' => 'Subir :attribute ha fallado.', - 'url' => 'El formato :attribute es inválido.', - 'uuid' => 'El campo :attribute debe ser un UUID válido.', - 'custom' => [ - 'email' => [ + 'starts_with' => 'El campo :attribute debe comenzar con uno de los siguientes valores: :values', + 'string' => 'El campo :attribute debe ser una cadena de caracteres.', + 'timezone' => 'El :attribute debe ser una zona válida.', + 'unique' => 'El campo :attribute ya ha sido registrado.', + 'uploaded' => 'Subir :attribute ha fallado.', + 'url' => 'El formato :attribute es inválido.', + 'uuid' => 'El campo :attribute debe ser un UUID válido.', + 'custom' => [ + 'email' => [ 'unique' => 'El :attribute ya ha sido registrado.', ], 'password' => [ 'min' => 'La :attribute debe contener más de :min caracteres', ], ], - 'attributes' => [ - 'address' => 'dirección', - 'age' => 'edad', - 'body' => 'contenido', - 'city' => 'ciudad', - 'content' => 'contenido', - 'country' => 'país', - 'current_password' => 'contraseña actual', - 'date' => 'fecha', - 'day' => 'día', - 'description' => 'descripción', - 'email' => 'correo electrónico', - 'excerpt' => 'extracto', - 'first_name' => 'nombre', - 'gender' => 'género', - 'hour' => 'hora', - 'last_name' => 'apellido', - 'message' => 'mensaje', - 'minute' => 'minuto', - 'mobile' => 'móvil', - 'month' => 'mes', - 'name' => 'nombre', - 'password' => 'contraseña', + 'attributes' => [ + 'address' => 'dirección', + 'age' => 'edad', + 'body' => 'contenido', + 'city' => 'ciudad', + 'content' => 'contenido', + 'country' => 'país', + 'current_password' => 'contraseña actual', + 'date' => 'fecha', + 'day' => 'día', + 'description' => 'descripción', + 'email' => 'correo electrónico', + 'excerpt' => 'extracto', + 'first_name' => 'nombre', + 'gender' => 'género', + 'hour' => 'hora', + 'last_name' => 'apellido', + 'message' => 'mensaje', + 'minute' => 'minuto', + 'mobile' => 'móvil', + 'month' => 'mes', + 'name' => 'nombre', + 'password' => 'contraseña', 'password_confirmation' => 'confirmación de la contraseña', - 'phone' => 'teléfono', - 'price' => 'precio', - 'role' => 'rol', - 'second' => 'segundo', - 'sex' => 'sexo', - 'subject' => 'asunto', - 'terms' => 'términos', - 'time' => 'hora', - 'title' => 'título', - 'username' => 'usuario', - 'year' => 'año', + 'phone' => 'teléfono', + 'price' => 'precio', + 'role' => 'rol', + 'second' => 'segundo', + 'sex' => 'sexo', + 'subject' => 'asunto', + 'terms' => 'términos', + 'time' => 'hora', + 'title' => 'título', + 'username' => 'usuario', + 'year' => 'año', ], ]; diff --git a/resources/lang/fa/auth.php b/resources/lang/fa/auth.php index 864c0567..3a62365c 100644 --- a/resources/lang/fa/auth.php +++ b/resources/lang/fa/auth.php @@ -12,7 +12,7 @@ */ return [ - 'failed' => 'مشخصات وارد شده با اطلاعات ما سازگار نیست.', + 'failed' => 'مشخصات وارد شده با اطلاعات ما سازگار نیست.', 'password' => 'رمز عبور شما معتبر نیست.', 'throttle' => 'دفعات تلاش شما برای ورود بیش از حد مجاز است. لطفا پس از :seconds ثانیه مجددا تلاش فرمایید.', ]; diff --git a/resources/lang/fa/pagination.php b/resources/lang/fa/pagination.php index e6460923..3bcf8d99 100644 --- a/resources/lang/fa/pagination.php +++ b/resources/lang/fa/pagination.php @@ -12,6 +12,6 @@ */ return [ - 'next' => 'بعدی »', + 'next' => 'بعدی »', 'previous' => '« قبلی', ]; diff --git a/resources/lang/fa/passwords.php b/resources/lang/fa/passwords.php index 3a04ac4a..09cee73c 100644 --- a/resources/lang/fa/passwords.php +++ b/resources/lang/fa/passwords.php @@ -12,9 +12,9 @@ */ return [ - 'reset' => 'رمز عبور شما بازگردانی شد!', - 'sent' => 'لینک بازگردانی رمز عبور به ایمیل شما ارسال شد.', + 'reset' => 'رمز عبور شما بازگردانی شد!', + 'sent' => 'لینک بازگردانی رمز عبور به ایمیل شما ارسال شد.', 'throttled' => 'پیش از تلاش مجدد کمی صبر کنید.', - 'token' => 'مشخصه‌ی بازگردانی رمز عبور معتبر نیست.', - 'user' => 'ما کاربری با این نشانی ایمیل نداریم!', + 'token' => 'مشخصه‌ی بازگردانی رمز عبور معتبر نیست.', + 'user' => 'ما کاربری با این نشانی ایمیل نداریم!', ]; diff --git a/resources/lang/fa/validation-inline.php b/resources/lang/fa/validation-inline.php index e01acafd..b2d18f35 100644 --- a/resources/lang/fa/validation-inline.php +++ b/resources/lang/fa/validation-inline.php @@ -12,120 +12,120 @@ */ return [ - 'accepted' => 'این مقدار باید پذیرفته شده باشد.', - 'active_url' => 'این مقدار یک آدرس معتبر نیست.', - 'after' => 'این مقدار باید یک تاریخ بعد از :date باشد.', - 'after_or_equal' => 'این مقدار باید یک تاریخ مساوی یا بعد از :date باشد.', - 'alpha' => 'این مقدار تنها میتواند شامل حروف باشد.', - 'alpha_dash' => 'این مقدار تنها میتواند شامل حروف، اعداد، خط تیره و زیرخط باشد.', - 'alpha_num' => 'این مقداز تنها میتواند شامل حروف و اعداد باشد.', - 'array' => 'این مقدار باید یک آرایه باشد.', - 'attached' => 'This field is already attached.', - 'before' => 'این مقدار باید یک تاریخ قبل از :date باشد.', - 'before_or_equal' => 'این مقدار باید یک تاریخ مساوی یا قبل از :date باشد.', - 'between' => [ - 'array' => 'این مقدار باید بین :min و :max گزینه داشته باشد.', - 'file' => 'حجم این فایل باید بین :min و :max کیلوبایت باشد.', + 'accepted' => 'این مقدار باید پذیرفته شده باشد.', + 'active_url' => 'این مقدار یک آدرس معتبر نیست.', + 'after' => 'این مقدار باید یک تاریخ بعد از :date باشد.', + 'after_or_equal' => 'این مقدار باید یک تاریخ مساوی یا بعد از :date باشد.', + 'alpha' => 'این مقدار تنها میتواند شامل حروف باشد.', + 'alpha_dash' => 'این مقدار تنها میتواند شامل حروف، اعداد، خط تیره و زیرخط باشد.', + 'alpha_num' => 'این مقداز تنها میتواند شامل حروف و اعداد باشد.', + 'array' => 'این مقدار باید یک آرایه باشد.', + 'attached' => 'This field is already attached.', + 'before' => 'این مقدار باید یک تاریخ قبل از :date باشد.', + 'before_or_equal' => 'این مقدار باید یک تاریخ مساوی یا قبل از :date باشد.', + 'between' => [ + 'array' => 'این مقدار باید بین :min و :max گزینه داشته باشد.', + 'file' => 'حجم این فایل باید بین :min و :max کیلوبایت باشد.', 'numeric' => 'این مقدار باید بین :min و :max باشد.', - 'string' => 'این رشته باید بین :min و :max حرف داشته باشد.', + 'string' => 'این رشته باید بین :min و :max حرف داشته باشد.', ], - 'boolean' => 'این مقدار باید حتما true و یا false باشد.', - 'confirmed' => 'با مقدار تکرار همخوانی ندارد.', - 'date' => 'این مقدار یک تاریخ معبتر نیست.', - 'date_equals' => 'این مقدار باید یک تاریخ مساوی با :date باشد.', - 'date_format' => 'این مقدار با فرمت :format همخوانی ندارد.', - 'different' => 'این مقدار باید متفاوت از :other باشد.', - 'digits' => 'این مقدار باید :digits رقمی باشد.', - 'digits_between' => 'تعداد ارقام این مقدار باید بین :min و :max باشد.', - 'dimensions' => 'ابعاد این عکس نامعتبر است.', - 'distinct' => 'مقدار این ورودی تکراری است.', - 'email' => 'این مقدار باید یک آدرس ایمیل معتبر باشد.', - 'ends_with' => 'این مقدار باید با یکی از عبارت های روبرو پایان یابد: :values.', - 'exists' => 'مقدار انتخابی نا معتبر است.', - 'file' => 'این ورودی باید یک فایل باشد.', - 'filled' => 'این ورودی باید یک مقدار داشته باشد.', - 'gt' => [ - 'array' => 'مقدار ورودی باید بیشتر از :value گزینه داشته باشد.', - 'file' => 'حجم فایل ورودی باید بزرگتر از :value کیلوبایت باشد.', + 'boolean' => 'این مقدار باید حتما true و یا false باشد.', + 'confirmed' => 'با مقدار تکرار همخوانی ندارد.', + 'date' => 'این مقدار یک تاریخ معبتر نیست.', + 'date_equals' => 'این مقدار باید یک تاریخ مساوی با :date باشد.', + 'date_format' => 'این مقدار با فرمت :format همخوانی ندارد.', + 'different' => 'این مقدار باید متفاوت از :other باشد.', + 'digits' => 'این مقدار باید :digits رقمی باشد.', + 'digits_between' => 'تعداد ارقام این مقدار باید بین :min و :max باشد.', + 'dimensions' => 'ابعاد این عکس نامعتبر است.', + 'distinct' => 'مقدار این ورودی تکراری است.', + 'email' => 'این مقدار باید یک آدرس ایمیل معتبر باشد.', + 'ends_with' => 'این مقدار باید با یکی از عبارت های روبرو پایان یابد: :values.', + 'exists' => 'مقدار انتخابی نا معتبر است.', + 'file' => 'این ورودی باید یک فایل باشد.', + 'filled' => 'این ورودی باید یک مقدار داشته باشد.', + 'gt' => [ + 'array' => 'مقدار ورودی باید بیشتر از :value گزینه داشته باشد.', + 'file' => 'حجم فایل ورودی باید بزرگتر از :value کیلوبایت باشد.', 'numeric' => 'مقدار ورودی باید بزرگتر از :value باشد.', - 'string' => 'تعداد حروف رشته ورودی باید بیشتر از :value باشد.', + 'string' => 'تعداد حروف رشته ورودی باید بیشتر از :value باشد.', ], - 'gte' => [ - 'array' => 'مقدار ورودی باید :value گزینه یا بیشتر داشته باشد.', - 'file' => 'حجم فایل ورودی باید بیشتر یا مساوی :value کیلوبایت باشد.', + 'gte' => [ + 'array' => 'مقدار ورودی باید :value گزینه یا بیشتر داشته باشد.', + 'file' => 'حجم فایل ورودی باید بیشتر یا مساوی :value کیلوبایت باشد.', 'numeric' => 'مقدار ورودی باید بزرگتر یا مساوی :value باشد.', - 'string' => 'تعداد حروف رشته ورودی باید بیشتر یا مساوی :value باشد.', + 'string' => 'تعداد حروف رشته ورودی باید بیشتر یا مساوی :value باشد.', ], - 'image' => 'این مقدار باید یک عکس باشد.', - 'in' => 'مقدار انتخابی نامعتبر است.', - 'in_array' => 'این مقدار در :other موجود نیست.', - 'integer' => 'این مقدار باید یک عدد صحیح باشد.', - 'ip' => 'این مقدار باید یک آدرس IP معتبر باشد.', - 'ipv4' => 'این مقدار باید یک آدرس IPv4 معتبر باشد.', - 'ipv6' => 'این مقدار باید یک آدرس IPv6 معتبر باشد.', - 'json' => 'این مقدار باید یک رشته معتبر JSON باشد.', - 'lt' => [ - 'array' => 'مقدار ورودی باید کمتر از :value گزینه داشته باشد.', - 'file' => 'حجم فایل ورودی باید کمتر از :value کیلوبایت باشد.', + 'image' => 'این مقدار باید یک عکس باشد.', + 'in' => 'مقدار انتخابی نامعتبر است.', + 'in_array' => 'این مقدار در :other موجود نیست.', + 'integer' => 'این مقدار باید یک عدد صحیح باشد.', + 'ip' => 'این مقدار باید یک آدرس IP معتبر باشد.', + 'ipv4' => 'این مقدار باید یک آدرس IPv4 معتبر باشد.', + 'ipv6' => 'این مقدار باید یک آدرس IPv6 معتبر باشد.', + 'json' => 'این مقدار باید یک رشته معتبر JSON باشد.', + 'lt' => [ + 'array' => 'مقدار ورودی باید کمتر از :value گزینه داشته باشد.', + 'file' => 'حجم فایل ورودی باید کمتر از :value کیلوبایت باشد.', 'numeric' => 'مقدار ورودی باید کمتر از :value باشد.', - 'string' => 'تعداد حروف رشته ورودی باید کمتر از :value باشد.', + 'string' => 'تعداد حروف رشته ورودی باید کمتر از :value باشد.', ], - 'lte' => [ - 'array' => 'مقدار ورودی باید :value گزینه یا کمتر داشته باشد.', - 'file' => 'حجم فایل ورودی باید کمتر یا مساوی :value کیلوبایت باشد.', + 'lte' => [ + 'array' => 'مقدار ورودی باید :value گزینه یا کمتر داشته باشد.', + 'file' => 'حجم فایل ورودی باید کمتر یا مساوی :value کیلوبایت باشد.', 'numeric' => 'مقدار ورودی باید کمتر یا مساوی :value باشد.', - 'string' => 'تعداد حروف رشته ورودی باید کمتر یا مساوی :value باشد.', + 'string' => 'تعداد حروف رشته ورودی باید کمتر یا مساوی :value باشد.', ], - 'max' => [ - 'array' => 'مقدار ورودی نباید بیشتر از :max گزینه داشته باشد.', - 'file' => 'حجم فایل ورودی نباید بیشتر از :max کیلوبایت باشد.', + 'max' => [ + 'array' => 'مقدار ورودی نباید بیشتر از :max گزینه داشته باشد.', + 'file' => 'حجم فایل ورودی نباید بیشتر از :max کیلوبایت باشد.', 'numeric' => 'مقدار ورودی نباید بزرگتر از :max باشد.', - 'string' => 'تعداد حروف رشته ورودی نباید بیشتر از :max باشد.', + 'string' => 'تعداد حروف رشته ورودی نباید بیشتر از :max باشد.', ], - 'mimes' => 'این مقدار باید یک فایل از این انواع باشد: :values.', - 'mimetypes' => 'این مقدار باید یک فایل از این انواع باشد: :values.', - 'min' => [ - 'array' => 'مقدار ورودی باید حداقل :min گزینه داشته باشد.', - 'file' => 'حجم فایل ورودی باید حداقل :min کیلوبایت باشد.', + 'mimes' => 'این مقدار باید یک فایل از این انواع باشد: :values.', + 'mimetypes' => 'این مقدار باید یک فایل از این انواع باشد: :values.', + 'min' => [ + 'array' => 'مقدار ورودی باید حداقل :min گزینه داشته باشد.', + 'file' => 'حجم فایل ورودی باید حداقل :min کیلوبایت باشد.', 'numeric' => 'مقدار ورودی باید حداقل :min باشد.', - 'string' => 'رشته ورودی باید حداقل :min حرف داشته باشد.', + 'string' => 'رشته ورودی باید حداقل :min حرف داشته باشد.', ], - 'multiple_of' => 'مقدار باید مضربی از :value باشد.', - 'not_in' => 'گزینه انتخابی نامعتبر است.', - 'not_regex' => 'این فرمت نامعتبر است.', - 'numeric' => 'این مقدار باید عددی باشد.', - 'password' => 'رمزعبور اشتباه است.', - 'present' => 'این مقدار باید وارد شده باشد.', - 'prohibited' => 'This field is prohibited.', - 'prohibited_if' => 'This field is prohibited when :other is :value.', - 'prohibited_unless' => 'This field is prohibited unless :other is in :values.', - 'regex' => 'این فرمت نامعتبر است.', - 'relatable' => 'This field may not be associated with this resource.', - 'required' => 'این مقدار ضروری است.', - 'required_if' => 'این مقدار ضروری است وقتی که :other برابر :value است.', - 'required_unless' => 'این مقدار ضروری است مگر اینکه :other برابر :values باشد.', - 'required_with' => 'این مقدار ضروری است وقتی که :values وارد شده باشد.', - 'required_with_all' => 'این مقدار ضروری است وقتی که مقادیر :values وارد شده باشند.', - 'required_without' => 'این مقدار ضروری است وقتی که :values وارد نشده باشد.', + 'multiple_of' => 'مقدار باید مضربی از :value باشد.', + 'not_in' => 'گزینه انتخابی نامعتبر است.', + 'not_regex' => 'این فرمت نامعتبر است.', + 'numeric' => 'این مقدار باید عددی باشد.', + 'password' => 'رمزعبور اشتباه است.', + 'present' => 'این مقدار باید وارد شده باشد.', + 'prohibited' => 'This field is prohibited.', + 'prohibited_if' => 'This field is prohibited when :other is :value.', + 'prohibited_unless' => 'This field is prohibited unless :other is in :values.', + 'regex' => 'این فرمت نامعتبر است.', + 'relatable' => 'This field may not be associated with this resource.', + 'required' => 'این مقدار ضروری است.', + 'required_if' => 'این مقدار ضروری است وقتی که :other برابر :value است.', + 'required_unless' => 'این مقدار ضروری است مگر اینکه :other برابر :values باشد.', + 'required_with' => 'این مقدار ضروری است وقتی که :values وارد شده باشد.', + 'required_with_all' => 'این مقدار ضروری است وقتی که مقادیر :values وارد شده باشند.', + 'required_without' => 'این مقدار ضروری است وقتی که :values وارد نشده باشد.', 'required_without_all' => 'این مقدار ضروری است وقتی که هیچکدام از :values وارد نشده باشند.', - 'same' => 'مقدار این ورودی باید یکی از مقدار های :other باشد.', - 'size' => [ - 'array' => 'مقدار ورودی باید :size گزینه داشته باشد.', - 'file' => 'حجم فایل ورودی باید :size کیلوبایت باشد.', + 'same' => 'مقدار این ورودی باید یکی از مقدار های :other باشد.', + 'size' => [ + 'array' => 'مقدار ورودی باید :size گزینه داشته باشد.', + 'file' => 'حجم فایل ورودی باید :size کیلوبایت باشد.', 'numeric' => 'مقدار ورودی باید :size باشد.', - 'string' => 'طول رشته ورودی باید :size حرف باشد.', + 'string' => 'طول رشته ورودی باید :size حرف باشد.', ], - 'starts_with' => 'این مقدار باید با یکی از گزینه های روبرو شروع شود: :values.', - 'string' => 'این مقدار باید یک رشته باشد.', - 'timezone' => 'این مقدار باید یک منطقه زمانی باشد.', - 'unique' => 'این مقدار قبلا استفاده شده.', - 'uploaded' => 'این ورودی بارگزاری نشد.', - 'url' => 'این فرمت نامعتبر است.', - 'uuid' => 'این مقدار باید یک UUID معتبر باشد.', - 'custom' => [ + 'starts_with' => 'این مقدار باید با یکی از گزینه های روبرو شروع شود: :values.', + 'string' => 'این مقدار باید یک رشته باشد.', + 'timezone' => 'این مقدار باید یک منطقه زمانی باشد.', + 'unique' => 'این مقدار قبلا استفاده شده.', + 'uploaded' => 'این ورودی بارگزاری نشد.', + 'url' => 'این فرمت نامعتبر است.', + 'uuid' => 'این مقدار باید یک UUID معتبر باشد.', + 'custom' => [ 'attribute-name' => [ 'rule-name' => 'custom-message', ], ], - 'attributes' => [], + 'attributes' => [], ]; diff --git a/resources/lang/fa/validation.php b/resources/lang/fa/validation.php index 3879c300..ec4a84e2 100644 --- a/resources/lang/fa/validation.php +++ b/resources/lang/fa/validation.php @@ -12,156 +12,156 @@ */ return [ - 'accepted' => ':attribute باید پذیرفته شده باشد.', - 'active_url' => 'آدرس :attribute معتبر نیست.', - 'after' => ':attribute باید تاریخی بعد از :date باشد.', - 'after_or_equal' => ':attribute باید تاریخی بعد از :date، یا مطابق با آن باشد.', - 'alpha' => ':attribute باید فقط حروف الفبا باشد.', - 'alpha_dash' => ':attribute باید فقط حروف الفبا، اعداد، خط تیره و زیرخط باشد.', - 'alpha_num' => ':attribute باید فقط حروف الفبا و اعداد باشد.', - 'array' => ':attribute باید آرایه باشد.', - 'attached' => 'This :attribute is already attached.', - 'before' => ':attribute باید تاریخی قبل از :date باشد.', - 'before_or_equal' => ':attribute باید تاریخی قبل از :date، یا مطابق با آن باشد.', - 'between' => [ - 'array' => ':attribute باید بین :min و :max آیتم باشد.', - 'file' => ':attribute باید بین :min و :max کیلوبایت باشد.', + 'accepted' => ':attribute باید پذیرفته شده باشد.', + 'active_url' => 'آدرس :attribute معتبر نیست.', + 'after' => ':attribute باید تاریخی بعد از :date باشد.', + 'after_or_equal' => ':attribute باید تاریخی بعد از :date، یا مطابق با آن باشد.', + 'alpha' => ':attribute باید فقط حروف الفبا باشد.', + 'alpha_dash' => ':attribute باید فقط حروف الفبا، اعداد، خط تیره و زیرخط باشد.', + 'alpha_num' => ':attribute باید فقط حروف الفبا و اعداد باشد.', + 'array' => ':attribute باید آرایه باشد.', + 'attached' => 'This :attribute is already attached.', + 'before' => ':attribute باید تاریخی قبل از :date باشد.', + 'before_or_equal' => ':attribute باید تاریخی قبل از :date، یا مطابق با آن باشد.', + 'between' => [ + 'array' => ':attribute باید بین :min و :max آیتم باشد.', + 'file' => ':attribute باید بین :min و :max کیلوبایت باشد.', 'numeric' => ':attribute باید بین :min و :max باشد.', - 'string' => ':attribute باید بین :min و :max کاراکتر باشد.', + 'string' => ':attribute باید بین :min و :max کاراکتر باشد.', ], - 'boolean' => 'فیلد :attribute فقط می‌تواند true و یا false باشد.', - 'confirmed' => ':attribute با فیلد تکرار مطابقت ندارد.', - 'date' => ':attribute یک تاریخ معتبر نیست.', - 'date_equals' => ':attribute باید یک تاریخ برابر با تاریخ :date باشد.', - 'date_format' => ':attribute با الگوی :format مطابقت ندارد.', - 'different' => ':attribute و :other باید از یکدیگر متفاوت باشند.', - 'digits' => ':attribute باید :digits رقم باشد.', - 'digits_between' => ':attribute باید بین :min و :max رقم باشد.', - 'dimensions' => 'ابعاد تصویر :attribute قابل قبول نیست.', - 'distinct' => 'فیلد :attribute مقدار تکراری دارد.', - 'email' => ':attribute باید یک ایمیل معتبر باشد.', - 'ends_with' => 'فیلد :attribute باید با یکی از مقادیر زیر خاتمه یابد: :values', - 'exists' => ':attribute انتخاب شده، معتبر نیست.', - 'file' => ':attribute باید یک فایل معتبر باشد.', - 'filled' => 'فیلد :attribute باید مقدار داشته باشد.', - 'gt' => [ - 'array' => ':attribute باید بیشتر از :value آیتم داشته باشد.', - 'file' => ':attribute باید بزرگتر از :value کیلوبایت باشد.', + 'boolean' => 'فیلد :attribute فقط می‌تواند true و یا false باشد.', + 'confirmed' => ':attribute با فیلد تکرار مطابقت ندارد.', + 'date' => ':attribute یک تاریخ معتبر نیست.', + 'date_equals' => ':attribute باید یک تاریخ برابر با تاریخ :date باشد.', + 'date_format' => ':attribute با الگوی :format مطابقت ندارد.', + 'different' => ':attribute و :other باید از یکدیگر متفاوت باشند.', + 'digits' => ':attribute باید :digits رقم باشد.', + 'digits_between' => ':attribute باید بین :min و :max رقم باشد.', + 'dimensions' => 'ابعاد تصویر :attribute قابل قبول نیست.', + 'distinct' => 'فیلد :attribute مقدار تکراری دارد.', + 'email' => ':attribute باید یک ایمیل معتبر باشد.', + 'ends_with' => 'فیلد :attribute باید با یکی از مقادیر زیر خاتمه یابد: :values', + 'exists' => ':attribute انتخاب شده، معتبر نیست.', + 'file' => ':attribute باید یک فایل معتبر باشد.', + 'filled' => 'فیلد :attribute باید مقدار داشته باشد.', + 'gt' => [ + 'array' => ':attribute باید بیشتر از :value آیتم داشته باشد.', + 'file' => ':attribute باید بزرگتر از :value کیلوبایت باشد.', 'numeric' => ':attribute باید بزرگتر از :value باشد.', - 'string' => ':attribute باید بیشتر از :value کاراکتر داشته باشد.', + 'string' => ':attribute باید بیشتر از :value کاراکتر داشته باشد.', ], - 'gte' => [ - 'array' => ':attribute باید بیشتر یا مساوی :value آیتم داشته باشد.', - 'file' => ':attribute باید بزرگتر یا مساوی :value کیلوبایت باشد.', + 'gte' => [ + 'array' => ':attribute باید بیشتر یا مساوی :value آیتم داشته باشد.', + 'file' => ':attribute باید بزرگتر یا مساوی :value کیلوبایت باشد.', 'numeric' => ':attribute باید بزرگتر یا مساوی :value باشد.', - 'string' => ':attribute باید بیشتر یا مساوی :value کاراکتر داشته باشد.', + 'string' => ':attribute باید بیشتر یا مساوی :value کاراکتر داشته باشد.', ], - 'image' => ':attribute باید یک تصویر معتبر باشد.', - 'in' => ':attribute انتخاب شده، معتبر نیست.', - 'in_array' => 'فیلد :attribute در لیست :other وجود ندارد.', - 'integer' => ':attribute باید عدد صحیح باشد.', - 'ip' => ':attribute باید آدرس IP معتبر باشد.', - 'ipv4' => ':attribute باید یک آدرس معتبر از نوع IPv4 باشد.', - 'ipv6' => ':attribute باید یک آدرس معتبر از نوع IPv6 باشد.', - 'json' => 'فیلد :attribute باید یک رشته از نوع JSON باشد.', - 'lt' => [ - 'array' => ':attribute باید کمتر از :value آیتم داشته باشد.', - 'file' => ':attribute باید کوچکتر از :value کیلوبایت باشد.', + 'image' => ':attribute باید یک تصویر معتبر باشد.', + 'in' => ':attribute انتخاب شده، معتبر نیست.', + 'in_array' => 'فیلد :attribute در لیست :other وجود ندارد.', + 'integer' => ':attribute باید عدد صحیح باشد.', + 'ip' => ':attribute باید آدرس IP معتبر باشد.', + 'ipv4' => ':attribute باید یک آدرس معتبر از نوع IPv4 باشد.', + 'ipv6' => ':attribute باید یک آدرس معتبر از نوع IPv6 باشد.', + 'json' => 'فیلد :attribute باید یک رشته از نوع JSON باشد.', + 'lt' => [ + 'array' => ':attribute باید کمتر از :value آیتم داشته باشد.', + 'file' => ':attribute باید کوچکتر از :value کیلوبایت باشد.', 'numeric' => ':attribute باید کوچکتر از :value باشد.', - 'string' => ':attribute باید کمتر از :value کاراکتر داشته باشد.', + 'string' => ':attribute باید کمتر از :value کاراکتر داشته باشد.', ], - 'lte' => [ - 'array' => ':attribute باید کمتر یا مساوی :value آیتم داشته باشد.', - 'file' => ':attribute باید کوچکتر یا مساوی :value کیلوبایت باشد.', + 'lte' => [ + 'array' => ':attribute باید کمتر یا مساوی :value آیتم داشته باشد.', + 'file' => ':attribute باید کوچکتر یا مساوی :value کیلوبایت باشد.', 'numeric' => ':attribute باید کوچکتر یا مساوی :value باشد.', - 'string' => ':attribute باید کمتر یا مساوی :value کاراکتر داشته باشد.', + 'string' => ':attribute باید کمتر یا مساوی :value کاراکتر داشته باشد.', ], - 'max' => [ - 'array' => ':attribute نباید بیشتر از :max آیتم داشته باشد.', - 'file' => ':attribute نباید بزرگتر از :max کیلوبایت باشد.', + 'max' => [ + 'array' => ':attribute نباید بیشتر از :max آیتم داشته باشد.', + 'file' => ':attribute نباید بزرگتر از :max کیلوبایت باشد.', 'numeric' => ':attribute نباید بزرگتر از :max باشد.', - 'string' => ':attribute نباید بیشتر از :max کاراکتر داشته باشد.', + 'string' => ':attribute نباید بیشتر از :max کاراکتر داشته باشد.', ], - 'mimes' => 'فرمت‌های معتبر فایل عبارتند از: :values.', - 'mimetypes' => 'فرمت‌های معتبر فایل عبارتند از: :values.', - 'min' => [ - 'array' => ':attribute نباید کمتر از :min آیتم داشته باشد.', - 'file' => ':attribute نباید کوچکتر از :min کیلوبایت باشد.', + 'mimes' => 'فرمت‌های معتبر فایل عبارتند از: :values.', + 'mimetypes' => 'فرمت‌های معتبر فایل عبارتند از: :values.', + 'min' => [ + 'array' => ':attribute نباید کمتر از :min آیتم داشته باشد.', + 'file' => ':attribute نباید کوچکتر از :min کیلوبایت باشد.', 'numeric' => ':attribute نباید کوچکتر از :min باشد.', - 'string' => ':attribute نباید کمتر از :min کاراکتر داشته باشد.', + 'string' => ':attribute نباید کمتر از :min کاراکتر داشته باشد.', ], - 'multiple_of' => 'مقدار :attribute باید مضربی از :value باشد.', - 'not_in' => ':attribute انتخاب شده، معتبر نیست.', - 'not_regex' => 'فرمت :attribute معتبر نیست.', - 'numeric' => ':attribute باید عدد یا رشته‌ای از اعداد باشد.', - 'password' => 'رمزعبور اشتباه است.', - 'present' => 'فیلد :attribute باید در پارامترهای ارسالی وجود داشته باشد.', - 'prohibited' => 'The :attribute field is prohibited.', - 'prohibited_if' => 'The :attribute field is prohibited when :other is :value.', - 'prohibited_unless' => 'The :attribute field is prohibited unless :other is in :values.', - 'regex' => 'فرمت :attribute معتبر نیست.', - 'relatable' => 'This :attribute may not be associated with this resource.', - 'required' => 'فیلد :attribute الزامی است.', - 'required_if' => 'هنگامی که :other برابر با :value است، فیلد :attribute الزامی است.', - 'required_unless' => 'فیلد :attribute الزامی است، مگر آنکه :other در :values موجود باشد.', - 'required_with' => 'در صورت وجود فیلد :values، فیلد :attribute نیز الزامی است.', - 'required_with_all' => 'در صورت وجود فیلدهای :values، فیلد :attribute نیز الزامی است.', - 'required_without' => 'در صورت عدم وجود فیلد :values، فیلد :attribute الزامی است.', + 'multiple_of' => 'مقدار :attribute باید مضربی از :value باشد.', + 'not_in' => ':attribute انتخاب شده، معتبر نیست.', + 'not_regex' => 'فرمت :attribute معتبر نیست.', + 'numeric' => ':attribute باید عدد یا رشته‌ای از اعداد باشد.', + 'password' => 'رمزعبور اشتباه است.', + 'present' => 'فیلد :attribute باید در پارامترهای ارسالی وجود داشته باشد.', + 'prohibited' => 'The :attribute field is prohibited.', + 'prohibited_if' => 'The :attribute field is prohibited when :other is :value.', + 'prohibited_unless' => 'The :attribute field is prohibited unless :other is in :values.', + 'regex' => 'فرمت :attribute معتبر نیست.', + 'relatable' => 'This :attribute may not be associated with this resource.', + 'required' => 'فیلد :attribute الزامی است.', + 'required_if' => 'هنگامی که :other برابر با :value است، فیلد :attribute الزامی است.', + 'required_unless' => 'فیلد :attribute الزامی است، مگر آنکه :other در :values موجود باشد.', + 'required_with' => 'در صورت وجود فیلد :values، فیلد :attribute نیز الزامی است.', + 'required_with_all' => 'در صورت وجود فیلدهای :values، فیلد :attribute نیز الزامی است.', + 'required_without' => 'در صورت عدم وجود فیلد :values، فیلد :attribute الزامی است.', 'required_without_all' => 'در صورت عدم وجود هر یک از فیلدهای :values، فیلد :attribute الزامی است.', - 'same' => ':attribute و :other باید همانند هم باشند.', - 'size' => [ - 'array' => ':attribute باید شامل :size آیتم باشد.', - 'file' => ':attribute باید برابر با :size کیلوبایت باشد.', + 'same' => ':attribute و :other باید همانند هم باشند.', + 'size' => [ + 'array' => ':attribute باید شامل :size آیتم باشد.', + 'file' => ':attribute باید برابر با :size کیلوبایت باشد.', 'numeric' => ':attribute باید برابر با :size باشد.', - 'string' => ':attribute باید برابر با :size کاراکتر باشد.', + 'string' => ':attribute باید برابر با :size کاراکتر باشد.', ], - 'starts_with' => ':attribute باید با یکی از این ها شروع شود: :values', - 'string' => 'فیلد :attribute باید متن باشد.', - 'timezone' => 'فیلد :attribute باید یک منطقه زمانی معتبر باشد.', - 'unique' => ':attribute قبلا انتخاب شده است.', - 'uploaded' => 'بارگذاری فایل :attribute موفقیت آمیز نبود.', - 'url' => ':attribute معتبر نمی‌باشد.', - 'uuid' => ':attribute باید یک UUID معتبر باشد.', - 'custom' => [ + 'starts_with' => ':attribute باید با یکی از این ها شروع شود: :values', + 'string' => 'فیلد :attribute باید متن باشد.', + 'timezone' => 'فیلد :attribute باید یک منطقه زمانی معتبر باشد.', + 'unique' => ':attribute قبلا انتخاب شده است.', + 'uploaded' => 'بارگذاری فایل :attribute موفقیت آمیز نبود.', + 'url' => ':attribute معتبر نمی‌باشد.', + 'uuid' => ':attribute باید یک UUID معتبر باشد.', + 'custom' => [ 'attribute-name' => [ 'rule-name' => 'custom-message', ], ], - 'attributes' => [ - 'address' => 'نشانی', - 'age' => 'سن', - 'area' => 'منطقه', - 'available' => 'موجود', - 'city' => 'شهر', - 'content' => 'محتوا', - 'country' => 'کشور', - 'date' => 'تاریخ', - 'day' => 'روز', - 'description' => 'توضیحات', - 'district' => 'ناحیه', - 'email' => 'ایمیل', - 'excerpt' => 'گزیده مطلب', - 'first_name' => 'نام', - 'gender' => 'جنسیت', - 'hour' => 'ساعت', - 'last_name' => 'نام خانوادگی', - 'minute' => 'دقیقه', - 'mobile' => 'شماره همراه', - 'month' => 'ماه', - 'name' => 'نام', - 'national_code' => 'کد ملی', - 'password' => 'رمز عبور', + 'attributes' => [ + 'address' => 'نشانی', + 'age' => 'سن', + 'area' => 'منطقه', + 'available' => 'موجود', + 'city' => 'شهر', + 'content' => 'محتوا', + 'country' => 'کشور', + 'date' => 'تاریخ', + 'day' => 'روز', + 'description' => 'توضیحات', + 'district' => 'ناحیه', + 'email' => 'ایمیل', + 'excerpt' => 'گزیده مطلب', + 'first_name' => 'نام', + 'gender' => 'جنسیت', + 'hour' => 'ساعت', + 'last_name' => 'نام خانوادگی', + 'minute' => 'دقیقه', + 'mobile' => 'شماره همراه', + 'month' => 'ماه', + 'name' => 'نام', + 'national_code' => 'کد ملی', + 'password' => 'رمز عبور', 'password_confirmation' => 'تکرار رمز عبور', - 'phone' => 'شماره ثابت', - 'province' => 'استان', - 'second' => 'ثانیه', - 'sex' => 'جنسیت', - 'size' => 'اندازه', - 'terms' => 'شرایط', - 'text' => 'متن', - 'time' => 'زمان', - 'title' => 'عنوان', - 'username' => 'نام کاربری', - 'year' => 'سال', + 'phone' => 'شماره ثابت', + 'province' => 'استان', + 'second' => 'ثانیه', + 'sex' => 'جنسیت', + 'size' => 'اندازه', + 'terms' => 'شرایط', + 'text' => 'متن', + 'time' => 'زمان', + 'title' => 'عنوان', + 'username' => 'نام کاربری', + 'year' => 'سال', ], ]; diff --git a/resources/lang/fr/auth.php b/resources/lang/fr/auth.php index e808c61b..cb661c96 100644 --- a/resources/lang/fr/auth.php +++ b/resources/lang/fr/auth.php @@ -12,7 +12,7 @@ */ return [ - 'failed' => 'Ces identifiants ne correspondent pas à nos enregistrements.', + 'failed' => 'Ces identifiants ne correspondent pas à nos enregistrements.', 'password' => 'Le mot de passe fourni est incorrect.', 'throttle' => 'Tentatives de connexion trop nombreuses. Veuillez essayer de nouveau dans :seconds secondes.', ]; diff --git a/resources/lang/fr/botanic.php b/resources/lang/fr/botanic.php index 2bf5e8dd..19684ec7 100644 --- a/resources/lang/fr/botanic.php +++ b/resources/lang/fr/botanic.php @@ -1,58 +1,58 @@ 'Résidences', - 'name' => 'Référence', - 'parameters' => 'Paramètres', - 'label' => 'Libellé', - 'description' => 'Description', - 'savebutton' => 'Enregistrer', - 'families' => [ - 'title' => 'Familles', - 'description' => 'Gérer les familles', - 'list' => 'Liste des familles', - 'add' => 'Ajouter une famille', - 'edit' => 'Editer une famille', - 'del' => 'Effacer une famille', - 'successadd' => 'La famille a été correctement ajoutée', - 'successmod' => 'La famille a été correctement modifiée', - 'successdel' => 'La famille a été correctement effacée', - 'confirmdelete' => 'Confirmez-vous la suppression de la famille ?', - ], - 'species' => [ - 'title' => 'Espèces', - 'description' => 'Gérer les espèce', - 'list' => 'Liste des espèces', - 'add' => 'Ajouter une espèce', - 'edit' => 'Editer une espèce', - 'del' => 'Effacer une espèce', - 'successadd' => 'L\'espèce a été correctement ajoutée', - 'successmod' => 'L\'espèce a été correctement modifiée', - 'successdel' => 'L\'espèce a été correctement effacée', - 'confirmdelete' => 'Confirmez-vous la suppression de l\'espèce ?', - ], - 'genres' => [ - 'title' => 'Genres', - 'description' => 'Gérer les genres', - 'list' => 'Liste des genres', - 'add' => 'Ajouter un genre', - 'edit' => 'Editer un genre', - 'del' => 'Effacer un genre', - 'successadd' => 'Le genre a été correctement ajoutée', - 'successmod' => 'Le genre a été correctement modifiée', - 'successdel' => 'Le genre a été correctement effacée', - 'confirmdelete' => 'Confirmez-vous la suppression du genre ?', - ], - 'varieties' => [ - 'title' => 'Variétés', - 'description' => 'Gérer les Variétés', - 'list' => 'Liste des Variétés', - 'add' => 'Ajouter une Variété', - 'edit' => 'Editer une Variété', - 'del' => 'Effacer une Variété', - 'successadd' => 'La Variété a été correctement ajoutée', - 'successmod' => 'La Variété a été correctement modifiée', - 'successdel' => 'La Variété a été correctement effacée', - 'confirmdelete' => 'Confirmez-vous la suppression de la Variété ?', - ], + 'title' => 'Résidences', + 'name' => 'Référence', + 'parameters' => 'Paramètres', + 'label' => 'Libellé', + 'description' => 'Description', + 'savebutton' => 'Enregistrer', + 'families' => [ + 'title' => 'Familles', + 'description' => 'Gérer les familles', + 'list' => 'Liste des familles', + 'add' => 'Ajouter une famille', + 'edit' => 'Editer une famille', + 'del' => 'Effacer une famille', + 'successadd' => 'La famille a été correctement ajoutée', + 'successmod' => 'La famille a été correctement modifiée', + 'successdel' => 'La famille a été correctement effacée', + 'confirmdelete' => 'Confirmez-vous la suppression de la famille ?', + ], + 'species' => [ + 'title' => 'Espèces', + 'description' => 'Gérer les espèce', + 'list' => 'Liste des espèces', + 'add' => 'Ajouter une espèce', + 'edit' => 'Editer une espèce', + 'del' => 'Effacer une espèce', + 'successadd' => 'L\'espèce a été correctement ajoutée', + 'successmod' => 'L\'espèce a été correctement modifiée', + 'successdel' => 'L\'espèce a été correctement effacée', + 'confirmdelete' => 'Confirmez-vous la suppression de l\'espèce ?', + ], + 'genres' => [ + 'title' => 'Genres', + 'description' => 'Gérer les genres', + 'list' => 'Liste des genres', + 'add' => 'Ajouter un genre', + 'edit' => 'Editer un genre', + 'del' => 'Effacer un genre', + 'successadd' => 'Le genre a été correctement ajoutée', + 'successmod' => 'Le genre a été correctement modifiée', + 'successdel' => 'Le genre a été correctement effacée', + 'confirmdelete' => 'Confirmez-vous la suppression du genre ?', + ], + 'varieties' => [ + 'title' => 'Variétés', + 'description' => 'Gérer les Variétés', + 'list' => 'Liste des Variétés', + 'add' => 'Ajouter une Variété', + 'edit' => 'Editer une Variété', + 'del' => 'Effacer une Variété', + 'successadd' => 'La Variété a été correctement ajoutée', + 'successmod' => 'La Variété a été correctement modifiée', + 'successdel' => 'La Variété a été correctement effacée', + 'confirmdelete' => 'Confirmez-vous la suppression de la Variété ?', + ], ]; diff --git a/resources/lang/fr/customer.php b/resources/lang/fr/customer.php index 8887b7d7..2f249601 100644 --- a/resources/lang/fr/customer.php +++ b/resources/lang/fr/customer.php @@ -1,30 +1,30 @@ [ - 'title' => 'Client', - 'name' => 'Client', - 'description' => 'Gérer les clients', - 'add' => 'Ajouter un client', - 'edit' => 'Editer un client', - 'del' => 'Effacer un client', - 'list' => 'Liste des clients', - 'successadd' => 'Le client été correctement ajouté', - 'successmod' => 'Le client a été correctement modifié', - 'successdel' => 'Le client a été correctement effacé', - 'confirmdelete' => 'Confirmez-vous la suppression du client ?', - ], - 'sale_channels' => [ - 'title' => 'Canal de vente', - 'name' => 'Canal de vente', - 'description' => 'Gérer les clients', - 'add' => 'Ajouter un canal de vente', - 'edit' => 'Editer un canal de vente', - 'del' => 'Effacer un canal de vente', - 'list' => 'Liste des canaux de vente', - 'successadd' => 'Le canal de vente été correctement ajouté', - 'successmod' => 'Le canal de vente a été correctement modifié', - 'successdel' => 'Le canal de vente a été correctement effacé', - 'confirmdelete' => 'Confirmez-vous la suppression du canal de vente ?', - ], + 'customers' => [ + 'title' => 'Client', + 'name' => 'Client', + 'description' => 'Gérer les clients', + 'add' => 'Ajouter un client', + 'edit' => 'Editer un client', + 'del' => 'Effacer un client', + 'list' => 'Liste des clients', + 'successadd' => 'Le client été correctement ajouté', + 'successmod' => 'Le client a été correctement modifié', + 'successdel' => 'Le client a été correctement effacé', + 'confirmdelete' => 'Confirmez-vous la suppression du client ?', + ], + 'sale_channels' => [ + 'title' => 'Canal de vente', + 'name' => 'Canal de vente', + 'description' => 'Gérer les clients', + 'add' => 'Ajouter un canal de vente', + 'edit' => 'Editer un canal de vente', + 'del' => 'Effacer un canal de vente', + 'list' => 'Liste des canaux de vente', + 'successadd' => 'Le canal de vente été correctement ajouté', + 'successmod' => 'Le canal de vente a été correctement modifié', + 'successdel' => 'Le canal de vente a été correctement effacé', + 'confirmdelete' => 'Confirmez-vous la suppression du canal de vente ?', + ], ]; diff --git a/resources/lang/fr/pagination.php b/resources/lang/fr/pagination.php index efa11ec1..a5542c32 100644 --- a/resources/lang/fr/pagination.php +++ b/resources/lang/fr/pagination.php @@ -12,6 +12,6 @@ */ return [ - 'next' => 'Suivant »', + 'next' => 'Suivant »', 'previous' => '« Précédent', ]; diff --git a/resources/lang/fr/passwords.php b/resources/lang/fr/passwords.php index dd068186..99a48b1d 100644 --- a/resources/lang/fr/passwords.php +++ b/resources/lang/fr/passwords.php @@ -12,9 +12,9 @@ */ return [ - 'reset' => 'Votre mot de passe a été réinitialisé !', - 'sent' => 'Nous vous avons envoyé par email le lien de réinitialisation du mot de passe !', + 'reset' => 'Votre mot de passe a été réinitialisé !', + 'sent' => 'Nous vous avons envoyé par email le lien de réinitialisation du mot de passe !', 'throttled' => 'Veuillez patienter avant de réessayer.', - 'token' => 'Ce jeton de réinitialisation du mot de passe n\'est pas valide.', - 'user' => 'Aucun utilisateur n\'a été trouvé avec cette adresse email.', + 'token' => 'Ce jeton de réinitialisation du mot de passe n\'est pas valide.', + 'user' => 'Aucun utilisateur n\'a été trouvé avec cette adresse email.', ]; diff --git a/resources/lang/fr/shop.php b/resources/lang/fr/shop.php index ec978847..56b226b7 100644 --- a/resources/lang/fr/shop.php +++ b/resources/lang/fr/shop.php @@ -1,276 +1,315 @@ 'Référence', - 'parameters' => 'Paramètres', - 'label' => 'Libellé', - 'description' => 'Description', - 'savebutton' => 'Enregistrer', - 'articles' => [ - 'title' => 'Articles', - 'name' => 'Article', - 'description' => 'Gérer les articles', - 'add' => 'Ajouter un article', - 'edit' => 'Editer un article', - 'del' => 'Effacer un article', - 'list' => 'Liste des articles', - 'successadd' => 'L\'article été correctement ajouté', - 'successmod' => 'L\'article a été correctement modifié', - 'successdel' => 'L\'article a été correctement effacé', - 'confirmdelete' => 'Confirmez-vous la suppression de l\'article ?', - ], - 'article_natures' => [ - 'title' => 'Natures d\'articles', - 'name' => 'Nature d\'articles', - 'description' => 'Gérer les natures d\'articles', - 'add' => 'Ajouter une nature d\'articles', - 'edit' => 'Editer une nature d\'articles', - 'del' => 'Effacer une nature d\'articles', - 'list' => 'Liste des natures d\'articles', - 'successadd' => 'La nature d\'articles été correctement ajoutée', - 'successmod' => 'La nature d\'articles a été correctement modifiée', - 'successdel' => 'La nature d\'articles a été correctement effacée', - 'confirmdelete' => 'Confirmez-vous la suppression de la nature d\'articles ?', - ], - 'article_attribute_families' => [ - 'title' => 'Familles d\'attributs', - 'description' => 'Gérer les familles d\'attributs', - 'add' => 'Ajouter une famille d\'attributs', - 'edit' => 'Editer une famille d\'attributs', - 'del' => 'Effacer une famille d\'attributs', - 'list' => 'Liste des familles d\'attributs', - 'successadd' => 'La famille d\'attributs été correctement ajoutée', - 'successmod' => 'La famille d\'attributs a été correctement modifiée', - 'successdel' => 'La familles d\'attributs a été correctement effacée', - 'confirmdelete' => 'Confirmez-vous la suppression de la famille d\'attributs ?', - ], - 'article_attribute_values' => [ - 'title' => 'Attributs d\'articles', - 'description' => 'Gérer les attributs d\'articles', - 'add' => 'Ajouter un attribut d\'articles', - 'edit' => 'Editer un attribut d\'articles', - 'del' => 'Effacer un attribut d\'articles', - 'list' => 'Liste des attributs d\'articles', - 'successadd' => 'L\'attribut d\'articles été correctement ajouté', - 'successmod' => 'L\'attribut d\'articles a été correctement modifiée', - 'successdel' => 'L\'attribut d\'articles a été correctement effacée', - 'confirmdelete' => 'Confirmez-vous la suppression de l\'attribut d\'article ?', - ], - 'article_price_generics' => [ - 'title' => 'Prix génériques', - 'description' => 'Gérer les prix génériques', - 'add' => 'Ajouter un prix générique', - 'edit' => 'Editer un prix générique', - 'del' => 'Effacer un prix générique', - 'list' => 'Liste des prix générique', - 'successadd' => 'Le prix générique été correctement ajouté', - 'successmod' => 'Le prix générique a été correctement modifiée', - 'successdel' => 'Le prix générique a été correctement effacée', - 'confirmdelete' => 'Confirmez-vous la suppression du prix générique ?', - ], - 'categories' => [ - 'title' => 'Catégories', - 'description' => 'Gérer les catégories', - 'add' => 'Ajouter une catégorie', - 'edit' => 'Editer une catégorie', - 'del' => 'Effacer une catégorie', - 'list' => 'Liste des catégories', - 'successadd' => 'La catégorie a été correctement ajoutée', - 'successmod' => 'La catégorie a été correctement modifiée', - 'successdel' => 'La catégorie a été correctement effacée', - 'confirmdelete' => 'Confirmez-vous la suppression de la catégorie ?', - ], - 'customers' => [ - 'title' => "Clients", - 'name' => 'Client', - 'description' => 'Gérer les clients', - 'add' => 'Ajouter un client', - 'edit' => 'Editer un client', - 'del' => 'Effacer un client', - 'list' => 'Liste des clients', - 'successadd' => 'Le client a été correctement ajouté', - 'successmod' => 'Le client a été correctement modifié', - 'successdel' => 'Le client a été correctement effacé', - 'confirmdelete' => 'Confirmez-vous la suppression du client ?', - ], - 'deliveries' => [ - 'title' => 'Points de distribution', - 'name' => 'Point de distribution', - 'description' => 'Gérer les points de distribution', - 'add' => 'Ajouter un point de distribution', - 'edit' => 'Editer un point de distribution', - 'del' => 'Effacer un point de distribution', - 'list' => 'Liste des points de distribution', - 'successadd' => 'Le point de distribution a été correctement ajouté', - 'successmod' => 'Le point de distribution a été correctement modifié', - 'successdel' => 'Le point de distribution a été correctement effacé', - 'confirmdelete' => 'Confirmez-vous la suppression du point de distribution ?', - ], - 'offers' => [ - 'title' => 'Offres', - 'name' => 'Offre', - 'description' => 'Gérer les offres', - 'add' => 'Ajouter une offre', - 'edit' => 'Editer une offre', - 'del' => 'Effacer une offre', - 'list' => 'Liste des offres', - 'successadd' => 'L\'offre a été correctement ajoutée', - 'successmod' => 'L\'offre a été correctement modifiée', - 'successdel' => 'L\'offre a été correctement effacée', - 'confirmdelete' => 'Confirmez-vous la suppression de l\'offre ?', - ], - 'packages' => [ - 'title' => 'Packages', - 'description' => 'Gérer les packages', - 'add' => 'Ajouter un package', - 'edit' => 'Editer un package', - 'del' => 'Effacer un package', - 'list' => 'Liste des packages', - 'successadd' => 'Le package été correctement ajouté', - 'successmod' => 'Le package a été correctement modifié', - 'successdel' => 'Le package a été correctement effacé', - 'confirmdelete' => 'Confirmez-vous la suppression du package ?', - ], - 'prices' => [ - 'title' => 'Prix', - 'description' => 'Gérer les prix', - 'add' => 'Ajouter un prix', - 'edit' => 'Editer un prix', - 'del' => 'Effacer un prix', - 'list' => 'Liste des prix', - 'successadd' => 'Le prix été correctement ajouté', - 'successmod' => 'Le prix a été correctement modifié', - 'successdel' => 'Le prix a été correctement effacé', - 'confirmdelete' => 'Confirmez-vous la suppression du prix ?', - ], - 'sale_channels' => [ - 'title' => 'Canaux de vente', - 'name' => 'Canal de vente', - 'description' => 'Gérer les canaux de ventes', - 'add' => 'Ajouter un canal de vente', - 'edit' => 'Editer un canal de vente', - 'del' => 'Effacer un canal de vente', - 'list' => 'Liste des canaux de vente', - 'successadd' => 'Le canal de vente a été correctement ajouté', - 'successmod' => 'Le canal de vente a été correctement modifié', - 'successdel' => 'Le canal de vente a été correctement effacé', - 'confirmdelete' => 'Confirmez-vous la suppression du canal de vente ?', - ], - 'shelves' => [ - 'title' => 'Rayons', - 'name' => 'Rayon', - 'description' => 'Gérer les rayons', - 'add' => 'Ajouter un rayon', - 'edit' => 'Editer un rayon', - 'del' => 'Effacer un rayon', - 'list' => 'Liste des rayons', - 'successadd' => 'Le rayon a été correctement ajouté', - 'successmod' => 'Le rayon a été correctement modifié', - 'successdel' => 'Le rayon a été correctement effacé', - 'confirmdelete' => 'Confirmez-vous la suppression du rayon ?', - ], - 'tags' => [ - 'title' => 'Tags', - 'name' => 'Tag', - 'description' => 'Gérer les tags', - 'add' => 'Ajouter un tag', - 'edit' => 'Editer un tag', - 'del' => 'Effacer un tag', - 'list' => 'Liste des tags', - 'successadd' => 'Le tag été correctement ajouté', - 'successmod' => 'Le tag a été correctement modifié', - 'successdel' => 'Le tag a été correctement effacé', - 'confirmdelete' => 'Confirmez-vous la suppression du tag ?', - ], - 'tag_families' => [ - 'title' => 'Familles de tags', - 'name' => 'Famille de tag', - 'description' => 'Gérer les familles de tags', - 'add' => 'Ajouter une famille de tag', - 'edit' => 'Editer une famille de tag', - 'del' => 'Effacer une famille de tag', - 'list' => 'Liste des familles de tags', - 'successadd' => 'La famille de tag été correctement ajoutée', - 'successmod' => 'La famille de tag a été correctement modifiée', - 'successdel' => 'La famille de tag a été correctement effacée', - 'confirmdelete' => 'Confirmez-vous la suppression de la famille de tag ?', - ], - 'tag_groups' => [ - 'title' => 'Groupes de tags', - 'name' => 'Groupe de tag', - 'description' => 'Gérer les groupes de tags', - 'add' => 'Ajouter un groupe de tag', - 'edit' => 'Editer un groupe de tag', - 'del' => 'Effacer un groupe de tag', - 'list' => 'Liste des groupes de tags', - 'successadd' => 'Le groupe de tag été correctement ajoutée', - 'successmod' => 'Le groupe de tag a été correctement modifiée', - 'successdel' => 'Le groupe de tag a été correctement effacée', - 'confirmdelete' => 'Confirmez-vous la suppression du groupe de tag ?', - ], - 'tariffs' => [ - 'title' => 'Tarifs', - 'name' => 'Tarif', - 'description' => 'Gérer les tarifs', - 'add' => 'Ajouter un tarif', - 'edit' => 'Editer un tarif', - 'del' => 'Effacer un tarif', - 'list' => 'Liste des tarifs', - 'successadd' => 'Le tarif été correctement ajouté', - 'successmod' => 'Le tarif a été correctement modifié', - 'successdel' => 'Le tarif a été correctement effacé', - 'confirmdelete' => 'Confirmez-vous la suppression du tarif ?', - ], - 'unities' => [ - 'title' => 'Unités', - 'name' => 'Unité', - 'description' => 'Gérer les unités', - 'add' => 'Ajouter une unité', - 'edit' => 'Editer une unité', - 'del' => 'Effacer une unité', - 'list' => 'Liste des unités', - 'successadd' => 'L\'unité a été correctement ajoutée', - 'successmod' => 'L\'unité a été correctement modifiée', - 'successdel' => 'L\'unité a été correctement effacée', - 'confirmdelete' => 'Confirmez-vous la suppression de l\'unité ?', - ], - 'variations' => [ - 'title' => 'Déclinaisons', - 'name' => 'Déclinaison', - 'description' => 'Gérer les déclinaisons', - 'add' => 'Ajouter une déclinaison', - 'edit' => 'Editer une déclinaison', - 'del' => 'Effacer une déclinaison', - 'list' => 'Liste des déclinaisons', - 'successadd' => 'La déclinaison a été correctement ajoutée', - 'successmod' => 'La déclinaison a été correctement modifiée', - 'successdel' => 'La déclinaison a été correctement effacée', - 'confirmdelete' => 'Confirmez-vous la suppression de la déclinaison ?', - ], - 'orders' => [ - 'title' => 'Commandes', - 'name' => 'Commande', - 'description' => 'Gérer les commandes', - 'add' => 'Ajouter une commande', - 'edit' => 'Editer une commande', - 'del' => 'Effacer une commande', - 'list' => 'Liste des commandes', - 'successadd' => 'La commande a été correctement ajoutée', - 'successmod' => 'La commande a été correctement modifiée', - 'successdel' => 'La commande a été correctement effacée', - 'confirmdelete' => 'Confirmez-vous la suppression de la commande ?', - ], - 'invoices' => [ - 'title' => 'Factures', - 'name' => 'Facture', - 'description' => 'Gérer les factures', - 'add' => 'Ajouter une facture', - 'edit' => 'Editer une facture', - 'del' => 'Effacer une facture', - 'list' => 'Liste des factures', - 'successadd' => 'La facture a été correctement ajoutée', - 'successmod' => 'La facture a été correctement modifiée', - 'successdel' => 'La facture a été correctement effacée', - 'confirmdelete' => 'Confirmez-vous la suppression de la facture ?', - ], + 'name' => 'Référence', + 'parameters' => 'Paramètres', + 'label' => 'Libellé', + 'description' => 'Description', + 'savebutton' => 'Enregistrer', + 'articles' => [ + 'title' => 'Articles', + 'name' => 'Article', + 'description' => 'Gérer les articles', + 'add' => 'Ajouter un article', + 'edit' => 'Editer un article', + 'del' => 'Effacer un article', + 'list' => 'Liste des articles', + 'successadd' => 'L\'article été correctement ajouté', + 'successmod' => 'L\'article a été correctement modifié', + 'successdel' => 'L\'article a été correctement effacé', + 'confirmdelete' => 'Confirmez-vous la suppression de l\'article ?', + ], + 'article_natures' => [ + 'title' => 'Natures d\'articles', + 'name' => 'Nature d\'articles', + 'description' => 'Gérer les natures d\'articles', + 'add' => 'Ajouter une nature d\'articles', + 'edit' => 'Editer une nature d\'articles', + 'del' => 'Effacer une nature d\'articles', + 'list' => 'Liste des natures d\'articles', + 'successadd' => 'La nature d\'articles été correctement ajoutée', + 'successmod' => 'La nature d\'articles a été correctement modifiée', + 'successdel' => 'La nature d\'articles a été correctement effacée', + 'confirmdelete' => 'Confirmez-vous la suppression de la nature d\'articles ?', + ], + 'article_attribute_families' => [ + 'title' => 'Familles d\'attributs', + 'description' => 'Gérer les familles d\'attributs', + 'add' => 'Ajouter une famille d\'attributs', + 'edit' => 'Editer une famille d\'attributs', + 'del' => 'Effacer une famille d\'attributs', + 'list' => 'Liste des familles d\'attributs', + 'successadd' => 'La famille d\'attributs été correctement ajoutée', + 'successmod' => 'La famille d\'attributs a été correctement modifiée', + 'successdel' => 'La familles d\'attributs a été correctement effacée', + 'confirmdelete' => 'Confirmez-vous la suppression de la famille d\'attributs ?', + ], + 'article_attribute_values' => [ + 'title' => 'Attributs d\'articles', + 'description' => 'Gérer les attributs d\'articles', + 'add' => 'Ajouter un attribut d\'articles', + 'edit' => 'Editer un attribut d\'articles', + 'del' => 'Effacer un attribut d\'articles', + 'list' => 'Liste des attributs d\'articles', + 'successadd' => 'L\'attribut d\'articles été correctement ajouté', + 'successmod' => 'L\'attribut d\'articles a été correctement modifiée', + 'successdel' => 'L\'attribut d\'articles a été correctement effacée', + 'confirmdelete' => 'Confirmez-vous la suppression de l\'attribut d\'article ?', + ], + 'article_price_generics' => [ + 'title' => 'Prix génériques', + 'description' => 'Gérer les prix génériques', + 'add' => 'Ajouter un prix générique', + 'edit' => 'Editer un prix générique', + 'del' => 'Effacer un prix générique', + 'list' => 'Liste des prix générique', + 'successadd' => 'Le prix générique été correctement ajouté', + 'successmod' => 'Le prix générique a été correctement modifiée', + 'successdel' => 'Le prix générique a été correctement effacée', + 'confirmdelete' => 'Confirmez-vous la suppression du prix générique ?', + ], + 'categories' => [ + 'title' => 'Catégories', + 'description' => 'Gérer les catégories', + 'add' => 'Ajouter une catégorie', + 'edit' => 'Editer une catégorie', + 'del' => 'Effacer une catégorie', + 'list' => 'Liste des catégories', + 'successadd' => 'La catégorie a été correctement ajoutée', + 'successmod' => 'La catégorie a été correctement modifiée', + 'successdel' => 'La catégorie a été correctement effacée', + 'confirmdelete' => 'Confirmez-vous la suppression de la catégorie ?', + ], + 'customers' => [ + 'title' => 'Clients', + 'name' => 'Client', + 'description' => 'Gérer les clients', + 'add' => 'Ajouter un client', + 'edit' => 'Editer un client', + 'del' => 'Effacer un client', + 'list' => 'Liste des clients', + 'successadd' => 'Le client a été correctement ajouté', + 'successmod' => 'Le client a été correctement modifié', + 'successdel' => 'Le client a été correctement effacé', + 'confirmdelete' => 'Confirmez-vous la suppression du client ?', + ], + 'deliveries' => [ + 'title' => 'Points de distribution', + 'name' => 'Point de distribution', + 'description' => 'Gérer les points de distribution', + 'add' => 'Ajouter un point de distribution', + 'edit' => 'Editer un point de distribution', + 'del' => 'Effacer un point de distribution', + 'list' => 'Liste des points de distribution', + 'successadd' => 'Le point de distribution a été correctement ajouté', + 'successmod' => 'Le point de distribution a été correctement modifié', + 'successdel' => 'Le point de distribution a été correctement effacé', + 'confirmdelete' => 'Confirmez-vous la suppression du point de distribution ?', + ], + 'delivery_types' => [ + 'title' => 'Livreurs', + 'name' => 'Livreur', + 'description' => 'Gérer les livreurs', + 'add' => 'Ajouter un livreur', + 'edit' => 'Editer un livreur', + 'del' => 'Effacer un livreur', + 'list' => 'Liste des livreurs', + 'successadd' => 'Le livreur a été correctement ajouté', + 'successmod' => 'Le livreur a été correctement modifié', + 'successdel' => 'Le livreur a été correctement effacé', + 'confirmdelete' => 'Confirmez-vous la suppression du livreur ?', + ], + 'delivery_type_calculations' => [ + 'title' => 'Frais d\'envois', + 'name' => 'Frais d\'envois', + 'description' => 'Gérer les frais d\'envois', + 'add' => 'Ajouter un frais d\'envoi', + 'edit' => 'Editer un frais d\'envoi', + 'del' => 'Effacer un frais d\'envoi', + 'list' => 'Liste des frais d\'envois', + 'successadd' => 'Le frais d\'envoi a été correctement ajouté', + 'successmod' => 'Le frais d\'envoi a été correctement modifié', + 'successdel' => 'Le frais d\'envoi a été correctement effacé', + 'confirmdelete' => 'Confirmez-vous la suppression du frais d\'envoi ?', + ], + 'delivery_packages' => [ + 'title' => 'Colis', + 'name' => 'Colis', + 'description' => 'Gérer les colis', + 'add' => 'Ajouter un colis', + 'edit' => 'Editer un colis', + 'del' => 'Effacer un colis', + 'list' => 'Liste des colis', + 'successadd' => 'Le colis a été correctement ajouté', + 'successmod' => 'Le colis a été correctement modifié', + 'successdel' => 'Le colis a été correctement effacé', + 'confirmdelete' => 'Confirmez-vous la suppression du colis ?', + ], + 'offers' => [ + 'title' => 'Offres', + 'name' => 'Offre', + 'description' => 'Gérer les offres', + 'add' => 'Ajouter une offre', + 'edit' => 'Editer une offre', + 'del' => 'Effacer une offre', + 'list' => 'Liste des offres', + 'successadd' => 'L\'offre a été correctement ajoutée', + 'successmod' => 'L\'offre a été correctement modifiée', + 'successdel' => 'L\'offre a été correctement effacée', + 'confirmdelete' => 'Confirmez-vous la suppression de l\'offre ?', + ], + 'packages' => [ + 'title' => 'Packages', + 'description' => 'Gérer les packages', + 'add' => 'Ajouter un package', + 'edit' => 'Editer un package', + 'del' => 'Effacer un package', + 'list' => 'Liste des packages', + 'successadd' => 'Le package été correctement ajouté', + 'successmod' => 'Le package a été correctement modifié', + 'successdel' => 'Le package a été correctement effacé', + 'confirmdelete' => 'Confirmez-vous la suppression du package ?', + ], + 'prices' => [ + 'title' => 'Prix', + 'description' => 'Gérer les prix', + 'add' => 'Ajouter un prix', + 'edit' => 'Editer un prix', + 'del' => 'Effacer un prix', + 'list' => 'Liste des prix', + 'successadd' => 'Le prix été correctement ajouté', + 'successmod' => 'Le prix a été correctement modifié', + 'successdel' => 'Le prix a été correctement effacé', + 'confirmdelete' => 'Confirmez-vous la suppression du prix ?', + ], + 'sale_channels' => [ + 'title' => 'Canaux de vente', + 'name' => 'Canal de vente', + 'description' => 'Gérer les canaux de ventes', + 'add' => 'Ajouter un canal de vente', + 'edit' => 'Editer un canal de vente', + 'del' => 'Effacer un canal de vente', + 'list' => 'Liste des canaux de vente', + 'successadd' => 'Le canal de vente a été correctement ajouté', + 'successmod' => 'Le canal de vente a été correctement modifié', + 'successdel' => 'Le canal de vente a été correctement effacé', + 'confirmdelete' => 'Confirmez-vous la suppression du canal de vente ?', + ], + 'shelves' => [ + 'title' => 'Rayons', + 'name' => 'Rayon', + 'description' => 'Gérer les rayons', + 'add' => 'Ajouter un rayon', + 'edit' => 'Editer un rayon', + 'del' => 'Effacer un rayon', + 'list' => 'Liste des rayons', + 'successadd' => 'Le rayon a été correctement ajouté', + 'successmod' => 'Le rayon a été correctement modifié', + 'successdel' => 'Le rayon a été correctement effacé', + 'confirmdelete' => 'Confirmez-vous la suppression du rayon ?', + ], + 'tags' => [ + 'title' => 'Tags', + 'name' => 'Tag', + 'description' => 'Gérer les tags', + 'add' => 'Ajouter un tag', + 'edit' => 'Editer un tag', + 'del' => 'Effacer un tag', + 'list' => 'Liste des tags', + 'successadd' => 'Le tag été correctement ajouté', + 'successmod' => 'Le tag a été correctement modifié', + 'successdel' => 'Le tag a été correctement effacé', + 'confirmdelete' => 'Confirmez-vous la suppression du tag ?', + ], + 'tag_families' => [ + 'title' => 'Familles de tags', + 'name' => 'Famille de tag', + 'description' => 'Gérer les familles de tags', + 'add' => 'Ajouter une famille de tag', + 'edit' => 'Editer une famille de tag', + 'del' => 'Effacer une famille de tag', + 'list' => 'Liste des familles de tags', + 'successadd' => 'La famille de tag été correctement ajoutée', + 'successmod' => 'La famille de tag a été correctement modifiée', + 'successdel' => 'La famille de tag a été correctement effacée', + 'confirmdelete' => 'Confirmez-vous la suppression de la famille de tag ?', + ], + 'tag_groups' => [ + 'title' => 'Groupes de tags', + 'name' => 'Groupe de tag', + 'description' => 'Gérer les groupes de tags', + 'add' => 'Ajouter un groupe de tag', + 'edit' => 'Editer un groupe de tag', + 'del' => 'Effacer un groupe de tag', + 'list' => 'Liste des groupes de tags', + 'successadd' => 'Le groupe de tag été correctement ajoutée', + 'successmod' => 'Le groupe de tag a été correctement modifiée', + 'successdel' => 'Le groupe de tag a été correctement effacée', + 'confirmdelete' => 'Confirmez-vous la suppression du groupe de tag ?', + ], + 'tariffs' => [ + 'title' => 'Tarifs', + 'name' => 'Tarif', + 'description' => 'Gérer les tarifs', + 'add' => 'Ajouter un tarif', + 'edit' => 'Editer un tarif', + 'del' => 'Effacer un tarif', + 'list' => 'Liste des tarifs', + 'successadd' => 'Le tarif été correctement ajouté', + 'successmod' => 'Le tarif a été correctement modifié', + 'successdel' => 'Le tarif a été correctement effacé', + 'confirmdelete' => 'Confirmez-vous la suppression du tarif ?', + ], + 'unities' => [ + 'title' => 'Unités', + 'name' => 'Unité', + 'description' => 'Gérer les unités', + 'add' => 'Ajouter une unité', + 'edit' => 'Editer une unité', + 'del' => 'Effacer une unité', + 'list' => 'Liste des unités', + 'successadd' => 'L\'unité a été correctement ajoutée', + 'successmod' => 'L\'unité a été correctement modifiée', + 'successdel' => 'L\'unité a été correctement effacée', + 'confirmdelete' => 'Confirmez-vous la suppression de l\'unité ?', + ], + 'variations' => [ + 'title' => 'Déclinaisons', + 'name' => 'Déclinaison', + 'description' => 'Gérer les déclinaisons', + 'add' => 'Ajouter une déclinaison', + 'edit' => 'Editer une déclinaison', + 'del' => 'Effacer une déclinaison', + 'list' => 'Liste des déclinaisons', + 'successadd' => 'La déclinaison a été correctement ajoutée', + 'successmod' => 'La déclinaison a été correctement modifiée', + 'successdel' => 'La déclinaison a été correctement effacée', + 'confirmdelete' => 'Confirmez-vous la suppression de la déclinaison ?', + ], + 'orders' => [ + 'title' => 'Commandes', + 'name' => 'Commande', + 'description' => 'Gérer les commandes', + 'add' => 'Ajouter une commande', + 'edit' => 'Editer une commande', + 'del' => 'Effacer une commande', + 'list' => 'Liste des commandes', + 'successadd' => 'La commande a été correctement ajoutée', + 'successmod' => 'La commande a été correctement modifiée', + 'successdel' => 'La commande a été correctement effacée', + 'confirmdelete' => 'Confirmez-vous la suppression de la commande ?', + ], + 'invoices' => [ + 'title' => 'Factures', + 'name' => 'Facture', + 'description' => 'Gérer les factures', + 'add' => 'Ajouter une facture', + 'edit' => 'Editer une facture', + 'del' => 'Effacer une facture', + 'list' => 'Liste des factures', + 'successadd' => 'La facture a été correctement ajoutée', + 'successmod' => 'La facture a été correctement modifiée', + 'successdel' => 'La facture a été correctement effacée', + 'confirmdelete' => 'Confirmez-vous la suppression de la facture ?', + ], ]; diff --git a/resources/lang/fr/system.php b/resources/lang/fr/system.php index 9c9d35b5..380d2da2 100644 --- a/resources/lang/fr/system.php +++ b/resources/lang/fr/system.php @@ -1,6 +1,6 @@ 'Annuler', - 'save' => 'Sauver', + 'cancel' => 'Annuler', + 'save' => 'Sauver', ]; diff --git a/resources/lang/fr/validation-inline.php b/resources/lang/fr/validation-inline.php index a06110a7..15478048 100644 --- a/resources/lang/fr/validation-inline.php +++ b/resources/lang/fr/validation-inline.php @@ -12,120 +12,120 @@ */ return [ - 'accepted' => 'Ce champ doit être accepté.', - 'active_url' => 'Ce n\'est pas une URL valide', - 'after' => 'La date doit être postérieure au :date.', - 'after_or_equal' => 'La date doit être postérieure ou égale au :date.', - 'alpha' => 'Ce champ doit contenir uniquement des lettres', - 'alpha_dash' => 'Ce champ doit contenir uniquement des lettres, des chiffres et des tirets.', - 'alpha_num' => 'Ce champ doit contenir uniquement des chiffres et des lettres.', - 'array' => 'Ce champ doit être un tableau.', - 'attached' => 'Ce champ est déjà attaché.', - 'before' => 'Ce champ doit être une date antérieure au :date.', - 'before_or_equal' => 'Ce champ doit être une date antérieure ou égale au :date.', - 'between' => [ - 'array' => 'Le tableau doit contenir entre :min et :max éléments.', - 'file' => 'La taille du fichier doit être comprise entre :min et :max kilo-octets.', + 'accepted' => 'Ce champ doit être accepté.', + 'active_url' => 'Ce n\'est pas une URL valide', + 'after' => 'La date doit être postérieure au :date.', + 'after_or_equal' => 'La date doit être postérieure ou égale au :date.', + 'alpha' => 'Ce champ doit contenir uniquement des lettres', + 'alpha_dash' => 'Ce champ doit contenir uniquement des lettres, des chiffres et des tirets.', + 'alpha_num' => 'Ce champ doit contenir uniquement des chiffres et des lettres.', + 'array' => 'Ce champ doit être un tableau.', + 'attached' => 'Ce champ est déjà attaché.', + 'before' => 'Ce champ doit être une date antérieure au :date.', + 'before_or_equal' => 'Ce champ doit être une date antérieure ou égale au :date.', + 'between' => [ + 'array' => 'Le tableau doit contenir entre :min et :max éléments.', + 'file' => 'La taille du fichier doit être comprise entre :min et :max kilo-octets.', 'numeric' => 'La valeur doit être comprise entre :min et :max.', - 'string' => 'Le texte doit contenir entre :min et :max caractères.', + 'string' => 'Le texte doit contenir entre :min et :max caractères.', ], - 'boolean' => 'Ce champ doit être vrai ou faux.', - 'confirmed' => 'Le champ de confirmation ne correspond pas.', - 'date' => 'Ce n\'est pas une date valide.', - 'date_equals' => 'La date doit être égale à :date.', - 'date_format' => 'Ce champ ne correspond pas au format :format.', - 'different' => 'Cette valeur doit être différente de :other.', - 'digits' => 'Ce champ doit contenir :digits chiffres.', - 'digits_between' => 'Ce champ doit contenir entre :min et :max chiffres.', - 'dimensions' => 'La taille de l\'image n\'est pas conforme.', - 'distinct' => 'Ce champ a une valeur en double.', - 'email' => 'Ce champ doit être une adresse email valide.', - 'ends_with' => 'Ce champ doit se terminer par une des valeurs suivantes : :values', - 'exists' => 'Ce champ sélectionné est invalide.', - 'file' => 'Ce champ doit être un fichier.', - 'filled' => 'Ce champ doit avoir une valeur.', - 'gt' => [ - 'array' => 'Le tableau doit contenir plus de :value éléments.', - 'file' => 'La taille du fichier doit être supérieure à :value kilo-octets.', + 'boolean' => 'Ce champ doit être vrai ou faux.', + 'confirmed' => 'Le champ de confirmation ne correspond pas.', + 'date' => 'Ce n\'est pas une date valide.', + 'date_equals' => 'La date doit être égale à :date.', + 'date_format' => 'Ce champ ne correspond pas au format :format.', + 'different' => 'Cette valeur doit être différente de :other.', + 'digits' => 'Ce champ doit contenir :digits chiffres.', + 'digits_between' => 'Ce champ doit contenir entre :min et :max chiffres.', + 'dimensions' => 'La taille de l\'image n\'est pas conforme.', + 'distinct' => 'Ce champ a une valeur en double.', + 'email' => 'Ce champ doit être une adresse email valide.', + 'ends_with' => 'Ce champ doit se terminer par une des valeurs suivantes : :values', + 'exists' => 'Ce champ sélectionné est invalide.', + 'file' => 'Ce champ doit être un fichier.', + 'filled' => 'Ce champ doit avoir une valeur.', + 'gt' => [ + 'array' => 'Le tableau doit contenir plus de :value éléments.', + 'file' => 'La taille du fichier doit être supérieure à :value kilo-octets.', 'numeric' => 'La valeur doit être supérieure à :value.', - 'string' => 'Le texte doit contenir plus de :value caractères.', + 'string' => 'Le texte doit contenir plus de :value caractères.', ], - 'gte' => [ - 'array' => 'Le tableau doit contenir au moins :value éléments.', - 'file' => 'La taille du fichier doit être supérieure ou égale à :value kilo-octets.', + 'gte' => [ + 'array' => 'Le tableau doit contenir au moins :value éléments.', + 'file' => 'La taille du fichier doit être supérieure ou égale à :value kilo-octets.', 'numeric' => 'La valeur doit être supérieure ou égale à :value.', - 'string' => 'Le texte doit contenir au moins :value caractères.', + 'string' => 'Le texte doit contenir au moins :value caractères.', ], - 'image' => 'Ce champ doit être une image.', - 'in' => 'Ce champ est invalide.', - 'in_array' => 'Ce champ n\'existe pas dans :other.', - 'integer' => 'Ce champ doit être un entier.', - 'ip' => 'Ce champ doit être une adresse IP valide.', - 'ipv4' => 'Ce champ doit être une adresse IPv4 valide.', - 'ipv6' => 'Ce champ doit être une adresse IPv6 valide.', - 'json' => 'Ce champ doit être un document JSON valide.', - 'lt' => [ - 'array' => 'Le tableau doit contenir moins de :value éléments.', - 'file' => 'La taille du fichier doit être inférieure à :value kilo-octets.', + 'image' => 'Ce champ doit être une image.', + 'in' => 'Ce champ est invalide.', + 'in_array' => 'Ce champ n\'existe pas dans :other.', + 'integer' => 'Ce champ doit être un entier.', + 'ip' => 'Ce champ doit être une adresse IP valide.', + 'ipv4' => 'Ce champ doit être une adresse IPv4 valide.', + 'ipv6' => 'Ce champ doit être une adresse IPv6 valide.', + 'json' => 'Ce champ doit être un document JSON valide.', + 'lt' => [ + 'array' => 'Le tableau doit contenir moins de :value éléments.', + 'file' => 'La taille du fichier doit être inférieure à :value kilo-octets.', 'numeric' => 'La valeur doit être inférieure à :value.', - 'string' => 'Le texte doit contenir moins de :value caractères.', + 'string' => 'Le texte doit contenir moins de :value caractères.', ], - 'lte' => [ - 'array' => 'Le tableau doit contenir au plus :value éléments.', - 'file' => 'La taille du fichier doit être inférieure ou égale à :value kilo-octets.', + 'lte' => [ + 'array' => 'Le tableau doit contenir au plus :value éléments.', + 'file' => 'La taille du fichier doit être inférieure ou égale à :value kilo-octets.', 'numeric' => 'La valeur doit être inférieure ou égale à :value.', - 'string' => 'Le texte doit contenir au plus :value caractères.', + 'string' => 'Le texte doit contenir au plus :value caractères.', ], - 'max' => [ - 'array' => 'Le tableau ne peut contenir plus de :max éléments.', - 'file' => 'La taille du fichier ne peut pas dépasser :max kilo-octets.', + 'max' => [ + 'array' => 'Le tableau ne peut contenir plus de :max éléments.', + 'file' => 'La taille du fichier ne peut pas dépasser :max kilo-octets.', 'numeric' => 'La valeur ne peut être supérieure à :max.', - 'string' => 'Le texte ne peut contenir plus de :max caractères.', + 'string' => 'Le texte ne peut contenir plus de :max caractères.', ], - 'mimes' => 'Le fichier doit être de type : :values.', - 'mimetypes' => 'Le fichier doit être de type : :values.', - 'min' => [ - 'array' => 'Le tableau doit contenir au moins :min éléments.', - 'file' => 'La taille du fichier doit être supérieure à :min kilo-octets.', + 'mimes' => 'Le fichier doit être de type : :values.', + 'mimetypes' => 'Le fichier doit être de type : :values.', + 'min' => [ + 'array' => 'Le tableau doit contenir au moins :min éléments.', + 'file' => 'La taille du fichier doit être supérieure à :min kilo-octets.', 'numeric' => 'La valeur doit être supérieure ou égale à :min.', - 'string' => 'Le texte doit contenir au moins :min caractères.', + 'string' => 'Le texte doit contenir au moins :min caractères.', ], - 'multiple_of' => 'La valeur doit être un multiple de :value', - 'not_in' => 'Le champ sélectionné n\'est pas valide.', - 'not_regex' => 'Le format du champ n\'est pas valide.', - 'numeric' => 'Ce champ doit contenir un nombre.', - 'password' => 'Le mot de passe est incorrect', - 'present' => 'Ce champ doit être présent.', - 'prohibited' => 'Ce champ est interdit', - 'prohibited_if' => 'Ce champ est interdit quand :other a la valeur :value.', - 'prohibited_unless' => 'Ce champ est interdit à moins que :other ait l\'une des valeurs :values.', - 'regex' => 'Le format du champ est invalide.', - 'relatable' => 'Ce champ n\'est sans doute pas associé avec cette donnée.', - 'required' => 'Ce champ est obligatoire.', - 'required_if' => 'Ce champ est obligatoire quand la valeur de :other est :value.', - 'required_unless' => 'Ce champ est obligatoire sauf si :other est :values.', - 'required_with' => 'Ce champ est obligatoire quand :values est présent.', - 'required_with_all' => 'Ce champ est obligatoire quand :values sont présents.', - 'required_without' => 'Ce champ est obligatoire quand :values n\'est pas présent.', + 'multiple_of' => 'La valeur doit être un multiple de :value', + 'not_in' => 'Le champ sélectionné n\'est pas valide.', + 'not_regex' => 'Le format du champ n\'est pas valide.', + 'numeric' => 'Ce champ doit contenir un nombre.', + 'password' => 'Le mot de passe est incorrect', + 'present' => 'Ce champ doit être présent.', + 'prohibited' => 'Ce champ est interdit', + 'prohibited_if' => 'Ce champ est interdit quand :other a la valeur :value.', + 'prohibited_unless' => 'Ce champ est interdit à moins que :other ait l\'une des valeurs :values.', + 'regex' => 'Le format du champ est invalide.', + 'relatable' => 'Ce champ n\'est sans doute pas associé avec cette donnée.', + 'required' => 'Ce champ est obligatoire.', + 'required_if' => 'Ce champ est obligatoire quand la valeur de :other est :value.', + 'required_unless' => 'Ce champ est obligatoire sauf si :other est :values.', + 'required_with' => 'Ce champ est obligatoire quand :values est présent.', + 'required_with_all' => 'Ce champ est obligatoire quand :values sont présents.', + 'required_without' => 'Ce champ est obligatoire quand :values n\'est pas présent.', 'required_without_all' => 'Ce champ est requis quand aucun de :values n\'est présent.', - 'same' => 'Ce champ doit être identique à :other.', - 'size' => [ - 'array' => 'Le tableau doit contenir :size éléments.', - 'file' => 'La taille du fichier doit être de :size kilo-octets.', + 'same' => 'Ce champ doit être identique à :other.', + 'size' => [ + 'array' => 'Le tableau doit contenir :size éléments.', + 'file' => 'La taille du fichier doit être de :size kilo-octets.', 'numeric' => 'La valeur doit être :size.', - 'string' => 'Le texte doit contenir :size caractères.', + 'string' => 'Le texte doit contenir :size caractères.', ], - 'starts_with' => 'Ce champ doit commencer avec une des valeurs suivantes : :values', - 'string' => 'Ce champ doit être une chaîne de caractères.', - 'timezone' => 'Ce champ doit être un fuseau horaire valide.', - 'unique' => 'La valeur est déjà utilisée.', - 'uploaded' => 'Le fichier n\'a pu être téléversé.', - 'url' => 'Le format de l\'URL n\'est pas valide.', - 'uuid' => 'Ce champ doit être un UUID valide', - 'custom' => [ + 'starts_with' => 'Ce champ doit commencer avec une des valeurs suivantes : :values', + 'string' => 'Ce champ doit être une chaîne de caractères.', + 'timezone' => 'Ce champ doit être un fuseau horaire valide.', + 'unique' => 'La valeur est déjà utilisée.', + 'uploaded' => 'Le fichier n\'a pu être téléversé.', + 'url' => 'Le format de l\'URL n\'est pas valide.', + 'uuid' => 'Ce champ doit être un UUID valide', + 'custom' => [ 'attribute-name' => [ 'rule-name' => 'custom-message', ], ], - 'attributes' => [], + 'attributes' => [], ]; diff --git a/resources/lang/fr/validation.php b/resources/lang/fr/validation.php index 5940e43a..f8e1a566 100644 --- a/resources/lang/fr/validation.php +++ b/resources/lang/fr/validation.php @@ -12,151 +12,151 @@ */ return [ - 'accepted' => 'Le champ :attribute doit être accepté.', - 'active_url' => 'Le champ :attribute n\'est pas une URL valide.', - 'after' => 'Le champ :attribute doit être une date postérieure au :date.', - 'after_or_equal' => 'Le champ :attribute doit être une date postérieure ou égale au :date.', - 'alpha' => 'Le champ :attribute doit contenir uniquement des lettres.', - 'alpha_dash' => 'Le champ :attribute doit contenir uniquement des lettres, des chiffres et des tirets.', - 'alpha_num' => 'Le champ :attribute doit contenir uniquement des chiffres et des lettres.', - 'array' => 'Le champ :attribute doit être un tableau.', - 'attached' => ':attribute est déjà attaché(e).', - 'before' => 'Le champ :attribute doit être une date antérieure au :date.', - 'before_or_equal' => 'Le champ :attribute doit être une date antérieure ou égale au :date.', - 'between' => [ - 'array' => 'Le tableau :attribute doit contenir entre :min et :max éléments.', - 'file' => 'La taille du fichier de :attribute doit être comprise entre :min et :max kilo-octets.', + 'accepted' => 'Le champ :attribute doit être accepté.', + 'active_url' => 'Le champ :attribute n\'est pas une URL valide.', + 'after' => 'Le champ :attribute doit être une date postérieure au :date.', + 'after_or_equal' => 'Le champ :attribute doit être une date postérieure ou égale au :date.', + 'alpha' => 'Le champ :attribute doit contenir uniquement des lettres.', + 'alpha_dash' => 'Le champ :attribute doit contenir uniquement des lettres, des chiffres et des tirets.', + 'alpha_num' => 'Le champ :attribute doit contenir uniquement des chiffres et des lettres.', + 'array' => 'Le champ :attribute doit être un tableau.', + 'attached' => ':attribute est déjà attaché(e).', + 'before' => 'Le champ :attribute doit être une date antérieure au :date.', + 'before_or_equal' => 'Le champ :attribute doit être une date antérieure ou égale au :date.', + 'between' => [ + 'array' => 'Le tableau :attribute doit contenir entre :min et :max éléments.', + 'file' => 'La taille du fichier de :attribute doit être comprise entre :min et :max kilo-octets.', 'numeric' => 'La valeur de :attribute doit être comprise entre :min et :max.', - 'string' => 'Le texte :attribute doit contenir entre :min et :max caractères.', + 'string' => 'Le texte :attribute doit contenir entre :min et :max caractères.', ], - 'boolean' => 'Le champ :attribute doit être vrai ou faux.', - 'confirmed' => 'Le champ de confirmation :attribute ne correspond pas.', - 'date' => 'Le champ :attribute n\'est pas une date valide.', - 'date_equals' => 'Le champ :attribute doit être une date égale à :date.', - 'date_format' => 'Le champ :attribute ne correspond pas au format :format.', - 'different' => 'Les champs :attribute et :other doivent être différents.', - 'digits' => 'Le champ :attribute doit contenir :digits chiffres.', - 'digits_between' => 'Le champ :attribute doit contenir entre :min et :max chiffres.', - 'dimensions' => 'La taille de l\'image :attribute n\'est pas conforme.', - 'distinct' => 'Le champ :attribute a une valeur en double.', - 'email' => 'Le champ :attribute doit être une adresse email valide.', - 'ends_with' => 'Le champ :attribute doit se terminer par une des valeurs suivantes : :values', - 'exists' => 'Le champ :attribute sélectionné est invalide.', - 'file' => 'Le champ :attribute doit être un fichier.', - 'filled' => 'Le champ :attribute doit avoir une valeur.', - 'gt' => [ - 'array' => 'Le tableau :attribute doit contenir plus de :value éléments.', - 'file' => 'La taille du fichier de :attribute doit être supérieure à :value kilo-octets.', + 'boolean' => 'Le champ :attribute doit être vrai ou faux.', + 'confirmed' => 'Le champ de confirmation :attribute ne correspond pas.', + 'date' => 'Le champ :attribute n\'est pas une date valide.', + 'date_equals' => 'Le champ :attribute doit être une date égale à :date.', + 'date_format' => 'Le champ :attribute ne correspond pas au format :format.', + 'different' => 'Les champs :attribute et :other doivent être différents.', + 'digits' => 'Le champ :attribute doit contenir :digits chiffres.', + 'digits_between' => 'Le champ :attribute doit contenir entre :min et :max chiffres.', + 'dimensions' => 'La taille de l\'image :attribute n\'est pas conforme.', + 'distinct' => 'Le champ :attribute a une valeur en double.', + 'email' => 'Le champ :attribute doit être une adresse email valide.', + 'ends_with' => 'Le champ :attribute doit se terminer par une des valeurs suivantes : :values', + 'exists' => 'Le champ :attribute sélectionné est invalide.', + 'file' => 'Le champ :attribute doit être un fichier.', + 'filled' => 'Le champ :attribute doit avoir une valeur.', + 'gt' => [ + 'array' => 'Le tableau :attribute doit contenir plus de :value éléments.', + 'file' => 'La taille du fichier de :attribute doit être supérieure à :value kilo-octets.', 'numeric' => 'La valeur de :attribute doit être supérieure à :value.', - 'string' => 'Le texte :attribute doit contenir plus de :value caractères.', + 'string' => 'Le texte :attribute doit contenir plus de :value caractères.', ], - 'gte' => [ - 'array' => 'Le tableau :attribute doit contenir au moins :value éléments.', - 'file' => 'La taille du fichier de :attribute doit être supérieure ou égale à :value kilo-octets.', + 'gte' => [ + 'array' => 'Le tableau :attribute doit contenir au moins :value éléments.', + 'file' => 'La taille du fichier de :attribute doit être supérieure ou égale à :value kilo-octets.', 'numeric' => 'La valeur de :attribute doit être supérieure ou égale à :value.', - 'string' => 'Le texte :attribute doit contenir au moins :value caractères.', + 'string' => 'Le texte :attribute doit contenir au moins :value caractères.', ], - 'image' => 'Le champ :attribute doit être une image.', - 'in' => 'Le champ :attribute est invalide.', - 'in_array' => 'Le champ :attribute n\'existe pas dans :other.', - 'integer' => 'Le champ :attribute doit être un entier.', - 'ip' => 'Le champ :attribute doit être une adresse IP valide.', - 'ipv4' => 'Le champ :attribute doit être une adresse IPv4 valide.', - 'ipv6' => 'Le champ :attribute doit être une adresse IPv6 valide.', - 'json' => 'Le champ :attribute doit être un document JSON valide.', - 'lt' => [ - 'array' => 'Le tableau :attribute doit contenir moins de :value éléments.', - 'file' => 'La taille du fichier de :attribute doit être inférieure à :value kilo-octets.', + 'image' => 'Le champ :attribute doit être une image.', + 'in' => 'Le champ :attribute est invalide.', + 'in_array' => 'Le champ :attribute n\'existe pas dans :other.', + 'integer' => 'Le champ :attribute doit être un entier.', + 'ip' => 'Le champ :attribute doit être une adresse IP valide.', + 'ipv4' => 'Le champ :attribute doit être une adresse IPv4 valide.', + 'ipv6' => 'Le champ :attribute doit être une adresse IPv6 valide.', + 'json' => 'Le champ :attribute doit être un document JSON valide.', + 'lt' => [ + 'array' => 'Le tableau :attribute doit contenir moins de :value éléments.', + 'file' => 'La taille du fichier de :attribute doit être inférieure à :value kilo-octets.', 'numeric' => 'La valeur de :attribute doit être inférieure à :value.', - 'string' => 'Le texte :attribute doit contenir moins de :value caractères.', + 'string' => 'Le texte :attribute doit contenir moins de :value caractères.', ], - 'lte' => [ - 'array' => 'Le tableau :attribute doit contenir au plus :value éléments.', - 'file' => 'La taille du fichier de :attribute doit être inférieure ou égale à :value kilo-octets.', + 'lte' => [ + 'array' => 'Le tableau :attribute doit contenir au plus :value éléments.', + 'file' => 'La taille du fichier de :attribute doit être inférieure ou égale à :value kilo-octets.', 'numeric' => 'La valeur de :attribute doit être inférieure ou égale à :value.', - 'string' => 'Le texte :attribute doit contenir au plus :value caractères.', + 'string' => 'Le texte :attribute doit contenir au plus :value caractères.', ], - 'max' => [ - 'array' => 'Le tableau :attribute ne peut contenir plus de :max éléments.', - 'file' => 'La taille du fichier de :attribute ne peut pas dépasser :max kilo-octets.', + 'max' => [ + 'array' => 'Le tableau :attribute ne peut contenir plus de :max éléments.', + 'file' => 'La taille du fichier de :attribute ne peut pas dépasser :max kilo-octets.', 'numeric' => 'La valeur de :attribute ne peut être supérieure à :max.', - 'string' => 'Le texte de :attribute ne peut contenir plus de :max caractères.', + 'string' => 'Le texte de :attribute ne peut contenir plus de :max caractères.', ], - 'mimes' => 'Le champ :attribute doit être un fichier de type : :values.', - 'mimetypes' => 'Le champ :attribute doit être un fichier de type : :values.', - 'min' => [ - 'array' => 'Le tableau :attribute doit contenir au moins :min éléments.', - 'file' => 'La taille du fichier de :attribute doit être supérieure à :min kilo-octets.', + 'mimes' => 'Le champ :attribute doit être un fichier de type : :values.', + 'mimetypes' => 'Le champ :attribute doit être un fichier de type : :values.', + 'min' => [ + 'array' => 'Le tableau :attribute doit contenir au moins :min éléments.', + 'file' => 'La taille du fichier de :attribute doit être supérieure à :min kilo-octets.', 'numeric' => 'La valeur de :attribute doit être supérieure ou égale à :min.', - 'string' => 'Le texte :attribute doit contenir au moins :min caractères.', + 'string' => 'Le texte :attribute doit contenir au moins :min caractères.', ], - 'multiple_of' => 'La valeur de :attribute doit être un multiple de :value', - 'not_in' => 'Le champ :attribute sélectionné n\'est pas valide.', - 'not_regex' => 'Le format du champ :attribute n\'est pas valide.', - 'numeric' => 'Le champ :attribute doit contenir un nombre.', - 'password' => 'Le mot de passe est incorrect', - 'present' => 'Le champ :attribute doit être présent.', - 'prohibited' => 'Le champ :attribute est interdit.', - 'prohibited_if' => 'Le champ :attribute est interdit quand :other a la valeur :value.', - 'prohibited_unless' => 'Le champ :attribute est interdit à moins que :other est l\'une des valeurs :values.', - 'regex' => 'Le format du champ :attribute est invalide.', - 'relatable' => ':attribute n\'est sans doute pas associé(e) avec cette donnée.', - 'required' => 'Le champ :attribute est obligatoire.', - 'required_if' => 'Le champ :attribute est obligatoire quand la valeur de :other est :value.', - 'required_unless' => 'Le champ :attribute est obligatoire sauf si :other est :values.', - 'required_with' => 'Le champ :attribute est obligatoire quand :values est présent.', - 'required_with_all' => 'Le champ :attribute est obligatoire quand :values sont présents.', - 'required_without' => 'Le champ :attribute est obligatoire quand :values n\'est pas présent.', + 'multiple_of' => 'La valeur de :attribute doit être un multiple de :value', + 'not_in' => 'Le champ :attribute sélectionné n\'est pas valide.', + 'not_regex' => 'Le format du champ :attribute n\'est pas valide.', + 'numeric' => 'Le champ :attribute doit contenir un nombre.', + 'password' => 'Le mot de passe est incorrect', + 'present' => 'Le champ :attribute doit être présent.', + 'prohibited' => 'Le champ :attribute est interdit.', + 'prohibited_if' => 'Le champ :attribute est interdit quand :other a la valeur :value.', + 'prohibited_unless' => 'Le champ :attribute est interdit à moins que :other est l\'une des valeurs :values.', + 'regex' => 'Le format du champ :attribute est invalide.', + 'relatable' => ':attribute n\'est sans doute pas associé(e) avec cette donnée.', + 'required' => 'Le champ :attribute est obligatoire.', + 'required_if' => 'Le champ :attribute est obligatoire quand la valeur de :other est :value.', + 'required_unless' => 'Le champ :attribute est obligatoire sauf si :other est :values.', + 'required_with' => 'Le champ :attribute est obligatoire quand :values est présent.', + 'required_with_all' => 'Le champ :attribute est obligatoire quand :values sont présents.', + 'required_without' => 'Le champ :attribute est obligatoire quand :values n\'est pas présent.', 'required_without_all' => 'Le champ :attribute est requis quand aucun de :values n\'est présent.', - 'same' => 'Les champs :attribute et :other doivent être identiques.', - 'size' => [ - 'array' => 'Le tableau :attribute doit contenir :size éléments.', - 'file' => 'La taille du fichier de :attribute doit être de :size kilo-octets.', + 'same' => 'Les champs :attribute et :other doivent être identiques.', + 'size' => [ + 'array' => 'Le tableau :attribute doit contenir :size éléments.', + 'file' => 'La taille du fichier de :attribute doit être de :size kilo-octets.', 'numeric' => 'La valeur de :attribute doit être :size.', - 'string' => 'Le texte de :attribute doit contenir :size caractères.', + 'string' => 'Le texte de :attribute doit contenir :size caractères.', ], - 'starts_with' => 'Le champ :attribute doit commencer avec une des valeurs suivantes : :values', - 'string' => 'Le champ :attribute doit être une chaîne de caractères.', - 'timezone' => 'Le champ :attribute doit être un fuseau horaire valide.', - 'unique' => 'La valeur du champ :attribute est déjà utilisée.', - 'uploaded' => 'Le fichier du champ :attribute n\'a pu être téléversé.', - 'url' => 'Le format de l\'URL de :attribute n\'est pas valide.', - 'uuid' => 'Le champ :attribute doit être un UUID valide', - 'custom' => [ + 'starts_with' => 'Le champ :attribute doit commencer avec une des valeurs suivantes : :values', + 'string' => 'Le champ :attribute doit être une chaîne de caractères.', + 'timezone' => 'Le champ :attribute doit être un fuseau horaire valide.', + 'unique' => 'La valeur du champ :attribute est déjà utilisée.', + 'uploaded' => 'Le fichier du champ :attribute n\'a pu être téléversé.', + 'url' => 'Le format de l\'URL de :attribute n\'est pas valide.', + 'uuid' => 'Le champ :attribute doit être un UUID valide', + 'custom' => [ 'attribute-name' => [ 'rule-name' => 'custom-message', ], ], - 'attributes' => [ - 'address' => 'adresse', - 'age' => 'âge', - 'available' => 'disponible', - 'city' => 'ville', - 'content' => 'contenu', - 'country' => 'pays', - 'current_password' => 'mot de passe actuel', - 'date' => 'date', - 'day' => 'jour', - 'description' => 'description', - 'email' => 'adresse email', - 'excerpt' => 'extrait', - 'first_name' => 'prénom', - 'gender' => 'genre', - 'hour' => 'heure', - 'last_name' => 'nom', - 'minute' => 'minute', - 'mobile' => 'portable', - 'month' => 'mois', - 'name' => 'nom', - 'password' => 'mot de passe', + 'attributes' => [ + 'address' => 'adresse', + 'age' => 'âge', + 'available' => 'disponible', + 'city' => 'ville', + 'content' => 'contenu', + 'country' => 'pays', + 'current_password' => 'mot de passe actuel', + 'date' => 'date', + 'day' => 'jour', + 'description' => 'description', + 'email' => 'adresse email', + 'excerpt' => 'extrait', + 'first_name' => 'prénom', + 'gender' => 'genre', + 'hour' => 'heure', + 'last_name' => 'nom', + 'minute' => 'minute', + 'mobile' => 'portable', + 'month' => 'mois', + 'name' => 'nom', + 'password' => 'mot de passe', 'password_confirmation' => 'confirmation du mot de passe', - 'phone' => 'téléphone', - 'second' => 'seconde', - 'sex' => 'sexe', - 'size' => 'taille', - 'time' => 'heure', - 'title' => 'titre', - 'username' => 'nom d\'utilisateur', - 'year' => 'année', + 'phone' => 'téléphone', + 'second' => 'seconde', + 'sex' => 'sexe', + 'size' => 'taille', + 'time' => 'heure', + 'title' => 'titre', + 'username' => 'nom d\'utilisateur', + 'year' => 'année', ], ]; diff --git a/resources/lang/it/auth.php b/resources/lang/it/auth.php index ff58e131..897c35e3 100644 --- a/resources/lang/it/auth.php +++ b/resources/lang/it/auth.php @@ -12,7 +12,7 @@ */ return [ - 'failed' => 'Credenziali non valide.', + 'failed' => 'Credenziali non valide.', 'password' => 'La password non è valida.', 'throttle' => 'Troppi tentativi di accesso. Riprova tra :seconds secondi.', ]; diff --git a/resources/lang/it/pagination.php b/resources/lang/it/pagination.php index 371ac01a..4bc78592 100644 --- a/resources/lang/it/pagination.php +++ b/resources/lang/it/pagination.php @@ -12,6 +12,6 @@ */ return [ - 'next' => 'Successivo »', + 'next' => 'Successivo »', 'previous' => '« Precedente', ]; diff --git a/resources/lang/it/passwords.php b/resources/lang/it/passwords.php index 4aa5b412..5d03d8cb 100644 --- a/resources/lang/it/passwords.php +++ b/resources/lang/it/passwords.php @@ -12,9 +12,9 @@ */ return [ - 'reset' => 'La password è stata reimpostata!', - 'sent' => 'Ti abbiamo inviato una email con il link per il reset della password!', + 'reset' => 'La password è stata reimpostata!', + 'sent' => 'Ti abbiamo inviato una email con il link per il reset della password!', 'throttled' => 'Per favore, attendi prima di riprovare.', - 'token' => 'Questo token di reset della password non è valido.', - 'user' => 'Non riusciamo a trovare un utente con questo indirizzo email.', + 'token' => 'Questo token di reset della password non è valido.', + 'user' => 'Non riusciamo a trovare un utente con questo indirizzo email.', ]; diff --git a/resources/lang/it/validation-inline.php b/resources/lang/it/validation-inline.php index b506a0a9..1a4a8680 100644 --- a/resources/lang/it/validation-inline.php +++ b/resources/lang/it/validation-inline.php @@ -12,120 +12,120 @@ */ return [ - 'accepted' => 'Deve essere accettato.', - 'active_url' => 'Non è un URL valido.', - 'after' => 'Deve essere una data successiva al :date.', - 'after_or_equal' => 'Deve essere una data successiva o uguale al :date.', - 'alpha' => 'Può contenere solo lettere.', - 'alpha_dash' => 'Può contenere solo lettere, numeri e trattini.', - 'alpha_num' => 'Può contenere solo lettere e numeri.', - 'array' => 'Deve essere un array.', - 'attached' => 'Campo già associato.', - 'before' => 'Deve essere una data precedente al :date.', - 'before_or_equal' => 'Deve essere una data precedente o uguale al :date.', - 'between' => [ - 'array' => 'Deve contenere tra :min e :max elementi.', - 'file' => 'Deve essere compreso tra :min e :max kilobytes.', + 'accepted' => 'Deve essere accettato.', + 'active_url' => 'Non è un URL valido.', + 'after' => 'Deve essere una data successiva al :date.', + 'after_or_equal' => 'Deve essere una data successiva o uguale al :date.', + 'alpha' => 'Può contenere solo lettere.', + 'alpha_dash' => 'Può contenere solo lettere, numeri e trattini.', + 'alpha_num' => 'Può contenere solo lettere e numeri.', + 'array' => 'Deve essere un array.', + 'attached' => 'Campo già associato.', + 'before' => 'Deve essere una data precedente al :date.', + 'before_or_equal' => 'Deve essere una data precedente o uguale al :date.', + 'between' => [ + 'array' => 'Deve contenere tra :min e :max elementi.', + 'file' => 'Deve essere compreso tra :min e :max kilobytes.', 'numeric' => 'Deve essere compreso tra :min e :max.', - 'string' => 'Deve essere compreso tra :min e :max caratteri.', + 'string' => 'Deve essere compreso tra :min e :max caratteri.', ], - 'boolean' => 'Deve essere vero o falso.', - 'confirmed' => 'Il valore di conferma non corrisponde.', - 'date' => 'Non è una data valida.', - 'date_equals' => 'La data deve essere :date.', - 'date_format' => 'La data non è nel formato :format.', - 'different' => 'Deve essere diverso da :other.', - 'digits' => 'Deve essere di :digits cifre.', - 'digits_between' => 'Deve essere compreso tra :min e :max cifre.', - 'dimensions' => 'Immagine con dimensioni non valide.', - 'distinct' => 'Questo valore esiste già.', - 'email' => 'Deve essere un indirizzo email valido.', - 'ends_with' => 'Deve terminare con uno dei seguenti valori: :values.', - 'exists' => 'Il valore non è valido.', - 'file' => 'Deve essere un file.', - 'filled' => 'Deve contenere un valore.', - 'gt' => [ - 'array' => 'Deve contenere più di :value elementi.', - 'file' => 'Deve essere maggiore di :value kilobytes.', + 'boolean' => 'Deve essere vero o falso.', + 'confirmed' => 'Il valore di conferma non corrisponde.', + 'date' => 'Non è una data valida.', + 'date_equals' => 'La data deve essere :date.', + 'date_format' => 'La data non è nel formato :format.', + 'different' => 'Deve essere diverso da :other.', + 'digits' => 'Deve essere di :digits cifre.', + 'digits_between' => 'Deve essere compreso tra :min e :max cifre.', + 'dimensions' => 'Immagine con dimensioni non valide.', + 'distinct' => 'Questo valore esiste già.', + 'email' => 'Deve essere un indirizzo email valido.', + 'ends_with' => 'Deve terminare con uno dei seguenti valori: :values.', + 'exists' => 'Il valore non è valido.', + 'file' => 'Deve essere un file.', + 'filled' => 'Deve contenere un valore.', + 'gt' => [ + 'array' => 'Deve contenere più di :value elementi.', + 'file' => 'Deve essere maggiore di :value kilobytes.', 'numeric' => 'Deve essere maggiore di :value.', - 'string' => 'Deve contenere più di :value caratteri.', + 'string' => 'Deve contenere più di :value caratteri.', ], - 'gte' => [ - 'array' => 'Deve contenere almeno :value elementi.', - 'file' => 'Deve essere maggiore o uguale a :value kilobytes.', + 'gte' => [ + 'array' => 'Deve contenere almeno :value elementi.', + 'file' => 'Deve essere maggiore o uguale a :value kilobytes.', 'numeric' => 'Deve essere uguale o maggiore a :value.', - 'string' => 'Deve contenere almeno :value caratteri.', + 'string' => 'Deve contenere almeno :value caratteri.', ], - 'image' => 'Deve essere un\'immagine.', - 'in' => 'Valore non valido.', - 'in_array' => 'Non esiste in :other.', - 'integer' => 'Deve essere un numero intero.', - 'ip' => 'Deve essere un indirizzo IP valido.', - 'ipv4' => 'Deve essere un indirizzo IPv4 valido.', - 'ipv6' => 'Deve essere un indirizzo IPv6 valido.', - 'json' => 'Deve essere una stringa JSON valida.', - 'lt' => [ - 'array' => 'Deve contenere meno di :value elementi.', - 'file' => 'Deve essere inferiore a :value kilobytes.', + 'image' => 'Deve essere un\'immagine.', + 'in' => 'Valore non valido.', + 'in_array' => 'Non esiste in :other.', + 'integer' => 'Deve essere un numero intero.', + 'ip' => 'Deve essere un indirizzo IP valido.', + 'ipv4' => 'Deve essere un indirizzo IPv4 valido.', + 'ipv6' => 'Deve essere un indirizzo IPv6 valido.', + 'json' => 'Deve essere una stringa JSON valida.', + 'lt' => [ + 'array' => 'Deve contenere meno di :value elementi.', + 'file' => 'Deve essere inferiore a :value kilobytes.', 'numeric' => 'Deve essere inferiore a :value.', - 'string' => 'Deve contenere meno di :value caratteri.', + 'string' => 'Deve contenere meno di :value caratteri.', ], - 'lte' => [ - 'array' => 'Deve contenere massimo :value elementi.', - 'file' => 'Deve essere inferiore o uguale a :value kilobytes.', + 'lte' => [ + 'array' => 'Deve contenere massimo :value elementi.', + 'file' => 'Deve essere inferiore o uguale a :value kilobytes.', 'numeric' => 'Deve essere inferiore o uguale a :value.', - 'string' => 'Deve contenere massimo :value caratteri.', + 'string' => 'Deve contenere massimo :value caratteri.', ], - 'max' => [ - 'array' => 'Non può contenere più di :max elementi.', - 'file' => 'Non può essere superiore a :max kilobytes.', + 'max' => [ + 'array' => 'Non può contenere più di :max elementi.', + 'file' => 'Non può essere superiore a :max kilobytes.', 'numeric' => 'Non può essere superiore a :max.', - 'string' => 'Non può contenere più di :max caratteri.', + 'string' => 'Non può contenere più di :max caratteri.', ], - 'mimes' => 'Deve essere del tipo: :values.', - 'mimetypes' => 'Deve essere del tipo: :values.', - 'min' => [ - 'array' => 'Deve contenere minimo :min elementi.', - 'file' => 'Deve essere minimo :min kilobytes.', + 'mimes' => 'Deve essere del tipo: :values.', + 'mimetypes' => 'Deve essere del tipo: :values.', + 'min' => [ + 'array' => 'Deve contenere minimo :min elementi.', + 'file' => 'Deve essere minimo :min kilobytes.', 'numeric' => 'Deve essere minimo :min.', - 'string' => 'Deve contenere minimo :min caratteri.', + 'string' => 'Deve contenere minimo :min caratteri.', ], - 'multiple_of' => 'Deve essere un multiplo di :value', - 'not_in' => 'Valore non valido.', - 'not_regex' => 'Formato non valido.', - 'numeric' => 'Deve essere un numero.', - 'password' => 'Password errata.', - 'present' => 'Devi specificare un valore.', - 'prohibited' => 'Non consentito.', - 'prohibited_if' => 'Non consentito quando :other è :value.', - 'prohibited_unless' => 'Non consentito a meno che :other sia contenuto in :values.', - 'regex' => 'Formato non valido.', - 'relatable' => 'Non puoi associarlo a questa risorsa.', - 'required' => 'Obbligatorio.', - 'required_if' => 'Obbligatorio quando :other è :value.', - 'required_unless' => 'Obbligatorio a meno che :other sia :values.', - 'required_with' => 'Obbligatorio quando :values è presente.', - 'required_with_all' => 'Obbligatorio quando :values sono presenti.', - 'required_without' => 'Obbligatorio quando :values non è presente.', + 'multiple_of' => 'Deve essere un multiplo di :value', + 'not_in' => 'Valore non valido.', + 'not_regex' => 'Formato non valido.', + 'numeric' => 'Deve essere un numero.', + 'password' => 'Password errata.', + 'present' => 'Devi specificare un valore.', + 'prohibited' => 'Non consentito.', + 'prohibited_if' => 'Non consentito quando :other è :value.', + 'prohibited_unless' => 'Non consentito a meno che :other sia contenuto in :values.', + 'regex' => 'Formato non valido.', + 'relatable' => 'Non puoi associarlo a questa risorsa.', + 'required' => 'Obbligatorio.', + 'required_if' => 'Obbligatorio quando :other è :value.', + 'required_unless' => 'Obbligatorio a meno che :other sia :values.', + 'required_with' => 'Obbligatorio quando :values è presente.', + 'required_with_all' => 'Obbligatorio quando :values sono presenti.', + 'required_without' => 'Obbligatorio quando :values non è presente.', 'required_without_all' => 'Obbligatorio quando nessuno di :values è presente.', - 'same' => 'Deve coincidere con :other.', - 'size' => [ - 'array' => 'Deve contenere :size elementi.', - 'file' => 'Deve essere :size kilobytes.', + 'same' => 'Deve coincidere con :other.', + 'size' => [ + 'array' => 'Deve contenere :size elementi.', + 'file' => 'Deve essere :size kilobytes.', 'numeric' => 'Deve essere :size.', - 'string' => 'Deve essere :size caratteri.', + 'string' => 'Deve essere :size caratteri.', ], - 'starts_with' => 'Deve iniziare con uno dei seguenti: :values.', - 'string' => 'Deve essere una stringa.', - 'timezone' => 'Deve essere una zona valida.', - 'unique' => 'E\' già in uso.', - 'uploaded' => 'Deve essere caricato.', - 'url' => 'Formato non valido.', - 'uuid' => 'Deve essere un UUID valido.', - 'custom' => [ + 'starts_with' => 'Deve iniziare con uno dei seguenti: :values.', + 'string' => 'Deve essere una stringa.', + 'timezone' => 'Deve essere una zona valida.', + 'unique' => 'E\' già in uso.', + 'uploaded' => 'Deve essere caricato.', + 'url' => 'Formato non valido.', + 'uuid' => 'Deve essere un UUID valido.', + 'custom' => [ 'attribute-name' => [ 'rule-name' => 'custom-message', ], ], - 'attributes' => [], + 'attributes' => [], ]; diff --git a/resources/lang/it/validation.php b/resources/lang/it/validation.php index e14d02a0..c9382ace 100644 --- a/resources/lang/it/validation.php +++ b/resources/lang/it/validation.php @@ -12,148 +12,148 @@ */ return [ - 'accepted' => ':attribute deve essere accettato.', - 'active_url' => ':attribute non è un URL valido.', - 'after' => ':attribute deve essere una data successiva al :date.', - 'after_or_equal' => ':attribute deve essere una data successiva o uguale al :date.', - 'alpha' => ':attribute può contenere solo lettere.', - 'alpha_dash' => ':attribute può contenere solo lettere, numeri e trattini.', - 'alpha_num' => ':attribute può contenere solo lettere e numeri.', - 'array' => ':attribute deve essere un array.', - 'attached' => ':attribute è già associato.', - 'before' => ':attribute deve essere una data precedente al :date.', - 'before_or_equal' => ':attribute deve essere una data precedente o uguale al :date.', - 'between' => [ - 'array' => ':attribute deve avere tra :min - :max elementi.', - 'file' => ':attribute deve trovarsi tra :min - :max kilobyte.', + 'accepted' => ':attribute deve essere accettato.', + 'active_url' => ':attribute non è un URL valido.', + 'after' => ':attribute deve essere una data successiva al :date.', + 'after_or_equal' => ':attribute deve essere una data successiva o uguale al :date.', + 'alpha' => ':attribute può contenere solo lettere.', + 'alpha_dash' => ':attribute può contenere solo lettere, numeri e trattini.', + 'alpha_num' => ':attribute può contenere solo lettere e numeri.', + 'array' => ':attribute deve essere un array.', + 'attached' => ':attribute è già associato.', + 'before' => ':attribute deve essere una data precedente al :date.', + 'before_or_equal' => ':attribute deve essere una data precedente o uguale al :date.', + 'between' => [ + 'array' => ':attribute deve avere tra :min - :max elementi.', + 'file' => ':attribute deve trovarsi tra :min - :max kilobyte.', 'numeric' => ':attribute deve trovarsi tra :min - :max.', - 'string' => ':attribute deve trovarsi tra :min - :max caratteri.', + 'string' => ':attribute deve trovarsi tra :min - :max caratteri.', ], - 'boolean' => 'Il campo :attribute deve essere vero o falso.', - 'confirmed' => 'Il campo di conferma per :attribute non coincide.', - 'date' => ':attribute non è una data valida.', - 'date_equals' => ':attribute deve essere una data e uguale a :date.', - 'date_format' => ':attribute non coincide con il formato :format.', - 'different' => ':attribute e :other devono essere differenti.', - 'digits' => ':attribute deve essere di :digits cifre.', - 'digits_between' => ':attribute deve essere tra :min e :max cifre.', - 'dimensions' => 'Le dimensioni dell\'immagine di :attribute non sono valide.', - 'distinct' => ':attribute contiene un valore duplicato.', - 'email' => ':attribute non è valido.', - 'ends_with' => ':attribute deve finire con uno dei seguenti valori: :values', - 'exists' => ':attribute selezionato non è valido.', - 'file' => ':attribute deve essere un file.', - 'filled' => 'Il campo :attribute deve contenere un valore.', - 'gt' => [ - 'array' => ':attribute deve contenere più di :value elementi.', - 'file' => ':attribute deve essere maggiore di :value kilobyte.', + 'boolean' => 'Il campo :attribute deve essere vero o falso.', + 'confirmed' => 'Il campo di conferma per :attribute non coincide.', + 'date' => ':attribute non è una data valida.', + 'date_equals' => ':attribute deve essere una data e uguale a :date.', + 'date_format' => ':attribute non coincide con il formato :format.', + 'different' => ':attribute e :other devono essere differenti.', + 'digits' => ':attribute deve essere di :digits cifre.', + 'digits_between' => ':attribute deve essere tra :min e :max cifre.', + 'dimensions' => 'Le dimensioni dell\'immagine di :attribute non sono valide.', + 'distinct' => ':attribute contiene un valore duplicato.', + 'email' => ':attribute non è valido.', + 'ends_with' => ':attribute deve finire con uno dei seguenti valori: :values', + 'exists' => ':attribute selezionato non è valido.', + 'file' => ':attribute deve essere un file.', + 'filled' => 'Il campo :attribute deve contenere un valore.', + 'gt' => [ + 'array' => ':attribute deve contenere più di :value elementi.', + 'file' => ':attribute deve essere maggiore di :value kilobyte.', 'numeric' => ':attribute deve essere maggiore di :value.', - 'string' => ':attribute deve contenere più di :value caratteri.', + 'string' => ':attribute deve contenere più di :value caratteri.', ], - 'gte' => [ - 'array' => ':attribute deve contenere un numero di elementi uguale o maggiore di :value.', - 'file' => ':attribute deve essere uguale o maggiore di :value kilobyte.', + 'gte' => [ + 'array' => ':attribute deve contenere un numero di elementi uguale o maggiore di :value.', + 'file' => ':attribute deve essere uguale o maggiore di :value kilobyte.', 'numeric' => ':attribute deve essere uguale o maggiore di :value.', - 'string' => ':attribute deve contenere un numero di caratteri uguale o maggiore di :value.', + 'string' => ':attribute deve contenere un numero di caratteri uguale o maggiore di :value.', ], - 'image' => ':attribute deve essere un\'immagine.', - 'in' => ':attribute selezionato non è valido.', - 'in_array' => 'Il valore del campo :attribute non esiste in :other.', - 'integer' => ':attribute deve essere un numero intero.', - 'ip' => ':attribute deve essere un indirizzo IP valido.', - 'ipv4' => ':attribute deve essere un indirizzo IPv4 valido.', - 'ipv6' => ':attribute deve essere un indirizzo IPv6 valido.', - 'json' => ':attribute deve essere una stringa JSON valida.', - 'lt' => [ - 'array' => ':attribute deve contenere meno di :value elementi.', - 'file' => ':attribute deve essere minore di :value kilobyte.', + 'image' => ':attribute deve essere un\'immagine.', + 'in' => ':attribute selezionato non è valido.', + 'in_array' => 'Il valore del campo :attribute non esiste in :other.', + 'integer' => ':attribute deve essere un numero intero.', + 'ip' => ':attribute deve essere un indirizzo IP valido.', + 'ipv4' => ':attribute deve essere un indirizzo IPv4 valido.', + 'ipv6' => ':attribute deve essere un indirizzo IPv6 valido.', + 'json' => ':attribute deve essere una stringa JSON valida.', + 'lt' => [ + 'array' => ':attribute deve contenere meno di :value elementi.', + 'file' => ':attribute deve essere minore di :value kilobyte.', 'numeric' => ':attribute deve essere minore di :value.', - 'string' => ':attribute deve contenere meno di :value caratteri.', + 'string' => ':attribute deve contenere meno di :value caratteri.', ], - 'lte' => [ - 'array' => ':attribute deve contenere un numero di elementi minore o uguale a :value.', - 'file' => ':attribute deve essere minore o uguale a :value kilobyte.', + 'lte' => [ + 'array' => ':attribute deve contenere un numero di elementi minore o uguale a :value.', + 'file' => ':attribute deve essere minore o uguale a :value kilobyte.', 'numeric' => ':attribute deve essere minore o uguale a :value.', - 'string' => ':attribute deve contenere un numero di caratteri minore o uguale a :value.', + 'string' => ':attribute deve contenere un numero di caratteri minore o uguale a :value.', ], - 'max' => [ - 'array' => ':attribute non può avere più di :max elementi.', - 'file' => ':attribute non può essere superiore a :max kilobyte.', + 'max' => [ + 'array' => ':attribute non può avere più di :max elementi.', + 'file' => ':attribute non può essere superiore a :max kilobyte.', 'numeric' => ':attribute non può essere superiore a :max.', - 'string' => ':attribute non può contenere più di :max caratteri.', + 'string' => ':attribute non può contenere più di :max caratteri.', ], - 'mimes' => ':attribute deve essere del tipo: :values.', - 'mimetypes' => ':attribute deve essere del tipo: :values.', - 'min' => [ - 'array' => ':attribute deve avere almeno :min elementi.', - 'file' => ':attribute deve essere almeno di :min kilobyte.', + 'mimes' => ':attribute deve essere del tipo: :values.', + 'mimetypes' => ':attribute deve essere del tipo: :values.', + 'min' => [ + 'array' => ':attribute deve avere almeno :min elementi.', + 'file' => ':attribute deve essere almeno di :min kilobyte.', 'numeric' => ':attribute deve essere almeno :min.', - 'string' => ':attribute deve contenere almeno :min caratteri.', + 'string' => ':attribute deve contenere almeno :min caratteri.', ], - 'multiple_of' => ':attribute deve essere un multiplo di :value', - 'not_in' => 'Il valore selezionato per :attribute non è valido.', - 'not_regex' => 'Il formato di :attribute non è valido.', - 'numeric' => ':attribute deve essere un numero.', - 'password' => 'Il campo :attribute non è corretto.', - 'present' => 'Il campo :attribute deve essere presente.', - 'prohibited' => ':attribute non consentito.', - 'prohibited_if' => ':attribute non consentito quando :other è :value.', - 'prohibited_unless' => ':attribute non consentito a meno che :other sia contenuto in :values.', - 'regex' => 'Il formato del campo :attribute non è valido.', - 'relatable' => ':attribute non può essere associato a questa risorsa.', - 'required' => 'Il campo :attribute è richiesto.', - 'required_if' => 'Il campo :attribute è richiesto quando :other è :value.', - 'required_unless' => 'Il campo :attribute è richiesto a meno che :other sia in :values.', - 'required_with' => 'Il campo :attribute è richiesto quando :values è presente.', - 'required_with_all' => 'Il campo :attribute è richiesto quando :values sono presenti.', - 'required_without' => 'Il campo :attribute è richiesto quando :values non è presente.', + 'multiple_of' => ':attribute deve essere un multiplo di :value', + 'not_in' => 'Il valore selezionato per :attribute non è valido.', + 'not_regex' => 'Il formato di :attribute non è valido.', + 'numeric' => ':attribute deve essere un numero.', + 'password' => 'Il campo :attribute non è corretto.', + 'present' => 'Il campo :attribute deve essere presente.', + 'prohibited' => ':attribute non consentito.', + 'prohibited_if' => ':attribute non consentito quando :other è :value.', + 'prohibited_unless' => ':attribute non consentito a meno che :other sia contenuto in :values.', + 'regex' => 'Il formato del campo :attribute non è valido.', + 'relatable' => ':attribute non può essere associato a questa risorsa.', + 'required' => 'Il campo :attribute è richiesto.', + 'required_if' => 'Il campo :attribute è richiesto quando :other è :value.', + 'required_unless' => 'Il campo :attribute è richiesto a meno che :other sia in :values.', + 'required_with' => 'Il campo :attribute è richiesto quando :values è presente.', + 'required_with_all' => 'Il campo :attribute è richiesto quando :values sono presenti.', + 'required_without' => 'Il campo :attribute è richiesto quando :values non è presente.', 'required_without_all' => 'Il campo :attribute è richiesto quando nessuno di :values è presente.', - 'same' => ':attribute e :other devono coincidere.', - 'size' => [ - 'array' => ':attribute deve contenere :size elementi.', - 'file' => ':attribute deve essere :size kilobyte.', + 'same' => ':attribute e :other devono coincidere.', + 'size' => [ + 'array' => ':attribute deve contenere :size elementi.', + 'file' => ':attribute deve essere :size kilobyte.', 'numeric' => ':attribute deve essere :size.', - 'string' => ':attribute deve contenere :size caratteri.', + 'string' => ':attribute deve contenere :size caratteri.', ], - 'starts_with' => ':attribute deve iniziare con uno dei seguenti: :values', - 'string' => ':attribute deve essere una stringa.', - 'timezone' => ':attribute deve essere una zona valida.', - 'unique' => ':attribute è stato già utilizzato.', - 'uploaded' => ':attribute non è stato caricato.', - 'url' => 'Il formato del campo :attribute non è valido.', - 'uuid' => ':attribute deve essere un UUID valido.', - 'custom' => [ + 'starts_with' => ':attribute deve iniziare con uno dei seguenti: :values', + 'string' => ':attribute deve essere una stringa.', + 'timezone' => ':attribute deve essere una zona valida.', + 'unique' => ':attribute è stato già utilizzato.', + 'uploaded' => ':attribute non è stato caricato.', + 'url' => 'Il formato del campo :attribute non è valido.', + 'uuid' => ':attribute deve essere un UUID valido.', + 'custom' => [ 'attribute-name' => [ 'rule-name' => 'custom-message', ], ], - 'attributes' => [ - 'address' => 'indirizzo', - 'age' => 'età', - 'available' => 'disponibile', - 'city' => 'città', - 'content' => 'contenuto', - 'country' => 'paese', - 'date' => 'data', - 'day' => 'giorno', - 'description' => 'descrizione', - 'excerpt' => 'estratto', - 'first_name' => 'nome', - 'gender' => 'genere', - 'hour' => 'ora', - 'last_name' => 'cognome', - 'minute' => 'minuto', - 'mobile' => 'cellulare', - 'month' => 'mese', - 'name' => 'nome', + 'attributes' => [ + 'address' => 'indirizzo', + 'age' => 'età', + 'available' => 'disponibile', + 'city' => 'città', + 'content' => 'contenuto', + 'country' => 'paese', + 'date' => 'data', + 'day' => 'giorno', + 'description' => 'descrizione', + 'excerpt' => 'estratto', + 'first_name' => 'nome', + 'gender' => 'genere', + 'hour' => 'ora', + 'last_name' => 'cognome', + 'minute' => 'minuto', + 'mobile' => 'cellulare', + 'month' => 'mese', + 'name' => 'nome', 'password_confirmation' => 'conferma password', - 'phone' => 'telefono', - 'second' => 'secondo', - 'sex' => 'sesso', - 'size' => 'dimensione', - 'time' => 'ora', - 'title' => 'titolo', - 'username' => 'nome utente', - 'year' => 'anno', + 'phone' => 'telefono', + 'second' => 'secondo', + 'sex' => 'sesso', + 'size' => 'dimensione', + 'time' => 'ora', + 'title' => 'titolo', + 'username' => 'nome utente', + 'year' => 'anno', ], ]; diff --git a/resources/lang/tr/auth.php b/resources/lang/tr/auth.php index 281cf0aa..7f217947 100644 --- a/resources/lang/tr/auth.php +++ b/resources/lang/tr/auth.php @@ -12,7 +12,7 @@ */ return [ - 'failed' => 'Bu kimlik bilgileri kayıtlarımızla eşleşmiyor.', + 'failed' => 'Bu kimlik bilgileri kayıtlarımızla eşleşmiyor.', 'password' => 'The provided password is incorrect.', 'throttle' => 'Çok fazla giriş denemesi. :seconds saniye sonra lütfen tekrar deneyin.', ]; diff --git a/resources/lang/tr/pagination.php b/resources/lang/tr/pagination.php index 2094f27c..fee16d76 100644 --- a/resources/lang/tr/pagination.php +++ b/resources/lang/tr/pagination.php @@ -12,6 +12,6 @@ */ return [ - 'next' => 'Sonrakiler »', + 'next' => 'Sonrakiler »', 'previous' => '« Öncekiler', ]; diff --git a/resources/lang/tr/passwords.php b/resources/lang/tr/passwords.php index f123b453..778127ac 100644 --- a/resources/lang/tr/passwords.php +++ b/resources/lang/tr/passwords.php @@ -12,9 +12,9 @@ */ return [ - 'reset' => 'Parolanız sıfırlandı!', - 'sent' => 'Parola sıfırlama bağlantınız e-posta ile gönderildi!', + 'reset' => 'Parolanız sıfırlandı!', + 'sent' => 'Parola sıfırlama bağlantınız e-posta ile gönderildi!', 'throttled' => 'Tekrar denemeden önce lütfen bekleyin.', - 'token' => 'Parola sıfırlama kodu geçersiz.', - 'user' => 'Bu e-posta adresi ile kayıtlı bir üye bulunamadı.', + 'token' => 'Parola sıfırlama kodu geçersiz.', + 'user' => 'Bu e-posta adresi ile kayıtlı bir üye bulunamadı.', ]; diff --git a/resources/lang/tr/validation-inline.php b/resources/lang/tr/validation-inline.php index 525a29f4..35554d02 100644 --- a/resources/lang/tr/validation-inline.php +++ b/resources/lang/tr/validation-inline.php @@ -12,120 +12,120 @@ */ return [ - 'accepted' => 'Bu alan kabul edilmelidir.', - 'active_url' => 'URL geçerli değil.', - 'after' => 'Bu :date\'den sonraki bir tarih olmalı.', - 'after_or_equal' => 'Bu, :date\'den sonra veya ona eşit bir tarih olmalıdır.', - 'alpha' => 'Bu alan yalnızca harf içerebilir.', - 'alpha_dash' => 'Bu alan yalnızca harfler, sayılar, kısa çizgiler ve alt çizgiler içerebilir.', - 'alpha_num' => 'Bu alan yalnızca harfler ve sayılar içerebilir.', - 'array' => 'Bu alan bir dizi olmalı.', - 'attached' => 'Bu alan zaten tanımlı.', - 'before' => 'Bu :date\'den önceki bir tarih olmalı.', - 'before_or_equal' => 'Bu, :date\'ten önce veya ona eşit bir tarih olmalıdır.', - 'between' => [ - 'array' => 'Bu içerik :min ve :max arasında olmalıdır.', - 'file' => 'Bu dosya :min ve :max kilobayt arasında olmalıdır.', + 'accepted' => 'Bu alan kabul edilmelidir.', + 'active_url' => 'URL geçerli değil.', + 'after' => 'Bu :date\'den sonraki bir tarih olmalı.', + 'after_or_equal' => 'Bu, :date\'den sonra veya ona eşit bir tarih olmalıdır.', + 'alpha' => 'Bu alan yalnızca harf içerebilir.', + 'alpha_dash' => 'Bu alan yalnızca harfler, sayılar, kısa çizgiler ve alt çizgiler içerebilir.', + 'alpha_num' => 'Bu alan yalnızca harfler ve sayılar içerebilir.', + 'array' => 'Bu alan bir dizi olmalı.', + 'attached' => 'Bu alan zaten tanımlı.', + 'before' => 'Bu :date\'den önceki bir tarih olmalı.', + 'before_or_equal' => 'Bu, :date\'ten önce veya ona eşit bir tarih olmalıdır.', + 'between' => [ + 'array' => 'Bu içerik :min ve :max arasında olmalıdır.', + 'file' => 'Bu dosya :min ve :max kilobayt arasında olmalıdır.', 'numeric' => 'Bu değer :min ve :max arasında olmalıdır.', - 'string' => 'Bu metin :min ve :max karakter aralığında olmalıdır.', + 'string' => 'Bu metin :min ve :max karakter aralığında olmalıdır.', ], - 'boolean' => 'Bu alan doğru veya yanlış olmalıdır.', - 'confirmed' => 'Onay eşleşmiyor.', - 'date' => 'Bu geçerli bir tarih değil.', - 'date_equals' => 'Bu, :date\'a eşit bir tarih olmalıdır.', - 'date_format' => 'Bu biçim :format eşleşmiyor.', - 'different' => 'Bu değer :other\'dan farklı olmalıdır.', - 'digits' => 'Bu :digits basamak olmalıdır.', - 'digits_between' => 'Bu :min ve :max basamak arasında olmalıdır.', - 'dimensions' => 'Resim boyutları geçersiz.', - 'distinct' => 'Bu alanın yinelenen bir değeri vardır.', - 'email' => 'E-posta adresi geçerli değil.', - 'ends_with' => 'Bu şunlardan biriyle bitmelidir: :values.', - 'exists' => 'Seçili değer geçersiz.', - 'file' => 'İçerik bir dosya olmalı.', - 'filled' => 'Bu alanın bir değeri olmalıdır.', - 'gt' => [ - 'array' => 'Bu içerikte :value\'den fazla öge bulunmalıdır.', - 'file' => 'Dosya boyutu :value kilobayt\'tan büyük olmalıdır.', + 'boolean' => 'Bu alan doğru veya yanlış olmalıdır.', + 'confirmed' => 'Onay eşleşmiyor.', + 'date' => 'Bu geçerli bir tarih değil.', + 'date_equals' => 'Bu, :date\'a eşit bir tarih olmalıdır.', + 'date_format' => 'Bu biçim :format eşleşmiyor.', + 'different' => 'Bu değer :other\'dan farklı olmalıdır.', + 'digits' => 'Bu :digits basamak olmalıdır.', + 'digits_between' => 'Bu :min ve :max basamak arasında olmalıdır.', + 'dimensions' => 'Resim boyutları geçersiz.', + 'distinct' => 'Bu alanın yinelenen bir değeri vardır.', + 'email' => 'E-posta adresi geçerli değil.', + 'ends_with' => 'Bu şunlardan biriyle bitmelidir: :values.', + 'exists' => 'Seçili değer geçersiz.', + 'file' => 'İçerik bir dosya olmalı.', + 'filled' => 'Bu alanın bir değeri olmalıdır.', + 'gt' => [ + 'array' => 'Bu içerikte :value\'den fazla öge bulunmalıdır.', + 'file' => 'Dosya boyutu :value kilobayt\'tan büyük olmalıdır.', 'numeric' => 'Bu değer :value\'ten büyük olmalıdır.', - 'string' => 'Bu metin :value karakterden uzun olmalıdır.', + 'string' => 'Bu metin :value karakterden uzun olmalıdır.', ], - 'gte' => [ - 'array' => 'Bu içerik :value veya daha fazla ögeye sahip olmalıdır.', - 'file' => 'Dosya boyutu :value kilobayt\'a eşit ya da daha büyük olmalıdır.', + 'gte' => [ + 'array' => 'Bu içerik :value veya daha fazla ögeye sahip olmalıdır.', + 'file' => 'Dosya boyutu :value kilobayt\'a eşit ya da daha büyük olmalıdır.', 'numeric' => 'Bu sayı :value sayısına eşit veya daha büyük olmalıdır.', - 'string' => 'Bu metin :value veya daha uzun karakter olmalıdır.', + 'string' => 'Bu metin :value veya daha uzun karakter olmalıdır.', ], - 'image' => 'Bu bir resim olmalıdır.', - 'in' => 'Seçili değer geçersiz.', - 'in_array' => 'Bu değer :other ögelerinin arasında yok.', - 'integer' => 'Bu bir tam sayı olmalıdır.', - 'ip' => 'Bu geçerli bir IP adresi olmalıdır.', - 'ipv4' => 'Bu geçerli bir IPv4 adresi olmalıdır.', - 'ipv6' => 'Bu geçerli bir IPv6 adresi olmalıdır.', - 'json' => 'Bu geçerli bir json dizesi olmalıdır.', - 'lt' => [ - 'array' => 'Bu içerikte en fazla :value öge olabilir.', - 'file' => 'Bu dosya :value kilobayt\'tan büyük olamaz.', + 'image' => 'Bu bir resim olmalıdır.', + 'in' => 'Seçili değer geçersiz.', + 'in_array' => 'Bu değer :other ögelerinin arasında yok.', + 'integer' => 'Bu bir tam sayı olmalıdır.', + 'ip' => 'Bu geçerli bir IP adresi olmalıdır.', + 'ipv4' => 'Bu geçerli bir IPv4 adresi olmalıdır.', + 'ipv6' => 'Bu geçerli bir IPv6 adresi olmalıdır.', + 'json' => 'Bu geçerli bir json dizesi olmalıdır.', + 'lt' => [ + 'array' => 'Bu içerikte en fazla :value öge olabilir.', + 'file' => 'Bu dosya :value kilobayt\'tan büyük olamaz.', 'numeric' => 'Bu sayı en fazla :value olmalıdır.', - 'string' => 'Bu metin :value karakterden kısa olmalıdır.', + 'string' => 'Bu metin :value karakterden kısa olmalıdır.', ], - 'lte' => [ - 'array' => 'Bu içerik :value\'den fazla öge içermemelidir.', - 'file' => 'Bu dosya :value kilobayt\'a eşit veya daha küçük olmalıdır.', + 'lte' => [ + 'array' => 'Bu içerik :value\'den fazla öge içermemelidir.', + 'file' => 'Bu dosya :value kilobayt\'a eşit veya daha küçük olmalıdır.', 'numeric' => 'Bu sayı :value sayısına eşit veya daha küçük olmalıdır.', - 'string' => 'Bu metin :value veya daha kısa karaktere olmalıdır.', + 'string' => 'Bu metin :value veya daha kısa karaktere olmalıdır.', ], - 'max' => [ - 'array' => 'Bu içerik en fazla :max öge içerebilir.', - 'file' => 'Dosya boyutu :max kilobayt\'tan büyük olamaz.', + 'max' => [ + 'array' => 'Bu içerik en fazla :max öge içerebilir.', + 'file' => 'Dosya boyutu :max kilobayt\'tan büyük olamaz.', 'numeric' => 'Bu sayı :max sayısından büyük olamaz.', - 'string' => 'Bu metin :max karakterden uzun olamaz.', + 'string' => 'Bu metin :max karakterden uzun olamaz.', ], - 'mimes' => 'Bu tür bir dosya olmalıdır: :values.', - 'mimetypes' => 'Bu tür bir dosya olmalıdır: :values.', - 'min' => [ - 'array' => 'Bu içerikte en az :min öge olmalıdır.', - 'file' => 'Bu dosya minimum :min kilobayt olmalıdır.', + 'mimes' => 'Bu tür bir dosya olmalıdır: :values.', + 'mimetypes' => 'Bu tür bir dosya olmalıdır: :values.', + 'min' => [ + 'array' => 'Bu içerikte en az :min öge olmalıdır.', + 'file' => 'Bu dosya minimum :min kilobayt olmalıdır.', 'numeric' => 'Bu sayı minimum :min olmalıdır.', - 'string' => 'Bu metin minimum :min karaktere sahip olmalıdır.', + 'string' => 'Bu metin minimum :min karaktere sahip olmalıdır.', ], - 'multiple_of' => 'Değer :value\'nin katları olmalıdır', - 'not_in' => 'Seçili değer geçersiz.', - 'not_regex' => 'Bu biçim geçersiz.', - 'numeric' => 'Bu bir sayı olmalı.', - 'password' => 'Parola yanlış.', - 'present' => 'Bu alan mevcut olmalıdır.', - 'prohibited' => 'Bu alan kısıtlanmıştır.', - 'prohibited_if' => ':other alanının değeri :value ise bu alana veri girişi yapılamaz.', - 'prohibited_unless' => ':other alanı :value değerlerinden birisi değilse bu alana veri girişi yapılamaz.', - 'regex' => 'Bu biçim geçersiz.', - 'relatable' => 'Bu alan, bu kaynakla ilişkili olmayabilir.', - 'required' => 'Bu alan gereklidir.', - 'required_if' => 'Bu alan :other :value olduğunda gereklidir.', - 'required_unless' => ':other :values\'de olmadığı sürece bu alan gereklidir.', - 'required_with' => 'Bu alan :values olduğunda gereklidir.', - 'required_with_all' => 'Bu alan :values olduğunda gereklidir.', - 'required_without' => 'Bu alan :values olmadığında gereklidir.', + 'multiple_of' => 'Değer :value\'nin katları olmalıdır', + 'not_in' => 'Seçili değer geçersiz.', + 'not_regex' => 'Bu biçim geçersiz.', + 'numeric' => 'Bu bir sayı olmalı.', + 'password' => 'Parola yanlış.', + 'present' => 'Bu alan mevcut olmalıdır.', + 'prohibited' => 'Bu alan kısıtlanmıştır.', + 'prohibited_if' => ':other alanının değeri :value ise bu alana veri girişi yapılamaz.', + 'prohibited_unless' => ':other alanı :value değerlerinden birisi değilse bu alana veri girişi yapılamaz.', + 'regex' => 'Bu biçim geçersiz.', + 'relatable' => 'Bu alan, bu kaynakla ilişkili olmayabilir.', + 'required' => 'Bu alan gereklidir.', + 'required_if' => 'Bu alan :other :value olduğunda gereklidir.', + 'required_unless' => ':other :values\'de olmadığı sürece bu alan gereklidir.', + 'required_with' => 'Bu alan :values olduğunda gereklidir.', + 'required_with_all' => 'Bu alan :values olduğunda gereklidir.', + 'required_without' => 'Bu alan :values olmadığında gereklidir.', 'required_without_all' => ':values hiçbiri yoksa, bu alan gereklidir.', - 'same' => 'Bu alanın değeri :other ile aynı olmalıdır.', - 'size' => [ - 'array' => 'Bu içerik :size öge içermelidir.', - 'file' => 'Bu dosya boyutu :size kilobayt olmalıdır.', + 'same' => 'Bu alanın değeri :other ile aynı olmalıdır.', + 'size' => [ + 'array' => 'Bu içerik :size öge içermelidir.', + 'file' => 'Bu dosya boyutu :size kilobayt olmalıdır.', 'numeric' => 'Bu sayı :size olmalıdır.', - 'string' => 'Bu metin :size karakter olmalıdır.', + 'string' => 'Bu metin :size karakter olmalıdır.', ], - 'starts_with' => 'Bu alan şunlardan biriyle başlamalıdır: :values.', - 'string' => 'Bu bir dize olmalı.', - 'timezone' => 'Bu geçerli bir bölge olmalıdır.', - 'unique' => 'Bu zaten mevcut.', - 'uploaded' => 'Bu yüklenemedi.', - 'url' => 'Bu biçim geçersiz.', - 'uuid' => 'Bu geçerli bir UUID olmalıdır.', - 'custom' => [ + 'starts_with' => 'Bu alan şunlardan biriyle başlamalıdır: :values.', + 'string' => 'Bu bir dize olmalı.', + 'timezone' => 'Bu geçerli bir bölge olmalıdır.', + 'unique' => 'Bu zaten mevcut.', + 'uploaded' => 'Bu yüklenemedi.', + 'url' => 'Bu biçim geçersiz.', + 'uuid' => 'Bu geçerli bir UUID olmalıdır.', + 'custom' => [ 'niteleyici-adi' => [ 'kural-adi' => 'Özel doğrulama mesajı', ], ], - 'attributes' => [], + 'attributes' => [], ]; diff --git a/resources/lang/tr/validation.php b/resources/lang/tr/validation.php index 1c00b643..c6c00308 100644 --- a/resources/lang/tr/validation.php +++ b/resources/lang/tr/validation.php @@ -12,150 +12,150 @@ */ return [ - 'accepted' => ':attribute kabul edilmelidir.', - 'active_url' => ':attribute geçerli bir URL olmalıdır.', - 'after' => ':attribute mutlaka :date tarihinden sonra olmalıdır.', - 'after_or_equal' => ':attribute mutlaka :date tarihinden sonra veya aynı tarihte olmalıdır.', - 'alpha' => ':attribute sadece harflerden oluşmalıdır.', - 'alpha_dash' => ':attribute sadece harflerden, rakamlardan ve tirelerden oluşmalıdır.', - 'alpha_num' => ':attribute sadece harflerden ve rakamlardan oluşmalıdır.', - 'array' => ':attribute mutlaka bir dizi olmalıdır.', - 'attached' => 'Bu :attribute zaten tanımlı.', - 'before' => ':attribute mutlaka :date tarihinden önce olmalıdır.', - 'before_or_equal' => ':attribute mutlaka :date tarihinden önce veya aynı tarihte olmalıdır.', - 'between' => [ - 'array' => ':attribute mutlaka :min - :max arasında öge içermelidir.', - 'file' => ':attribute mutlaka :min - :max kilobayt arasında olmalıdır.', + 'accepted' => ':attribute kabul edilmelidir.', + 'active_url' => ':attribute geçerli bir URL olmalıdır.', + 'after' => ':attribute mutlaka :date tarihinden sonra olmalıdır.', + 'after_or_equal' => ':attribute mutlaka :date tarihinden sonra veya aynı tarihte olmalıdır.', + 'alpha' => ':attribute sadece harflerden oluşmalıdır.', + 'alpha_dash' => ':attribute sadece harflerden, rakamlardan ve tirelerden oluşmalıdır.', + 'alpha_num' => ':attribute sadece harflerden ve rakamlardan oluşmalıdır.', + 'array' => ':attribute mutlaka bir dizi olmalıdır.', + 'attached' => 'Bu :attribute zaten tanımlı.', + 'before' => ':attribute mutlaka :date tarihinden önce olmalıdır.', + 'before_or_equal' => ':attribute mutlaka :date tarihinden önce veya aynı tarihte olmalıdır.', + 'between' => [ + 'array' => ':attribute mutlaka :min - :max arasında öge içermelidir.', + 'file' => ':attribute mutlaka :min - :max kilobayt arasında olmalıdır.', 'numeric' => ':attribute mutlaka :min - :max arasında olmalıdır.', - 'string' => ':attribute mutlaka :min - :max karakter arasında olmalıdır.', + 'string' => ':attribute mutlaka :min - :max karakter arasında olmalıdır.', ], - 'boolean' => ':attribute sadece doğru veya yanlış olmalıdır.', - 'confirmed' => ':attribute tekrarı eşleşmiyor.', - 'date' => ':attribute geçerli bir tarih değil.', - 'date_equals' => ':attribute mutlaka :date ile aynı tarihte olmalıdır.', - 'date_format' => ':attribute mutlaka :format biçiminde olmalıdır.', - 'different' => ':attribute ile :other mutlaka birbirinden farklı olmalıdır.', - 'digits' => ':attribute mutlaka :digits basamaklı olmalıdır.', - 'digits_between' => ':attribute mutlaka en az :min, en fazla :max basamaklı olmalıdır.', - 'dimensions' => ':attribute geçersiz resim boyutlarına sahip.', - 'distinct' => ':attribute alanı yinelenen bir değere sahip.', - 'email' => ':attribute mutlaka geçerli bir e-posta adresi olmalıdır.', - 'ends_with' => ':attribute sadece şu değerlerden biriyle bitebilir: :values.', - 'exists' => 'Seçili :attribute geçersiz.', - 'file' => ':attribute mutlaka bir dosya olmalıdır.', - 'filled' => ':attribute mutlaka doldurulmalıdır.', - 'gt' => [ - 'array' => ':attribute mutlaka :value sayısından daha fazla öge içermelidir.', - 'file' => ':attribute mutlaka :value kilobayt\'tan büyük olmalıdır.', + 'boolean' => ':attribute sadece doğru veya yanlış olmalıdır.', + 'confirmed' => ':attribute tekrarı eşleşmiyor.', + 'date' => ':attribute geçerli bir tarih değil.', + 'date_equals' => ':attribute mutlaka :date ile aynı tarihte olmalıdır.', + 'date_format' => ':attribute mutlaka :format biçiminde olmalıdır.', + 'different' => ':attribute ile :other mutlaka birbirinden farklı olmalıdır.', + 'digits' => ':attribute mutlaka :digits basamaklı olmalıdır.', + 'digits_between' => ':attribute mutlaka en az :min, en fazla :max basamaklı olmalıdır.', + 'dimensions' => ':attribute geçersiz resim boyutlarına sahip.', + 'distinct' => ':attribute alanı yinelenen bir değere sahip.', + 'email' => ':attribute mutlaka geçerli bir e-posta adresi olmalıdır.', + 'ends_with' => ':attribute sadece şu değerlerden biriyle bitebilir: :values.', + 'exists' => 'Seçili :attribute geçersiz.', + 'file' => ':attribute mutlaka bir dosya olmalıdır.', + 'filled' => ':attribute mutlaka doldurulmalıdır.', + 'gt' => [ + 'array' => ':attribute mutlaka :value sayısından daha fazla öge içermelidir.', + 'file' => ':attribute mutlaka :value kilobayt\'tan büyük olmalıdır.', 'numeric' => ':attribute mutlaka :value sayısından büyük olmalıdır.', - 'string' => ':attribute mutlaka :value karakterden uzun olmalıdır.', + 'string' => ':attribute mutlaka :value karakterden uzun olmalıdır.', ], - 'gte' => [ - 'array' => ':attribute mutlaka :value veya daha fazla öge içermelidir.', - 'file' => ':attribute mutlaka :value kilobayt\'tan büyük veya eşit olmalıdır.', + 'gte' => [ + 'array' => ':attribute mutlaka :value veya daha fazla öge içermelidir.', + 'file' => ':attribute mutlaka :value kilobayt\'tan büyük veya eşit olmalıdır.', 'numeric' => ':attribute mutlaka :value sayısından büyük veya eşit olmalıdır.', - 'string' => ':attribute mutlaka :value karakterden uzun veya eşit olmalıdır.', + 'string' => ':attribute mutlaka :value karakterden uzun veya eşit olmalıdır.', ], - 'image' => ':attribute mutlaka bir resim olmalıdır.', - 'in' => 'Seçili :attribute geçersiz.', - 'in_array' => ':attribute :other içinde mevcut değil.', - 'integer' => ':attribute mutlaka bir tam sayı olmalıdır.', - 'ip' => ':attribute mutlaka geçerli bir IP adresi olmalıdır.', - 'ipv4' => ':attribute mutlaka geçerli bir IPv4 adresi olmalıdır.', - 'ipv6' => ':attribute mutlaka geçerli bir IPv6 adresi olmalıdır.', - 'json' => ':attribute mutlaka geçerli bir JSON içeriği olmalıdır.', - 'lt' => [ - 'array' => ':attribute mutlaka :value sayısından daha az öge içermelidir.', - 'file' => ':attribute mutlaka :value kilobayt\'tan küçük olmalıdır.', + 'image' => ':attribute mutlaka bir resim olmalıdır.', + 'in' => 'Seçili :attribute geçersiz.', + 'in_array' => ':attribute :other içinde mevcut değil.', + 'integer' => ':attribute mutlaka bir tam sayı olmalıdır.', + 'ip' => ':attribute mutlaka geçerli bir IP adresi olmalıdır.', + 'ipv4' => ':attribute mutlaka geçerli bir IPv4 adresi olmalıdır.', + 'ipv6' => ':attribute mutlaka geçerli bir IPv6 adresi olmalıdır.', + 'json' => ':attribute mutlaka geçerli bir JSON içeriği olmalıdır.', + 'lt' => [ + 'array' => ':attribute mutlaka :value sayısından daha az öge içermelidir.', + 'file' => ':attribute mutlaka :value kilobayt\'tan küçük olmalıdır.', 'numeric' => ':attribute mutlaka :value sayısından küçük olmalıdır.', - 'string' => ':attribute mutlaka :value karakterden kısa olmalıdır.', + 'string' => ':attribute mutlaka :value karakterden kısa olmalıdır.', ], - 'lte' => [ - 'array' => ':attribute mutlaka :value veya daha az öge içermelidir.', - 'file' => ':attribute mutlaka :value kilobayt\'tan küçük veya eşit olmalıdır.', + 'lte' => [ + 'array' => ':attribute mutlaka :value veya daha az öge içermelidir.', + 'file' => ':attribute mutlaka :value kilobayt\'tan küçük veya eşit olmalıdır.', 'numeric' => ':attribute mutlaka :value sayısından küçük veya eşit olmalıdır.', - 'string' => ':attribute mutlaka :value karakterden kısa veya eşit olmalıdır.', + 'string' => ':attribute mutlaka :value karakterden kısa veya eşit olmalıdır.', ], - 'max' => [ - 'array' => ':attribute en fazla :max öge içerebilir.', - 'file' => ':attribute en fazla :max kilobayt olabilir.', + 'max' => [ + 'array' => ':attribute en fazla :max öge içerebilir.', + 'file' => ':attribute en fazla :max kilobayt olabilir.', 'numeric' => ':attribute en fazla :max olabilir.', - 'string' => ':attribute en fazla :max karakter olabilir.', + 'string' => ':attribute en fazla :max karakter olabilir.', ], - 'mimes' => ':attribute mutlaka :values biçiminde bir dosya olmalıdır.', - 'mimetypes' => ':attribute mutlaka :values biçiminde bir dosya olmalıdır.', - 'min' => [ - 'array' => ':attribute en az :min öge içerebilir.', - 'file' => ':attribute en az :min kilobayt olabilir.', + 'mimes' => ':attribute mutlaka :values biçiminde bir dosya olmalıdır.', + 'mimetypes' => ':attribute mutlaka :values biçiminde bir dosya olmalıdır.', + 'min' => [ + 'array' => ':attribute en az :min öge içerebilir.', + 'file' => ':attribute en az :min kilobayt olabilir.', 'numeric' => ':attribute en az :min olabilir.', - 'string' => ':attribute en az :min karakter olabilir.', + 'string' => ':attribute en az :min karakter olabilir.', ], - 'multiple_of' => ':attribute, :value\'nin katları olmalıdır', - 'not_in' => 'Seçili :attribute geçersiz.', - 'not_regex' => ':attribute biçimi geçersiz.', - 'numeric' => ':attribute mutlaka bir sayı olmalıdır.', - 'password' => 'Parola geçersiz.', - 'present' => ':attribute mutlaka mevcut olmalıdır.', - 'prohibited' => ':attribute alanı kısıtlanmıştır.', - 'prohibited_if' => ':other alanının değeri :value ise :attribute alanına veri girişi yapılamaz.', - 'prohibited_unless' => ':other alanı :value değerlerinden birisi değilse :attribute alanına veri girişi yapılamaz.', - 'regex' => ':attribute biçimi geçersiz.', - 'relatable' => 'Bu :attribute bu kaynakla ilişkili olmayabilir.', - 'required' => ':attribute mutlaka gereklidir.', - 'required_if' => ':attribute :other :value değerine sahip olduğunda mutlaka gereklidir.', - 'required_unless' => ':attribute :other :values değerlerinden birine sahip olmadığında mutlaka gereklidir.', - 'required_with' => ':attribute :values varken mutlaka gereklidir.', - 'required_with_all' => ':attribute herhangi bir :values değeri varken mutlaka gereklidir.', - 'required_without' => ':attribute :values yokken mutlaka gereklidir.', + 'multiple_of' => ':attribute, :value\'nin katları olmalıdır', + 'not_in' => 'Seçili :attribute geçersiz.', + 'not_regex' => ':attribute biçimi geçersiz.', + 'numeric' => ':attribute mutlaka bir sayı olmalıdır.', + 'password' => 'Parola geçersiz.', + 'present' => ':attribute mutlaka mevcut olmalıdır.', + 'prohibited' => ':attribute alanı kısıtlanmıştır.', + 'prohibited_if' => ':other alanının değeri :value ise :attribute alanına veri girişi yapılamaz.', + 'prohibited_unless' => ':other alanı :value değerlerinden birisi değilse :attribute alanına veri girişi yapılamaz.', + 'regex' => ':attribute biçimi geçersiz.', + 'relatable' => 'Bu :attribute bu kaynakla ilişkili olmayabilir.', + 'required' => ':attribute mutlaka gereklidir.', + 'required_if' => ':attribute :other :value değerine sahip olduğunda mutlaka gereklidir.', + 'required_unless' => ':attribute :other :values değerlerinden birine sahip olmadığında mutlaka gereklidir.', + 'required_with' => ':attribute :values varken mutlaka gereklidir.', + 'required_with_all' => ':attribute herhangi bir :values değeri varken mutlaka gereklidir.', + 'required_without' => ':attribute :values yokken mutlaka gereklidir.', 'required_without_all' => ':attribute :values değerlerinden herhangi biri yokken mutlaka gereklidir.', - 'same' => ':attribute ile :other aynı olmalıdır.', - 'size' => [ - 'array' => ':attribute mutlaka :size ögeye sahip olmalıdır.', - 'file' => ':attribute mutlaka :size kilobayt olmalıdır.', + 'same' => ':attribute ile :other aynı olmalıdır.', + 'size' => [ + 'array' => ':attribute mutlaka :size ögeye sahip olmalıdır.', + 'file' => ':attribute mutlaka :size kilobayt olmalıdır.', 'numeric' => ':attribute mutlaka :size olmalıdır.', - 'string' => ':attribute mutlaka :size karakterli olmalıdır.', + 'string' => ':attribute mutlaka :size karakterli olmalıdır.', ], - 'starts_with' => ':attribute sadece şu değerlerden biriyle başlayabilir: :values.', - 'string' => ':attribute mutlaka bir metin olmalıdır.', - 'timezone' => ':attribute mutlaka geçerli bir saat dilimi olmalıdır.', - 'unique' => ':attribute zaten alınmış.', - 'uploaded' => ':attribute yüklemesi başarısız.', - 'url' => ':attribute biçimi geçersiz.', - 'uuid' => ':attribute mutlaka geçerli bir UUID olmalıdır.', - 'custom' => [ + 'starts_with' => ':attribute sadece şu değerlerden biriyle başlayabilir: :values.', + 'string' => ':attribute mutlaka bir metin olmalıdır.', + 'timezone' => ':attribute mutlaka geçerli bir saat dilimi olmalıdır.', + 'unique' => ':attribute zaten alınmış.', + 'uploaded' => ':attribute yüklemesi başarısız.', + 'url' => ':attribute biçimi geçersiz.', + 'uuid' => ':attribute mutlaka geçerli bir UUID olmalıdır.', + 'custom' => [ 'niteleyici-adi' => [ 'kural-adi' => 'Özel doğrulama mesajı', ], ], - 'attributes' => [ - 'address' => 'Adres', - 'age' => 'Yaş', - 'available' => 'Mevcut', - 'city' => 'Şehir', - 'content' => 'İçerik', - 'country' => 'Ülke', - 'date' => 'Tarih', - 'day' => 'Gün', - 'description' => 'Açıklama', - 'email' => 'E-posta adresi', - 'excerpt' => 'Alıntı', - 'first_name' => 'Adı', - 'gender' => 'Cinsiyet', - 'hour' => 'Saat', - 'last_name' => 'Soyadı', - 'minute' => 'Dakika', - 'mobile' => 'Cep telefonu', - 'month' => 'Ay', - 'name' => 'Adı', - 'password' => 'Şifre', + 'attributes' => [ + 'address' => 'Adres', + 'age' => 'Yaş', + 'available' => 'Mevcut', + 'city' => 'Şehir', + 'content' => 'İçerik', + 'country' => 'Ülke', + 'date' => 'Tarih', + 'day' => 'Gün', + 'description' => 'Açıklama', + 'email' => 'E-posta adresi', + 'excerpt' => 'Alıntı', + 'first_name' => 'Adı', + 'gender' => 'Cinsiyet', + 'hour' => 'Saat', + 'last_name' => 'Soyadı', + 'minute' => 'Dakika', + 'mobile' => 'Cep telefonu', + 'month' => 'Ay', + 'name' => 'Adı', + 'password' => 'Şifre', 'password_confirmation' => 'Şifre (Tekrar)', - 'phone' => 'Telefon', - 'second' => 'Saniye', - 'sex' => 'Cinsiyet', - 'size' => 'Boyut', - 'time' => 'Zaman', - 'title' => 'Unvan', - 'username' => 'Kullanıcı adı', - 'year' => 'Yıl', + 'phone' => 'Telefon', + 'second' => 'Saniye', + 'sex' => 'Cinsiyet', + 'size' => 'Boyut', + 'time' => 'Zaman', + 'title' => 'Unvan', + 'username' => 'Kullanıcı adı', + 'year' => 'Yıl', ], ]; diff --git a/resources/views/Admin/Shop/CustomerAddresses/list.blade.php b/resources/views/Admin/Shop/CustomerAddresses/list.blade.php index 761138d4..a7206e77 100644 --- a/resources/views/Admin/Shop/CustomerAddresses/list.blade.php +++ b/resources/views/Admin/Shop/CustomerAddresses/list.blade.php @@ -1,3 +1,6 @@ @component('components.card') - @include('components.datatable', ['route' => route('Admin.Shop.CustomerAddresses.index'), 'model' => 'customer_addresses']) + @include('components.datatable', [ + 'route' => route('Admin.Shop.CustomerAddresses.index'), + 'model' => 'customer_addresses', + ]) @endcomponent diff --git a/resources/views/Admin/Shop/Customers/form.blade.php b/resources/views/Admin/Shop/Customers/form.blade.php index 97e8251f..ecc8bf6a 100644 --- a/resources/views/Admin/Shop/Customers/form.blade.php +++ b/resources/views/Admin/Shop/Customers/form.blade.php @@ -1,118 +1,118 @@
-
-
-
- {{ Form::label('first_name', 'Prénom') }} - @include('components.form.input', [ - 'name' => 'first_name', - 'value' => $customer['first_name'] ?? null, - 'required' => true, - ]) -
-
- {{ Form::label('last_name', 'Nom') }} - @include('components.form.input', [ - 'name' => 'last_name', - 'value' => $customer['last_name'] ?? null, - 'required' => true, - ]) -
-
-
-
- {{ Form::label('company', 'Société') }} - @include('components.form.input', [ - 'name' => 'company', - 'value' => $customer['company'] ?? null, - ]) -
-
-
-
- {{ Form::label('tva', 'TVA') }} - @include('components.form.input', [ - 'name' => 'tva', - 'value' => $customer['tva'] ?? null, - ]) -
-
-
-
- {{ Form::label('email', 'Email') }} - @include('components.form.input', [ - 'name' => 'email', - 'value' => $customer['email'] ?? null, - 'required' => true, - ]) -
-
- {{ Form::label('phone', 'Téléphone') }} - @include('components.form.input', [ - 'name' => 'phone', - 'value' => $customer['phone'] ?? null, - ]) -
-
+
+
+
+ {{ Form::label('first_name', 'Prénom') }} + @include('components.form.input', [ + 'name' => 'first_name', + 'value' => $customer['first_name'] ?? null, + 'required' => true, + ]) +
+
+ {{ Form::label('last_name', 'Nom') }} + @include('components.form.input', [ + 'name' => 'last_name', + 'value' => $customer['last_name'] ?? null, + 'required' => true, + ]) +
+
+
+
+ {{ Form::label('company', 'Société') }} + @include('components.form.input', [ + 'name' => 'company', + 'value' => $customer['company'] ?? null, + ]) +
+
+
+
+ {{ Form::label('tva', 'TVA') }} + @include('components.form.input', [ + 'name' => 'tva', + 'value' => $customer['tva'] ?? null, + ]) +
+
+
+
+ {{ Form::label('email', 'Email') }} + @include('components.form.input', [ + 'name' => 'email', + 'value' => $customer['email'] ?? null, + 'required' => true, + ]) +
+
+ {{ Form::label('phone', 'Téléphone') }} + @include('components.form.input', [ + 'name' => 'phone', + 'value' => $customer['phone'] ?? null, + ]) +
+
-
-
- {{ Form::label('address', 'Adresse') }} - @include('components.form.input', [ - 'name' => 'address', - 'value' => $customer['address'] ?? null, - 'required' => true, - ]) -
-
+
+
+ {{ Form::label('address', 'Adresse') }} + @include('components.form.input', [ + 'name' => 'address', + 'value' => $customer['address'] ?? null, + 'required' => true, + ]) +
+
-
-
- {{ Form::label('address2', 'Adresse complémentaire') }} - @include('components.form.input', [ - 'name' => 'address2', - 'value' => $customer['address2'] ?? null, - ]) -
-
+
+
+ {{ Form::label('address2', 'Adresse complémentaire') }} + @include('components.form.input', [ + 'name' => 'address2', + 'value' => $customer['address2'] ?? null, + ]) +
+
-
-
- {{ Form::label('zipcode', 'Code postal') }} - @include('components.form.input', [ - 'name' => 'zipcode', - 'value' => $customer['zipcode'] ?? null, - 'required' => true, - ]) -
-
- {{ Form::label('city', 'Ville') }} - @include('components.form.input', [ - 'name' => 'city', - 'value' => $customer['city'] ?? null, - 'required' => true, - ]) -
-
+
+
+ {{ Form::label('zipcode', 'Code postal') }} + @include('components.form.input', [ + 'name' => 'zipcode', + 'value' => $customer['zipcode'] ?? null, + 'required' => true, + ]) +
+
+ {{ Form::label('city', 'Ville') }} + @include('components.form.input', [ + 'name' => 'city', + 'value' => $customer['city'] ?? null, + 'required' => true, + ]) +
+
-
-
- {{ Form::label('sale_delivery_id', __('shop.deliveries.name')) }} - @include('components.form.select', [ - 'name' => 'deliveries[]', - 'list' => $deliveries ?? [], - 'values' => $customer['deliveries'] ?? null, - 'with_empty' => '', - 'class' => 'select2', - 'multiple' => true, - ]) -
-
-
-
- @component('components.layout.box-collapse', ['title' => __('Adresses'), 'id' => 'form-customer-address']) - @include('Admin.Shop.CustomerAddresses.list', ['dataTable' => $customer_addresses]) - @endcomponent -
+
+
+ {{ Form::label('sale_delivery_id', __('shop.deliveries.name')) }} + @include('components.form.select', [ + 'name' => 'deliveries[]', + 'list' => $deliveries ?? [], + 'values' => $customer['deliveries'] ?? null, + 'with_empty' => '', + 'class' => 'select2', + 'multiple' => true, + ]) +
+
+
+
+ @component('components.layout.box-collapse', ['title' => __('Adresses'), 'id' => 'form-customer-address']) + @include('Admin.Shop.CustomerAddresses.list', ['dataTable' => $customer_addresses]) + @endcomponent +
@include('components.save') @@ -121,10 +121,10 @@ @include('load.form.select2') @push('js') - -@endpush \ No newline at end of file + +@endpush diff --git a/resources/views/Admin/Shop/DeliveryPackages/create.blade.php b/resources/views/Admin/Shop/DeliveryPackages/create.blade.php new file mode 100644 index 00000000..bcaacd01 --- /dev/null +++ b/resources/views/Admin/Shop/DeliveryPackages/create.blade.php @@ -0,0 +1,11 @@ +@extends('layout.index', [ + 'title' => __('shop.deliveries.title'), + 'subtitle' => __('shop.deliveries.add'), + 'breadcrumb' => [__('shop.deliveries.title'), __('shop.deliveries.add')] +]) + +@section('content') + {{ Form::open(['route' => 'Admin.Shop.Deliveries.store', 'id' => 'delivery-form', 'autocomplete' => 'off']) }} + @include('Admin.Shop.Deliveries.form') + +@endsection diff --git a/resources/views/Admin/Shop/DeliveryPackages/edit.blade.php b/resources/views/Admin/Shop/DeliveryPackages/edit.blade.php new file mode 100644 index 00000000..1e867bf6 --- /dev/null +++ b/resources/views/Admin/Shop/DeliveryPackages/edit.blade.php @@ -0,0 +1,12 @@ +@extends('layout.index', [ + 'title' => __('shop.deliveries.title'), + 'subtitle' => __('shop.deliveries.edit'), + 'breadcrumb' => [__('shop.deliveries.title')] +]) + +@section('content') + {{ Form::open(['route' => 'Admin.Shop.Deliveries.store', 'id' => 'delivery-form', 'autocomplete' => 'off']) }} + + @include('Admin.Shop.Deliveries.form') + +@endsection diff --git a/resources/views/Admin/Shop/DeliveryPackages/form.blade.php b/resources/views/Admin/Shop/DeliveryPackages/form.blade.php new file mode 100644 index 00000000..27547196 --- /dev/null +++ b/resources/views/Admin/Shop/DeliveryPackages/form.blade.php @@ -0,0 +1,69 @@ +
+
+
+
+ {{ Form::label('sale_channel_id', __('shop.sale_channels.name')) }} + @include('components.form.select', ['name' => 'sale_channel_id', 'list' => $sale_channels ?? [], 'value' => $delivery['sale_channel_id'] ?? null, 'with_empty' => '', 'class' => 'select2']) +
+
+
+
+ {{ Form::label('active', __('Actif')) }}
+ @include("components.form.toggle", ['name' => 'active', 'value' => $delivery['active'] ?? false, 'on' => __('active'), 'off' => __('inactive')]) +
+
+ {{ Form::label('is_public', __('Type')) }} + @include('components.form.toggle', ['name' => 'is_public', 'value' => $delivery['is_public'] ?? false, 'on' => __('public'), 'off' => __('administré')]) +
+
+ {{ Form::label('at_house', __('Défaut')) }} + @include('components.form.checkboxes.icheck', ['name' => 'at_house', 'value' => $delivery['at_house'] ?? null]) +
+
+
+
+
+
+ {{ Form::label('name', __('Nom')) }} + @include('components.form.input', ['name' => 'name', 'value' => $delivery['name'] ?? null, 'required' => true]) +
+
+ +
+
+ {{ Form::label('', __('Description')) }} + +
+
+ + @include('components.address', ['with_country' => false]) + +
+
+ {{ Form::label('event_date_begin', __('Date de début')) }} + @include('components.form.datepicker', ['name' => 'event_date_begin', 'value' => $delivery['event_date_begin'] ?? null]) +
+
+ {{ Form::label('event_date_end', __('Date de fin')) }} + @include('components.form.datepicker', ['name' => 'event_date_end', 'value' => $delivery['event_date_end'] ?? null]) +
+ +
+
+
+ +@include('components.save') + +@include('load.form.select2') +@include('load.form.save') + + +@push('js') + +@endpush \ No newline at end of file diff --git a/resources/views/Admin/Shop/DeliveryPackages/list.blade.php b/resources/views/Admin/Shop/DeliveryPackages/list.blade.php new file mode 100644 index 00000000..3870bdbd --- /dev/null +++ b/resources/views/Admin/Shop/DeliveryPackages/list.blade.php @@ -0,0 +1,26 @@ +@extends('layout.index', [ + 'title' => __('shop.deliveries.title'), + 'subtitle' => __('shop.deliveries.list'), + 'breadcrumb' => [__('shop.deliveries.title')] +]) + +@section('content') + @component('components.card') + @include('components.datatable', ['route' => route('Admin.Shop.Deliveries.index'), 'model' => 'deliveries', 'callback' => 'handleDelivery();']) + @endcomponent +@endsection + +@include('load.form.select2') +@include('load.form.toggle') + +@push('js') + +@endpush \ No newline at end of file diff --git a/resources/views/Admin/Shop/DeliveryPackages/partials/filters.blade.php b/resources/views/Admin/Shop/DeliveryPackages/partials/filters.blade.php new file mode 100644 index 00000000..efd72f51 --- /dev/null +++ b/resources/views/Admin/Shop/DeliveryPackages/partials/filters.blade.php @@ -0,0 +1,5 @@ +
+
+ +
+
diff --git a/resources/views/Admin/Shop/DeliveryPackages/show.blade.php b/resources/views/Admin/Shop/DeliveryPackages/show.blade.php new file mode 100644 index 00000000..1e1cd729 --- /dev/null +++ b/resources/views/Admin/Shop/DeliveryPackages/show.blade.php @@ -0,0 +1,36 @@ +@extends('layout.index', [ + 'title' => __('products.title'), + 'subtitle' => __('products.title'), + 'breadcrumb' => [__('products.title')] +]) + +@section('content') +
+ +
+ +
+ +
+
+
+

{{ name }}

+

+ {{ $product.section.name }}
+

+
+
+

{{ $prix_total }} €

+

{{ $residence['type_produit']['name'] }}

+
+ +
+ @include('Hestimmo.modules.Lot.partials.carousel') +
+
+
+
+
+
+ +@endsection diff --git a/resources/views/Admin/Shop/DeliveryTypeCalculations/create.blade.php b/resources/views/Admin/Shop/DeliveryTypeCalculations/create.blade.php new file mode 100644 index 00000000..bcaacd01 --- /dev/null +++ b/resources/views/Admin/Shop/DeliveryTypeCalculations/create.blade.php @@ -0,0 +1,11 @@ +@extends('layout.index', [ + 'title' => __('shop.deliveries.title'), + 'subtitle' => __('shop.deliveries.add'), + 'breadcrumb' => [__('shop.deliveries.title'), __('shop.deliveries.add')] +]) + +@section('content') + {{ Form::open(['route' => 'Admin.Shop.Deliveries.store', 'id' => 'delivery-form', 'autocomplete' => 'off']) }} + @include('Admin.Shop.Deliveries.form') + +@endsection diff --git a/resources/views/Admin/Shop/DeliveryTypeCalculations/edit.blade.php b/resources/views/Admin/Shop/DeliveryTypeCalculations/edit.blade.php new file mode 100644 index 00000000..1e867bf6 --- /dev/null +++ b/resources/views/Admin/Shop/DeliveryTypeCalculations/edit.blade.php @@ -0,0 +1,12 @@ +@extends('layout.index', [ + 'title' => __('shop.deliveries.title'), + 'subtitle' => __('shop.deliveries.edit'), + 'breadcrumb' => [__('shop.deliveries.title')] +]) + +@section('content') + {{ Form::open(['route' => 'Admin.Shop.Deliveries.store', 'id' => 'delivery-form', 'autocomplete' => 'off']) }} + + @include('Admin.Shop.Deliveries.form') + +@endsection diff --git a/resources/views/Admin/Shop/DeliveryTypeCalculations/form.blade.php b/resources/views/Admin/Shop/DeliveryTypeCalculations/form.blade.php new file mode 100644 index 00000000..27547196 --- /dev/null +++ b/resources/views/Admin/Shop/DeliveryTypeCalculations/form.blade.php @@ -0,0 +1,69 @@ +
+
+
+
+ {{ Form::label('sale_channel_id', __('shop.sale_channels.name')) }} + @include('components.form.select', ['name' => 'sale_channel_id', 'list' => $sale_channels ?? [], 'value' => $delivery['sale_channel_id'] ?? null, 'with_empty' => '', 'class' => 'select2']) +
+
+
+
+ {{ Form::label('active', __('Actif')) }}
+ @include("components.form.toggle", ['name' => 'active', 'value' => $delivery['active'] ?? false, 'on' => __('active'), 'off' => __('inactive')]) +
+
+ {{ Form::label('is_public', __('Type')) }} + @include('components.form.toggle', ['name' => 'is_public', 'value' => $delivery['is_public'] ?? false, 'on' => __('public'), 'off' => __('administré')]) +
+
+ {{ Form::label('at_house', __('Défaut')) }} + @include('components.form.checkboxes.icheck', ['name' => 'at_house', 'value' => $delivery['at_house'] ?? null]) +
+
+
+
+
+
+ {{ Form::label('name', __('Nom')) }} + @include('components.form.input', ['name' => 'name', 'value' => $delivery['name'] ?? null, 'required' => true]) +
+
+ +
+
+ {{ Form::label('', __('Description')) }} + +
+
+ + @include('components.address', ['with_country' => false]) + +
+
+ {{ Form::label('event_date_begin', __('Date de début')) }} + @include('components.form.datepicker', ['name' => 'event_date_begin', 'value' => $delivery['event_date_begin'] ?? null]) +
+
+ {{ Form::label('event_date_end', __('Date de fin')) }} + @include('components.form.datepicker', ['name' => 'event_date_end', 'value' => $delivery['event_date_end'] ?? null]) +
+ +
+
+
+ +@include('components.save') + +@include('load.form.select2') +@include('load.form.save') + + +@push('js') + +@endpush \ No newline at end of file diff --git a/resources/views/Admin/Shop/DeliveryTypeCalculations/list.blade.php b/resources/views/Admin/Shop/DeliveryTypeCalculations/list.blade.php new file mode 100644 index 00000000..4c29589b --- /dev/null +++ b/resources/views/Admin/Shop/DeliveryTypeCalculations/list.blade.php @@ -0,0 +1,24 @@ +@extends('layout.index', [ + 'title' => __('shop.delivery_type_calculations.title'), + 'subtitle' => __('shop.delivery_type_calculations.list'), + 'breadcrumb' => [__('shop.delivery_type_calculations.title')] +]) + +@section('content') + @component('components.card') + @include('components.datatable', [ + 'route' => route('Admin.Shop.DeliveryTypeCalculations.index'), + 'model' => 'delivery_type_calculations', + ]) + @endcomponent +@endsection + +@include('load.form.select2') + +@push('js') + +@endpush diff --git a/resources/views/Admin/Shop/DeliveryTypeCalculations/partials/filters.blade.php b/resources/views/Admin/Shop/DeliveryTypeCalculations/partials/filters.blade.php new file mode 100644 index 00000000..efd72f51 --- /dev/null +++ b/resources/views/Admin/Shop/DeliveryTypeCalculations/partials/filters.blade.php @@ -0,0 +1,5 @@ +
+
+ +
+
diff --git a/resources/views/Admin/Shop/DeliveryTypeCalculations/show.blade.php b/resources/views/Admin/Shop/DeliveryTypeCalculations/show.blade.php new file mode 100644 index 00000000..1e1cd729 --- /dev/null +++ b/resources/views/Admin/Shop/DeliveryTypeCalculations/show.blade.php @@ -0,0 +1,36 @@ +@extends('layout.index', [ + 'title' => __('products.title'), + 'subtitle' => __('products.title'), + 'breadcrumb' => [__('products.title')] +]) + +@section('content') +
+ +
+ +
+ +
+
+
+

{{ name }}

+

+ {{ $product.section.name }}
+

+
+
+

{{ $prix_total }} €

+

{{ $residence['type_produit']['name'] }}

+
+ +
+ @include('Hestimmo.modules.Lot.partials.carousel') +
+
+
+
+
+
+ +@endsection diff --git a/resources/views/Admin/Shop/DeliveryTypes/create.blade.php b/resources/views/Admin/Shop/DeliveryTypes/create.blade.php new file mode 100644 index 00000000..bcaacd01 --- /dev/null +++ b/resources/views/Admin/Shop/DeliveryTypes/create.blade.php @@ -0,0 +1,11 @@ +@extends('layout.index', [ + 'title' => __('shop.deliveries.title'), + 'subtitle' => __('shop.deliveries.add'), + 'breadcrumb' => [__('shop.deliveries.title'), __('shop.deliveries.add')] +]) + +@section('content') + {{ Form::open(['route' => 'Admin.Shop.Deliveries.store', 'id' => 'delivery-form', 'autocomplete' => 'off']) }} + @include('Admin.Shop.Deliveries.form') + +@endsection diff --git a/resources/views/Admin/Shop/DeliveryTypes/edit.blade.php b/resources/views/Admin/Shop/DeliveryTypes/edit.blade.php new file mode 100644 index 00000000..1e867bf6 --- /dev/null +++ b/resources/views/Admin/Shop/DeliveryTypes/edit.blade.php @@ -0,0 +1,12 @@ +@extends('layout.index', [ + 'title' => __('shop.deliveries.title'), + 'subtitle' => __('shop.deliveries.edit'), + 'breadcrumb' => [__('shop.deliveries.title')] +]) + +@section('content') + {{ Form::open(['route' => 'Admin.Shop.Deliveries.store', 'id' => 'delivery-form', 'autocomplete' => 'off']) }} + + @include('Admin.Shop.Deliveries.form') + +@endsection diff --git a/resources/views/Admin/Shop/DeliveryTypes/form.blade.php b/resources/views/Admin/Shop/DeliveryTypes/form.blade.php new file mode 100644 index 00000000..27547196 --- /dev/null +++ b/resources/views/Admin/Shop/DeliveryTypes/form.blade.php @@ -0,0 +1,69 @@ +
+
+
+
+ {{ Form::label('sale_channel_id', __('shop.sale_channels.name')) }} + @include('components.form.select', ['name' => 'sale_channel_id', 'list' => $sale_channels ?? [], 'value' => $delivery['sale_channel_id'] ?? null, 'with_empty' => '', 'class' => 'select2']) +
+
+
+
+ {{ Form::label('active', __('Actif')) }}
+ @include("components.form.toggle", ['name' => 'active', 'value' => $delivery['active'] ?? false, 'on' => __('active'), 'off' => __('inactive')]) +
+
+ {{ Form::label('is_public', __('Type')) }} + @include('components.form.toggle', ['name' => 'is_public', 'value' => $delivery['is_public'] ?? false, 'on' => __('public'), 'off' => __('administré')]) +
+
+ {{ Form::label('at_house', __('Défaut')) }} + @include('components.form.checkboxes.icheck', ['name' => 'at_house', 'value' => $delivery['at_house'] ?? null]) +
+
+
+
+
+
+ {{ Form::label('name', __('Nom')) }} + @include('components.form.input', ['name' => 'name', 'value' => $delivery['name'] ?? null, 'required' => true]) +
+
+ +
+
+ {{ Form::label('', __('Description')) }} + +
+
+ + @include('components.address', ['with_country' => false]) + +
+
+ {{ Form::label('event_date_begin', __('Date de début')) }} + @include('components.form.datepicker', ['name' => 'event_date_begin', 'value' => $delivery['event_date_begin'] ?? null]) +
+
+ {{ Form::label('event_date_end', __('Date de fin')) }} + @include('components.form.datepicker', ['name' => 'event_date_end', 'value' => $delivery['event_date_end'] ?? null]) +
+ +
+
+
+ +@include('components.save') + +@include('load.form.select2') +@include('load.form.save') + + +@push('js') + +@endpush \ No newline at end of file diff --git a/resources/views/Admin/Shop/DeliveryTypes/list.blade.php b/resources/views/Admin/Shop/DeliveryTypes/list.blade.php new file mode 100644 index 00000000..1ec41133 --- /dev/null +++ b/resources/views/Admin/Shop/DeliveryTypes/list.blade.php @@ -0,0 +1,23 @@ +@extends('layout.index', [ + 'title' => __('shop.delivery_types.title'), + 'subtitle' => __('shop.delivery_types.list'), +]) + +@section('content') + @component('components.card') + @include('components.datatable', [ + 'route' => route('Admin.Shop.DeliveryTypes.index'), + 'model' => 'delivery_types', + ]) + @endcomponent +@endsection + +@include('load.form.select2') + +@push('js') + +@endpush diff --git a/resources/views/Admin/Shop/DeliveryTypes/partials/filters.blade.php b/resources/views/Admin/Shop/DeliveryTypes/partials/filters.blade.php new file mode 100644 index 00000000..efd72f51 --- /dev/null +++ b/resources/views/Admin/Shop/DeliveryTypes/partials/filters.blade.php @@ -0,0 +1,5 @@ +
+
+ +
+
diff --git a/resources/views/Admin/Shop/DeliveryTypes/show.blade.php b/resources/views/Admin/Shop/DeliveryTypes/show.blade.php new file mode 100644 index 00000000..1e1cd729 --- /dev/null +++ b/resources/views/Admin/Shop/DeliveryTypes/show.blade.php @@ -0,0 +1,36 @@ +@extends('layout.index', [ + 'title' => __('products.title'), + 'subtitle' => __('products.title'), + 'breadcrumb' => [__('products.title')] +]) + +@section('content') +
+ +
+ +
+ +
+
+
+

{{ name }}

+

+ {{ $product.section.name }}
+

+
+
+

{{ $prix_total }} €

+

{{ $residence['type_produit']['name'] }}

+
+ +
+ @include('Hestimmo.modules.Lot.partials.carousel') +
+
+
+
+
+
+ +@endsection diff --git a/routes/Admin/Botanic/Families.php b/routes/Admin/Botanic/Families.php index 413e57ae..4a6b309f 100644 --- a/routes/Admin/Botanic/Families.php +++ b/routes/Admin/Botanic/Families.php @@ -1,14 +1,13 @@ name('Families.')->group(function () { - Route::get('', 'FamilyController@index')->name('index'); - Route::get('create', 'FamilyController@create')->name('create'); - Route::delete('destroy/{id?}', 'FamilyController@destroy')->name('destroy'); - Route::post('update', 'FamilyController@update')->name('update'); - Route::post('store', 'FamilyController@store')->name('store'); - Route::get('edit/{id}', 'FamilyController@edit')->name('edit'); + Route::get('', 'FamilyController@index')->name('index'); + Route::get('create', 'FamilyController@create')->name('create'); + Route::delete('destroy/{id?}', 'FamilyController@destroy')->name('destroy'); + Route::post('update', 'FamilyController@update')->name('update'); + Route::post('store', 'FamilyController@store')->name('store'); + Route::get('edit/{id}', 'FamilyController@edit')->name('edit'); - Route::any('exportExcel', 'FamilyController@exportExcel')->name('exportExcel'); + Route::any('exportExcel', 'FamilyController@exportExcel')->name('exportExcel'); }); - diff --git a/routes/Admin/Botanic/Genres.php b/routes/Admin/Botanic/Genres.php index e8c66b56..4bc764a9 100644 --- a/routes/Admin/Botanic/Genres.php +++ b/routes/Admin/Botanic/Genres.php @@ -1,14 +1,13 @@ name('Genres.')->group(function () { - Route::get('', 'GenreController@index')->name('index'); - Route::get('create', 'GenreController@create')->name('create'); - Route::delete('destroy/{id?}', 'GenreController@destroy')->name('destroy'); - Route::post('update', 'GenreController@update')->name('update'); - Route::post('store', 'GenreController@store')->name('store'); - Route::get('edit/{id}', 'GenreController@edit')->name('edit'); + Route::get('', 'GenreController@index')->name('index'); + Route::get('create', 'GenreController@create')->name('create'); + Route::delete('destroy/{id?}', 'GenreController@destroy')->name('destroy'); + Route::post('update', 'GenreController@update')->name('update'); + Route::post('store', 'GenreController@store')->name('store'); + Route::get('edit/{id}', 'GenreController@edit')->name('edit'); - Route::any('exportExcel', 'GenreController@exportExcel')->name('exportExcel'); + Route::any('exportExcel', 'GenreController@exportExcel')->name('exportExcel'); }); - diff --git a/routes/Admin/Botanic/Species.php b/routes/Admin/Botanic/Species.php index b2391cd3..a07b601d 100644 --- a/routes/Admin/Botanic/Species.php +++ b/routes/Admin/Botanic/Species.php @@ -1,18 +1,16 @@ name('Species.')->group(function () { - Route::get('', 'SpecieController@index')->name('index'); - Route::get('create', 'SpecieController@create')->name('create'); - Route::delete('destroy/{id?}', 'SpecieController@destroy')->name('destroy'); - Route::post('update', 'SpecieController@update')->name('update'); - Route::post('store', 'SpecieController@store')->name('store'); - Route::get('edit/{id}', 'SpecieController@edit')->name('edit'); - Route::any('getSelect', 'SpecieController@getOptions')->name('getSelect'); - Route::post('deleteImage', 'SpecieController@deleteImage')->name('deleteImage'); - Route::any('getImages/{id?}/{can_edit?}', 'SpecieController@getImages')->name('getImages'); + Route::get('', 'SpecieController@index')->name('index'); + Route::get('create', 'SpecieController@create')->name('create'); + Route::delete('destroy/{id?}', 'SpecieController@destroy')->name('destroy'); + Route::post('update', 'SpecieController@update')->name('update'); + Route::post('store', 'SpecieController@store')->name('store'); + Route::get('edit/{id}', 'SpecieController@edit')->name('edit'); + Route::any('getSelect', 'SpecieController@getOptions')->name('getSelect'); + Route::post('deleteImage', 'SpecieController@deleteImage')->name('deleteImage'); + Route::any('getImages/{id?}/{can_edit?}', 'SpecieController@getImages')->name('getImages'); - - Route::any('exportExcel', 'SpecieController@exportExcel')->name('exportExcel'); + Route::any('exportExcel', 'SpecieController@exportExcel')->name('exportExcel'); }); - diff --git a/routes/Admin/Botanic/Varieties.php b/routes/Admin/Botanic/Varieties.php index 8f001170..2ac23a19 100644 --- a/routes/Admin/Botanic/Varieties.php +++ b/routes/Admin/Botanic/Varieties.php @@ -1,18 +1,17 @@ name('Varieties.')->group(function () { - Route::get('', 'VarietyController@index')->name('index'); - Route::get('getDataTable', 'VarietyController@getDataTable')->name('getDataTable'); - Route::get('create', 'VarietyController@create')->name('create'); - Route::delete('destroy/{id?}', 'VarietyController@destroy')->name('destroy'); - Route::post('update', 'VarietyController@update')->name('update'); - Route::post('store', 'VarietyController@store')->name('store'); - Route::get('edit/{id}', 'VarietyController@edit')->name('edit'); - Route::post('getSelect', 'VarietyController@getOptionsWithSpecie')->name('getSelect'); - Route::post('deleteImage', 'VarietyController@deleteImage')->name('deleteImage'); - Route::any('getImages/{id?}/{can_edit?}', 'VarietyController@getImages')->name('getImages'); + Route::get('', 'VarietyController@index')->name('index'); + Route::get('getDataTable', 'VarietyController@getDataTable')->name('getDataTable'); + Route::get('create', 'VarietyController@create')->name('create'); + Route::delete('destroy/{id?}', 'VarietyController@destroy')->name('destroy'); + Route::post('update', 'VarietyController@update')->name('update'); + Route::post('store', 'VarietyController@store')->name('store'); + Route::get('edit/{id}', 'VarietyController@edit')->name('edit'); + Route::post('getSelect', 'VarietyController@getOptionsWithSpecie')->name('getSelect'); + Route::post('deleteImage', 'VarietyController@deleteImage')->name('deleteImage'); + Route::any('getImages/{id?}/{can_edit?}', 'VarietyController@getImages')->name('getImages'); - Route::any('exportExcel', 'VarietyController@exportExcel')->name('exportExcel'); + Route::any('exportExcel', 'VarietyController@exportExcel')->name('exportExcel'); }); - diff --git a/routes/Admin/Botanic/route.php b/routes/Admin/Botanic/route.php index 594e2c72..e63a0b15 100644 --- a/routes/Admin/Botanic/route.php +++ b/routes/Admin/Botanic/route.php @@ -1,8 +1,8 @@ namespace('Botanic')->name('Botanic.')->group(function () { - include( __DIR__ . '/Families.php'); - include( __DIR__ . '/Genres.php'); - include( __DIR__ . '/Species.php'); - include( __DIR__ . '/Varieties.php'); + include __DIR__.'/Families.php'; + include __DIR__.'/Genres.php'; + include __DIR__.'/Species.php'; + include __DIR__.'/Varieties.php'; }); diff --git a/routes/Admin/Core/Comments.php b/routes/Admin/Core/Comments.php index 1ec309e0..d3a45fdb 100644 --- a/routes/Admin/Core/Comments.php +++ b/routes/Admin/Core/Comments.php @@ -7,4 +7,3 @@ Route::prefix('Comments')->name('Comments.')->group(function () { Route::post('store', 'CommentController@store')->name('store'); Route::get('edit/{id}', 'CommentController@edit')->name('edit'); }); - diff --git a/routes/Admin/Core/route.php b/routes/Admin/Core/route.php index bfdd7082..d9a30af6 100644 --- a/routes/Admin/Core/route.php +++ b/routes/Admin/Core/route.php @@ -1,6 +1,6 @@ namespace('Core')->name('Core.')->group(function () { - include( __DIR__ . '/Comments.php'); - include( __DIR__ . '/Mail/route.php'); + include __DIR__.'/Comments.php'; + include __DIR__.'/Mail/route.php'; }); diff --git a/routes/Admin/Shop/Articles.php b/routes/Admin/Shop/Articles.php index fd0649f3..7d07a5b8 100644 --- a/routes/Admin/Shop/Articles.php +++ b/routes/Admin/Shop/Articles.php @@ -6,7 +6,7 @@ Route::prefix('Articles')->name('Articles.')->group(function () { Route::delete('destroy/{id?}', 'ArticleController@destroy')->name('destroy'); Route::post('store', 'ArticleController@store')->name('store'); Route::get('edit/{id}', 'ArticleController@edit')->name('edit'); - + Route::any('getImages/{id?}', 'ArticleController@getImages')->name('getImages'); Route::post('deleteImage', 'ArticleController@deleteImage')->name('deleteImage'); @@ -19,5 +19,3 @@ Route::prefix('Articles')->name('Articles.')->group(function () { Route::post('toggleHomepage', 'ArticleController@toggleHomepage')->name('toggleHomepage'); }); - - diff --git a/routes/Admin/Shop/CustomerAddresses.php b/routes/Admin/Shop/CustomerAddresses.php index 2b5e6c8f..2c5f0061 100644 --- a/routes/Admin/Shop/CustomerAddresses.php +++ b/routes/Admin/Shop/CustomerAddresses.php @@ -1,12 +1,11 @@ name('CustomerAddresses.')->group(function () { - Route::get('', 'CustomerAddressController@index')->name('index'); - Route::get('create', 'CustomerAddressController@create')->name('create'); - Route::delete('destroy/{id?}', 'CustomerAddressController@destroy')->name('destroy'); - Route::post('update', 'CustomerAddressController@update')->name('update'); - Route::post('store', 'CustomerAddressController@store')->name('store'); - Route::get('edit/{id}', 'CustomerAddressController@edit')->name('edit'); + Route::get('', 'CustomerAddressController@index')->name('index'); + Route::get('create', 'CustomerAddressController@create')->name('create'); + Route::delete('destroy/{id?}', 'CustomerAddressController@destroy')->name('destroy'); + Route::post('update', 'CustomerAddressController@update')->name('update'); + Route::post('store', 'CustomerAddressController@store')->name('store'); + Route::get('edit/{id}', 'CustomerAddressController@edit')->name('edit'); }); - diff --git a/routes/Admin/Shop/Customers.php b/routes/Admin/Shop/Customers.php index ad9f67e2..a8433b10 100644 --- a/routes/Admin/Shop/Customers.php +++ b/routes/Admin/Shop/Customers.php @@ -1,12 +1,11 @@ name('Customers.')->group(function () { - Route::get('', 'CustomerController@index')->name('index'); - Route::get('create', 'CustomerController@create')->name('create'); - Route::delete('destroy/{id?}', 'CustomerController@destroy')->name('destroy'); - Route::post('update', 'CustomerController@update')->name('update'); - Route::post('store', 'CustomerController@store')->name('store'); - Route::get('edit/{id}', 'CustomerController@edit')->name('edit'); + Route::get('', 'CustomerController@index')->name('index'); + Route::get('create', 'CustomerController@create')->name('create'); + Route::delete('destroy/{id?}', 'CustomerController@destroy')->name('destroy'); + Route::post('update', 'CustomerController@update')->name('update'); + Route::post('store', 'CustomerController@store')->name('store'); + Route::get('edit/{id}', 'CustomerController@edit')->name('edit'); }); - diff --git a/routes/Admin/Shop/DeliveryPackages.php b/routes/Admin/Shop/DeliveryPackages.php new file mode 100644 index 00000000..e2507b75 --- /dev/null +++ b/routes/Admin/Shop/DeliveryPackages.php @@ -0,0 +1,10 @@ +name('DeliveryPackages.')->group(function () { + Route::get('', 'DeliveryPackageController@index')->name('index'); + Route::get('create', 'DeliveryPackageController@create')->name('create'); + Route::delete('destroy/{id?}', 'DeliveryPackageController@destroy')->name('destroy'); + Route::post('update', 'DeliveryPackageController@update')->name('update'); + Route::post('store', 'DeliveryPackageController@store')->name('store'); + Route::get('edit/{id}', 'DeliveryPackageController@edit')->name('edit'); +}); diff --git a/routes/Admin/Shop/DeliveryTypeCalculations.php b/routes/Admin/Shop/DeliveryTypeCalculations.php new file mode 100644 index 00000000..b2e0774d --- /dev/null +++ b/routes/Admin/Shop/DeliveryTypeCalculations.php @@ -0,0 +1,10 @@ +name('DeliveryTypeCalculations.')->group(function () { + Route::get('', 'DeliveryTypeCalculationController@index')->name('index'); + Route::get('create', 'DeliveryTypeCalculationController@create')->name('create'); + Route::delete('destroy/{id?}', 'DeliveryTypeCalculationController@destroy')->name('destroy'); + Route::post('update', 'DeliveryTypeCalculationController@update')->name('update'); + Route::post('store', 'DeliveryTypeCalculationController@store')->name('store'); + Route::get('edit/{id}', 'DeliveryTypeCalculationController@edit')->name('edit'); +}); diff --git a/routes/Admin/Shop/DeliveryTypes.php b/routes/Admin/Shop/DeliveryTypes.php new file mode 100644 index 00000000..d31958c5 --- /dev/null +++ b/routes/Admin/Shop/DeliveryTypes.php @@ -0,0 +1,11 @@ +name('DeliveryTypes.')->group(function () { + Route::get('', 'DeliveryTypeController@index')->name('index'); + Route::get('create', 'DeliveryTypeController@create')->name('create'); + Route::delete('destroy/{id?}', 'DeliveryTypeController@destroy')->name('destroy'); + Route::post('update', 'DeliveryTypeController@update')->name('update'); + Route::post('store', 'DeliveryTypeController@store')->name('store'); + Route::get('edit/{id}', 'DeliveryTypeController@edit')->name('edit'); + Route::post('toggleActive', 'DeliveryTypeController@toggleActive')->name('toggleActive'); +}); diff --git a/routes/Admin/Shop/InvoiceItems.php b/routes/Admin/Shop/InvoiceItems.php index 9a56349d..e15cba85 100644 --- a/routes/Admin/Shop/InvoiceItems.php +++ b/routes/Admin/Shop/InvoiceItems.php @@ -1,4 +1,3 @@ name('Invoices.')->group(function () { - Route::get('', 'InvoiceController@index')->name('index'); - Route::get('create', 'InvoiceController@create')->name('create'); - Route::delete('destroy', 'InvoiceController@destroy')->name('destroy'); - Route::post('update', 'InvoiceController@update')->name('update'); - Route::post('store', 'InvoiceController@store')->name('store'); - Route::get('edit/{id}', 'InvoiceController@edit')->name('edit'); + Route::get('', 'InvoiceController@index')->name('index'); + Route::get('create', 'InvoiceController@create')->name('create'); + Route::delete('destroy', 'InvoiceController@destroy')->name('destroy'); + Route::post('update', 'InvoiceController@update')->name('update'); + Route::post('store', 'InvoiceController@store')->name('store'); + Route::get('edit/{id}', 'InvoiceController@edit')->name('edit'); }); - diff --git a/routes/Admin/Shop/Merchandises.php b/routes/Admin/Shop/Merchandises.php index 9d34a4e7..240c4b64 100644 --- a/routes/Admin/Shop/Merchandises.php +++ b/routes/Admin/Shop/Merchandises.php @@ -15,4 +15,3 @@ Route::prefix('Merchandises')->name('Merchandises.')->group(function () { Route::any('exportExcel', 'MerchandiseController@exportExcel')->name('exportExcel'); }); - diff --git a/routes/Admin/Shop/Orders.php b/routes/Admin/Shop/Orders.php index 4cce24f6..a726b04f 100644 --- a/routes/Admin/Shop/Orders.php +++ b/routes/Admin/Shop/Orders.php @@ -8,4 +8,3 @@ Route::prefix('Orders')->name('Orders.')->group(function () { Route::post('store', 'OrderController@store')->name('store'); Route::get('edit/{id}', 'OrderController@edit')->name('edit'); }); - diff --git a/routes/Admin/Shop/Packages.php b/routes/Admin/Shop/Packages.php index 3be67f5c..ca55fe80 100644 --- a/routes/Admin/Shop/Packages.php +++ b/routes/Admin/Shop/Packages.php @@ -1,11 +1,11 @@ name('Packages.')->group(function () { - Route::any('getOptionsByFamily', 'PackageController@getOptionsByFamily')->name('getOptionsByFamily'); - Route::get('', 'PackageController@index')->name('index'); - Route::get('create', 'PackageController@create')->name('create'); - Route::delete('destroy/{id?}', 'PackageController@destroy')->name('destroy'); - Route::post('update', 'PackageController@update')->name('update'); - Route::post('store', 'PackageController@store')->name('store'); - Route::get('edit/{id}', 'PackageController@edit')->name('edit'); +Route::prefix('Packages')->name('Packages.')->group(function () { + Route::any('getOptionsByFamily', 'PackageController@getOptionsByFamily')->name('getOptionsByFamily'); + Route::get('', 'PackageController@index')->name('index'); + Route::get('create', 'PackageController@create')->name('create'); + Route::delete('destroy/{id?}', 'PackageController@destroy')->name('destroy'); + Route::post('update', 'PackageController@update')->name('update'); + Route::post('store', 'PackageController@store')->name('store'); + Route::get('edit/{id}', 'PackageController@edit')->name('edit'); }); diff --git a/routes/Admin/Shop/PriceListValues.php b/routes/Admin/Shop/PriceListValues.php index 94d2a8b6..41f7b9f4 100644 --- a/routes/Admin/Shop/PriceListValues.php +++ b/routes/Admin/Shop/PriceListValues.php @@ -1,11 +1,10 @@ name('PriceListValues.')->group(function () { - Route::get('', 'PriceListValueController@index')->name('index'); - Route::get('create', 'PriceListValueController@create')->name('create'); - Route::delete('destroy/{id?}', 'PriceListValueController@destroy')->name('destroy'); - Route::post('store', 'PriceListValueController@store')->name('store'); - Route::get('edit/{id}', 'PriceListValueController@edit')->name('edit'); - Route::get('addPrice/{index?}', 'PriceListValueController@addPrice')->name('addPrice'); + Route::get('', 'PriceListValueController@index')->name('index'); + Route::get('create', 'PriceListValueController@create')->name('create'); + Route::delete('destroy/{id?}', 'PriceListValueController@destroy')->name('destroy'); + Route::post('store', 'PriceListValueController@store')->name('store'); + Route::get('edit/{id}', 'PriceListValueController@edit')->name('edit'); + Route::get('addPrice/{index?}', 'PriceListValueController@addPrice')->name('addPrice'); }); - diff --git a/routes/Admin/Shop/PriceLists.php b/routes/Admin/Shop/PriceLists.php index 16300123..e2838cda 100644 --- a/routes/Admin/Shop/PriceLists.php +++ b/routes/Admin/Shop/PriceLists.php @@ -1,16 +1,15 @@ name('PriceLists.')->group(function () { - Route::get('', 'PriceListController@index')->name('index'); - Route::get('create', 'PriceListController@create')->name('create'); - Route::get('edit/{id}', 'PriceListController@edit')->name('edit'); - Route::post('store', 'PriceListController@store')->name('store'); - Route::delete('destroy/{id?}', 'PriceListController@destroy')->name('destroy'); - Route::get('getPrices/{id?}', 'PriceListController@getPrice')->name('getPrices'); + Route::get('', 'PriceListController@index')->name('index'); + Route::get('create', 'PriceListController@create')->name('create'); + Route::get('edit/{id}', 'PriceListController@edit')->name('edit'); + Route::post('store', 'PriceListController@store')->name('store'); + Route::delete('destroy/{id?}', 'PriceListController@destroy')->name('destroy'); + Route::get('getPrices/{id?}', 'PriceListController@getPrice')->name('getPrices'); - Route::get('modalCreate/{tariff_id?}', 'PriceListController@modalCreate')->name('modalCreate'); - Route::get('modalEdit/{id?}', 'PriceListController@modalEdit')->name('modalEdit'); - Route::post('storeAjax', 'PriceListController@storeAjax')->name('storeAjax'); + Route::get('modalCreate/{tariff_id?}', 'PriceListController@modalCreate')->name('modalCreate'); + Route::get('modalEdit/{id?}', 'PriceListController@modalEdit')->name('modalEdit'); + Route::post('storeAjax', 'PriceListController@storeAjax')->name('storeAjax'); }); - diff --git a/routes/Admin/Shop/Producers.php b/routes/Admin/Shop/Producers.php index e201a4e8..b3dd9064 100644 --- a/routes/Admin/Shop/Producers.php +++ b/routes/Admin/Shop/Producers.php @@ -13,4 +13,3 @@ Route::prefix('Producers')->name('Producers.')->group(function () { Route::any('getImages/{id?}/{can_edit?}', 'ProducerController@getImages')->name('getImages'); Route::any('exportExcel', 'ProducerController@exportExcel')->name('exportExcel'); }); - diff --git a/routes/Admin/Shop/SaleChannels.php b/routes/Admin/Shop/SaleChannels.php index 2ed78a07..9e93900d 100644 --- a/routes/Admin/Shop/SaleChannels.php +++ b/routes/Admin/Shop/SaleChannels.php @@ -1,11 +1,11 @@ name('SaleChannels.')->group(function () { - Route::get('', 'SaleChannelController@index')->name('index'); - Route::get('create', 'SaleChannelController@create')->name('create'); - Route::delete('destroy/{id?}', 'SaleChannelController@destroy')->name('destroy'); - Route::post('update', 'SaleChannelController@update')->name('update'); - Route::post('store', 'SaleChannelController@store')->name('store'); - Route::get('edit/{id}', 'SaleChannelController@edit')->name('edit'); + Route::get('', 'SaleChannelController@index')->name('index'); + Route::get('create', 'SaleChannelController@create')->name('create'); + Route::delete('destroy/{id?}', 'SaleChannelController@destroy')->name('destroy'); + Route::post('update', 'SaleChannelController@update')->name('update'); + Route::post('store', 'SaleChannelController@store')->name('store'); + Route::get('edit/{id}', 'SaleChannelController@edit')->name('edit'); }); diff --git a/routes/Admin/Shop/TagGroups.php b/routes/Admin/Shop/TagGroups.php index e2fa6708..e30bddc4 100644 --- a/routes/Admin/Shop/TagGroups.php +++ b/routes/Admin/Shop/TagGroups.php @@ -8,4 +8,3 @@ Route::prefix('TagGroups')->name('TagGroups.')->group(function () { Route::get('edit/{id}', 'TagGroupController@edit')->name('edit'); Route::post('toggleVisible', 'TagGroupController@toggleVisible')->name('toggleVisible'); }); - diff --git a/routes/Admin/Shop/Tags.php b/routes/Admin/Shop/Tags.php index bd4e89ad..7497c92c 100644 --- a/routes/Admin/Shop/Tags.php +++ b/routes/Admin/Shop/Tags.php @@ -8,4 +8,3 @@ Route::prefix('Tags')->name('Tags.')->group(function () { Route::post('store', 'TagController@store')->name('store'); Route::get('edit/{id}', 'TagController@edit')->name('edit'); }); - diff --git a/routes/Admin/Shop/TariffUnities.php b/routes/Admin/Shop/TariffUnities.php index 97f56aa5..4d4a6bf4 100644 --- a/routes/Admin/Shop/TariffUnities.php +++ b/routes/Admin/Shop/TariffUnities.php @@ -1,6 +1,6 @@ name('TariffUnities.')->group(function () { +Route::prefix('TariffUnities')->name('TariffUnities.')->group(function () { Route::get('', 'TariffUnityController@index')->name('index'); Route::get('create', 'TariffUnityController@create')->name('create'); Route::delete('destroy/{id?}', 'TariffUnityController@destroy')->name('destroy'); diff --git a/routes/Admin/Shop/Tariffs.php b/routes/Admin/Shop/Tariffs.php index 20a6b45f..0d431b77 100644 --- a/routes/Admin/Shop/Tariffs.php +++ b/routes/Admin/Shop/Tariffs.php @@ -1,14 +1,13 @@ name('Tariffs.')->group(function () { - Route::get('', 'TariffController@index')->name('index'); - Route::get('create', 'TariffController@create')->name('create'); - Route::delete('destroy/{id?}', 'TariffController@destroy')->name('destroy'); - Route::post('update', 'TariffController@update')->name('update'); - Route::post('store', 'TariffController@store')->name('store'); - Route::get('edit/{id}', 'TariffController@edit')->name('edit'); + Route::get('', 'TariffController@index')->name('index'); + Route::get('create', 'TariffController@create')->name('create'); + Route::delete('destroy/{id?}', 'TariffController@destroy')->name('destroy'); + Route::post('update', 'TariffController@update')->name('update'); + Route::post('store', 'TariffController@store')->name('store'); + Route::get('edit/{id}', 'TariffController@edit')->name('edit'); - Route::any('autocomplete/{q?}', 'TariffController@autocomplete')->name('autocomplete'); + Route::any('autocomplete/{q?}', 'TariffController@autocomplete')->name('autocomplete'); }); - diff --git a/routes/Admin/Shop/Unities.php b/routes/Admin/Shop/Unities.php index 466fc258..769f19c4 100644 --- a/routes/Admin/Shop/Unities.php +++ b/routes/Admin/Shop/Unities.php @@ -1,11 +1,11 @@ name('Unities.')->group(function () { - Route::any('getOptionsByPackage', 'UnityController@getOptionsByPackage')->name('getOptionsByPackage'); - Route::get('', 'UnityController@index')->name('index'); - Route::get('create', 'UnityController@create')->name('create'); - Route::delete('destroy/{id?}', 'UnityController@destroy')->name('destroy'); - Route::post('update', 'UnityController@update')->name('update'); - Route::post('store', 'UnityController@store')->name('store'); - Route::get('edit/{id}', 'UnityController@edit')->name('edit'); +Route::prefix('Unities')->name('Unities.')->group(function () { + Route::any('getOptionsByPackage', 'UnityController@getOptionsByPackage')->name('getOptionsByPackage'); + Route::get('', 'UnityController@index')->name('index'); + Route::get('create', 'UnityController@create')->name('create'); + Route::delete('destroy/{id?}', 'UnityController@destroy')->name('destroy'); + Route::post('update', 'UnityController@update')->name('update'); + Route::post('store', 'UnityController@store')->name('store'); + Route::get('edit/{id}', 'UnityController@edit')->name('edit'); }); diff --git a/routes/Admin/Shop/Variations.php b/routes/Admin/Shop/Variations.php index 4edd0fc8..bea8f56a 100644 --- a/routes/Admin/Shop/Variations.php +++ b/routes/Admin/Shop/Variations.php @@ -1,14 +1,13 @@ name('Variations.')->group(function () { - Route::get('', 'VariationController@index')->name('index'); - Route::get('create', 'VariationController@create')->name('create'); - Route::delete('destroy/{id?}', 'VariationController@destroy')->name('destroy'); - Route::post('update', 'VariationController@update')->name('update'); - Route::post('store', 'VariationController@store')->name('store'); - Route::get('edit/{id}', 'VariationController@edit')->name('edit'); + Route::get('', 'VariationController@index')->name('index'); + Route::get('create', 'VariationController@create')->name('create'); + Route::delete('destroy/{id?}', 'VariationController@destroy')->name('destroy'); + Route::post('update', 'VariationController@update')->name('update'); + Route::post('store', 'VariationController@store')->name('store'); + Route::get('edit/{id}', 'VariationController@edit')->name('edit'); - Route::any('autocomplete/{q?}', 'VariationController@autocomplete')->name('autocomplete'); + Route::any('autocomplete/{q?}', 'VariationController@autocomplete')->name('autocomplete'); }); - diff --git a/routes/Admin/Shop/route.php b/routes/Admin/Shop/route.php index 810faa55..24f21c21 100644 --- a/routes/Admin/Shop/route.php +++ b/routes/Admin/Shop/route.php @@ -2,27 +2,30 @@ Route::middleware('auth')->prefix('Shop')->namespace('Shop')->name('Shop.')->group(function () { Route::get('dashboard', 'DashboardController@index')->name('dashboard'); - include_once __DIR__ . '/ArticleNatures.php'; - include_once __DIR__ . '/Articles.php'; - include_once __DIR__ . '/Categories.php'; - include_once __DIR__ . '/Customers.php'; - include_once __DIR__ . '/CustomerAddresses.php'; - include_once __DIR__ . '/Deliveries.php'; - include_once __DIR__ . '/Homepages.php'; - include_once __DIR__ . '/InvoiceItems.php'; - include_once __DIR__ . '/Invoices.php'; - include_once __DIR__ . '/Merchandises.php'; - include_once __DIR__ . '/Offers.php'; - include_once __DIR__ . '/Orders.php'; - include_once __DIR__ . '/Packages.php'; - include_once __DIR__ . '/PriceLists.php'; - include_once __DIR__ . '/PriceListValues.php'; - include_once __DIR__ . '/Producers.php'; - include_once __DIR__ . '/SaleChannels.php'; - include_once __DIR__ . '/Tags.php'; - include_once __DIR__ . '/TagGroups.php'; - include_once __DIR__ . '/Tariffs.php'; - include_once __DIR__ . '/TariffUnities.php'; - include_once __DIR__ . '/Unities.php'; - include_once __DIR__ . '/Variations.php'; + include_once __DIR__.'/ArticleNatures.php'; + include_once __DIR__.'/Articles.php'; + include_once __DIR__.'/Categories.php'; + include_once __DIR__.'/Customers.php'; + include_once __DIR__.'/CustomerAddresses.php'; + include_once __DIR__.'/Deliveries.php'; + include_once __DIR__.'/DeliveryPackages.php'; + include_once __DIR__.'/DeliveryTypes.php'; + include_once __DIR__.'/DeliveryTypeCalculations.php'; + include_once __DIR__.'/Homepages.php'; + include_once __DIR__.'/InvoiceItems.php'; + include_once __DIR__.'/Invoices.php'; + include_once __DIR__.'/Merchandises.php'; + include_once __DIR__.'/Offers.php'; + include_once __DIR__.'/Orders.php'; + include_once __DIR__.'/Packages.php'; + include_once __DIR__.'/PriceLists.php'; + include_once __DIR__.'/PriceListValues.php'; + include_once __DIR__.'/Producers.php'; + include_once __DIR__.'/SaleChannels.php'; + include_once __DIR__.'/Tags.php'; + include_once __DIR__.'/TagGroups.php'; + include_once __DIR__.'/Tariffs.php'; + include_once __DIR__.'/TariffUnities.php'; + include_once __DIR__.'/Unities.php'; + include_once __DIR__.'/Variations.php'; }); diff --git a/routes/Admin/route.php b/routes/Admin/route.php index cfee85dc..efa99edf 100644 --- a/routes/Admin/route.php +++ b/routes/Admin/route.php @@ -2,7 +2,7 @@ Route::middleware('auth')->prefix('Admin')->namespace('Admin')->name('Admin.')->group(function () { Route::get('{period?}', 'HomeController@index')->name('home'); - include __DIR__ . '/Botanic/route.php'; - include __DIR__ . '/Core/route.php'; - include __DIR__ . '/Shop/route.php'; + include __DIR__.'/Botanic/route.php'; + include __DIR__.'/Core/route.php'; + include __DIR__.'/Shop/route.php'; }); diff --git a/routes/Botanic/route.php b/routes/Botanic/route.php index ed4d7433..e7abd0d5 100644 --- a/routes/Botanic/route.php +++ b/routes/Botanic/route.php @@ -1,5 +1,5 @@ namespace('Botanic')->name('Botanic.')->group(function () { - + }); diff --git a/routes/Shop/Articles.php b/routes/Shop/Articles.php index af81f8c5..753b9dbd 100644 --- a/routes/Shop/Articles.php +++ b/routes/Shop/Articles.php @@ -1,7 +1,6 @@ name('Articles.')->group(function () { - Route::get('', 'ArticleController@index')->name('index'); - Route::get('show/{id}', 'ArticleController@show')->name('show'); + Route::get('', 'ArticleController@index')->name('index'); + Route::get('show/{id}', 'ArticleController@show')->name('show'); }); - diff --git a/routes/Shop/Baskets.php b/routes/Shop/Baskets.php index 290547b6..b144d2ca 100644 --- a/routes/Shop/Baskets.php +++ b/routes/Shop/Baskets.php @@ -11,4 +11,3 @@ Route::prefix('Panier')->name('Basket.')->group(function () { Route::get('basket', 'BasketController@basket')->name('basket'); Route::post('order', 'BasketController@order')->name('order'); }); - diff --git a/routes/Shop/Categories.php b/routes/Shop/Categories.php index cb97eff6..c425ff7d 100644 --- a/routes/Shop/Categories.php +++ b/routes/Shop/Categories.php @@ -5,4 +5,3 @@ Route::prefix('Rayons')->name('Categories.')->group(function () { Route::any('show/{id}', 'CategoryController@show')->name('show'); Route::get('getTree', 'CategoryController@getTree')->name('getTree'); }); - diff --git a/routes/Shop/Invoices.php b/routes/Shop/Invoices.php index e482b74c..5730beae 100644 --- a/routes/Shop/Invoices.php +++ b/routes/Shop/Invoices.php @@ -4,4 +4,3 @@ Route::prefix('Factures')->name('Invoices.')->group(function () { Route::get('show/{uuid?}', 'InvoiceController@show')->name('show'); Route::get('pdf/{uuid?}', 'InvoiceController@pdf')->name('pdf'); }); - diff --git a/routes/Shop/Offers.php b/routes/Shop/Offers.php index 1eb44671..764529f7 100644 --- a/routes/Shop/Offers.php +++ b/routes/Shop/Offers.php @@ -3,4 +3,3 @@ Route::prefix('Offres')->name('Offers.')->group(function () { Route::get('show/{id}', 'OfferController@show')->name('show'); }); - diff --git a/routes/Shop/OrderPayments.php b/routes/Shop/OrderPayments.php index 30ca1e6e..fd8c8c9d 100644 --- a/routes/Shop/OrderPayments.php +++ b/routes/Shop/OrderPayments.php @@ -1,4 +1,3 @@ name('Orders.')->group(function () { Route::get('view/{uuid?}', 'OrderController@view')->name('view'); Route::get('pdf/{uuid?}', 'OrderController@pdf')->name('pdf'); }); - diff --git a/routes/Shop/Searches.php b/routes/Shop/Searches.php index 75a91403..20d79b7a 100644 --- a/routes/Shop/Searches.php +++ b/routes/Shop/Searches.php @@ -3,4 +3,3 @@ Route::prefix('Recherche')->name('Searches.')->group(function () { Route::get('resultats/{search?}', 'SearchController@search')->name('search'); }); - diff --git a/routes/Shop/route.php b/routes/Shop/route.php index 8fc1761d..b4af5d94 100644 --- a/routes/Shop/route.php +++ b/routes/Shop/route.php @@ -13,14 +13,14 @@ Route::prefix('')->namespace('Shop')->name('Shop.')->group(function () { }); Route::prefix('')->namespace('Shop')->name('Shop.')->group(function () { - include_once __DIR__ . '/Articles.php'; - include_once __DIR__ . '/Baskets.php'; - include_once __DIR__ . '/Categories.php'; - include_once __DIR__ . '/Customers.php'; - include_once __DIR__ . '/Invoices.php'; - include_once __DIR__ . '/Offers.php'; - include_once __DIR__ . '/Orders.php'; - include_once __DIR__ . '/Orders.php'; - include_once __DIR__ . '/OrderPayments.php'; - include_once __DIR__ . '/Searches.php'; + include_once __DIR__.'/Articles.php'; + include_once __DIR__.'/Baskets.php'; + include_once __DIR__.'/Categories.php'; + include_once __DIR__.'/Customers.php'; + include_once __DIR__.'/Invoices.php'; + include_once __DIR__.'/Offers.php'; + include_once __DIR__.'/Orders.php'; + include_once __DIR__.'/Orders.php'; + include_once __DIR__.'/OrderPayments.php'; + include_once __DIR__.'/Searches.php'; }); diff --git a/routes/api.php b/routes/api.php index 16d41d48..a713bd86 100644 --- a/routes/api.php +++ b/routes/api.php @@ -16,4 +16,4 @@ use Illuminate\Http\Request; Route::middleware('auth:api')->get('/user', function (Request $request) { return $request->user(); }); -*/ \ No newline at end of file +*/ diff --git a/routes/paybox.php b/routes/paybox.php index 980347ee..fdeac5c5 100644 --- a/routes/paybox.php +++ b/routes/paybox.php @@ -7,4 +7,3 @@ Route::prefix('Payment')->name('paybox.')->group(function () { Route::get('waiting', 'Shop\PayboxController@waiting')->name('waiting'); Route::get('process', 'Shop\PayboxController@process')->name('process'); }); - diff --git a/routes/web.php b/routes/web.php index 0188eb28..4d150d66 100644 --- a/routes/web.php +++ b/routes/web.php @@ -17,7 +17,7 @@ Route::get('login2', 'Shop\Auth\LoginController@showLoginForm')->name('login'); Route::get('', 'Shop\HomeController@index')->name('welcome'); Route::get('home', 'Shop\HomeController@index')->name('home'); -include __DIR__ . '/Admin/route.php'; -include __DIR__ . '/Shop/route.php'; -include __DIR__ . '/Botanic/route.php'; -include __DIR__ . '/paybox.php'; +include __DIR__.'/Admin/route.php'; +include __DIR__.'/Shop/route.php'; +include __DIR__.'/Botanic/route.php'; +include __DIR__.'/paybox.php'; diff --git a/server.php b/server.php index 5fb6379e..b07fa44b 100644 --- a/server.php +++ b/server.php @@ -3,10 +3,8 @@ /** * Laravel - A PHP Framework For Web Artisans * - * @package Laravel * @author Taylor Otwell */ - $uri = urldecode( parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH) ); diff --git a/tests/Feature/ExampleTest.php b/tests/Feature/ExampleTest.php index cdb51119..8fbf3706 100644 --- a/tests/Feature/ExampleTest.php +++ b/tests/Feature/ExampleTest.php @@ -2,7 +2,6 @@ namespace Tests\Feature; -use Illuminate\Foundation\Testing\RefreshDatabase; use Tests\TestCase; class ExampleTest extends TestCase