'elektronika_bagisto'
This commit is contained in:
commit
5624fbb4b8
|
|
@ -0,0 +1,17 @@
|
|||
root = true
|
||||
|
||||
[*]
|
||||
charset = utf-8
|
||||
end_of_line = lf
|
||||
insert_final_newline = false
|
||||
indent_style = space
|
||||
indent_size = 4
|
||||
quote_type = single
|
||||
trim_trailing_whitespace = true
|
||||
|
||||
[*.md]
|
||||
trim_trailing_whitespace = false
|
||||
|
||||
[*.yml]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
|
|
@ -0,0 +1,71 @@
|
|||
APP_NAME=Bagisto
|
||||
APP_ENV=local
|
||||
APP_VERSION=1.3.3
|
||||
APP_KEY=
|
||||
APP_DEBUG=true
|
||||
APP_URL=http://localhost
|
||||
APP_ADMIN_URL=admin
|
||||
APP_TIMEZONE=Asia/Kolkata
|
||||
APP_LOCALE=en
|
||||
LOG_CHANNEL=stack
|
||||
APP_CURRENCY=USD
|
||||
|
||||
DB_CONNECTION=mysql
|
||||
DB_HOST=127.0.0.1
|
||||
DB_PORT=3306
|
||||
DB_DATABASE=
|
||||
DB_USERNAME=
|
||||
DB_PASSWORD=
|
||||
DB_PREFIX=
|
||||
|
||||
BROADCAST_DRIVER=log
|
||||
CACHE_DRIVER=file
|
||||
SESSION_DRIVER=file
|
||||
SESSION_LIFETIME=120
|
||||
QUEUE_DRIVER=sync
|
||||
|
||||
REDIS_HOST=127.0.0.1
|
||||
REDIS_PASSWORD=null
|
||||
REDIS_PORT=6379
|
||||
|
||||
MAIL_DRIVER=smtp
|
||||
MAIL_HOST=smtp.mailtrap.io
|
||||
MAIL_PORT=2525
|
||||
MAIL_USERNAME=
|
||||
MAIL_PASSWORD=
|
||||
MAIL_ENCRYPTION=tls
|
||||
|
||||
SHOP_MAIL_FROM=
|
||||
ADMIN_MAIL_TO=
|
||||
MAIL_FROM_NAME=
|
||||
|
||||
FIXER_API_KEY=
|
||||
EXCHANGE_RATES_API_KEY=
|
||||
|
||||
PUSHER_APP_ID=
|
||||
PUSHER_APP_KEY=
|
||||
PUSHER_APP_SECRET=
|
||||
PUSHER_APP_CLUSTER=mt1
|
||||
|
||||
MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
|
||||
MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
|
||||
|
||||
FACEBOOK_CLIENT_ID=
|
||||
FACEBOOK_CLIENT_SECRET=
|
||||
FACEBOOK_CALLBACK_URL=https://yourhost.com/customer/social-login/facebook/callback
|
||||
|
||||
TWITTER_CLIENT_ID=
|
||||
TWITTER_CLIENT_SECRET=
|
||||
TWITTER_CALLBACK_URL=https://yourhost.com/customer/social-login/twitter/callback
|
||||
|
||||
GOOGLE_CLIENT_ID=
|
||||
GOOGLE_CLIENT_SECRET=
|
||||
GOOGLE_CALLBACK_URL=https://yourhost.com/customer/social-login/google/callback
|
||||
|
||||
LINKEDIN_CLIENT_ID=
|
||||
LINKEDIN_CLIENT_SECRET=
|
||||
LINKEDIN_CALLBACK_URL=https://yourhost.com/customer/social-login/linkedin/callback
|
||||
|
||||
GITHUB_CLIENT_ID=
|
||||
GITHUB_CLIENT_SECRET=
|
||||
GITHUB_CALLBACK_URL=https://yourhost.com/customer/social-login/github/callback
|
||||
|
|
@ -0,0 +1,46 @@
|
|||
APP_NAME=Laravel
|
||||
APP_ENV=local
|
||||
APP_VERSION=1.3.3
|
||||
APP_KEY=base64:G4KY3tUsTaY9ONo1n/QyJvVLQZdJDgbIkSJswFK01HE=
|
||||
APP_DEBUG=true
|
||||
APP_URL=http://localhost
|
||||
APP_ADMIN_URL=admin
|
||||
|
||||
LOG_CHANNEL=stack
|
||||
|
||||
DB_CONNECTION=mysql
|
||||
DB_HOST=mysql
|
||||
DB_PORT=3306
|
||||
DB_DATABASE=bagisto_testing
|
||||
DB_USERNAME=bagisto
|
||||
DB_PASSWORD=secret
|
||||
DB_PREFIX=
|
||||
|
||||
BROADCAST_DRIVER=log
|
||||
CACHE_DRIVER=file
|
||||
SESSION_DRIVER=file
|
||||
SESSION_LIFETIME=120
|
||||
QUEUE_DRIVER=sync
|
||||
|
||||
REDIS_HOST=127.0.0.1
|
||||
REDIS_PASSWORD=null
|
||||
REDIS_PORT=6379
|
||||
|
||||
MAIL_DRIVER=smtp
|
||||
MAIL_HOST=smtp.mailtrap.io
|
||||
MAIL_PORT=2525
|
||||
MAIL_USERNAME=
|
||||
MAIL_PASSWORD=
|
||||
MAIL_ENCRYPTION=tls
|
||||
|
||||
|
||||
PUSHER_APP_ID=
|
||||
PUSHER_APP_KEY=
|
||||
PUSHER_APP_SECRET=
|
||||
PUSHER_APP_CLUSTER=mt1
|
||||
|
||||
MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
|
||||
MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
|
||||
|
||||
SHOP_MAIL_FROM=test@example.com
|
||||
ADMIN_MAIL_TO=test@example.com
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
* text=auto
|
||||
*.css linguist-vendored
|
||||
*.scss linguist-vendored
|
||||
*.js linguist-vendored
|
||||
CHANGELOG.md export-ignore
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
.env
|
||||
.idea
|
||||
.php_cs.cache
|
||||
.vscode
|
||||
.vagrant
|
||||
/data
|
||||
/docker-compose-collection
|
||||
Homestead.json
|
||||
Homestead.yaml
|
||||
/ignorables/*
|
||||
/node_modules
|
||||
npm-debug.log
|
||||
package-lock.json
|
||||
/public/css
|
||||
/public/fonts
|
||||
/public/js
|
||||
/public/hot
|
||||
/public/storage
|
||||
/public/themes
|
||||
/public/vendor
|
||||
/resources/lang/vendor
|
||||
/storage/*.key
|
||||
/storage/dcc-data/
|
||||
/vendor
|
||||
yarn.lock
|
||||
yarn-error.log
|
||||
|
|
@ -0,0 +1,951 @@
|
|||
# CHANGELOG for v0.1.x
|
||||
|
||||
This changelog consists the bug & security fixes and new features being included in the releases listed below.
|
||||
|
||||
## **v0.1.9 (20th of December, 2019)** - *Release*
|
||||
|
||||
* #1942 [fixed] - When editing the cart rule, selected category is not checked.
|
||||
|
||||
* #1939 [fixed] - Invalid coupon gets applied, if clicking on apply coupon multiple time, although there is no discount amount but its displaying message that coupon code applied successfully.
|
||||
|
||||
* #1938 [fixed] - multiple cart rules are getting applied by using only single coupon.
|
||||
|
||||
* #1935 [fixed] - Categories are not displaying if in condition Categories(children only) or Categories(Parent Only) is selected.
|
||||
|
||||
* #1931 [fixed] - Catalog rule not applying if in condition type"Any Condition is true" is selected, and some of the condition doesn't match the product.
|
||||
|
||||
* #1929 [fixed] - Actual product amount and discounted amount both should display on product page for configurable product
|
||||
|
||||
* #1928 [fixed] - Catalog rule should not apply if any of the condition doesn't match, if condition type"All Condition are true"
|
||||
|
||||
* #1904 [fixed] - Existing tax should display as list on creating catalog rule if in condition "Tax Category" is selected.
|
||||
|
||||
* #1903 [fixed] - UI issue in condition field
|
||||
|
||||
* #1895 [fixed] - Translation issue Action Type field while creating catalog rule.
|
||||
|
||||
* #1883 [fixed] - Free shipping not applied on cart, if from action "Free Shipping" is selected and discount amount is given as zero.
|
||||
|
||||
* #1882 [fixed] - If from Action "Apply on shipping " is selected as yes then the discounted amount is applying on both product and shipping charge.
|
||||
|
||||
* #1875 [fixed] - Discount gets applied on cart if condition is "Visible Individually" is set to yes and product added in cart is not visible individually.
|
||||
|
||||
* #1868 [fixed] - Getting exception on checkout if action Buy X Get Y free is selected in cart rule.
|
||||
|
||||
* #1861 [fixed] - Getting exception on checkout if applying invalid coupon code and proceed for checkout.
|
||||
|
||||
* #1857 [fixed] - Getting exception when creating cart rule with condition URL KEY(children only).
|
||||
|
||||
* #1856 [fixed] - Getting exception on creating cart rule with condition Name(children only).
|
||||
|
||||
* #1847 [fixed] - If cart rule condition does not match the cart then on applying coupon it should display message "Coupon cannot be applied".
|
||||
|
||||
* #1839 [fixed] - Getting exception on filtering cart rule through id.
|
||||
|
||||
* #1838 [fixed] - Cart rule not working for condition sku(children only) and sku(parent only).
|
||||
|
||||
* #1836 [fixed] - Back button on Edit cart rule page doesn't work.
|
||||
|
||||
* #1835 [fixed] - Getting exception if condition value remains blank.
|
||||
|
||||
* #1834 [fixed] - On editing any cart rule, its priority updates to 1.
|
||||
|
||||
* #1833 [fixed] - Discount not applied if "Payment Method", "Shipping Method", "Shipping State" or "Shipping Country" is selected in condition.
|
||||
|
||||
* #1832 [fixed] - Able to use coupon irrespective of the number given in "Uses per coupon" field.
|
||||
|
||||
* #1831 [fixed] - Negative sign is not required in discount amount.
|
||||
|
||||
* #1830 [fixed] - If Coupon type is selected as "No Coupon" then coupon code should not generate for that particular cart rule.
|
||||
|
||||
* #1828 [fixed] - Updated changes are not saved on editing cart rule.
|
||||
|
||||
* #1825 [fixed] - Not able to generate coupon code while creating cart rule.
|
||||
|
||||
* #1823 [fixed] - Getting exception after clicking on developement.
|
||||
|
||||
## **v0.1.8 (4th of October, 2019)** - *Release*
|
||||
|
||||
* [feature] - Refund is added for orders.
|
||||
|
||||
* #1504 [fixed] - Getting Exception when applying filter in Invoices grid through Invoice Date.
|
||||
|
||||
* #1492 [fixed] - Not showing orderid with prefix and suffix in Refund section.
|
||||
|
||||
* #1490 [fixed] - Getting Incorrect paid amount and due amount if order contains more than one product.
|
||||
|
||||
* #1489 [fixed] - Quantity of Product doesn't get updated after creating a refund.
|
||||
|
||||
* #1486 [fixed] - Getting incorrect Total Due Amount if discount is applied.
|
||||
|
||||
* #1484 [fixed] - Unable to edit data of Refund Shipping field.
|
||||
|
||||
* #1483 [fixed] - Refund option should not be available if refund is already created.
|
||||
|
||||
* #1461 [fixed] - Invoice number length should be number of zeros that appears before invoice id.
|
||||
|
||||
* #1460 [fixed] - Getting error on deleting Newsletter.
|
||||
|
||||
* #1447 [fixed] - Order ID is not matching after printing invoice.
|
||||
|
||||
* #1442 [fixed] - Customer should get an email after registration.
|
||||
|
||||
* #1338 [fixed] - Fixed the complete header ,header should not scroll on scrolling the page.
|
||||
|
||||
* #1172 [fixed] - Default shipping and payment should be selected, currently no shipping method and payment method is selected by default.
|
||||
|
||||
## **v0.1.7 (17th of September, 2019)** - *Release*
|
||||
|
||||
* [feature] - Fiterable attributes according to category.
|
||||
|
||||
* [feature] - New module CMS added for adding static pages.
|
||||
|
||||
* [feature] - Dyanamic event firing in datagrid while adding columns, actions and mass actions as well.
|
||||
|
||||
* [enhancement] - Customer gets an email after registration.
|
||||
|
||||
* [enhancement] - Customer receives cancellation mail if his/her order is cancelled by admin.
|
||||
|
||||
* [enhancement] - SEO is now available for home page.
|
||||
|
||||
* [enhancement] - If account is created for customer by admin then customer should received an email that his/her account is created with create password link.
|
||||
|
||||
* [enhancement] - product_flat will is now scalable according to choice of attributes to be used in it.
|
||||
|
||||
* #1434 [fixed] - Incorrect discount amount in case of multicurrency.
|
||||
|
||||
* #1417 [fixed] - Discount amount is showing in "Quantity" column.
|
||||
|
||||
* #1415 [fixed] - Wrong discount applies if Action "Adjust whole cart to percent" is selected.
|
||||
|
||||
* #1411 [fixed] - Getting exception on updating cart rule.
|
||||
|
||||
* #1391 [fixed] - By default attribute condition gets saved as 1 in db, because of which cart rule not getting applied.
|
||||
|
||||
* #1382 [fixed] - In case of "Adjust whole cart to percent" discount amount is getting calculated according to price of one product.
|
||||
|
||||
* #1381 [fixed] - Filter is not working properly for action type column in cart rule.
|
||||
|
||||
* #1380 [fixed] - Getting error after refreshing the page.
|
||||
|
||||
* #1379 [fixed] - Cart rule not working in case of non-coupon if any condition is given.
|
||||
|
||||
* #1375 [fixed] - Wrong discount applied on cart in case of fixed discount.
|
||||
|
||||
* #1372 [fixed] - Getting exception if while updating cart rule , if any option is selected from "How to Choose Products?".
|
||||
|
||||
* #1351 [fixed] - Getting exception when assigning the root category to another category.
|
||||
|
||||
* #1348 [fixed] - Showing incorrect grandtotal in invoice section of admin, if order is placed in currency other than base currency.
|
||||
|
||||
* #1334 [fixed] - On editing catalog rule data gets removed from Discount Amount field.
|
||||
|
||||
* #1320 [fixed] - Catalog rule is not working according to selected attributes, if category is not selected.
|
||||
|
||||
* #1319 [fixed] - Getting exception when click on Apply rules if conditions are left empty while creating catalog rule.
|
||||
|
||||
* #1295 [fixed] - Getting exception on changing the locale from cms page.
|
||||
|
||||
* #1288 [fixed] - Getting exception while creating cart rules if any of the dropdown field left blank.
|
||||
|
||||
* #1286 [fixed] - Incorrect discount is showing in cart.
|
||||
|
||||
* #1284 [fixed] - Updated price for variant is not reflected on store.
|
||||
|
||||
* #1277 [fixed] - Getting exception on creating cart rules.
|
||||
|
||||
* #1263 [fixed] - For forgot password Submit button should get disabled if user has already clicked on submit button.
|
||||
|
||||
* #1260 [fixed] - Getting broken image link in email.
|
||||
|
||||
* #1259 [fixed] - Getting exception if using same sku for variants..
|
||||
|
||||
* #1258 [fixed] - If payment is done through paypal then invoice should generate automatically and status of Order should be processing.
|
||||
|
||||
* #1256 [fixed] - Discounted amount is not displaying in invoice and invoice pdf at both customer end and admin end.
|
||||
|
||||
* #1253 [fixed] - Selected Channel for products get deselected after saving the product.
|
||||
|
||||
* #1239 [fixed] - Filterable attributes should not display in layered navigation if there are no product in that particular category.
|
||||
|
||||
* #1235 [fixed] - Attributes are not visible in category page to select as filterable attribute if attributes name are not provided in particular locales.
|
||||
|
||||
* #1234 [fixed] - After selecting direction to filter locale acc to direction no other field appears to select format.
|
||||
|
||||
* #1233 [fixed] - Got exception on front-end when first time changes the locale ,the changed locale have rtl direction.
|
||||
|
||||
* #1229 [fixed] - Issue with currency in customer order section, currency code doesn't get converted at orders page of customer.
|
||||
|
||||
* #1228 [fixed] - Getting issue when entering direct url for customer account profile.
|
||||
|
||||
* #1226 [fixed] - Product variation that has been ordered should display in customer order section in case of configurable product.
|
||||
|
||||
* #1217 [fixed] - Layered navigation for price is not working, when click on bar it shifts to rightmost end.Getting this issue in case of configurable product only.
|
||||
|
||||
* #1216 [fixed] - Price filter of layered navigation not working properly in case of Multi Currency.
|
||||
|
||||
* #1209 [fixed] - There is an image issue while ordering any variant of configurable product.
|
||||
|
||||
* #1190 [fixed] - After printing invoice at customer end, price is not getting change according to currency in invoice.
|
||||
|
||||
* #1177 [fixed] - Getting exception when trying to recover password.
|
||||
|
||||
* #1130 [fixed] - If "does not contain" is used in case of Shipping method, then discount amount get implemented before selecting any shipping method.
|
||||
|
||||
* #1129 [fixed] - Discount not getting applied if "does not contain" condition is used from Actions for Payment Methods.
|
||||
|
||||
* #1015 [fixed] - Adjust Paginator Number of Elements.
|
||||
|
||||
* #973 [fixed] - Edit Slider, get wrong with: An invalid form control with name='image[image_0]' is not focusable.
|
||||
|
||||
* #968 [fixed] - sorting is not working (price).
|
||||
|
||||
* #778 [fixed] - Error when add item to cart.
|
||||
|
||||
## **v0.1.6 (28th of June, 2019)** - *Release*
|
||||
|
||||
* [feature] - Cart rules for providing discount with coupons and without coupons.
|
||||
|
||||
* [feature] - Take notes on customers.
|
||||
|
||||
* [feature] - Added swatch type attribute for products.
|
||||
|
||||
* [feature] - Added file type attribute for products.
|
||||
|
||||
* [feature] - Added image type attribute for products.
|
||||
|
||||
* [feature] - Admins can now export products.
|
||||
|
||||
* [feature] - Activate/Deactivate customers from admin panel.
|
||||
|
||||
* [feature] - Added backorders as global level configuration for Admin.
|
||||
|
||||
* [feature] - REST APIs added as a separate package.
|
||||
|
||||
* [enhancement] - Each channel can choose their respective root category.
|
||||
|
||||
* [enhancement] - Added customer group 'Guest' for guest type user comparison (reference usage in cart rule create and edit).
|
||||
|
||||
* [enhancement] - Global configuration to allow reviews from guests.
|
||||
|
||||
* [enhancement] - Weight unit options added as global configuration.
|
||||
|
||||
* [enhancement] - Dynamic footer bottom text input added as global level configuration.
|
||||
|
||||
* [enhancement] - Admin can now change their logo added as global level configuration.
|
||||
|
||||
* [enhancement] - Added global configuration for news letter subscription.
|
||||
|
||||
* [enhancement] - Added configuration to enable email verification on customer registration.
|
||||
|
||||
* [enhancement] - Dependent field added in system configuration.
|
||||
|
||||
* [optimization] - Removed products dependency from products_datagrid table and that table had been phased out of the system successfully.
|
||||
|
||||
* [optimization] - Massive performance improvements in page load from last stable release of v0.1.5.
|
||||
|
||||
* #1131 [fixed] - If "does not contain" is used in case of Shipping city, then discount amount get implemented before selecting any address.
|
||||
|
||||
* #1127 [fixed] - Getting wrong grandtotal if in cart rule shipping is selected as free.
|
||||
|
||||
* #1114 [fixed] - Unable to search cart rule by name.
|
||||
|
||||
* #1113 [fixed] - Cart rule is not working for guest user.
|
||||
|
||||
* #1112 [fixed] - Provide an option to delete the note added for a customer.
|
||||
|
||||
* #1103 [fixed] - If entered coupon is incorrect then after clicking on Apply coupon button once the button should get disabled until the coupon code changes.
|
||||
|
||||
* #1102 [fixed] - If in condition percentage of product is selected , then also fixed amount discount is applied.
|
||||
|
||||
* #1097 [fixed] - Coupon get applied if only one product is added in cart and from action it is saved as buy atleast 2.
|
||||
|
||||
* #1096 [fixed] - If any discount is already applied on cart and customer uses his coupon to get discount then in this case coupon discount should be applied.
|
||||
|
||||
* #1095 [fixed] - If maximum quantity allowed to discount is selected as 2 then on both product discount should be applied.
|
||||
|
||||
* #1080 [fixed] - Customer should be logged out if admin blocked the user, and a message should display "Your account has been blocked by admin".
|
||||
|
||||
* #1075 [fixed] - Validation error message is not showing for Customer Group.
|
||||
|
||||
* #1069 [fixed] - Getting exception on editing the second customer.
|
||||
|
||||
* #1068 [fixed] - Product Inventory is "Zero" but in product page showing In Stock.
|
||||
|
||||
* #1065 [fixed] - On editing any cart rule if user need to add any new condition then he need to select value from Add Conditions again.
|
||||
|
||||
* #1061 [fixed] - Cart rule not working For Shipping code.
|
||||
|
||||
* #1060 [fixed] - If cart rule is not created for guest then also it is applicable for guest user.
|
||||
|
||||
* #1059 [fixed] - Cart Rule not working for Shipping state. Created a non coupon cart rule for Condition Shipping state but it doesn't get applied.
|
||||
|
||||
* #1053 [fixed] - Discount amount is not displaying in orders.
|
||||
|
||||
* #1052 [fixed] - Coupon is not applicable in case of payment methods.
|
||||
|
||||
* #1051 [fixed] - If cart rule is create for customer having group guest, then also general group customer is also able to use the same coupon.
|
||||
|
||||
* #1050 [fixed] - Coupon code discount amount is not displaying on checkout page.
|
||||
|
||||
* #1011 [fixed] - Channel, Add Condition and Global label field not showing validation error message if user save without entering any data in these fields.
|
||||
|
||||
* #1007 [fixed] - Applying zero discount amount in case of percentage.
|
||||
|
||||
* #1006 [fixed] - Not able to remove coupon if once applied.
|
||||
|
||||
* #1005 [fixed] - Cart rule not working correctly with coupon code.Fixed discount of amount 10 is created but after applying amount need to pay by customer is 10.
|
||||
|
||||
* #1003 [fixed] - Getting exception if on editing any cart rule we select " Use Coupon" as Yes.
|
||||
|
||||
* #1001 [fixed] - Getting error while placing an order.
|
||||
|
||||
* #997 [fixed] - Change the validation for description.
|
||||
|
||||
* #995 [fixed] - [default] en field of labels section disappear after entering data in "Global Label" field.
|
||||
|
||||
* #994 [fixed] - Getting exception while creating cart rules.
|
||||
|
||||
* #993 [fixed] - Rule Name should be alphanumeric.
|
||||
|
||||
* #957 [fixed] - Typo in event fire.
|
||||
|
||||
* #949 [fixed] - Refresh order summary on every checkout step.
|
||||
|
||||
* #939 [fixed] - Not able to save price in decimal for configurable products.
|
||||
|
||||
* #932 [fixed] - Getting incorrect price of product in case of configurable product if custom attribute of select type is used.
|
||||
|
||||
* #923 [fixed] - Required validation is not working for Lines in a Street Address, and add 1 as default line for address field.
|
||||
|
||||
* #917 [fixed] - Attribute name should display with attribute value.
|
||||
|
||||
* #916 [fixed] - SQLSTATE[42S22]: Column not found: 1054 Unknown column 'phone'.
|
||||
|
||||
* #897 [fixed] - Product get saved without image, if used image is large in size.It should throw an error message.
|
||||
|
||||
* #896 [fixed] - getVariantMinPrice does not look at special_price.
|
||||
|
||||
* #894 [fixed] - Storage link command is missing when installing framework through installer.
|
||||
|
||||
* #890 [fixed] - An error message should show if uploaded mage size is large, while saving the category.
|
||||
|
||||
* #879 [fixed] - Getting validation error message for locale while editing attribute.Attribute value is required for all locale.
|
||||
|
||||
* #867 [fixed] - Getting exception if user create shipment for product which has been deleted from catalog.
|
||||
|
||||
* #842 [fixed] - Not able to export. This functionality is not working everywhere, where export is used.
|
||||
|
||||
* #841 [fixed] - Layout issue on 404 Page.
|
||||
|
||||
* #835 [fixed] - Parent Products show instock when all children have quantity 0.
|
||||
|
||||
* #825 [fixed] - unable to update ( is_filterable ) in attributes.
|
||||
|
||||
* #818 [fixed] - Email should sent to the respective inventory from which shipment has been created.
|
||||
|
||||
* #817 [fixed] - Admin should receive an email when an order is placed.
|
||||
|
||||
* #815 [fixed] - Issue in Attribute while creating configurable product.
|
||||
|
||||
* #814 [fixed] - Implement sort order feature for payment methods, so that payment method should display on front-end according to sort-order.
|
||||
|
||||
* #783 [fixed] - Image display issue of product on front-end when installation is done through GUI Installer.
|
||||
|
||||
* #771 [fixed] - Getting exception when login with custom role.
|
||||
|
||||
* #767 [fixed] - After applying filter of status , the result display in boolean for Active/True and Inactive/False.
|
||||
|
||||
* #765 [fixed] - Getting issue in mass deletion for the configurable products if we have saved the products but variation and name of products has not saved.Getting this issue when App_Debug mode is false.
|
||||
|
||||
* #764 [fixed] - Make "Sliders" and "Image" field as required.While creating slider if image is not uploaded then slider is not created and its not showing that this field is required validation message.
|
||||
|
||||
* #763 [fixed] - Add a validation in tax rate that it should not be negative.
|
||||
|
||||
* #762 [fixed] - In Order Section of Customer Account no column is available in filter dropdown.
|
||||
|
||||
* #761 [fixed] - Issue in creating products if special characters are used in sku field.On add Product page if we use special character then it will be saved but when we click on Save Product button it gives validation error message that "The sku must be valid slug." admin.
|
||||
|
||||
* #760 [fixed] - Not able to add product to Wishlist from product page.
|
||||
|
||||
* #759 [fixed] - Text for Add to Cart button is not properly visible on product page for locale pt_BR.
|
||||
|
||||
* #757 [fixed] - Product getting save if price and weight is negative in variants of configurable product.
|
||||
|
||||
* #755 [fixed] - When trying to change display mode for product to list view when locale is "arabic" , it changes to default locale.
|
||||
|
||||
* #753 [fixed] - While creating attribute of type swatch, admin name and name according to locale is showing as required but get saved if field is left as blank, and while creating product this attribute field is blank.
|
||||
|
||||
* #752 [fixed] - On creating custom theme for shop it was also affecting admin panel's frontend.
|
||||
|
||||
* #750 [fixed] - Cross site request forgery.
|
||||
|
||||
* #749 [fixed] - Broken access control.
|
||||
|
||||
* #742 [fixed] - Getting exception when we change locale from Search result page.
|
||||
|
||||
* #741 [fixed] - Trying to get property 'permission_type' of non-object.
|
||||
|
||||
* #730 [fixed] - Add a word limitation for Category name so that after that limit category name should display in different line.
|
||||
|
||||
* #729 [fixed] - Price Slider overlap with category menu.
|
||||
|
||||
* #728 [fixed] - If multiple products are added in cart and we update the quantity of product which is not available then in this case its not showing a message that request quantity is not available, it shows success message that products in cart is updated.
|
||||
|
||||
* #727 [fixed] - Quantity of Product doesn't get updated at product page after generating shipment.
|
||||
|
||||
* #720 [fixed] - Case issue HomeController.php.
|
||||
|
||||
* #718 [fixed] - If user with custom role doesn't have access of Products and if he click on product link given in dashboard then getting exception.It should display unauthorised access message.
|
||||
|
||||
* #717 [fixed] - Url is not working "Add to Cart" in drop shipping manager.
|
||||
|
||||
* #713 [fixed] - Getting exception on deleting default channel.
|
||||
|
||||
* #712 [fixed] - Correct the filter option in Invoice grid.
|
||||
|
||||
* #710 [fixed] - Getting exception when applying filter on Product according to Status.
|
||||
|
||||
* #709 [fixed] - Getting exception when applying filter according to Order Date of Order grid of Admin.
|
||||
|
||||
* #707 [fixed] - If in display mode for categories "Only Product" is selected then description should not display on front-end and if Only "Description" is selected than product should not display for category.
|
||||
|
||||
* #705 [fixed] - For 3 level menu option if access is given for only first menu and third menu , then getting unauthorized access.
|
||||
|
||||
* #699 [fixed] - Active category class missing
|
||||
|
||||
* #671 [fixed] - Having these errors Undefined variable: key/value.
|
||||
|
||||
* #666 [enhancement] - Create possibility of choose the qty os address line.
|
||||
|
||||
* #657 [fixed] - Not able to export order.Not getting any response after clicking on Export.Getting this issue for all export functionality
|
||||
|
||||
* #656 [fixed] - Getting checkout page blank when product is added in cart first and then proceed for checkout.Getting this issue in case of logged-in customer.Getting same issue in case of Buy-now also.
|
||||
|
||||
* #655 [fixed] - Not able to create category with images, category doesn't get save if image is used.
|
||||
|
||||
* #654 [fixed] - Getting Exception while adding product images by gui installer.
|
||||
|
||||
* #647 [fixed] - Special price not working.
|
||||
|
||||
* #646 [fixed] - Warning: array_combine() expects parameter 1 to be array, null given ( install.php on line 32 ).
|
||||
|
||||
* #642 [fixed] - Getting exception on search in Products, Categories, Shipments & Product Reviews datagrids.
|
||||
|
||||
* #639 [fixed] - Broken link of image, on edit page of attribute in case of Swatch Type "Image" when editing first time.
|
||||
|
||||
* #638 [fixed] - Colors are not available in swatch on selecting Swatch Type as "Color Swatch".
|
||||
|
||||
* #636 [fixed] - Getting exception in shipment grid.
|
||||
|
||||
## **v0.1.5 (15th of March, 2019)** - *Release*
|
||||
|
||||
* [feature] - Category display mode.
|
||||
|
||||
* [feature] - Color swatches for product.
|
||||
|
||||
* [feature] - Cross sell and Up sell suggestions.
|
||||
|
||||
* [feature] - Faster search, faster product load on storefront, Product API for fetching with numerous attributes filter.
|
||||
|
||||
* [feature] - Added translations for Arabic and Brazilian languages(thanks to @cgartner-redstage).
|
||||
|
||||
* #676 [fixed] - Can't filter by ID.
|
||||
|
||||
* #671 [fixed] - Having these errors Undefined variable: key/value.
|
||||
|
||||
* #669 [fixed] - Product list view not working in demo.
|
||||
|
||||
* #664 [fixed] - CSS issues
|
||||
|
||||
* #652 [fixed] - Removed black bar in admin panel.
|
||||
|
||||
* #646 [fixed] - Warning: array_combine() expects parameter 1 to be array, null given ( install.php on line 32 )
|
||||
|
||||
* #642 [fixed] - Getting exception on search in Products, Categories, Shipments & Product Reviews datagrids.
|
||||
|
||||
* #639 [fixed] - Broken link of image, on edit page of attribute in case of Swatch Type "Image" when editing first time.
|
||||
|
||||
* #636 [fixed] - Getting exception in shipment grid.
|
||||
|
||||
* #633 [fixed] - Fixed database custom port issue in installer issue (thanks to @abdulhamid-alattar)
|
||||
|
||||
* #621 [Added] - Add a column in product grid to identify the attribute family used for creating that product.
|
||||
|
||||
* #620 [fixed] - "Enter Key" is not working while searching the product.
|
||||
|
||||
* #619 [fixed] - Getting Exception when clicking on Product for which data is set according to locale.
|
||||
|
||||
* #618 [fixed] - Layout issue on Changing Locale.
|
||||
|
||||
* #617 [fixed] - Getting Exception in case of Guest Review on frontend.
|
||||
|
||||
* #616 [fixed] - Getting error message that tax rate field is required when importing tax rate even when value is provided in that field.
|
||||
|
||||
* #615 [Added] - Add a hint of allowed extension type on Import Tax rate pop-up.
|
||||
|
||||
* #612 [fixed] - Layout issue on create Shipment Page.
|
||||
|
||||
* #611 [fixed] - Attribute field name is not displaying on product page for all attribute type except multiselect.
|
||||
|
||||
* #608 [fixed] - Root Category issue while root setting from channel.
|
||||
|
||||
* #597 [Done] - "Boolean" Attribute type issue , when we select yes then 1 is showing on front end.
|
||||
|
||||
* #596 [Fixed] - "Multiselect" Attribute type issue, when we select multiple option then numeric value is showing on the front end.
|
||||
|
||||
* #594 [Added] - Latest order should display on top and add pagination on order page.(For Customer Account).
|
||||
|
||||
* #592 [Added] - "Shipping to" column of Shipment remain blank if shipment for order is generated first and then invoice is created.
|
||||
|
||||
* #589 [Fixed] - Getting exception when product added in wishlist is deleted from admin and user try to add that product to cart from wishlist.
|
||||
|
||||
* #588 [Fixed] - For filter priority placeholder text should be numeric In Inventory Source grid.
|
||||
|
||||
* #587 [Fixed] - Layout issue in order grid of customer.
|
||||
|
||||
* #586 [Fixed] - Getting Exception in importing tax rates.
|
||||
|
||||
* #585 [Fixed] - Getting Exception when using filter according to Id in Order grid.
|
||||
|
||||
* #581 [Fixed] - Translation issues when switching between any two languages, specifically categories in nav does not revert back.
|
||||
|
||||
* #575 [Fixed] - TestDataGrid does not exist
|
||||
|
||||
* #560 [Fixed] - Buy Now Issue on Demo.
|
||||
|
||||
* #556 [Fixed] - Getting Incorrect Grandtotal and delivery charge at checkout page if currency use is other than default.
|
||||
|
||||
* #555 [Fixed] - Negative numbers and zero is not required in filter for Id.
|
||||
|
||||
* #553 [Fixed] - Showing error on wrong field while using country type field in case of required.
|
||||
|
||||
* #551 [Fixed] - Able to delete root category.
|
||||
|
||||
* #546 [Fixed] - Getting Exception while uploading category image after installing project using installer.
|
||||
|
||||
* #545 [Fixed] - Installer doesn't launch admin panel of framework.
|
||||
|
||||
* #534 [Fixed] - Product is displaying as out of stock if default Inventory is zero, while other Inventory sources have products.
|
||||
|
||||
* #533 [Fixed] - Displaying incorrect number of product on front-end.
|
||||
|
||||
## **v0.1.4 (4th of Febuary, 2019)** - *Release*
|
||||
|
||||
* [fixed] - Customer account menu issue fixed.
|
||||
|
||||
* [fixed] - Channel's homepage content updated.
|
||||
|
||||
## **v0.1.4-BETA4 (4th of Febuary, 2019)** - *Release*
|
||||
|
||||
* [feature] - Product flat, a product subsystem for faster product search, filter & sort on the storefront.
|
||||
|
||||
* [feature] - Configurations loaded up in admin panel for almost all necessary things such as payments, shipments, etc.
|
||||
|
||||
* [feature] - Faster and efficiently refactored datagrids for showing listing data.
|
||||
|
||||
* #532 [fixed] - Pagination should not display if there is no product on other page.If 9 products are selected to show on a single page then until the limit reach pagination should not occur.
|
||||
|
||||
* #531 [fixed] - Do not use short form of any words for notification.
|
||||
|
||||
* #530 [fixed] - Unable to delete any of the created attributes.Getting validation message that attribute is used in configurable product while attribute is not used for creating any product.
|
||||
|
||||
* #524 [fixed] - Getting Exception when login with user having custom role(ACL issue).
|
||||
|
||||
* #523 [fixed] - Status column of review page remains blank if Status is change to disapprove(Mass update).
|
||||
|
||||
* #519 [fixed] - Status column of Review remains blank if review is in Pending state.
|
||||
|
||||
* #514 [fixed] - Getting Exception on changing the status of Product(On mass update).
|
||||
|
||||
* #513 [fixed] - Getting Exception in deleting categories.
|
||||
|
||||
* #508 [fixed] - Correct the required php version in installer.
|
||||
|
||||
* #506 [fixed] - While Installing the framework through Installer if at any stage user click on back button and then click on continue to install, then in this case unable to install.
|
||||
|
||||
* #457 [fixed] - Admin add product "Undefined variable: configurableFamily".
|
||||
|
||||
* #453 [fixed] - Installation of Master Branch.
|
||||
|
||||
* #438 [fixed] - Simple Select Attribute Issue
|
||||
|
||||
* #426 [fixed] - php artisan down does not work.
|
||||
|
||||
* #402 [fixed] - Change the validation message on moving product from wish-list to cart if product added in wish-list is out of stock.
|
||||
|
||||
* #399 [fixed] - Accepting future date of birth for customer.
|
||||
|
||||
* #396 [fixed] - Layout issue on changing locale.
|
||||
|
||||
* #381 [fixed] - On front-end currency symbol display only for Indian Rupee and USD. If code is selected other than these two in currency then code displays before price.
|
||||
|
||||
* #378 [fixed] - Images that are applied on Category doesn't display in Edit Category Page.
|
||||
|
||||
* #369 [fixed] - Displaying incorrect response message on updating the status of products.
|
||||
|
||||
* #368 [fixed] - If products are added in shopping cart and those product get deleted from admin section then it still displays in cart.
|
||||
|
||||
* #363 [fixed] - Unable to delete last tax rate.
|
||||
|
||||
* #353 [fixed] - Getting exception in deleting currency.
|
||||
|
||||
* #347 [fixed] - Pricing Issue.
|
||||
|
||||
* #334 [fixed] - My Account Grid displays blank after the bagisto 0.1.2 installation.
|
||||
|
||||
* #304 [fixed] - If a current user want to delete his account then in this case a password verification should be required before deleting the user.
|
||||
|
||||
* #301 [fixed] - Only customer that are on first page get exported.
|
||||
|
||||
* #191 [fixed] - Add a column Shipped to in Order Grid ,to display the name for whom order has been shipped.
|
||||
|
||||
* #143 [fixed] - If user login from checkout page, then it should redirect to checkout page.
|
||||
|
||||
## **v0.1.3 (20th of December, 2018)** - *Release*
|
||||
|
||||
* [feature] Mass selection features had been implemented in datagrid for deletion and mass updation purposes
|
||||
|
||||
* [feature] New filter for boolean values like active/inactive or true/false and date values native filters added in datagrid, can be seen in product grid and other data grids of admin section
|
||||
|
||||
* [feature] Core configuration section had been implemented so that all the sytem's core settings can be managed from a single place inside admin panel
|
||||
|
||||
* [critical fix] XSS vulnerability fix for datagrid thanks to anonymous user for informing
|
||||
|
||||
* [fixes] Optimized exception handler (thanks to @AliN11)
|
||||
|
||||
* #332 [fixed] Unable to change the status of user
|
||||
|
||||
* #326 [enhanced] Only customer that are on first page get exported
|
||||
|
||||
* #324 [enhanced] Change the Button title "Create Tax Rate" to "Save Tax Rate" on Tax Rate page
|
||||
|
||||
* #315 [fixed] Getting exception if time taken to subscribe for newsletter increases.Add email validation in newsletter field
|
||||
|
||||
* #314 [fixed] No success message after deleting the News Letter Subscribers
|
||||
|
||||
* #308 [fixed] Accepting the future date of birth in Customer Grid
|
||||
|
||||
* #307 [fixed] Incorrect success message after updating the News Letter Subscribers
|
||||
|
||||
* #306 [enhanced] Customers display randomly irrespective of their id
|
||||
|
||||
* #305 [fixed] Displaying incorrect role name in account
|
||||
|
||||
* #301 [fixed] Only customer that are on first page get exported
|
||||
|
||||
* #298 [enhanced] Provide an Option to delete all reviews in Review section of a customer
|
||||
|
||||
* #295 [fixed] Unable to change gender of customers from Edit Customer Page
|
||||
|
||||
* #287 [fixed] No Status for Order, in customer order grid if Order is placed using "Paypal Standard Payment" method
|
||||
|
||||
* #286 [fixed] Unable to update attribute
|
||||
|
||||
* #285 [enahanced] Add export functionality for Orders, Invoice and Shipment
|
||||
|
||||
* #284 [fixed] Issue with price field.Accepting string also, and if space is provided between two number(5 4) than the price of product is displaying as 5 on frontend
|
||||
|
||||
* #283 [fixed] Unable to copy text from any grid
|
||||
|
||||
* #279 [fixed] If Inventory source is not selected as active then also after saving it, its status changes to Active
|
||||
|
||||
* #278 [fixed] Images that are applied on Category doesn't display in Edit Category Page
|
||||
|
||||
* #277 [fixed] No email and number validation in Inventory Source Grid
|
||||
|
||||
* #276 [fixed] Description started from centre in Categories and Tax Category
|
||||
|
||||
* #275 [enhanced] Recent Orders, Shipment and Invoice should display first in grid
|
||||
|
||||
* #273 [fixed] Add a validation on price field that it should be numeric on Edit Product Page
|
||||
|
||||
* #272 [fixed] Getting Exception when click on Save Invoice
|
||||
|
||||
* #271 [fixed] Provide little space between line and text in review section(frontend)
|
||||
|
||||
* #269 [fixed] Weight of Product is displaying in negative
|
||||
|
||||
* #268 [enhanced] Newly Created Product should display first in Product Grid
|
||||
|
||||
* #267 [enhanced] Add Pagination for search page on frontend
|
||||
|
||||
* #264 [enhanced] Provide mass delete and mass update option in product grid
|
||||
|
||||
* #263 [enhanced] Filter for visible in menu is not working in Category grid.
|
||||
|
||||
* #262 [fixed] System attributes are also getting deleted
|
||||
|
||||
* #260 [fixed] Layout issue in Order Status
|
||||
|
||||
* #238 [enhanced] Provide a mass selection option to approve a review
|
||||
|
||||
* #228 [enhanced] bagisto icon should be clickable and by clicking on it, it should redirect to dashboard
|
||||
|
||||
* #226 [fixed] Correct the spelling of "expensive" in Sort By
|
||||
|
||||
* #213 [fixed] View all link is not required on Rating and Review page
|
||||
|
||||
* #209 [enhanced] Add filter according to date in order grid
|
||||
|
||||
* #204 [enhanced] A pop-up confirmation should display before deleting an address
|
||||
|
||||
* #199 [enhanced] Add button and filter dropdown should be aligned.Changes required in every grid
|
||||
|
||||
* #190 [fixed] Add a default group General in "Customer Group" grid and by default customer should lay in this group
|
||||
|
||||
* #187 [enhanced] We can add column "Group Name" instead of Group Id and also add this column in filter in Customers Grid
|
||||
|
||||
* #183 [enhanced] In Target Currency dropdown , currencies for which rate has already been set should not display in dropdown
|
||||
|
||||
* #182 [fixed] Layout issue on Add Exchange Rate page
|
||||
|
||||
* #165 [fixed] If a Product is selected as disabled at time of creation,then also it is visible at store front
|
||||
|
||||
* #155 [enhanced] If a customer writes any review for product then that review is not visible in review section of customer profile until it is approved by admin
|
||||
|
||||
* #128 [enhanced] Calender icon should also be clickable,and on click calender should display
|
||||
|
||||
## **v0.1.2 (30th of November, 2018)** - *Release*
|
||||
|
||||
* [feature] Paypal integration for online payments
|
||||
|
||||
* [feature] Newsletter subscription
|
||||
|
||||
* [feature] Email Verification for customers
|
||||
|
||||
* [feature] News letter grid for Admin
|
||||
|
||||
* #247 - [fixed] Displaying wrong number of products and sales in category, on dashboard
|
||||
|
||||
* #245 - [fixed] Add Sales and Customers also in Custom Permission option of Access Control
|
||||
|
||||
* #244 - [fixed] Getting exception when applying sorting on Tax Rate
|
||||
|
||||
* #242 - [fixed] Confirmation message should be "Do you really want to edit this record?", on editing slider
|
||||
|
||||
* #237 - [fixed] Incorrect response message after deleting product from wishlist
|
||||
|
||||
* #236 - [fixed] Incorrect response message after removing a product from cart
|
||||
|
||||
* #235 - [fixed] User name should display on account dropdown(In case of signed-in user)
|
||||
|
||||
* #232 - [added] Add sorting functionality in column "Name" of Inventory Grid
|
||||
|
||||
* #230 - [added] Add Sorting functionality on column "Status" of Product Grid
|
||||
|
||||
* #229 - [added] Add sorting functionality on Column "Type" in Product Grid, so that product can be sorted according to type
|
||||
|
||||
* #225 - [fixed] Slider button should display as clickable on mouse hover
|
||||
|
||||
* #224 - [fixed] Status column in Invoice remains blank
|
||||
|
||||
* #216 - [added] Add a Column "Channel" to verify from which channel order has been placed and also add this column in filter
|
||||
|
||||
* #207 - [fixed] Two button are not required to save address
|
||||
|
||||
* #206 - [fixed] Correct the confirmation message in pop-up when click on Edit User
|
||||
|
||||
* #202 - [fixed] Correct the background text of filter field in Taxes grid.Text should be according to selected column(placeholder)
|
||||
|
||||
* #201 - [fixed] Getting exception when applying filter in slider
|
||||
|
||||
* #200 - [fixed] Getting exception when applying filter on Exchange Rates grid
|
||||
|
||||
* #192 - [fixed] Not able to checkout with different shipping address
|
||||
|
||||
* #188 - [fixed] Unable to delete Customer Group
|
||||
|
||||
* #187 - [fixed] We can add column "Group Name" instead of Group Id and also add this column in filter in Customers Grid
|
||||
|
||||
* #185 - [fixed] Search not working in responsive mode
|
||||
|
||||
* #184 - [fixed] Product page mandatory fields are missing '*' or asterisk as failing to indicate required field and inappropriate validation message
|
||||
|
||||
* #181 - [fixed] Change the column name in filter from "Target Currency" to "Currency Name"
|
||||
|
||||
* #180 - [fixed] Not accepting the code for Currency if it is already used in locales
|
||||
|
||||
* #178 - [fixed] Change the Column Name
|
||||
|
||||
* #177 - [fixed] Getting Exception when clicking on column locale
|
||||
|
||||
* #175 - [fixed] Getting exception in deleting attributes
|
||||
|
||||
* #174 - [fixed] Getting Exception while applying filter on category page
|
||||
|
||||
* #173 - [fixed] Getting 500 Internal Server Error on Updating taxes
|
||||
|
||||
* #172 - [fixed] Getting 500 Internal Server Error on updating Users
|
||||
|
||||
* #166 - [fixed] Getting 404 error on deleting order
|
||||
|
||||
* #165 - [fixed] If a Product is selected as disabled at time of creation,then also it is visible at store front
|
||||
|
||||
* #165 - [feature] No grid is available in back-end to manage Newsletter
|
||||
|
||||
* #164 - [fixed] Loss of data from content field of Slider
|
||||
|
||||
* #162 - [fixed] No response when click on "Add to Cart" for configurable product on home page and category page
|
||||
|
||||
* #162 - [fixed] No response when click on "Add to Cart" for configurable product on home page and category page
|
||||
|
||||
* #161 - [fixed] Inappropriate validation message(System wide fix is applied for validation messages)
|
||||
|
||||
* #157 - [fixed] Old password check in edit profile ain't working for customers
|
||||
|
||||
* #154 - [fixed] While creating channel Description field,Home Page Content and footer _content is required, but it doesn't throw any validation error if we leave that field blank
|
||||
|
||||
* #151 - [fixed] Description and Short description field are throwing validation error message even if description is written
|
||||
|
||||
* #150 - [fixed] If currency changes on store front then on admin panel in Order Grid currency changes according to store front
|
||||
|
||||
* #149 - [fixed] Getting exception in creating configurable product.
|
||||
|
||||
* #148 - [fixed] Search Functionality is not working in all grid of Admin panel
|
||||
|
||||
* #146 - [fixed] Tax is not added on product at checkout
|
||||
|
||||
* #145 - [fixed] Edit Functionality of Tax Categories is not Working
|
||||
|
||||
* #144 - [fixed] "Move All Products To Cart" and "Delete All" link is not working in Wishlist grid(Move all products to cart is removed and delete all works now)
|
||||
|
||||
* #142 - [fixed] Correct the spelling of "default" in theme
|
||||
|
||||
* #141 - [fixed] Subscribe button on storefront is unresponsive
|
||||
|
||||
* #139 - [fixed] Encountered exception while changing locale on storefront
|
||||
|
||||
* #137 - [fixed] By default Gender is selected as Male for every customer
|
||||
|
||||
* #134 - [fixed] Unable to login with the user account that is created in user grid with custom access
|
||||
|
||||
* #133 - [fixed] Add asterisk symbol for email field in Add User page
|
||||
|
||||
* #132 - [fixed] Issue in Mass Deletion.This issue exists for every grid(mass actions will return in next release and the issue will remain open till next release)
|
||||
|
||||
* #129 - [fixed] Getting issue when deleting orders.Mass action is not working in any grid(Getting Internal server error) while updating status(mass actions will return in next release and the issue will remain open till next release)
|
||||
|
||||
* #126 - [fixed] Add asterisk symbol on SKU field
|
||||
|
||||
* #125 - [fixed] Delete button is not available for mass delete of Products in Product Grid(mass actions will return in next release and the issue will remain open till next release)
|
||||
|
||||
* #121 - [fixed] buy now button is not working on index page for some products
|
||||
|
||||
* #120 - [fixed] After signup on the frontend, the customer is still not the signup page
|
||||
|
||||
* #119 - [fixed] Set value in the login form fields(on Demo)
|
||||
|
||||
* [fixes] More ACL added.
|
||||
|
||||
## **v0.1.1 (13th of November, 2018)** - *Release*
|
||||
|
||||
* #114 - [fixed] Invoice printing added as a feature
|
||||
|
||||
* #98 - [fixed] No warning before removing the item from the cart
|
||||
|
||||
* #97 - [fixed] client side validation / js validation is missing at login page
|
||||
|
||||
* #96 - [fixed] Search button does not work(@prashant-webkul)
|
||||
|
||||
* #95 - [fixed] Buy Now Button does not work(@prashant-webkul)
|
||||
|
||||
* #94 - [fixed] Sign-in page shows signup text(@prashant-webkul)
|
||||
|
||||
* [fixed] Email templates logo issue fixed(@jitendra-webkul)
|
||||
|
||||
* [fixed] Front search issue fixed due to hardcoded attribute code in search criteria(@jitendra-webkul)
|
||||
|
||||
* [changed] Versioning of core packages
|
||||
|
||||
* [fixed] Buynow validation fixes(@jitendra-webkul)
|
||||
|
||||
* [feature] New action type added in datagrid
|
||||
|
||||
* [feature] Loader added in storefront product page
|
||||
|
||||
* [fixed] Tax rates and categories form fixes(@jitendra-webkul)
|
||||
|
||||
* [feature] Country state selector added where country and states were there originally in release v0.1.0
|
||||
|
||||
* [feature] Multiple addresses for customers with CRUD
|
||||
|
||||
* [feature] Customer can now make any of his/her existing address a default address
|
||||
|
||||
* [fixed] Customer address 2 form field validation required changed to optional(@jitendra-webkul)
|
||||
|
||||
* [fixed] Tax rates validation fixes for zip ranges(@prashant-webkul)
|
||||
|
||||
* [changed] Core packages composer file parameter name changed from namespace webkul to bagisto
|
||||
|
||||
* [feature] Payment package added in core packages
|
||||
|
||||
* [feature] Sales module added in admin with orders, invoices and shipments with datagrid
|
||||
|
||||
* [feature] Functionality to indicate the new and featured product in the product's add and edit form
|
||||
|
||||
* [feature] Cart actions more faster in storefront
|
||||
|
||||
* [changed] Responsive styles refined and extended for checkout pages on storefront
|
||||
|
||||
* [fixed] Various UI/UX fixes in store front styles and layouts(@prashant-webkul & @jitendra-webkul)
|
||||
|
||||
## **v0.1.0 (30th of October 2018)** - *First Release*
|
||||
|
||||
* [feature] Add and modify product with simple and configurable types
|
||||
|
||||
* [feature] Add and modify attributes and attribute families for creating products
|
||||
|
||||
* [feature] Datagrid for all the major core resources added as index for listing core resources like product, attributes
|
||||
|
||||
* [feature] Add and modify channels for creating multiple storefront
|
||||
|
||||
* [feature] Add and modify categories to be displayed on storefront
|
||||
|
||||
* [feature] Add and modify customers
|
||||
|
||||
* [feature] Add and modify customer groups
|
||||
|
||||
* [feature] Add and modify customer reviews for moderation by admin
|
||||
|
||||
* [feature] Add and modify currently logged in admin user details
|
||||
|
||||
* [feature] Add and modify locales for multiple languages support system wide
|
||||
|
||||
* [feature] Add and modify currencies to be used in channels
|
||||
|
||||
* [feature] Add and modify currency exchange rate for the stores accepting multiple currencies or using multiple channels
|
||||
|
||||
* [feature] Add and modify inventory sources with priority to hold products quantities in real time
|
||||
|
||||
* [feature] Add and modify channels
|
||||
|
||||
* [feature] Add and modify user from admins access with customer roles
|
||||
|
||||
* [feature] Add and modify customer roles for users
|
||||
|
||||
* [feature] Add and modify slider for storefront as a CMS capability
|
||||
|
||||
* [feature] Add and modify tax categories and tax rates
|
||||
|
||||
* [feature] Shopping cart in storefront
|
||||
|
||||
* [feature] Wishlist for customer
|
||||
|
||||
* [feature] Single address for customer
|
||||
|
||||
* [feature] Customer can see his reviews in his account section when logged in
|
||||
|
||||
* [feature] Customer profile edit feature account section when logged in
|
||||
|
||||
* [feature] Customer can view his orders in account section when logged in
|
||||
|
||||
* [feature] Customer order notifications via mails
|
||||
|
||||
* [feature] Multiple locales and currencies on storefront
|
||||
|
||||
* [feature] Locale translations are stored as a separate file in shop and admin packages
|
||||
|
||||
* [feature] Single page checkout system for checkout
|
||||
|
||||
* [feature] Custom themes and assets provisioning included as a integrated package called "theme" in packages
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
# CHANGELOG for v0.2.x
|
||||
|
||||
This changelog consists the bug & security fixes and new features being included in the releases listed below.
|
||||
|
||||
## **v0.2.0 (23th of December, 2019)** - *Release*
|
||||
|
||||
* #1959 [fixed] - if admin has set the same condition twice, then catalog rule is not getting apply
|
||||
|
||||
* #1958 [fixed] - getting exception on front end, if action type is Buy x get y free in non couponable cart rule.
|
||||
|
||||
* #1957 [fixed] - if action type is Fixed Amount to Whole Cart, then apply to shipping option should get hide.
|
||||
|
||||
* #1955 [fixed] - Message need to be changed on mouse hover on cross symbol next to applied coupon.
|
||||
|
||||
* #1954 [fixed] - If any different tax category has been assigned to variants in configurable product, then while using tax category condition in cart rule, rule is not working properly.
|
||||
|
||||
* #1950 [fixed] - multiple catalog rule should not get get applied, if 1st one has been created as End Other Rules = yes
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,76 @@
|
|||
# Contributor Covenant Code of Conduct
|
||||
|
||||
## Our Pledge
|
||||
|
||||
In the interest of fostering an open and welcoming environment, we as
|
||||
contributors and maintainers pledge to making participation in our project and
|
||||
our community a harassment-free experience for everyone, regardless of age, body
|
||||
size, disability, ethnicity, sex characteristics, gender identity and expression,
|
||||
level of experience, education, socio-economic status, nationality, personal
|
||||
appearance, race, religion, or sexual identity and orientation.
|
||||
|
||||
## Our Standards
|
||||
|
||||
Examples of behavior that contributes to creating a positive environment
|
||||
include:
|
||||
|
||||
* Using welcoming and inclusive language
|
||||
* Being respectful of differing viewpoints and experiences
|
||||
* Gracefully accepting constructive criticism
|
||||
* Focusing on what is best for the community
|
||||
* Showing empathy towards other community members
|
||||
|
||||
Examples of unacceptable behavior by participants include:
|
||||
|
||||
* The use of sexualized language or imagery and unwelcome sexual attention or
|
||||
advances
|
||||
* Trolling, insulting/derogatory comments, and personal or political attacks
|
||||
* Public or private harassment
|
||||
* Publishing others' private information, such as a physical or electronic
|
||||
address, without explicit permission
|
||||
* Other conduct which could reasonably be considered inappropriate in a
|
||||
professional setting
|
||||
|
||||
## Our Responsibilities
|
||||
|
||||
Project maintainers are responsible for clarifying the standards of acceptable
|
||||
behavior and are expected to take appropriate and fair corrective action in
|
||||
response to any instances of unacceptable behavior.
|
||||
|
||||
Project maintainers have the right and responsibility to remove, edit, or
|
||||
reject comments, commits, code, wiki edits, issues, and other contributions
|
||||
that are not aligned to this Code of Conduct, or to ban temporarily or
|
||||
permanently any contributor for other behaviors that they deem inappropriate,
|
||||
threatening, offensive, or harmful.
|
||||
|
||||
## Scope
|
||||
|
||||
This Code of Conduct applies both within project spaces and in public spaces
|
||||
when an individual is representing the project or its community. Examples of
|
||||
representing a project or community include using an official project e-mail
|
||||
address, posting via an official social media account, or acting as an appointed
|
||||
representative at an online or offline event. Representation of a project may be
|
||||
further defined and clarified by project maintainers.
|
||||
|
||||
## Enforcement
|
||||
|
||||
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
||||
reported by contacting the project team at support@bagisto.com. All
|
||||
complaints will be reviewed and investigated and will result in a response that
|
||||
is deemed necessary and appropriate to the circumstances. The project team is
|
||||
obligated to maintain confidentiality with regard to the reporter of an incident.
|
||||
Further details of specific enforcement policies may be posted separately.
|
||||
|
||||
Project maintainers who do not follow or enforce the Code of Conduct in good
|
||||
faith may face temporary or permanent repercussions as determined by other
|
||||
members of the project's leadership.
|
||||
|
||||
## Attribution
|
||||
|
||||
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
||||
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
|
||||
|
||||
[homepage]: https://www.contributor-covenant.org
|
||||
|
||||
For answers to common questions about this code of conduct, see
|
||||
https://www.contributor-covenant.org/faq
|
||||
|
|
@ -0,0 +1,61 @@
|
|||
# Bagisto Contribution Guide
|
||||
|
||||
**BUGS:**
|
||||
|
||||
To encourage active collaboration, Bagisto encourages pull requests, not just bug reports. "Bug reports" may also be sent in the form of a pull request containing negative test.
|
||||
|
||||
However, when filing a bug report, your issue should contain a title and a clear description of the issue. You should also include as much relevant information as possible and a code sample that demonstrates the issue. The goal of a bug report is to make it easy for yourself - and others - to replicate the bug and develop a fix.
|
||||
|
||||
Remember, bug reports are created in the hope that others with the same problem will be able to collaborate with you on solving it. Creating a bug report serves to help yourself and others start on the path of fixing the problem.
|
||||
|
||||
**Projects that you can contribute in:**
|
||||
|
||||
1. Bagisto
|
||||
|
||||
2. Bagisto docs
|
||||
|
||||
3. Laravel-aliexpress-dropship
|
||||
|
||||
4. Laravel-aliexpress-dropship-chrome-extension
|
||||
|
||||
5. Bagisto-custom-style-extension
|
||||
|
||||
**Core development ideas or discussion:**
|
||||
|
||||
If you propose a new feature, please be willing to implement at least some of the code that would be needed to complete the feature.
|
||||
|
||||
Informal discussion regarding bugs, new features, and implementation of existing features takes place in the comments of the issues filed using feature template.
|
||||
|
||||
**Which branch you should target?**
|
||||
|
||||
All bug fixes should be sent to the latest staging branch i.e development branch. Bug fixes should never be sent to the master branch unless they fix features that exist only in the upcoming release.
|
||||
|
||||
Minor features that are fully backwards compatible with the current Laravel release may be sent to the latest stable branch.
|
||||
|
||||
Major new features should always be sent to the master branch, which contains the upcoming Bagisto release.
|
||||
|
||||
**Compiling assets:**
|
||||
|
||||
If you are submitting a change that will affect a compiled file, such as most of the files in admin/resources/assets/sass or admin/resources/assets/js of the Bagisto repository, do not commit the compiled files. Due to their large size, they cannot realistically be reviewed by a maintainer. This could be exploited as a way to inject malicious code into Bagisto. In order to defensively prevent this, all compiled files will be generated and committed by Bagisto maintainers.
|
||||
|
||||
**Code style:**
|
||||
|
||||
Bagisto follow PSR-2 for coding standard and PSR-4 as of Laravel for autoloading standards.
|
||||
|
||||
**PHPDoc:**
|
||||
|
||||
Below is an example of a valid Bagisto doc block. Note that the @param attribute is followed by two spaces, the argument type, two more spaces, and finally the variable name:
|
||||
|
||||
/**
|
||||
* Register a service with CoreServiceProvider.
|
||||
*
|
||||
* @param string|array $loader
|
||||
* @param \Closure|string|null $concrete
|
||||
* @param bool $shared
|
||||
* @return void
|
||||
* @throws \Exception
|
||||
*/
|
||||
protected function registerFacades($loader, $concrete = null, $shared = false)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
MIT License
|
||||
|
||||
Copyright 2010-2018, Webkul Software
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is furnished
|
||||
to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
|
||||
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||||
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
|
@ -0,0 +1,185 @@
|
|||
<p align="center">
|
||||
<a href="http://www.bagisto.com"><img src="https://bagisto.com/wp-content/themes/bagisto/images/logo.png" alt="Total Downloads"></a>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<a href="https://packagist.org/packages/bagisto/bagisto"><img src="https://poser.pugx.org/bagisto/bagisto/d/total.svg" alt="Total Downloads"></a>
|
||||
<a href="https://packagist.org/packages/bagisto/bagisto"><img src="https://poser.pugx.org/bagisto/bagisto/v/stable.svg" alt="Latest Stable Version"></a>
|
||||
<a href="https://packagist.org/packages/bagisto/bagisto"><img src="https://poser.pugx.org/bagisto/bagisto/license.svg" alt="License"></a>
|
||||
<a href="https://github.com/bagisto/bagisto/actions"><img src="https://github.com/bagisto/bagisto/workflows/CI/badge.svg" alt="Backers on Open Collective"></a>
|
||||
<a href="#backers"><img src="https://opencollective.com/bagisto/backers/badge.svg" alt="Backers on Open Collective"></a>
|
||||
<a href="#sponsors"><img src="https://opencollective.com/bagisto/sponsors/badge.svg" alt="Sponsors on Open Collective"></a>
|
||||
</p>
|
||||
|
||||
## Topics
|
||||
1. [Introduction](#introduction)
|
||||
2. [Documentation](#documentation)
|
||||
3. [Requirements](#requirements)
|
||||
4. [Installation & Configuration](#installation-and-configuration)
|
||||
5. [License](#license)
|
||||
6. [Security Vulnerabilities](#security-vulnerabilities)
|
||||
7. [Modules](#modules)
|
||||
8. [Miscellaneous](#miscellaneous)
|
||||
|
||||
### Introduction
|
||||
|
||||
[Bagisto](https://www.bagisto.com) is a hand tailored E-Commerce framework built on some of the hottest opensource technologies
|
||||
such as [Laravel](https://laravel.com) (a [PHP](https://secure.php.net/) framework) and [Vue.js](https://vuejs.org)
|
||||
a progressive Javascript framework.
|
||||
|
||||
**Bagisto can help you to cut down your time, cost, and workforce for building online stores or migrating from physical stores
|
||||
to the ever demanding online world. Your business -- whether small or huge -- can benefit. And it's very simple to set it up.**
|
||||
|
||||
**Read our documentation: [Bagisto Docs](https://devdocs.bagisto.com/)**
|
||||
|
||||
**We also have a forum for any type of concerns, feature requests, or discussions. Please visit: [Bagisto Forums](https://forums.bagisto.com/)**
|
||||
|
||||
# Visit our live [Demo](https://demo.bagisto.com)
|
||||
|
||||
It packs in lots of features that will allow your E-Commerce business to scale in no time:
|
||||
|
||||
* Multiple Channels, Locale, Currencies.
|
||||
* Built-in Access Control Layer.
|
||||
* Beautiful and Responsive Storefront.
|
||||
* Descriptive and Simple Admin Panel.
|
||||
* Admin Dashboard.
|
||||
* Custom Attributes.
|
||||
* Built on Modular Approach.
|
||||
* Support for Multiple Store Themes.
|
||||
* Multistore Inventory System.
|
||||
* Orders Management System.
|
||||
* Customer Cart, Wishlist, Product Reviews.
|
||||
* Simple, Configurable, Group, Bundle, Downloadable and Virtual Products.
|
||||
* Price rules (Discount) inbuilt.
|
||||
* Theme (Velocity).
|
||||
* CMS Pages.
|
||||
* Check out [these features and more](https://bagisto.com/features/).
|
||||
|
||||
**For Developers**:
|
||||
Take advantage of two of the hottest frameworks used in this project -- Laravel and Vue.js -- both of which have been used in Bagisto.
|
||||
|
||||
### Documentation
|
||||
|
||||
#### Bagisto Documentation [https://devdocs.bagisto.com](https://devdocs.bagisto.com)
|
||||
|
||||
### Requirements
|
||||
|
||||
* **SERVER**: Apache 2 or NGINX.
|
||||
* **RAM**: 3 GB or higher.
|
||||
* **PHP**: 7.3 or higher.
|
||||
* **For MySQL users**: 5.7.23 or higher.
|
||||
* **For MariaDB users**: 10.2.7 or Higher.
|
||||
* **Node**: 8.11.3 LTS or higher.
|
||||
* **Composer**: 1.6.5 or higher.
|
||||
|
||||
### Installation and Configuration
|
||||
|
||||
**1. You can install Bagisto by using the GUI installer.**
|
||||
|
||||
##### a. Download zip from the link below:
|
||||
|
||||
[Download the latest release](https://github.com/bagisto/bagisto/releases/latest)
|
||||
|
||||
##### b. Extract the contents of zip and execute the project in your browser:
|
||||
|
||||
~~~
|
||||
http(s)://example.com
|
||||
~~~
|
||||
|
||||
**2. Or you can install Bagisto from your console.**
|
||||
|
||||
##### Execute these commands below, in order
|
||||
|
||||
~~~
|
||||
1. composer create-project bagisto/bagisto
|
||||
~~~
|
||||
|
||||
~~~
|
||||
2. php artisan bagisto:install
|
||||
~~~
|
||||
|
||||
**To execute Bagisto**:
|
||||
|
||||
##### On server:
|
||||
|
||||
Warning: Before going into production mode we recommend you uninstall developer dependencies.
|
||||
In order to do that, run the command below:
|
||||
|
||||
> composer install --no-dev
|
||||
|
||||
~~~
|
||||
Open the specified entry point in your hosts file in your browser or make an entry in hosts file if not done.
|
||||
~~~
|
||||
|
||||
##### On local:
|
||||
|
||||
~~~
|
||||
php artisan serve
|
||||
~~~
|
||||
|
||||
|
||||
**How to log in as admin:**
|
||||
|
||||
> *http(s)://example.com/admin/login*
|
||||
|
||||
~~~
|
||||
email:admin@example.com
|
||||
password:admin123
|
||||
~~~
|
||||
|
||||
**How to log in as customer:**
|
||||
|
||||
*You can directly register as customer and then login.*
|
||||
|
||||
> *http(s)://example.com/customer/register*
|
||||
|
||||
|
||||
### License
|
||||
Bagisto is a truly opensource E-Commerce framework which will always be free under the [MIT License](https://github.com/bagisto/bagisto/blob/master/LICENSE).
|
||||
|
||||
### Security Vulnerabilities
|
||||
Please don't disclose security vulnerabilities publicly. If you find any security vulnerability in Bagisto then please email us: mailto:support@bagisto.com.
|
||||
|
||||
### Modules
|
||||
[Available Modules](https://bagisto.com/en/extensions)
|
||||
|
||||
Need something else? Email us at support@bagisto.com.
|
||||
|
||||
### Miscellaneous
|
||||
|
||||
#### Contribute
|
||||
|
||||
Bagisto is a community driven project, we appreciate every contribution from the community
|
||||
|
||||
- If you found an issue that you think we should know about, or if you have a suggestion, please submit an issue.
|
||||
- If you want to submit a solution or offer a new feature, please create a pull request.
|
||||
|
||||
Please read our [contributing guide](https://github.com/bagisto/bagisto/blob/master/.github/CONTRIBUTING.md) for more info.
|
||||
|
||||
#### Contributors
|
||||
|
||||
This project is on [Open Collective](https://opencollective.com/bagisto) and it exists thanks to the people who contribute.
|
||||
|
||||
<a href="https://github.com/bagisto/bagisto/graphs/contributors"><img src="https://opencollective.com/bagisto/contributors.svg?width=890&button=false"/></a>
|
||||
|
||||
#### Backers
|
||||
|
||||
Thank you to all our backers! 🙏
|
||||
|
||||
<a href="https://opencollective.com/bagisto#contributors" target="_blank"><img src="https://opencollective.com/bagisto/backers.svg?width=890"></a>
|
||||
|
||||
#### Sponsors
|
||||
|
||||
Support this project by becoming a sponsor. Your logo will show up here with a link to your website.
|
||||
|
||||
<div>
|
||||
<a href="https://opencollective.com/bagisto/contribute/sponsor-7372/checkout" target="_blank">
|
||||
<img src="https://images.opencollective.com/static/images/become_sponsor.svg">
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<kbd>
|
||||
<a href="http://e.ventures/" target="_blank">
|
||||
<img src="https://images.opencollective.com/e-ventures1/7d61db2/logo.png" height="75">
|
||||
</a>
|
||||
</kbd>
|
||||
|
|
@ -0,0 +1,42 @@
|
|||
<?php
|
||||
|
||||
namespace App\Console;
|
||||
|
||||
use Illuminate\Console\Scheduling\Schedule;
|
||||
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
|
||||
|
||||
class Kernel extends ConsoleKernel
|
||||
{
|
||||
/**
|
||||
* The Artisan commands provided by your application.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $commands = [
|
||||
//
|
||||
];
|
||||
|
||||
/**
|
||||
* Define the application's command schedule.
|
||||
*
|
||||
* @param \Illuminate\Console\Scheduling\Schedule $schedule
|
||||
* @return void
|
||||
*/
|
||||
protected function schedule(Schedule $schedule)
|
||||
{
|
||||
$schedule->command('booking:cron')->dailyAt('3:00');
|
||||
}
|
||||
|
||||
/**
|
||||
* Register the commands for the application.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
protected function commands()
|
||||
{
|
||||
$this->load(__DIR__.'/Commands');
|
||||
$this->load(__DIR__.'/../../packages/Webkul/Core/src/Console/Commands');
|
||||
|
||||
require base_path('routes/console.php');
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,51 @@
|
|||
<?php
|
||||
|
||||
namespace App\Exceptions;
|
||||
|
||||
use Throwable;
|
||||
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
|
||||
|
||||
class Handler extends ExceptionHandler
|
||||
{
|
||||
/**
|
||||
* A list of the exception types that are not reported.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $dontReport = [
|
||||
//
|
||||
];
|
||||
|
||||
/**
|
||||
* A list of the inputs that are never flashed for validation exceptions.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $dontFlash = [
|
||||
'password',
|
||||
'password_confirmation',
|
||||
];
|
||||
|
||||
/**
|
||||
* Report or log an exception.
|
||||
*
|
||||
* @param \Throwable $exception
|
||||
* @return void
|
||||
*/
|
||||
public function report(Throwable $exception)
|
||||
{
|
||||
parent::report($exception);
|
||||
}
|
||||
|
||||
/**
|
||||
* Render an exception into an HTTP response.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @param \Throwable $exception
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function render($request, Throwable $exception)
|
||||
{
|
||||
return parent::render($request, $exception);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use Illuminate\Foundation\Bus\DispatchesJobs;
|
||||
use Illuminate\Routing\Controller as BaseController;
|
||||
use Illuminate\Foundation\Validation\ValidatesRequests;
|
||||
use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
|
||||
|
||||
class Controller extends BaseController
|
||||
{
|
||||
use AuthorizesRequests, DispatchesJobs, ValidatesRequests;
|
||||
}
|
||||
|
|
@ -0,0 +1,61 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http;
|
||||
|
||||
use Illuminate\Foundation\Http\Kernel as HttpKernel;
|
||||
|
||||
class Kernel extends HttpKernel
|
||||
{
|
||||
/**
|
||||
* The application's global HTTP middleware stack.
|
||||
*
|
||||
* These middleware are run during every request to your application.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $middleware = [
|
||||
\Webkul\Core\Http\Middleware\CheckForMaintenanceMode::class,
|
||||
\App\Http\Middleware\EncryptCookies::class,
|
||||
\Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
|
||||
\Illuminate\Session\Middleware\StartSession::class,
|
||||
\Webkul\Core\Http\Middleware\SecureHeaders::class,
|
||||
];
|
||||
|
||||
/**
|
||||
* The application's route middleware groups.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $middlewareGroups = [
|
||||
'web' => [
|
||||
\Illuminate\Session\Middleware\AuthenticateSession::class,
|
||||
\Illuminate\View\Middleware\ShareErrorsFromSession::class,
|
||||
\App\Http\Middleware\VerifyCsrfToken::class,
|
||||
\Illuminate\Routing\Middleware\SubstituteBindings::class,
|
||||
],
|
||||
|
||||
'api' => [
|
||||
'throttle:60,1',
|
||||
'bindings',
|
||||
],
|
||||
];
|
||||
|
||||
/**
|
||||
* The application's route middleware.
|
||||
*
|
||||
* These middleware may be assigned to groups or used individually.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $routeMiddleware = [
|
||||
'auth' => \Illuminate\Auth\Middleware\Authenticate::class,
|
||||
'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class,
|
||||
'bindings' => \Illuminate\Routing\Middleware\SubstituteBindings::class,
|
||||
'cache.headers' => \Illuminate\Http\Middleware\SetCacheHeaders::class,
|
||||
'can' => \Illuminate\Auth\Middleware\Authorize::class,
|
||||
'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class,
|
||||
'signed' => \Illuminate\Routing\Middleware\ValidateSignature::class,
|
||||
'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class,
|
||||
'cart.merger' => \Webkul\Checkout\Http\Middleware\CartMerger::class,
|
||||
];
|
||||
}
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Middleware;
|
||||
|
||||
use Illuminate\Cookie\Middleware\EncryptCookies as Middleware;
|
||||
|
||||
class EncryptCookies extends Middleware
|
||||
{
|
||||
/**
|
||||
* The names of the cookies that should not be encrypted.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $except = [
|
||||
//
|
||||
];
|
||||
}
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Middleware;
|
||||
|
||||
use Closure;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
|
||||
class RedirectIfAuthenticated
|
||||
{
|
||||
/**
|
||||
* Handle an incoming request.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @param \Closure $next
|
||||
* @param string|null $guard
|
||||
* @return mixed
|
||||
*/
|
||||
public function handle($request, Closure $next, $guard = null)
|
||||
{
|
||||
if (Auth::guard($guard)->check()) {
|
||||
return redirect('/home');
|
||||
}
|
||||
|
||||
return $next($request);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Middleware;
|
||||
|
||||
use Illuminate\Foundation\Http\Middleware\TrimStrings as Middleware;
|
||||
|
||||
class TrimStrings extends Middleware
|
||||
{
|
||||
/**
|
||||
* The names of the attributes that should not be trimmed.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $except = [
|
||||
'password',
|
||||
'password_confirmation',
|
||||
];
|
||||
}
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Middleware;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use Fideloper\Proxy\TrustProxies as Middleware;
|
||||
|
||||
class TrustProxies extends Middleware
|
||||
{
|
||||
/**
|
||||
* The trusted proxies for this application.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $proxies;
|
||||
|
||||
/**
|
||||
* The headers that should be used to detect proxies.
|
||||
*
|
||||
* @var int
|
||||
*/
|
||||
protected $headers = Request::HEADER_X_FORWARDED_ALL;
|
||||
}
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Middleware;
|
||||
|
||||
use Illuminate\Foundation\Http\Middleware\VerifyCsrfToken as Middleware;
|
||||
|
||||
class VerifyCsrfToken extends Middleware
|
||||
{
|
||||
/**
|
||||
* The URIs that should be excluded from CSRF verification.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $except = [
|
||||
'paypal/standard/ipn'
|
||||
];
|
||||
}
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
<?php
|
||||
|
||||
namespace App\Providers;
|
||||
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AppServiceProvider extends ServiceProvider
|
||||
{
|
||||
/**
|
||||
* Bootstrap any application services.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function boot()
|
||||
{
|
||||
Schema::defaultStringLength(191);
|
||||
}
|
||||
|
||||
/**
|
||||
* Register any application services.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function register()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
<?php
|
||||
|
||||
namespace App\Providers;
|
||||
|
||||
use Illuminate\Support\Facades\Gate;
|
||||
use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider;
|
||||
|
||||
class AuthServiceProvider extends ServiceProvider
|
||||
{
|
||||
/**
|
||||
* The policy mappings for the application.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $policies = [
|
||||
// 'App\Model' => 'App\Policies\ModelPolicy',
|
||||
];
|
||||
|
||||
/**
|
||||
* Register any authentication / authorization services.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function boot()
|
||||
{
|
||||
$this->registerPolicies();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
<?php
|
||||
|
||||
namespace App\Providers;
|
||||
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
use Illuminate\Support\Facades\Broadcast;
|
||||
|
||||
class BroadcastServiceProvider extends ServiceProvider
|
||||
{
|
||||
/**
|
||||
* Bootstrap any application services.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function boot()
|
||||
{
|
||||
Broadcast::routes();
|
||||
|
||||
require base_path('routes/channels.php');
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
<?php
|
||||
|
||||
namespace App\Providers;
|
||||
|
||||
use Illuminate\Support\Facades\Event;
|
||||
use Illuminate\Auth\Events\Registered;
|
||||
use Illuminate\Auth\Listeners\SendEmailVerificationNotification;
|
||||
use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;
|
||||
|
||||
class EventServiceProvider extends ServiceProvider
|
||||
{
|
||||
/**
|
||||
* The event listener mappings for the application.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
// protected $listen = [
|
||||
// Registered::class => [
|
||||
// SendEmailVerificationNotification::class,
|
||||
// ],
|
||||
// ];
|
||||
|
||||
/**
|
||||
* Register any events for your application.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function boot()
|
||||
{
|
||||
parent::boot();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,69 @@
|
|||
<?php
|
||||
|
||||
namespace App\Providers;
|
||||
|
||||
use Illuminate\Support\Facades\Route;
|
||||
use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider;
|
||||
|
||||
class RouteServiceProvider extends ServiceProvider
|
||||
{
|
||||
/**
|
||||
* This namespace is applied to your controller routes.
|
||||
*
|
||||
* In addition, it is set as the URL generator's root namespace.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
// protected $namespace = 'App\Http\Controllers';
|
||||
|
||||
/**
|
||||
* Define your route model bindings, pattern filters, etc.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function boot()
|
||||
{
|
||||
parent::boot();
|
||||
}
|
||||
|
||||
/**
|
||||
* Define the routes for the application.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function map()
|
||||
{
|
||||
$this->mapApiRoutes();
|
||||
|
||||
$this->mapWebRoutes();
|
||||
}
|
||||
|
||||
/**
|
||||
* Define the "web" routes for the application.
|
||||
*
|
||||
* These routes all receive session state, CSRF protection, etc.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
protected function mapWebRoutes()
|
||||
{
|
||||
Route::middleware('web')
|
||||
->namespace($this->namespace)
|
||||
->group(base_path('routes/web.php'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Define the "api" routes for the application.
|
||||
*
|
||||
* These routes are typically stateless.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
protected function mapApiRoutes()
|
||||
{
|
||||
Route::prefix('api')
|
||||
->middleware('api')
|
||||
->namespace($this->namespace)
|
||||
->group(base_path('routes/api.php'));
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,53 @@
|
|||
#!/usr/bin/env php
|
||||
<?php
|
||||
|
||||
define('LARAVEL_START', microtime(true));
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Register The Auto Loader
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Composer provides a convenient, automatically generated class loader
|
||||
| for our application. We just need to utilize it! We'll require it
|
||||
| into the script here so that we do not have to worry about the
|
||||
| loading of any our classes "manually". Feels great to relax.
|
||||
|
|
||||
*/
|
||||
|
||||
require __DIR__.'/vendor/autoload.php';
|
||||
|
||||
$app = require_once __DIR__.'/bootstrap/app.php';
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Run The Artisan Application
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| When we run the console application, the current CLI command will be
|
||||
| executed in this console and the response sent back to a terminal
|
||||
| or another output device for the developers. Here goes nothing!
|
||||
|
|
||||
*/
|
||||
|
||||
$kernel = $app->make(Illuminate\Contracts\Console\Kernel::class);
|
||||
|
||||
$status = $kernel->handle(
|
||||
$input = new Symfony\Component\Console\Input\ArgvInput,
|
||||
new Symfony\Component\Console\Output\ConsoleOutput
|
||||
);
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Shutdown The Application
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Once Artisan has finished running, we will fire off the shutdown events
|
||||
| so that any final work may be done by the application before we shut
|
||||
| down the process. This is the last thing to happen to the request.
|
||||
|
|
||||
*/
|
||||
|
||||
$kernel->terminate($input, $status);
|
||||
|
||||
exit($status);
|
||||
|
|
@ -0,0 +1 @@
|
|||
../vendor/bin/codecept
|
||||
|
|
@ -0,0 +1,51 @@
|
|||
#!/bin/bash
|
||||
|
||||
printf "### start preparation ###\n"
|
||||
|
||||
WORKPATH=$(dirname ${0})
|
||||
printf ">> workpath is %s\n" ${WORKPATH}
|
||||
|
||||
LOG_DIR="${WORKPATH}/../storage/logs/tests"
|
||||
printf ">> log-dir is %s\n" ${LOG_DIR}
|
||||
|
||||
printf ">> create and truncate log dir\n"
|
||||
mkdir -p ${LOG_DIR}
|
||||
rm -rf ${LOG_DIR}/*
|
||||
|
||||
printf ">> truncate and migrate database\n"
|
||||
php artisan migrate:fresh --env=testing --quiet
|
||||
|
||||
printf ">> cleaning previous tests ###\n"
|
||||
${WORKPATH}/../vendor/bin/codecept clean
|
||||
printf "### finish preparation ###\n"
|
||||
|
||||
printf "### start tests ###\n"
|
||||
|
||||
SUCCESS=1
|
||||
execSuite() {
|
||||
${WORKPATH}/../vendor/bin/codecept run ${1} \
|
||||
--xml report_${1}.xml ${CODECEPT_OPTIONS} | tee ${LOG_DIR}/tests_${1}.log
|
||||
if [[ ${PIPESTATUS[0]} -ne 0 ]]
|
||||
then
|
||||
SUCCESS=0
|
||||
fi
|
||||
}
|
||||
|
||||
execSuite unit
|
||||
execSuite functional
|
||||
|
||||
if [[ ${?} -ne 0 ]]
|
||||
then
|
||||
SUCCESS=0
|
||||
fi
|
||||
|
||||
printf "### finish tests ###\n"
|
||||
|
||||
if [[ ${SUCCESS} -eq 1 ]]
|
||||
then
|
||||
printf ">> all tests are \e[01;32mgreen\e[0m\n"
|
||||
exit 0
|
||||
else
|
||||
printf ">> at least one test is \e[01;31mred\e[0m\n"
|
||||
exit 1
|
||||
fi
|
||||
|
|
@ -0,0 +1,55 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Create The Application
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The first thing we will do is create a new Laravel application instance
|
||||
| which serves as the "glue" for all the components of Laravel, and is
|
||||
| the IoC container for the system binding all of the various parts.
|
||||
|
|
||||
*/
|
||||
|
||||
$app = new Illuminate\Foundation\Application(
|
||||
realpath(__DIR__.'/../')
|
||||
);
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Bind Important Interfaces
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Next, we need to bind some important interfaces into the container so
|
||||
| we will be able to resolve them when needed. The kernels serve the
|
||||
| incoming requests to this application from both the web and CLI.
|
||||
|
|
||||
*/
|
||||
|
||||
$app->singleton(
|
||||
Illuminate\Contracts\Http\Kernel::class,
|
||||
App\Http\Kernel::class
|
||||
);
|
||||
|
||||
$app->singleton(
|
||||
Illuminate\Contracts\Console\Kernel::class,
|
||||
App\Console\Kernel::class
|
||||
);
|
||||
|
||||
$app->singleton(
|
||||
Illuminate\Contracts\Debug\ExceptionHandler::class,
|
||||
App\Exceptions\Handler::class
|
||||
);
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Return The Application
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This script returns the application instance. The instance is given to
|
||||
| the calling script so we can separate the building of the instances
|
||||
| from the actual running of the application and sending responses.
|
||||
|
|
||||
*/
|
||||
|
||||
return $app;
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
*
|
||||
!.gitignore
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
{
|
||||
"name": "bagisto",
|
||||
"description": "An eCommerce ecosystem for All to build and scale your business.",
|
||||
"main": "",
|
||||
"authors": [
|
||||
"Webkul <support@webkul.com>"
|
||||
],
|
||||
"license": "MIT",
|
||||
"keywords": [
|
||||
"ecommerce",
|
||||
"framework",
|
||||
"laravel",
|
||||
"php",
|
||||
"store",
|
||||
"commerce"
|
||||
],
|
||||
"homepage": "https://github.com/bagisto/bagisto"
|
||||
}
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
paths:
|
||||
tests: tests
|
||||
output: tests/_output
|
||||
data: tests/_data
|
||||
support: tests/_support
|
||||
envs: tests/_envs
|
||||
actor_suffix: Tester
|
||||
extensions:
|
||||
enabled:
|
||||
- Codeception\Extension\RunFailed
|
||||
|
||||
|
|
@ -0,0 +1,163 @@
|
|||
{
|
||||
"name": "bagisto/bagisto",
|
||||
"description": "Bagisto Laravel E-Commerce",
|
||||
"keywords": [
|
||||
"framework",
|
||||
"laravel"
|
||||
],
|
||||
"license": "MIT",
|
||||
"type": "project",
|
||||
"require": {
|
||||
"php": "^7.3|^8.0",
|
||||
"algolia/algoliasearch-client-php": "^2.2",
|
||||
"astrotomic/laravel-translatable": "^11.0.0",
|
||||
"aws/aws-sdk-php": "^3.171",
|
||||
"babenkoivan/elastic-scout-driver": "^1.1",
|
||||
"bagistobrasil/bagisto-product-social-share": "^0.1.2",
|
||||
"barryvdh/laravel-debugbar": "^3.1",
|
||||
"barryvdh/laravel-dompdf": "^0.8.5|^0.9.0",
|
||||
"doctrine/dbal": "^2.9",
|
||||
"enshrined/svg-sanitize": "^0.14.0",
|
||||
"facade/ignition": "^2.3.6",
|
||||
"fakerphp/faker": "^1.14",
|
||||
"fideloper/proxy": "^4.2",
|
||||
"flynsarmy/db-blade-compiler": "^5.5",
|
||||
"guzzlehttp/guzzle": "^7.0.1",
|
||||
"intervention/image": "^2.4",
|
||||
"intervention/imagecache": "^2.3",
|
||||
"kalnoy/nestedset": "^5.0",
|
||||
"khaled.alshamaa/ar-php": "^6.0.0",
|
||||
"konekt/concord": "^1.2",
|
||||
"laravel/framework": "^8.0",
|
||||
"laravel/legacy-factories": "^1.1",
|
||||
"laravel/scout": "^8.0",
|
||||
"laravel/socialite": "^5.0",
|
||||
"laravel/tinker": "^2.0",
|
||||
"laravel/ui": "^3.0",
|
||||
"maatwebsite/excel": "^3.1.26",
|
||||
"paypal/paypal-checkout-sdk": "1.0.1",
|
||||
"prettus/l5-repository": "^2.6",
|
||||
"tymon/jwt-auth": "1.0.x-dev"
|
||||
},
|
||||
"require-dev": {
|
||||
"codeception/codeception": "^4.1",
|
||||
"codeception/module-asserts": "^1.1",
|
||||
"codeception/module-filesystem": "^1.0",
|
||||
"codeception/module-laravel5": "^1.0",
|
||||
"codeception/module-webdriver": "^1.0",
|
||||
"filp/whoops": "^2.0",
|
||||
"mockery/mockery": "^1.3.1",
|
||||
"nunomaduro/collision": "^5.3",
|
||||
"phpunit/phpunit": "^9.5"
|
||||
},
|
||||
"replace": {
|
||||
"bagisto/laravel-user": "v0.1.0",
|
||||
"bagisto/laravel-admin": "v0.1.0",
|
||||
"bagisto/laravel-ui": "v0.1.0",
|
||||
"bagisto/laravel-core": "v0.1.0",
|
||||
"bagisto/laravel-attribute": "v0.1.0",
|
||||
"bagisto/laravel-checkout": "v0.1.0",
|
||||
"bagisto/laravel-customer": "v0.1.0",
|
||||
"bagisto/laravel-inventory": "v0.1.0",
|
||||
"bagisto/laravel-category": "v0.1.0",
|
||||
"bagisto/laravel-product": "v0.1.0",
|
||||
"bagisto/laravel-shop": "v0.1.0",
|
||||
"bagisto/laravel-theme": "v0.1.0",
|
||||
"bagisto/laravel-shipping": "v0.1.0",
|
||||
"bagisto/laravel-payment": "v0.1.0",
|
||||
"bagisto/laravel-sales": "v0.1.0",
|
||||
"bagisto/laravel-tax": "v0.1.0",
|
||||
"bagisto/laravel-api": "v0.1.0",
|
||||
"bagisto/laravel-paypal": "v0.1.0",
|
||||
"bagisto/laravel-discount": "v0.1.0"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"App\\": "app/",
|
||||
"Database\\Factories\\": "database/factories/",
|
||||
"Database\\Seeders\\": "database/seeders/",
|
||||
"Webkul\\User\\": "packages/Webkul/User/src",
|
||||
"Webkul\\Admin\\": "packages/Webkul/Admin/src",
|
||||
"Webkul\\Ui\\": "packages/Webkul/Ui/src",
|
||||
"Webkul\\Category\\": "packages/Webkul/Category/src",
|
||||
"Webkul\\Checkout\\": "packages/Webkul/Checkout/src",
|
||||
"Webkul\\Attribute\\": "packages/Webkul/Attribute/src",
|
||||
"Webkul\\Shop\\": "packages/Webkul/Shop/src",
|
||||
"Webkul\\Core\\": "packages/Webkul/Core/src",
|
||||
"Webkul\\Customer\\": "packages/Webkul/Customer/src",
|
||||
"Webkul\\Inventory\\": "packages/Webkul/Inventory/src",
|
||||
"Webkul\\Product\\": "packages/Webkul/Product/src",
|
||||
"Webkul\\Theme\\": "packages/Webkul/Theme/src",
|
||||
"Webkul\\Shipping\\": "packages/Webkul/Shipping/src",
|
||||
"Webkul\\Payment\\": "packages/Webkul/Payment/src",
|
||||
"Webkul\\Paypal\\": "packages/Webkul/Paypal/src",
|
||||
"Webkul\\Sales\\": "packages/Webkul/Sales/src",
|
||||
"Webkul\\Tax\\": "packages/Webkul/Tax/src",
|
||||
"Webkul\\API\\": "packages/Webkul/API",
|
||||
"Webkul\\CatalogRule\\": "packages/Webkul/CatalogRule/src",
|
||||
"Webkul\\CartRule\\": "packages/Webkul/CartRule/src",
|
||||
"Webkul\\Rule\\": "packages/Webkul/Rule/src",
|
||||
"Webkul\\CMS\\": "packages/Webkul/CMS/src",
|
||||
"Webkul\\Velocity\\": "packages/Webkul/Velocity/src",
|
||||
"Webkul\\BookingProduct\\": "packages/Webkul/BookingProduct/src",
|
||||
"Webkul\\SocialLogin\\": "packages/Webkul/SocialLogin/src",
|
||||
"Webkul\\DebugBar\\": "packages/Webkul/DebugBar/src",
|
||||
"Webkul\\Marketing\\": "packages/Webkul/Marketing/src"
|
||||
}
|
||||
},
|
||||
"autoload-dev": {
|
||||
"psr-4": {
|
||||
"Tests\\Acceptance\\": "tests/acceptance/",
|
||||
"Tests\\Functional\\": "tests/functional/",
|
||||
"Tests\\Unit\\": "tests/unit/",
|
||||
"Tests\\Trigger\\": "tests/trigger/"
|
||||
}
|
||||
},
|
||||
"extra": {
|
||||
"laravel": {
|
||||
"dont-discover": [
|
||||
"laravel/dusk"
|
||||
]
|
||||
}
|
||||
},
|
||||
"scripts": {
|
||||
"post-root-package-install": [
|
||||
"@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
|
||||
],
|
||||
"post-create-project-cmd": [
|
||||
"@php artisan key:generate",
|
||||
"Webkul\\Core\\Events\\ComposerEvents::postCreateProject"
|
||||
],
|
||||
"post-autoload-dump": [
|
||||
"Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
|
||||
"@php artisan package:discover"
|
||||
],
|
||||
"test": [
|
||||
"set -e",
|
||||
"@php artisan migrate:fresh --env=testing",
|
||||
"vendor/bin/codecept run unit",
|
||||
"vendor/bin/codecept run functional",
|
||||
"vendor/bin/codecept run trigger"
|
||||
],
|
||||
"test-win": [
|
||||
"@set -e",
|
||||
"@php artisan migrate:fresh --env=testing",
|
||||
"vendor\\bin\\codecept.bat run unit",
|
||||
"vendor\\bin\\codecept.bat run functional",
|
||||
"vendor\\bin\\codecept.bat run trigger"
|
||||
]
|
||||
},
|
||||
"config": {
|
||||
"preferred-install": "stable",
|
||||
"sort-packages": true,
|
||||
"optimize-autoloader": true
|
||||
},
|
||||
"minimum-stability": "dev",
|
||||
"prefer-stable": true,
|
||||
"support": {
|
||||
"issues": "https://github.com/bagisto/bagisto/issues",
|
||||
"forum": "https://forums.bagisto.com",
|
||||
"source": "https://github.com/bagisto/bagisto",
|
||||
"docs": "https://devdocs.bagisto.com"
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,5 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
|
||||
];
|
||||
|
|
@ -0,0 +1,359 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Application Name
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This value is the name of your application. This value is used when the
|
||||
| framework needs to place the application's name in a notification or
|
||||
| any other location as required by the application or its packages.
|
||||
|
|
||||
*/
|
||||
|
||||
'name' => env('APP_NAME', 'Bagisto'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Application Environment
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This value determines the "environment" your application is currently
|
||||
| running in. This may determine how you prefer to configure various
|
||||
| services your application utilizes. Set this in your ".env" file.
|
||||
|
|
||||
*/
|
||||
|
||||
'env' => env('APP_ENV', 'production'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Application Debug Mode
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| When your application is in debug mode, detailed error messages with
|
||||
| stack traces will be shown on every error that occurs within your
|
||||
| application. If disabled, a simple generic error page is shown.
|
||||
|
|
||||
*/
|
||||
|
||||
'debug' => env('APP_DEBUG', false),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Application URL
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This URL is used by the console to properly generate URLs when using
|
||||
| the Artisan command line tool. You should set this to the root of
|
||||
| your application so that it is used when running Artisan tasks.
|
||||
|
|
||||
*/
|
||||
|
||||
'url' => env('APP_URL', 'http://localhost'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Application Admin URL
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This URL suffix is used to define the admin url for example
|
||||
| admin/ or backend/
|
||||
|
|
||||
*/
|
||||
|
||||
'admin_url' => env('APP_ADMIN_URL', 'admin'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Application Timezone
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may specify the default timezone for your application, which
|
||||
| will be used by the PHP date and date-time functions. We have gone
|
||||
| ahead and set this to a sensible default for you out of the box.
|
||||
|
|
||||
*/
|
||||
|
||||
'timezone' => env('APP_TIMEZONE', 'Asia/Kolkata'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Application Locale Configuration
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The application locale determines the default locale that will be used
|
||||
| by the translation service provider. You are free to set this value
|
||||
| to any of the locales which will be supported by the application.
|
||||
|
|
||||
*/
|
||||
|
||||
'locale' => env('APP_LOCALE', 'en'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Application Fallback Locale
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The fallback locale determines the locale to use when the current one
|
||||
| is not available. You may change the value to correspond to any of
|
||||
| the language folders that are provided through your application.
|
||||
|
|
||||
*/
|
||||
|
||||
'fallback_locale' => 'en',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Default Country
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may specify the default country by country code.
|
||||
| Ensure it is uppercase and reflects the 'code' column of the
|
||||
| countries table.
|
||||
|
|
||||
| for example: DE EN FR
|
||||
| (use capital letters!)
|
||||
*/
|
||||
|
||||
'default_country' => null,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Base Currency Code
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may specify the base currency code for your application.
|
||||
|
|
||||
*/
|
||||
|
||||
'currency' => env('APP_CURRENCY', 'USD'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Default channel Code
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may specify the default channel code for your application.
|
||||
|
|
||||
*/
|
||||
|
||||
'channel' => 'default',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Encryption Key
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This key is used by the Illuminate encrypter service and should be set
|
||||
| to a random, 32 character string, otherwise these encrypted strings
|
||||
| will not be safe. Please do this before deploying an application!
|
||||
|
|
||||
*/
|
||||
|
||||
'key' => env('APP_KEY'),
|
||||
|
||||
'cipher' => 'AES-256-CBC',
|
||||
|
||||
/*
|
||||
Code Editor
|
||||
*/
|
||||
'editor' => 'vscode',
|
||||
|
||||
/*
|
||||
Application Version
|
||||
*/
|
||||
'version' => env('APP_VERSION'),
|
||||
|
||||
/**
|
||||
* Blacklisting attributes while debugging
|
||||
*/
|
||||
'debug_blacklist' => [
|
||||
'_ENV' => [
|
||||
'APP_KEY',
|
||||
'DB_PASSWORD'
|
||||
],
|
||||
|
||||
'_SERVER' => [
|
||||
'APP_KEY',
|
||||
'DB_PASSWORD'
|
||||
],
|
||||
|
||||
'_POST' => [
|
||||
'password'
|
||||
],
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Autoloaded Service Providers
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The service providers listed here will be automatically loaded on the
|
||||
| request to your application. Feel free to add your own services to
|
||||
| this array to grant expanded functionality to your applications.
|
||||
|
|
||||
*/
|
||||
|
||||
'providers' => [
|
||||
|
||||
/*
|
||||
* Laravel Framework Service Providers...
|
||||
*/
|
||||
Illuminate\Auth\AuthServiceProvider::class,
|
||||
Illuminate\Broadcasting\BroadcastServiceProvider::class,
|
||||
Illuminate\Bus\BusServiceProvider::class,
|
||||
Illuminate\Cache\CacheServiceProvider::class,
|
||||
Illuminate\Foundation\Providers\ConsoleSupportServiceProvider::class,
|
||||
Illuminate\Cookie\CookieServiceProvider::class,
|
||||
Illuminate\Database\DatabaseServiceProvider::class,
|
||||
Illuminate\Encryption\EncryptionServiceProvider::class,
|
||||
Illuminate\Filesystem\FilesystemServiceProvider::class,
|
||||
Illuminate\Foundation\Providers\FoundationServiceProvider::class,
|
||||
Illuminate\Hashing\HashServiceProvider::class,
|
||||
Illuminate\Mail\MailServiceProvider::class,
|
||||
Illuminate\Notifications\NotificationServiceProvider::class,
|
||||
Illuminate\Pagination\PaginationServiceProvider::class,
|
||||
Illuminate\Pipeline\PipelineServiceProvider::class,
|
||||
Illuminate\Queue\QueueServiceProvider::class,
|
||||
Illuminate\Redis\RedisServiceProvider::class,
|
||||
Illuminate\Auth\Passwords\PasswordResetServiceProvider::class,
|
||||
Illuminate\Session\SessionServiceProvider::class,
|
||||
Illuminate\Translation\TranslationServiceProvider::class,
|
||||
Illuminate\Validation\ValidationServiceProvider::class,
|
||||
Illuminate\View\ViewServiceProvider::class,
|
||||
|
||||
/*
|
||||
* Package Service Providers...
|
||||
*/
|
||||
|
||||
Astrotomic\Translatable\TranslatableServiceProvider::class,
|
||||
|
||||
/*
|
||||
* Application Service Providers...
|
||||
*/
|
||||
App\Providers\AppServiceProvider::class,
|
||||
App\Providers\AuthServiceProvider::class,
|
||||
// App\Providers\BroadcastServiceProvider::class,
|
||||
App\Providers\EventServiceProvider::class,
|
||||
App\Providers\RouteServiceProvider::class,
|
||||
|
||||
//Laravel Intervention
|
||||
Intervention\Image\ImageServiceProvider::class,
|
||||
|
||||
//Laravel Maatwebsite
|
||||
Maatwebsite\Excel\ExcelServiceProvider::class,
|
||||
|
||||
//Repository
|
||||
Prettus\Repository\Providers\RepositoryServiceProvider::class,
|
||||
Konekt\Concord\ConcordServiceProvider::class,
|
||||
Flynsarmy\DbBladeCompiler\DbBladeCompilerServiceProvider::class,
|
||||
Barryvdh\DomPDF\ServiceProvider::class,
|
||||
Tymon\JWTAuth\Providers\LaravelServiceProvider::class,
|
||||
|
||||
//Webkul packages
|
||||
Webkul\Theme\Providers\ThemeServiceProvider::class,
|
||||
Webkul\User\Providers\UserServiceProvider::class,
|
||||
Webkul\Admin\Providers\AdminServiceProvider::class,
|
||||
Webkul\Ui\Providers\UiServiceProvider::class,
|
||||
Webkul\Category\Providers\CategoryServiceProvider::class,
|
||||
Webkul\Attribute\Providers\AttributeServiceProvider::class,
|
||||
Webkul\Core\Providers\CoreServiceProvider::class,
|
||||
Webkul\Core\Providers\EnvValidatorServiceProvider::class,
|
||||
Webkul\Shop\Providers\ShopServiceProvider::class,
|
||||
Webkul\Customer\Providers\CustomerServiceProvider::class,
|
||||
Webkul\Inventory\Providers\InventoryServiceProvider::class,
|
||||
Webkul\Product\Providers\ProductServiceProvider::class,
|
||||
Webkul\Checkout\Providers\CheckoutServiceProvider::class,
|
||||
Webkul\Shipping\Providers\ShippingServiceProvider::class,
|
||||
Webkul\Payment\Providers\PaymentServiceProvider::class,
|
||||
Webkul\Paypal\Providers\PaypalServiceProvider::class,
|
||||
Webkul\Sales\Providers\SalesServiceProvider::class,
|
||||
Webkul\Tax\Providers\TaxServiceProvider::class,
|
||||
Webkul\API\Providers\APIServiceProvider::class,
|
||||
Webkul\CatalogRule\Providers\CatalogRuleServiceProvider::class,
|
||||
Webkul\CartRule\Providers\CartRuleServiceProvider::class,
|
||||
Webkul\Rule\Providers\RuleServiceProvider::class,
|
||||
Webkul\CMS\Providers\CMSServiceProvider::class,
|
||||
Webkul\Velocity\Providers\VelocityServiceProvider::class,
|
||||
Webkul\BookingProduct\Providers\BookingProductServiceProvider::class,
|
||||
Webkul\SocialLogin\Providers\SocialLoginServiceProvider::class,
|
||||
Webkul\DebugBar\Providers\DebugBarServiceProvider::class,
|
||||
Webkul\Marketing\Providers\MarketingServiceProvider::class,
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Class Aliases
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This array of class aliases will be registered when this application
|
||||
| is started. However, feel free to register as many as you wish as
|
||||
| the aliases are "lazy" loaded so they don't hinder performance.
|
||||
|
|
||||
*/
|
||||
|
||||
'aliases' => [
|
||||
|
||||
/**
|
||||
* Laravel
|
||||
*
|
||||
* Place your aliases in alphabetical order.
|
||||
*/
|
||||
'App' => Illuminate\Support\Facades\App::class,
|
||||
'Artisan' => Illuminate\Support\Facades\Artisan::class,
|
||||
'Auth' => Illuminate\Support\Facades\Auth::class,
|
||||
'Blade' => Illuminate\Support\Facades\Blade::class,
|
||||
'Broadcast' => Illuminate\Support\Facades\Broadcast::class,
|
||||
'Bus' => Illuminate\Support\Facades\Bus::class,
|
||||
'Cache' => Illuminate\Support\Facades\Cache::class,
|
||||
'Config' => Illuminate\Support\Facades\Config::class,
|
||||
'Cookie' => Illuminate\Support\Facades\Cookie::class,
|
||||
'Crypt' => Illuminate\Support\Facades\Crypt::class,
|
||||
'DB' => Illuminate\Support\Facades\DB::class,
|
||||
'Eloquent' => Illuminate\Database\Eloquent\Model::class,
|
||||
'Event' => Illuminate\Support\Facades\Event::class,
|
||||
'File' => Illuminate\Support\Facades\File::class,
|
||||
'Gate' => Illuminate\Support\Facades\Gate::class,
|
||||
'Hash' => Illuminate\Support\Facades\Hash::class,
|
||||
'Lang' => Illuminate\Support\Facades\Lang::class,
|
||||
'Log' => Illuminate\Support\Facades\Log::class,
|
||||
'Mail' => Illuminate\Support\Facades\Mail::class,
|
||||
'Notification' => Illuminate\Support\Facades\Notification::class,
|
||||
'Password' => Illuminate\Support\Facades\Password::class,
|
||||
'Queue' => Illuminate\Support\Facades\Queue::class,
|
||||
'Redirect' => Illuminate\Support\Facades\Redirect::class,
|
||||
'Redis' => Illuminate\Support\Facades\Redis::class,
|
||||
'Request' => Illuminate\Support\Facades\Request::class,
|
||||
'Response' => Illuminate\Support\Facades\Response::class,
|
||||
'Route' => Illuminate\Support\Facades\Route::class,
|
||||
'Schema' => Illuminate\Support\Facades\Schema::class,
|
||||
'Session' => Illuminate\Support\Facades\Session::class,
|
||||
'Storage' => Illuminate\Support\Facades\Storage::class,
|
||||
'URL' => Illuminate\Support\Facades\URL::class,
|
||||
'Validator' => Illuminate\Support\Facades\Validator::class,
|
||||
'View' => Illuminate\Support\Facades\View::class,
|
||||
|
||||
/**
|
||||
* Bagisto
|
||||
*
|
||||
* Place your aliases in alphabetical order.
|
||||
*/
|
||||
'Captcha' => Webkul\Customer\Facades\Captcha::class,
|
||||
'Cart' => Webkul\Checkout\Facades\Cart::class,
|
||||
'Concord' => Konekt\Concord\Facades\Concord::class,
|
||||
'Core' => Webkul\Core\Facades\Core::class,
|
||||
'Datagrid' => Webkul\Ui\DataGrid\Facades\DataGrid::class,
|
||||
'DbView' => Flynsarmy\DbBladeCompiler\Facades\DbView::class,
|
||||
'Debugbar' => Barryvdh\Debugbar\Facade::class,
|
||||
'Excel' => Maatwebsite\Excel\Facades\Excel::class,
|
||||
'Helper' => Konekt\Concord\Facades\Helper::class,
|
||||
'Image' => Intervention\Image\Facades\Image::class,
|
||||
'PDF' => Barryvdh\DomPDF\Facade::class,
|
||||
'ProductImage' => Webkul\Product\Facades\ProductImage::class,
|
||||
'ProductGrid' => Webkul\Ui\DataGrid\Facades\ProductGrid::class,
|
||||
'ProductVideo' => Webkul\Product\Facades\ProductVideo::class,
|
||||
],
|
||||
];
|
||||
|
|
@ -0,0 +1,60 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
'defaults' => [
|
||||
'guard' => 'web',
|
||||
'passwords' => 'admins',
|
||||
],
|
||||
|
||||
'guards' => [
|
||||
'web' => [
|
||||
'driver' => 'session',
|
||||
'provider' => 'admins',
|
||||
],
|
||||
|
||||
'api' => [
|
||||
'driver' => 'jwt',
|
||||
'provider' => 'customers',
|
||||
],
|
||||
|
||||
'customer' => [
|
||||
'driver' => 'session',
|
||||
'provider' => 'customers'
|
||||
],
|
||||
|
||||
'admin' => [
|
||||
'driver' => 'session',
|
||||
'provider' => 'admins'
|
||||
],
|
||||
|
||||
'admin-api' => [
|
||||
'driver' => 'jwt',
|
||||
'provider' => 'admins',
|
||||
]
|
||||
],
|
||||
|
||||
'providers' => [
|
||||
'customers' => [
|
||||
'driver' => 'eloquent',
|
||||
'model' => Webkul\Customer\Models\Customer::class,
|
||||
],
|
||||
|
||||
'admins' => [
|
||||
'driver' => 'eloquent',
|
||||
'model' => Webkul\User\Models\Admin::class,
|
||||
]
|
||||
],
|
||||
|
||||
'passwords' => [
|
||||
'admins' => [
|
||||
'provider' => 'admins',
|
||||
'table' => 'admin_password_resets',
|
||||
'expire' => 60,
|
||||
],
|
||||
'customers' => [
|
||||
'provider' => 'customers',
|
||||
'table' => 'customer_password_resets',
|
||||
'expire' => 60,
|
||||
],
|
||||
],
|
||||
];
|
||||
|
|
@ -0,0 +1,57 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Default Broadcaster
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This option controls the default broadcaster that will be used by the
|
||||
| framework when an event needs to be broadcast. You may set this to
|
||||
| any of the connections defined in the "connections" array below.
|
||||
|
|
||||
| Supported: "pusher", "redis", "log", "null"
|
||||
|
|
||||
*/
|
||||
|
||||
'default' => env('BROADCAST_DRIVER', 'null'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Broadcast Connections
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may define all of the broadcast connections that will be used
|
||||
| to broadcast events to other systems or over websockets. Samples of
|
||||
| each available type of connection are provided inside this array.
|
||||
|
|
||||
*/
|
||||
|
||||
'connections' => [
|
||||
'pusher' => [
|
||||
'driver' => 'pusher',
|
||||
'key' => env('PUSHER_APP_KEY'),
|
||||
'secret' => env('PUSHER_APP_SECRET'),
|
||||
'app_id' => env('PUSHER_APP_ID'),
|
||||
'options' => [
|
||||
'cluster' => env('PUSHER_APP_CLUSTER'),
|
||||
'encrypted' => true,
|
||||
],
|
||||
],
|
||||
|
||||
'redis' => [
|
||||
'driver' => 'redis',
|
||||
'connection' => 'default',
|
||||
],
|
||||
|
||||
'log' => [
|
||||
'driver' => 'log',
|
||||
],
|
||||
|
||||
'null' => [
|
||||
'driver' => 'null',
|
||||
],
|
||||
],
|
||||
|
||||
];
|
||||
|
|
@ -0,0 +1,94 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Default Cache Store
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This option controls the default cache connection that gets used while
|
||||
| using this caching library. This connection is used when another is
|
||||
| not explicitly specified when executing a given caching function.
|
||||
|
|
||||
| Supported: "apc", "array", "database", "file", "memcached", "redis"
|
||||
|
|
||||
*/
|
||||
|
||||
'default' => env('CACHE_DRIVER', 'file'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Cache Stores
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may define all of the cache "stores" for your application as
|
||||
| well as their drivers. You may even define multiple stores for the
|
||||
| same cache driver to group types of items stored in your caches.
|
||||
|
|
||||
*/
|
||||
|
||||
'stores' => [
|
||||
|
||||
'apc' => [
|
||||
'driver' => 'apc',
|
||||
],
|
||||
|
||||
'array' => [
|
||||
'driver' => 'array',
|
||||
],
|
||||
|
||||
'database' => [
|
||||
'driver' => 'database',
|
||||
'table' => 'cache',
|
||||
'connection' => null,
|
||||
],
|
||||
|
||||
'file' => [
|
||||
'driver' => 'file',
|
||||
'path' => storage_path('framework/cache/data'),
|
||||
],
|
||||
|
||||
'memcached' => [
|
||||
'driver' => 'memcached',
|
||||
'persistent_id' => env('MEMCACHED_PERSISTENT_ID'),
|
||||
'sasl' => [
|
||||
env('MEMCACHED_USERNAME'),
|
||||
env('MEMCACHED_PASSWORD'),
|
||||
],
|
||||
'options' => [
|
||||
// Memcached::OPT_CONNECT_TIMEOUT => 2000,
|
||||
],
|
||||
'servers' => [
|
||||
[
|
||||
'host' => env('MEMCACHED_HOST', '127.0.0.1'),
|
||||
'port' => env('MEMCACHED_PORT', 11211),
|
||||
'weight' => 100,
|
||||
],
|
||||
],
|
||||
],
|
||||
|
||||
'redis' => [
|
||||
'driver' => 'redis',
|
||||
'connection' => env('CACHE_CONNECTION', 'cache'),
|
||||
],
|
||||
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Cache Key Prefix
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| When utilizing a RAM based store such as APC or Memcached, there might
|
||||
| be other applications utilizing the same cache. So, we'll specify a
|
||||
| value to get prefixed to all our keys so we can avoid collisions.
|
||||
|
|
||||
*/
|
||||
|
||||
'prefix' => env(
|
||||
'CACHE_PREFIX',
|
||||
\Illuminate\Support\Str::slug(env('APP_NAME', 'laravel'), '_') . '_cache'
|
||||
),
|
||||
|
||||
];
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
|
||||
];
|
||||
|
|
@ -0,0 +1,42 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
|
||||
'convention' => Webkul\Core\CoreConvention::class,
|
||||
|
||||
'modules' => [
|
||||
/**
|
||||
* Example:
|
||||
* VendorA\ModuleX\Providers\ModuleServiceProvider::class,
|
||||
* VendorB\ModuleY\Providers\ModuleServiceProvider::class
|
||||
*
|
||||
*/
|
||||
|
||||
\Webkul\Admin\Providers\ModuleServiceProvider::class,
|
||||
\Webkul\API\Providers\ModuleServiceProvider::class,
|
||||
\Webkul\Attribute\Providers\ModuleServiceProvider::class,
|
||||
\Webkul\BookingProduct\Providers\ModuleServiceProvider::class,
|
||||
\Webkul\CartRule\Providers\ModuleServiceProvider::class,
|
||||
\Webkul\CatalogRule\Providers\ModuleServiceProvider::class,
|
||||
\Webkul\Category\Providers\ModuleServiceProvider::class,
|
||||
\Webkul\Checkout\Providers\ModuleServiceProvider::class,
|
||||
\Webkul\Core\Providers\ModuleServiceProvider::class,
|
||||
\Webkul\CMS\Providers\ModuleServiceProvider::class,
|
||||
\Webkul\Customer\Providers\ModuleServiceProvider::class,
|
||||
\Webkul\Inventory\Providers\ModuleServiceProvider::class,
|
||||
\Webkul\Marketing\Providers\ModuleServiceProvider::class,
|
||||
\Webkul\Payment\Providers\ModuleServiceProvider::class,
|
||||
\Webkul\Paypal\Providers\ModuleServiceProvider::class,
|
||||
\Webkul\Product\Providers\ModuleServiceProvider::class,
|
||||
\Webkul\Rule\Providers\ModuleServiceProvider::class,
|
||||
\Webkul\Sales\Providers\ModuleServiceProvider::class,
|
||||
\Webkul\Shipping\Providers\ModuleServiceProvider::class,
|
||||
\Webkul\Shop\Providers\ModuleServiceProvider::class,
|
||||
\Webkul\SocialLogin\Providers\ModuleServiceProvider::class,
|
||||
\Webkul\Tax\Providers\ModuleServiceProvider::class,
|
||||
\Webkul\Theme\Providers\ModuleServiceProvider::class,
|
||||
\Webkul\Ui\Providers\ModuleServiceProvider::class,
|
||||
\Webkul\User\Providers\ModuleServiceProvider::class,
|
||||
\Webkul\Velocity\Providers\ModuleServiceProvider::class,
|
||||
]
|
||||
];
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
|
||||
];
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Cross-Origin Resource Sharing (CORS) Configuration
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may configure your settings for cross-origin resource sharing
|
||||
| or "CORS". This determines what cross-origin operations may execute
|
||||
| in web browsers. You are free to adjust these settings as needed.
|
||||
|
|
||||
| To learn more: https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS
|
||||
|
|
||||
*/
|
||||
|
||||
'paths' => ['api/*', 'sanctum/csrf-cookie'],
|
||||
|
||||
'allowed_methods' => ['*'],
|
||||
|
||||
'allowed_origins' => ['*'],
|
||||
|
||||
'allowed_origins_patterns' => [],
|
||||
|
||||
'allowed_headers' => ['*'],
|
||||
|
||||
'exposed_headers' => [],
|
||||
|
||||
'max_age' => 0,
|
||||
|
||||
'supports_credentials' => false,
|
||||
|
||||
];
|
||||
|
|
@ -0,0 +1,136 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Default Database Connection Name
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may specify which of the database connections below you wish
|
||||
| to use as your default connection for all database work. Of course
|
||||
| you may use many connections at once using the Database library.
|
||||
|
|
||||
*/
|
||||
|
||||
'default' => env('DB_CONNECTION', 'mysql'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Database Connections
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here are each of the database connections setup for your application.
|
||||
| Of course, examples of configuring each database platform that is
|
||||
| supported by Laravel is shown below to make development simple.
|
||||
|
|
||||
|
|
||||
| All database work in Laravel is done through the PHP PDO facilities
|
||||
| so make sure you have the driver for your particular database of
|
||||
| choice installed on your machine before you begin development.
|
||||
|
|
||||
*/
|
||||
|
||||
'connections' => [
|
||||
|
||||
'sqlite' => [
|
||||
'driver' => 'sqlite',
|
||||
'database' => env('DB_DATABASE', database_path('database.sqlite')),
|
||||
'prefix' => env('DB_PREFIX'),
|
||||
],
|
||||
|
||||
'mysql' => [
|
||||
'driver' => 'mysql',
|
||||
'host' => env('DB_HOST', '127.0.0.1'),
|
||||
'port' => env('DB_PORT', '3306'),
|
||||
'database' => env('DB_DATABASE', 'forge'),
|
||||
'username' => env('DB_USERNAME', 'forge'),
|
||||
'password' => env('DB_PASSWORD', ''),
|
||||
'unix_socket' => env('DB_SOCKET', ''),
|
||||
'charset' => 'utf8mb4',
|
||||
'collation' => 'utf8mb4_unicode_ci',
|
||||
'prefix' => env('DB_PREFIX'),
|
||||
'strict' => false,
|
||||
'engine' => 'InnoDB ROW_FORMAT=DYNAMIC',
|
||||
],
|
||||
|
||||
'pgsql' => [
|
||||
'driver' => 'pgsql',
|
||||
'host' => env('DB_HOST', '127.0.0.1'),
|
||||
'port' => env('DB_PORT', '5432'),
|
||||
'database' => env('DB_DATABASE', 'forge'),
|
||||
'username' => env('DB_USERNAME', 'forge'),
|
||||
'password' => env('DB_PASSWORD', ''),
|
||||
'charset' => 'utf8',
|
||||
'prefix' => env('DB_PREFIX'),
|
||||
'schema' => 'public',
|
||||
'sslmode' => 'prefer',
|
||||
],
|
||||
|
||||
'sqlsrv' => [
|
||||
'driver' => 'sqlsrv',
|
||||
'host' => env('DB_HOST', 'localhost'),
|
||||
'port' => env('DB_PORT', '1433'),
|
||||
'database' => env('DB_DATABASE', 'forge'),
|
||||
'username' => env('DB_USERNAME', 'forge'),
|
||||
'password' => env('DB_PASSWORD', ''),
|
||||
'charset' => 'utf8',
|
||||
'prefix' => '',
|
||||
],
|
||||
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Migration Repository Table
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This table keeps track of all the migrations that have already run for
|
||||
| your application. Using this information, we can determine which of
|
||||
| the migrations on disk haven't actually been run in the database.
|
||||
|
|
||||
*/
|
||||
|
||||
'migrations' => 'migrations',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Redis Databases
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Redis is an open source, fast, and advanced key-value store that also
|
||||
| provides a richer set of commands than a typical key-value systems
|
||||
| such as APC or Memcached. Laravel makes it easy to dig right in.
|
||||
|
|
||||
*/
|
||||
|
||||
'redis' => [
|
||||
|
||||
'client' => 'predis',
|
||||
|
||||
'default' => [
|
||||
'host' => env('REDIS_HOST', '127.0.0.1'),
|
||||
'password' => env('REDIS_PASSWORD', null),
|
||||
'port' => env('REDIS_PORT', 6379),
|
||||
'database' => env('REDIS_DEFAULT_DATABASE', '0'),
|
||||
],
|
||||
|
||||
'cache' => [
|
||||
'host' => env('REDIS_HOST', '127.0.0.1'),
|
||||
'password' => env('REDIS_PASSWORD', null),
|
||||
'port' => env('REDIS_PORT', 6379),
|
||||
'database' => env('REDIS_CACHE_DATABASE', '1'),
|
||||
],
|
||||
|
||||
'session' => [
|
||||
'host' => env('REDIS_HOST', '127.0.0.1'),
|
||||
'password' => env('REDIS_PASSWORD', null),
|
||||
'port' => env('REDIS_PORT', 6379),
|
||||
'database' => env('REDIS_SESSION_DATABASE', '2'),
|
||||
],
|
||||
|
||||
],
|
||||
|
||||
];
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
<?php
|
||||
|
||||
|
||||
return array(
|
||||
|
||||
/**
|
||||
* This property will be added to models being compiled with DbView
|
||||
* to keep track of which field in the model is being compiled
|
||||
*/
|
||||
'model_property' => '__db_blade_compiler_content_field',
|
||||
|
||||
/**
|
||||
* The default model field to be compiled when not explicitly specified
|
||||
* with DbView::field()
|
||||
*/
|
||||
'model_default_field' => 'content',
|
||||
|
||||
'cache' => false
|
||||
);
|
||||
|
|
@ -0,0 +1,231 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Debugbar Settings
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Debugbar is enabled by default, when debug is set to true in app.php.
|
||||
| You can override the value by setting enable to true or false instead of null.
|
||||
|
|
||||
| You can provide an array of URI's that must be ignored (eg. 'api/*')
|
||||
|
|
||||
*/
|
||||
|
||||
'enabled' => env('DEBUGBAR_ENABLED', null),
|
||||
'except' => [
|
||||
'telescope*',
|
||||
'horizon*',
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Storage settings
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| DebugBar stores data for session/ajax requests.
|
||||
| You can disable this, so the debugbar stores data in headers/session,
|
||||
| but this can cause problems with large data collectors.
|
||||
| By default, file storage (in the storage folder) is used. Redis and PDO
|
||||
| can also be used. For PDO, run the package migrations first.
|
||||
|
|
||||
*/
|
||||
'storage' => [
|
||||
'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
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Vendors
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Vendor files are included by default, but can be set to false.
|
||||
| This can also be set to 'js' or 'css', to only include javascript or css vendor files.
|
||||
| Vendor files are for css: font-awesome (including fonts) and highlight.js (css files)
|
||||
| and for js: jquery and and highlight.js
|
||||
| So if you want syntax highlighting, set it to true.
|
||||
| jQuery is set to not conflict with existing jQuery scripts.
|
||||
|
|
||||
*/
|
||||
|
||||
'include_vendors' => true,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Capture Ajax Requests
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The Debugbar can capture Ajax requests and display them. If you don't want this (ie. because of errors),
|
||||
| you can use this option to disable sending the data through the headers.
|
||||
|
|
||||
| Optionally, you can also send ServerTiming headers on ajax requests for the Chrome DevTools.
|
||||
|
|
||||
| Note for your request to be identified as ajax requests they must either send the header
|
||||
| X-Requested-With with the value XMLHttpRequest (most JS libraries send this), or have application/json as a Accept header.
|
||||
*/
|
||||
|
||||
'capture_ajax' => true,
|
||||
'add_ajax_timing' => false,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Custom Error Handler for Deprecated warnings
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| When enabled, the Debugbar shows deprecated warnings for Symfony components
|
||||
| in the Messages tab.
|
||||
|
|
||||
*/
|
||||
'error_handler' => false,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Clockwork integration
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The Debugbar can emulate the Clockwork headers, so you can use the Chrome
|
||||
| Extension, without the server-side code. It uses Debugbar collectors instead.
|
||||
|
|
||||
*/
|
||||
'clockwork' => false,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| DataCollectors
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Enable/disable DataCollectors
|
||||
|
|
||||
*/
|
||||
|
||||
'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
|
||||
'symfony_request' => true, // Only one can be enabled..
|
||||
'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)
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Extra options
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Configure some DataCollectors
|
||||
|
|
||||
*/
|
||||
|
||||
'options' => [
|
||||
'auth' => [
|
||||
'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.
|
||||
'backtrace_exclude_paths' => [], // Paths to exclude from backtrace. (in addition to defaults)
|
||||
'timeline' => false, // Add the queries to the timeline
|
||||
'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
|
||||
],
|
||||
'mail' => [
|
||||
'full_log' => false,
|
||||
],
|
||||
'views' => [
|
||||
'data' => false, //Note: Can slow down the application, because the data can be quite large..
|
||||
],
|
||||
'route' => [
|
||||
'label' => true, // show complete route on bar
|
||||
],
|
||||
'logs' => [
|
||||
'file' => null,
|
||||
],
|
||||
'cache' => [
|
||||
'values' => true, // collect cache values
|
||||
],
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Inject Debugbar in Response
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Usually, the debugbar is added just before </body>, by listening to the
|
||||
| Response after the App is done. If you disable this, you have to add them
|
||||
| in your template yourself. See http://phpdebugbar.com/docs/rendering.html
|
||||
|
|
||||
*/
|
||||
|
||||
'inject' => true,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| DebugBar route prefix
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Sometimes you want to set route prefix to be used by DebugBar to load
|
||||
| its resources from. Usually the need comes from misconfigured web server or
|
||||
| from trying to overcome bugs like this: http://trac.nginx.org/nginx/ticket/97
|
||||
|
|
||||
*/
|
||||
'route_prefix' => '_debugbar',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| DebugBar route domain
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| By default DebugBar route served from the same domain that request served.
|
||||
| To override default domain, specify it as a non-empty value.
|
||||
*/
|
||||
'route_domain' => null,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| DebugBar theme
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Switches between light and dark theme. If set to auto it will respect system preferences
|
||||
| Possible values: auto, light, dark
|
||||
*/
|
||||
'theme' => env('DEBUGBAR_THEME', 'auto'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Backtrace stack limit
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| By default, the DebugBar limits the number of frames returned by the 'debug_backtrace()' function.
|
||||
| If you need larger stacktraces, you can increase this number. Setting it to 0 will result in no limit.
|
||||
*/
|
||||
'debug_backtrace_limit' => 50,
|
||||
];
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
|
||||
];
|
||||
|
|
@ -0,0 +1,244 @@
|
|||
<?php
|
||||
|
||||
return array(
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Settings
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Set some default values. It is possible to add all defines that can be set
|
||||
| in dompdf_config.inc.php. You can also override the entire config file.
|
||||
|
|
||||
*/
|
||||
'show_warnings' => false, // Throw an Exception on warnings from dompdf
|
||||
'orientation' => 'portrait',
|
||||
'defines' => array(
|
||||
/**
|
||||
* The location of the DOMPDF font directory
|
||||
*
|
||||
* The location of the directory where DOMPDF will store fonts and font metrics
|
||||
* Note: This directory must exist and be writable by the webserver process.
|
||||
* *Please note the trailing slash.*
|
||||
*
|
||||
* Notes regarding fonts:
|
||||
* Additional .afm font metrics can be added by executing load_font.php from command line.
|
||||
*
|
||||
* Only the original "Base 14 fonts" are present on all pdf viewers. Additional fonts must
|
||||
* be embedded in the pdf file or the PDF may not display correctly. This can significantly
|
||||
* increase file size unless font subsetting is enabled. Before embedding a font please
|
||||
* review your rights under the font license.
|
||||
*
|
||||
* Any font specification in the source HTML is translated to the closest font available
|
||||
* in the font directory.
|
||||
*
|
||||
* The pdf standard "Base 14 fonts" are:
|
||||
* Courier, Courier-Bold, Courier-BoldOblique, Courier-Oblique,
|
||||
* Helvetica, Helvetica-Bold, Helvetica-BoldOblique, Helvetica-Oblique,
|
||||
* 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)
|
||||
|
||||
/**
|
||||
* The location of the DOMPDF font cache directory
|
||||
*
|
||||
* This directory contains the cached font metrics for the fonts used by DOMPDF.
|
||||
* This directory can be the same as DOMPDF_FONT_DIR
|
||||
*
|
||||
* Note: This directory must exist and be writable by the webserver process.
|
||||
*/
|
||||
"font_cache" => storage_path('fonts/'),
|
||||
|
||||
/**
|
||||
* The location of a temporary directory.
|
||||
*
|
||||
* The directory specified must be writeable by the webserver process.
|
||||
* The temporary directory is required to download remote images and when
|
||||
* using the PFDLib back end.
|
||||
*/
|
||||
"temp_dir" => sys_get_temp_dir(),
|
||||
|
||||
/**
|
||||
* ==== IMPORTANT ====
|
||||
*
|
||||
* dompdf's "chroot": Prevents dompdf from accessing system files or other
|
||||
* files on the webserver. All local files opened by dompdf must be in a
|
||||
* subdirectory of this directory. DO NOT set it to '/' since this could
|
||||
* allow an attacker to use dompdf to read any files on the server. This
|
||||
* should be an absolute path.
|
||||
* This is only checked on command line call by dompdf.php, but not by
|
||||
* direct class use like:
|
||||
* $dompdf = new DOMPDF(); $dompdf->load_html($htmldata); $dompdf->render(); $pdfdata = $dompdf->output();
|
||||
*/
|
||||
"chroot" => realpath(base_path()),
|
||||
|
||||
/**
|
||||
* Whether to enable font subsetting or not.
|
||||
*/
|
||||
"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
|
||||
* based on this setting.
|
||||
*
|
||||
* Both PDFLib & CPDF rendering backends provide sufficient rendering
|
||||
* capabilities for dompdf, however additional features (e.g. object,
|
||||
* image and font support, etc.) differ between backends. Please see
|
||||
* {@link PDFLib_Adapter} for more information on the PDFLib backend
|
||||
* and {@link CPDF_Adapter} and lib/class.pdf.php for more information
|
||||
* on CPDF. Also see the documentation for each backend at the links
|
||||
* below.
|
||||
*
|
||||
* The GD rendering backend is a little different than PDFLib and
|
||||
* CPDF. Several features of CPDF and PDFLib are not supported or do
|
||||
* not make any sense when creating image files. For example,
|
||||
* multiple pages are not supported, nor are PDF 'objects'. Have a
|
||||
* look at {@link GD_Adapter} for more information. GD support is
|
||||
* experimental, so use it at your own risk.
|
||||
*
|
||||
* @link http://www.pdflib.com
|
||||
* @link http://www.ros.co.nz/pdf
|
||||
* @link http://www.php.net/image
|
||||
*/
|
||||
"pdf_backend" => "CPDF",
|
||||
|
||||
/**
|
||||
* PDFlib license key
|
||||
*
|
||||
* If you are using a licensed, commercial version of PDFlib, specify
|
||||
* your license key here. If you are using PDFlib-Lite or are evaluating
|
||||
* the commercial version of PDFlib, comment out this setting.
|
||||
*
|
||||
* @link http://www.pdflib.com
|
||||
*
|
||||
* If pdflib present in web server and auto or selected explicitely above,
|
||||
* a real license code must exist!
|
||||
*/
|
||||
//"DOMPDF_PDFLIB_LICENSE" => "your license key here",
|
||||
|
||||
/**
|
||||
* html target media view which should be rendered into pdf.
|
||||
* List of types and parsing rules for future extensions:
|
||||
* http://www.w3.org/TR/REC-html40/types.html
|
||||
* screen, tty, tv, projection, handheld, print, braille, aural, all
|
||||
* Note: aural is deprecated in CSS 2.1 because it is replaced by speech in CSS 3.
|
||||
* Note, even though the generated pdf file is intended for print output,
|
||||
* 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",
|
||||
|
||||
/**
|
||||
* The default paper size.
|
||||
*
|
||||
* North America standard is "letter"; other countries generally "a4"
|
||||
*
|
||||
* @see CPDF_Adapter::PAPER_SIZES for valid sizes ('letter', 'legal', 'A4', etc.)
|
||||
*/
|
||||
"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",
|
||||
|
||||
/**
|
||||
* Image DPI setting
|
||||
*
|
||||
* This setting determines the default DPI setting for images and fonts. The
|
||||
* DPI may be overridden for inline images by explictly setting the
|
||||
* image's width & height style attributes (i.e. if the image's native
|
||||
* width is 600 pixels and you specify the image's width as 72 points,
|
||||
* the image will have a DPI of 600 in the rendered PDF. The DPI of
|
||||
* background images can not be overridden and is controlled entirely
|
||||
* via this parameter.
|
||||
*
|
||||
* For the purposes of DOMPDF, pixels per inch (PPI) = dots per inch (DPI).
|
||||
* If a size in html is given as px (or without unit as image size),
|
||||
* this tells the corresponding size in pt.
|
||||
* This adjusts the relative sizes to be similar to the rendering of the
|
||||
* html page in a reference browser.
|
||||
*
|
||||
* In pdf, always 1 pt = 1/72 inch
|
||||
*
|
||||
* Rendering resolution of various browsers in px per inch:
|
||||
* Windows Firefox and Internet Explorer:
|
||||
* SystemControl->Display properties->FontResolution: Default:96, largefonts:120, custom:?
|
||||
* Linux Firefox:
|
||||
* about:config *resolution: Default:96
|
||||
* (xorg screen dimension in mm and Desktop font dpi settings are ignored)
|
||||
*
|
||||
* Take care about extra font/image zoom factor of browser.
|
||||
*
|
||||
* In images, <img> size in pixel attribute, img css style, are overriding
|
||||
* the real image dimension in px for rendering.
|
||||
*
|
||||
* @var int
|
||||
*/
|
||||
"dpi" => 96,
|
||||
|
||||
/**
|
||||
* Enable inline PHP
|
||||
*
|
||||
* If this setting is set to true then DOMPDF will automatically evaluate
|
||||
* inline PHP contained within <script type="text/php"> ... </script> tags.
|
||||
*
|
||||
* Enabling this for documents you do not trust (e.g. arbitrary remote html
|
||||
* pages) is a security risk. Set this option to false if you wish to process
|
||||
* untrusted documents.
|
||||
*
|
||||
* @var bool
|
||||
*/
|
||||
"enable_php" => false,
|
||||
|
||||
/**
|
||||
* Enable inline Javascript
|
||||
*
|
||||
* If this setting is set to true then DOMPDF will automatically insert
|
||||
* JavaScript code contained within <script type="text/javascript"> ... </script> tags.
|
||||
*
|
||||
* @var bool
|
||||
*/
|
||||
"enable_javascript" => true,
|
||||
|
||||
/**
|
||||
* Enable remote file access
|
||||
*
|
||||
* If this setting is set to true, DOMPDF will access remote sites for
|
||||
* images and CSS files as required.
|
||||
* This is required for part of test case www/test/image_variants.html through www/examples.php
|
||||
*
|
||||
* Attention!
|
||||
* This can be a security risk, in particular in combination with DOMPDF_ENABLE_PHP and
|
||||
* allowing remote access to dompdf.php or on allowing remote html code to be passed to
|
||||
* $dompdf = new DOMPDF(, $dompdf->load_html(...,
|
||||
* This allows anonymous users to download legally doubtful internet content which on
|
||||
* tracing back appears to being downloaded by your server, or allows malicious php code
|
||||
* in remote html pages to be executed by your server with your account privileges.
|
||||
*
|
||||
* @var bool
|
||||
*/
|
||||
"enable_remote" => true,
|
||||
|
||||
/**
|
||||
* A ratio applied to the fonts height to be more like browsers' line height
|
||||
*/
|
||||
"font_height_ratio" => 1.1,
|
||||
|
||||
/**
|
||||
* Use the more-than-experimental HTML5 Lib parser
|
||||
*/
|
||||
"enable_html5_parser" => false,
|
||||
),
|
||||
|
||||
|
||||
);
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
<?php declare(strict_types=1);
|
||||
|
||||
return [
|
||||
'hosts' => [
|
||||
env('ELASTIC_HOST', 'localhost:9200'),
|
||||
]
|
||||
];
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
<?php declare(strict_types=1);
|
||||
|
||||
return [
|
||||
'refresh_documents' => env('ELASTIC_SCOUT_DRIVER_REFRESH_DOCUMENTS', false),
|
||||
];
|
||||
|
|
@ -0,0 +1,328 @@
|
|||
<?php
|
||||
|
||||
use Maatwebsite\Excel\Excel;
|
||||
|
||||
return [
|
||||
'exports' => [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Chunk size
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| When using FromQuery, the query is automatically chunked.
|
||||
| Here you can specify how big the chunk should be.
|
||||
|
|
||||
*/
|
||||
'chunk_size' => 1000,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Pre-calculate formulas during export
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
'pre_calculate_formulas' => false,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Enable strict null comparison
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| When enabling strict null comparison empty cells ('') will
|
||||
| be added to the sheet.
|
||||
*/
|
||||
'strict_null_comparison' => false,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| CSV Settings
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Configure e.g. delimiter, enclosure and line ending for CSV exports.
|
||||
|
|
||||
*/
|
||||
'csv' => [
|
||||
'delimiter' => ',',
|
||||
'enclosure' => '"',
|
||||
'line_ending' => PHP_EOL,
|
||||
'use_bom' => false,
|
||||
'include_separator_line' => false,
|
||||
'excel_compatibility' => false,
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Worksheet properties
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Configure e.g. default title, creator, subject,...
|
||||
|
|
||||
*/
|
||||
'properties' => [
|
||||
'creator' => '',
|
||||
'lastModifiedBy' => '',
|
||||
'title' => '',
|
||||
'description' => '',
|
||||
'subject' => '',
|
||||
'keywords' => '',
|
||||
'category' => '',
|
||||
'manager' => '',
|
||||
'company' => '',
|
||||
],
|
||||
],
|
||||
|
||||
'imports' => [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Read Only
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| When dealing with imports, you might only be interested in the
|
||||
| data that the sheet exists. By default we ignore all styles,
|
||||
| however if you want to do some logic based on style data
|
||||
| you can enable it by setting read_only to false.
|
||||
|
|
||||
*/
|
||||
'read_only' => true,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Ignore Empty
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| When dealing with imports, you might be interested in ignoring
|
||||
| rows that have null values or empty strings. By default rows
|
||||
| containing empty strings or empty values are not ignored but can be
|
||||
| ignored by enabling the setting ignore_empty to true.
|
||||
|
|
||||
*/
|
||||
'ignore_empty' => false,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Heading Row Formatter
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Configure the heading row formatter.
|
||||
| Available options: none|slug|custom
|
||||
|
|
||||
*/
|
||||
'heading_row' => [
|
||||
'formatter' => 'slug',
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| CSV Settings
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Configure e.g. delimiter, enclosure and line ending for CSV imports.
|
||||
|
|
||||
*/
|
||||
'csv' => [
|
||||
'delimiter' => ',',
|
||||
'enclosure' => '"',
|
||||
'escape_character' => '\\',
|
||||
'contiguous' => false,
|
||||
'input_encoding' => 'UTF-8',
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Worksheet properties
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Configure e.g. default title, creator, subject,...
|
||||
|
|
||||
*/
|
||||
'properties' => [
|
||||
'creator' => '',
|
||||
'lastModifiedBy' => '',
|
||||
'title' => '',
|
||||
'description' => '',
|
||||
'subject' => '',
|
||||
'keywords' => '',
|
||||
'category' => '',
|
||||
'manager' => '',
|
||||
'company' => '',
|
||||
],
|
||||
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Extension detector
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Configure here which writer/reader type should be used when the package
|
||||
| needs to guess the correct type based on the extension alone.
|
||||
|
|
||||
*/
|
||||
'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,
|
||||
'gnumeric' => Excel::GNUMERIC,
|
||||
'htm' => Excel::HTML,
|
||||
'html' => Excel::HTML,
|
||||
'csv' => Excel::CSV,
|
||||
'tsv' => Excel::TSV,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| PDF Extension
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Configure here which Pdf driver should be used by default.
|
||||
| Available options: Excel::MPDF | Excel::TCPDF | Excel::DOMPDF
|
||||
|
|
||||
*/
|
||||
'pdf' => Excel::DOMPDF,
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Value Binder
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| PhpSpreadsheet offers a way to hook into the process of a value being
|
||||
| written to a cell. In there some assumptions are made on how the
|
||||
| value should be formatted. If you want to change those defaults,
|
||||
| you can implement your own default value binder.
|
||||
|
|
||||
| Possible value binders:
|
||||
|
|
||||
| [x] Maatwebsite\Excel\DefaultValueBinder::class
|
||||
| [x] PhpOffice\PhpSpreadsheet\Cell\StringValueBinder::class
|
||||
| [x] PhpOffice\PhpSpreadsheet\Cell\AdvancedValueBinder::class
|
||||
|
|
||||
*/
|
||||
'value_binder' => [
|
||||
'default' => Maatwebsite\Excel\DefaultValueBinder::class,
|
||||
],
|
||||
|
||||
'cache' => [
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Default cell caching driver
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| By default PhpSpreadsheet keeps all cell values in memory, however when
|
||||
| dealing with large files, this might result into memory issues. If you
|
||||
| want to mitigate that, you can configure a cell caching driver here.
|
||||
| When using the illuminate driver, it will store each value in a the
|
||||
| cache store. This can slow down the process, because it needs to
|
||||
| store each value. You can use the "batch" store if you want to
|
||||
| only persist to the store when the memory limit is reached.
|
||||
|
|
||||
| Drivers: memory|illuminate|batch
|
||||
|
|
||||
*/
|
||||
'driver' => 'memory',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Batch memory caching
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| When dealing with the "batch" caching driver, it will only
|
||||
| persist to the store when the memory limit is reached.
|
||||
| Here you can tweak the memory limit to your liking.
|
||||
|
|
||||
*/
|
||||
'batch' => [
|
||||
'memory_limit' => 60000,
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Illuminate cache
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| When using the "illuminate" caching driver, it will automatically use
|
||||
| your default cache store. However if you prefer to have the cell
|
||||
| cache on a separate store, you can configure the store name here.
|
||||
| You can use any store defined in your cache config. When leaving
|
||||
| at "null" it will use the default store.
|
||||
|
|
||||
*/
|
||||
'illuminate' => [
|
||||
'store' => null,
|
||||
],
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Transaction Handler
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| By default the import is wrapped in a transaction. This is useful
|
||||
| for when an import may fail and you want to retry it. With the
|
||||
| transactions, the previous import gets rolled-back.
|
||||
|
|
||||
| You can disable the transaction handler by setting this to null.
|
||||
| Or you can choose a custom made transaction handler here.
|
||||
|
|
||||
| Supported handlers: null|db
|
||||
|
|
||||
*/
|
||||
'transactions' => [
|
||||
'handler' => 'db',
|
||||
],
|
||||
|
||||
'temporary_files' => [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Local Temporary Path
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| When exporting and importing files, we use a temporary file, before
|
||||
| storing reading or downloading. Here you can customize that path.
|
||||
|
|
||||
*/
|
||||
'local_path' => storage_path('framework/laravel-excel'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Remote Temporary Disk
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| When dealing with a multi server setup with queues in which you
|
||||
| cannot rely on having a shared local temporary path, you might
|
||||
| want to store the temporary file on a shared disk. During the
|
||||
| queue executing, we'll retrieve the temporary file from that
|
||||
| location instead. When left to null, it will always use
|
||||
| the local path. This setting only has effect when using
|
||||
| in conjunction with queued imports and exports.
|
||||
|
|
||||
*/
|
||||
'remote_disk' => null,
|
||||
'remote_prefix' => null,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Force Resync
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| When dealing with a multi server setup as above, it's possible
|
||||
| for the clean up that occurs after entire queue has been run to only
|
||||
| cleanup the server that the last AfterImportJob runs on. The rest of the server
|
||||
| would still have the local temporary file stored on it. In this case your
|
||||
| local storage limits can be exceeded and future imports won't be processed.
|
||||
| To mitigate this you can set this config value to be true, so that after every
|
||||
| queued chunk is processed the local temporary file is deleted on the server that
|
||||
| processed it.
|
||||
|
|
||||
*/
|
||||
'force_resync_remote' => null,
|
||||
],
|
||||
];
|
||||
|
|
@ -0,0 +1,74 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Default Filesystem Disk
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may specify the default filesystem disk that should be used
|
||||
| by the framework. The "local" disk, as well as a variety of cloud
|
||||
| based disks are available to your application. Just store away!
|
||||
|
|
||||
*/
|
||||
|
||||
'default' => env('FILESYSTEM_DRIVER', 'public'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Default Cloud Filesystem Disk
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Many applications store files both locally and in the cloud. For this
|
||||
| reason, you may specify a default "cloud" driver here. This driver
|
||||
| will be bound as the Cloud disk implementation in the container.
|
||||
|
|
||||
*/
|
||||
|
||||
'cloud' => env('FILESYSTEM_CLOUD', 's3'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Filesystem Disks
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may configure as many filesystem "disks" as you wish, and you
|
||||
| may even configure multiple disks of the same driver. Defaults have
|
||||
| been setup for each driver as an example of the required options.
|
||||
|
|
||||
| Supported Drivers: "local", "ftp", "sftp", "s3", "rackspace"
|
||||
|
|
||||
*/
|
||||
|
||||
'disks' => [
|
||||
|
||||
'local' => [
|
||||
'driver' => 'local',
|
||||
'root' => storage_path('app'),
|
||||
],
|
||||
|
||||
'private' => [
|
||||
'driver' => 'local',
|
||||
'root' => storage_path('app/private'),
|
||||
],
|
||||
|
||||
'public' => [
|
||||
'driver' => 'local',
|
||||
'root' => storage_path('app/public'),
|
||||
'url' => env('APP_URL') . '/storage',
|
||||
'visibility' => 'public',
|
||||
],
|
||||
|
||||
's3' => [
|
||||
'driver' => 's3',
|
||||
'key' => env('AWS_ACCESS_KEY_ID'),
|
||||
'secret' => env('AWS_SECRET_ACCESS_KEY'),
|
||||
'region' => env('AWS_DEFAULT_REGION'),
|
||||
'bucket' => env('AWS_BUCKET'),
|
||||
'url' => env('AWS_URL'),
|
||||
],
|
||||
|
||||
],
|
||||
|
||||
];
|
||||
|
|
@ -0,0 +1,62 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
/*
|
||||
|
|
||||
|--------------------------------------------------------------------------
|
||||
| Flare API key
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Specify Flare's API key below to enable error reporting to the service.
|
||||
|
|
||||
| More info: https://flareapp.io/docs/general/projects
|
||||
|
|
||||
*/
|
||||
|
||||
'key' => env('FLARE_KEY'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Reporting Options
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| These options determine which information will be transmitted to Flare.
|
||||
|
|
||||
*/
|
||||
|
||||
'reporting' => [
|
||||
'anonymize_ips' => true,
|
||||
'collect_git_information' => false,
|
||||
'report_queries' => true,
|
||||
'maximum_number_of_collected_queries' => 200,
|
||||
'report_query_bindings' => true,
|
||||
'report_view_data' => true,
|
||||
'grouping_type' => null,
|
||||
'report_logs' => true,
|
||||
'maximum_number_of_collected_logs' => 200,
|
||||
'censor_request_body_fields' => ['password'],
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Reporting Log statements
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| If this setting is `false` log statements won't be send as events to Flare,
|
||||
| no matter which error level you specified in the Flare log channel.
|
||||
|
|
||||
*/
|
||||
|
||||
'send_logs_as_events' => true,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Censor request body fields
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| These fields will be censored from your request when sent to Flare.
|
||||
|
|
||||
*/
|
||||
|
||||
'censor_request_body_fields' => ['password'],
|
||||
];
|
||||
|
|
@ -0,0 +1,52 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Default Hash Driver
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This option controls the default hash driver that will be used to hash
|
||||
| passwords for your application. By default, the bcrypt algorithm is
|
||||
| used; however, you remain free to modify this option if you wish.
|
||||
|
|
||||
| Supported: "bcrypt", "argon"
|
||||
|
|
||||
*/
|
||||
|
||||
'driver' => 'bcrypt',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Bcrypt Options
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may specify the configuration options that should be used when
|
||||
| passwords are hashed using the Bcrypt algorithm. This will allow you
|
||||
| to control the amount of time it takes to hash the given password.
|
||||
|
|
||||
*/
|
||||
|
||||
'bcrypt' => [
|
||||
'rounds' => env('BCRYPT_ROUNDS', 10),
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Argon Options
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may specify the configuration options that should be used when
|
||||
| passwords are hashed using the Argon algorithm. These will allow you
|
||||
| to control the amount of time it takes to hash the given password.
|
||||
|
|
||||
*/
|
||||
|
||||
'argon' => [
|
||||
'memory' => 1024,
|
||||
'threads' => 2,
|
||||
'time' => 2,
|
||||
],
|
||||
|
||||
];
|
||||
|
|
@ -0,0 +1,126 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Editor
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Choose your preferred editor to use when clicking any edit button.
|
||||
|
|
||||
| Supported: "phpstorm", "vscode", "vscode-insiders", "textmate", "emacs",
|
||||
| "sublime", "atom", "nova", "macvim", "idea", "netbeans",
|
||||
| "xdebug"
|
||||
|
|
||||
*/
|
||||
|
||||
'editor' => env('IGNITION_EDITOR', 'phpstorm'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Theme
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may specify which theme Ignition should use.
|
||||
|
|
||||
| Supported: "light", "dark", "auto"
|
||||
|
|
||||
*/
|
||||
|
||||
'theme' => env('IGNITION_THEME', 'light'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Sharing
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| You can share local errors with colleagues or others around the world.
|
||||
| Sharing is completely free and doesn't require an account on Flare.
|
||||
|
|
||||
| If necessary, you can completely disable sharing below.
|
||||
|
|
||||
*/
|
||||
|
||||
'enable_share_button' => env('IGNITION_SHARING_ENABLED', true),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Register Ignition commands
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Ignition comes with an additional make command that lets you create
|
||||
| new solution classes more easily. To keep your default Laravel
|
||||
| installation clean, this command is not registered by default.
|
||||
|
|
||||
| You can enable the command registration below.
|
||||
|
|
||||
*/
|
||||
'register_commands' => env('REGISTER_IGNITION_COMMANDS', false),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Ignored Solution Providers
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| You may specify a list of solution providers (as fully qualified class
|
||||
| names) that shouldn't be loaded. Ignition will ignore these classes
|
||||
| and possible solutions provided by them will never be displayed.
|
||||
|
|
||||
*/
|
||||
|
||||
'ignored_solution_providers' => [
|
||||
\Facade\Ignition\SolutionProviders\MissingPackageSolutionProvider::class,
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Runnable Solutions
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Some solutions that Ignition displays are runnable and can perform
|
||||
| various tasks. Runnable solutions are enabled when your app has
|
||||
| debug mode enabled. You may also fully disable this feature.
|
||||
|
|
||||
*/
|
||||
|
||||
'enable_runnable_solutions' => env('IGNITION_ENABLE_RUNNABLE_SOLUTIONS', null),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Remote Path Mapping
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| If you are using a remote dev server, like Laravel Homestead, Docker, or
|
||||
| even a remote VPS, it will be necessary to specify your path mapping.
|
||||
|
|
||||
| Leaving one, or both of these, empty or null will not trigger the remote
|
||||
| URL changes and Ignition will treat your editor links as local files.
|
||||
|
|
||||
| "remote_sites_path" is an absolute base path for your sites or projects
|
||||
| in Homestead, Vagrant, Docker, or another remote development server.
|
||||
|
|
||||
| Example value: "/home/vagrant/Code"
|
||||
|
|
||||
| "local_sites_path" is an absolute base path for your sites or projects
|
||||
| on your local computer where your IDE or code editor is running on.
|
||||
|
|
||||
| Example values: "/Users/<name>/Code", "C:\Users\<name>\Documents\Code"
|
||||
|
|
||||
*/
|
||||
|
||||
'remote_sites_path' => env('IGNITION_REMOTE_SITES_PATH', ''),
|
||||
'local_sites_path' => env('IGNITION_LOCAL_SITES_PATH', ''),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Housekeeping Endpoint Prefix
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Ignition registers a couple of routes when it is enabled. Below you may
|
||||
| specify a route prefix that will be used to host all internal links.
|
||||
|
|
||||
*/
|
||||
'housekeeping_endpoint_prefix' => '_ignition',
|
||||
|
||||
];
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Image Driver
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Intervention Image supports "GD Library" and "Imagick" to process images
|
||||
| internally. You may choose one of them according to your PHP
|
||||
| configuration. By default PHP's "GD Library" implementation is used.
|
||||
|
|
||||
| Supported: "gd", "imagick"
|
||||
|
|
||||
*/
|
||||
|
||||
'driver' => 'gd'
|
||||
|
||||
];
|
||||
|
|
@ -0,0 +1,71 @@
|
|||
<?php
|
||||
|
||||
return array(
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Name of route
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Enter the routes name to enable dynamic imagecache manipulation.
|
||||
| This handle will define the first part of the URI:
|
||||
|
|
||||
| {route}/{template}/{filename}
|
||||
|
|
||||
| Examples: "images", "img/cache"
|
||||
|
|
||||
*/
|
||||
|
||||
'route' => 'cache',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Storage paths
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The following paths will be searched for the image filename, submited
|
||||
| by URI.
|
||||
|
|
||||
| Define as many directories as you like.
|
||||
|
|
||||
*/
|
||||
|
||||
'paths' => array(
|
||||
storage_path('app/public'),
|
||||
public_path('storage')
|
||||
),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Manipulation templates
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may specify your own manipulation filter templates.
|
||||
| The keys of this array will define which templates
|
||||
| are available in the URI:
|
||||
|
|
||||
| {route}/{template}/{filename}
|
||||
|
|
||||
| The values of this array will define which filter class
|
||||
| will be applied, by its fully qualified name.
|
||||
|
|
||||
*/
|
||||
|
||||
'templates' => array(
|
||||
'small' => 'Webkul\Product\CacheFilters\Small',
|
||||
'medium' => 'Webkul\Product\CacheFilters\Medium',
|
||||
'large' => 'Webkul\Product\CacheFilters\Large',
|
||||
),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Image Cache Lifetime
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Lifetime in minutes of the images handled by the imagecache route.
|
||||
|
|
||||
*/
|
||||
|
||||
'lifetime' => 525600,
|
||||
|
||||
);
|
||||
|
|
@ -0,0 +1,304 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of jwt-auth.
|
||||
*
|
||||
* (c) Sean Tymon <tymon148@gmail.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| JWT Authentication Secret
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Don't forget to set this in your .env file, as it will be used to sign
|
||||
| your tokens. A helper command is provided for this:
|
||||
| `php artisan jwt:secret`
|
||||
|
|
||||
| Note: This will be used for Symmetric algorithms only (HMAC),
|
||||
| since RSA and ECDSA use a private/public key combo (See below).
|
||||
|
|
||||
*/
|
||||
|
||||
'secret' => env('JWT_SECRET'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| JWT Authentication Keys
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The algorithm you are using, will determine whether your tokens are
|
||||
| signed with a random string (defined in `JWT_SECRET`) or using the
|
||||
| following public & private keys.
|
||||
|
|
||||
| Symmetric Algorithms:
|
||||
| HS256, HS384 & HS512 will use `JWT_SECRET`.
|
||||
|
|
||||
| Asymmetric Algorithms:
|
||||
| RS256, RS384 & RS512 / ES256, ES384 & ES512 will use the keys below.
|
||||
|
|
||||
*/
|
||||
|
||||
'keys' => [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Public Key
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| A path or resource to your public key.
|
||||
|
|
||||
| E.g. 'file://path/to/public/key'
|
||||
|
|
||||
*/
|
||||
|
||||
'public' => env('JWT_PUBLIC_KEY'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Private Key
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| A path or resource to your private key.
|
||||
|
|
||||
| E.g. 'file://path/to/private/key'
|
||||
|
|
||||
*/
|
||||
|
||||
'private' => env('JWT_PRIVATE_KEY'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Passphrase
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The passphrase for your private key. Can be null if none set.
|
||||
|
|
||||
*/
|
||||
|
||||
'passphrase' => env('JWT_PASSPHRASE'),
|
||||
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| JWT time to live
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Specify the length of time (in minutes) that the token will be valid for.
|
||||
| Defaults to 1 hour.
|
||||
|
|
||||
| You can also set this to null, to yield a never expiring token.
|
||||
| Some people may want this behaviour for e.g. a mobile app.
|
||||
| This is not particularly recommended, so make sure you have appropriate
|
||||
| systems in place to revoke the token if necessary.
|
||||
| Notice: If you set this to null you should remove 'exp' element from 'required_claims' list.
|
||||
|
|
||||
*/
|
||||
|
||||
'ttl' => env('JWT_TTL', 60),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Refresh time to live
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Specify the length of time (in minutes) that the token can be refreshed
|
||||
| within. I.E. The user can refresh their token within a 2 week window of
|
||||
| the original token being created until they must re-authenticate.
|
||||
| Defaults to 2 weeks.
|
||||
|
|
||||
| You can also set this to null, to yield an infinite refresh time.
|
||||
| Some may want this instead of never expiring tokens for e.g. a mobile app.
|
||||
| This is not particularly recommended, so make sure you have appropriate
|
||||
| systems in place to revoke the token if necessary.
|
||||
|
|
||||
*/
|
||||
|
||||
'refresh_ttl' => env('JWT_REFRESH_TTL', 20160),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| JWT hashing algorithm
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Specify the hashing algorithm that will be used to sign the token.
|
||||
|
|
||||
| See here: https://github.com/namshi/jose/tree/master/src/Namshi/JOSE/Signer/OpenSSL
|
||||
| for possible values.
|
||||
|
|
||||
*/
|
||||
|
||||
'algo' => env('JWT_ALGO', 'HS256'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Required Claims
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Specify the required claims that must exist in any token.
|
||||
| A TokenInvalidException will be thrown if any of these claims are not
|
||||
| present in the payload.
|
||||
|
|
||||
*/
|
||||
|
||||
'required_claims' => [
|
||||
'iss',
|
||||
'iat',
|
||||
'exp',
|
||||
'nbf',
|
||||
'sub',
|
||||
'jti',
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Persistent Claims
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Specify the claim keys to be persisted when refreshing a token.
|
||||
| `sub` and `iat` will automatically be persisted, in
|
||||
| addition to the these claims.
|
||||
|
|
||||
| Note: If a claim does not exist then it will be ignored.
|
||||
|
|
||||
*/
|
||||
|
||||
'persistent_claims' => [
|
||||
// 'foo',
|
||||
// 'bar',
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Lock Subject
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This will determine whether a `prv` claim is automatically added to
|
||||
| the token. The purpose of this is to ensure that if you have multiple
|
||||
| authentication models e.g. `App\User` & `App\OtherPerson`, then we
|
||||
| should prevent one authentication request from impersonating another,
|
||||
| if 2 tokens happen to have the same id across the 2 different models.
|
||||
|
|
||||
| Under specific circumstances, you may want to disable this behaviour
|
||||
| e.g. if you only have one authentication model, then you would save
|
||||
| a little on token size.
|
||||
|
|
||||
*/
|
||||
|
||||
'lock_subject' => true,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Leeway
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This property gives the jwt timestamp claims some "leeway".
|
||||
| Meaning that if you have any unavoidable slight clock skew on
|
||||
| any of your servers then this will afford you some level of cushioning.
|
||||
|
|
||||
| This applies to the claims `iat`, `nbf` and `exp`.
|
||||
|
|
||||
| Specify in seconds - only if you know you need it.
|
||||
|
|
||||
*/
|
||||
|
||||
'leeway' => env('JWT_LEEWAY', 0),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Blacklist Enabled
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| In order to invalidate tokens, you must have the blacklist enabled.
|
||||
| If you do not want or need this functionality, then set this to false.
|
||||
|
|
||||
*/
|
||||
|
||||
'blacklist_enabled' => env('JWT_BLACKLIST_ENABLED', true),
|
||||
|
||||
/*
|
||||
| -------------------------------------------------------------------------
|
||||
| Blacklist Grace Period
|
||||
| -------------------------------------------------------------------------
|
||||
|
|
||||
| When multiple concurrent requests are made with the same JWT,
|
||||
| it is possible that some of them fail, due to token regeneration
|
||||
| on every request.
|
||||
|
|
||||
| Set grace period in seconds to prevent parallel request failure.
|
||||
|
|
||||
*/
|
||||
|
||||
'blacklist_grace_period' => env('JWT_BLACKLIST_GRACE_PERIOD', 0),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Cookies encryption
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| By default Laravel encrypt cookies for security reason.
|
||||
| If you decide to not decrypt cookies, you will have to configure Laravel
|
||||
| to not encrypt your cookie token by adding its name into the $except
|
||||
| array available in the middleware "EncryptCookies" provided by Laravel.
|
||||
| see https://laravel.com/docs/master/responses#cookies-and-encryption
|
||||
| for details.
|
||||
|
|
||||
| Set it to true if you want to decrypt cookies.
|
||||
|
|
||||
*/
|
||||
|
||||
'decrypt_cookies' => false,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Providers
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Specify the various providers used throughout the package.
|
||||
|
|
||||
*/
|
||||
|
||||
'providers' => [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| JWT Provider
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Specify the provider that is used to create and decode the tokens.
|
||||
|
|
||||
*/
|
||||
|
||||
'jwt' => Tymon\JWTAuth\Providers\JWT\Lcobucci::class,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Authentication Provider
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Specify the provider that is used to authenticate users.
|
||||
|
|
||||
*/
|
||||
|
||||
'auth' => Tymon\JWTAuth\Providers\Auth\Illuminate::class,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Storage Provider
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Specify the provider that is used to store tokens in the blacklist.
|
||||
|
|
||||
*/
|
||||
|
||||
'storage' => Tymon\JWTAuth\Providers\Storage\Illuminate::class,
|
||||
|
||||
],
|
||||
|
||||
];
|
||||
|
|
@ -0,0 +1,81 @@
|
|||
<?php
|
||||
|
||||
use Monolog\Handler\StreamHandler;
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Default Log Channel
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This option defines the default log channel that gets used when writing
|
||||
| messages to the logs. The name specified in this option should match
|
||||
| one of the channels defined in the "channels" configuration array.
|
||||
|
|
||||
*/
|
||||
|
||||
'default' => env('LOG_CHANNEL', 'stack'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Log Channels
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may configure the log channels for your application. Out of
|
||||
| the box, Laravel uses the Monolog PHP logging library. This gives
|
||||
| you a variety of powerful log handlers / formatters to utilize.
|
||||
|
|
||||
| Available Drivers: "single", "daily", "slack", "syslog",
|
||||
| "errorlog", "monolog",
|
||||
| "custom", "stack"
|
||||
|
|
||||
*/
|
||||
|
||||
'channels' => [
|
||||
'stack' => [
|
||||
'driver' => 'stack',
|
||||
'channels' => ['single'],
|
||||
],
|
||||
|
||||
'single' => [
|
||||
'driver' => 'single',
|
||||
'path' => storage_path('logs/laravel.log'),
|
||||
'level' => 'debug',
|
||||
],
|
||||
|
||||
'daily' => [
|
||||
'driver' => 'daily',
|
||||
'path' => storage_path('logs/laravel.log'),
|
||||
'level' => 'debug',
|
||||
'days' => 7,
|
||||
],
|
||||
|
||||
'slack' => [
|
||||
'driver' => 'slack',
|
||||
'url' => env('LOG_SLACK_WEBHOOK_URL'),
|
||||
'username' => 'Laravel Log',
|
||||
'emoji' => ':boom:',
|
||||
'level' => 'critical',
|
||||
],
|
||||
|
||||
'stderr' => [
|
||||
'driver' => 'monolog',
|
||||
'handler' => StreamHandler::class,
|
||||
'with' => [
|
||||
'stream' => 'php://stderr',
|
||||
],
|
||||
],
|
||||
|
||||
'syslog' => [
|
||||
'driver' => 'syslog',
|
||||
'level' => 'debug',
|
||||
],
|
||||
|
||||
'errorlog' => [
|
||||
'driver' => 'errorlog',
|
||||
'level' => 'debug',
|
||||
],
|
||||
],
|
||||
|
||||
];
|
||||
|
|
@ -0,0 +1,145 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Mail Driver
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Laravel supports both SMTP and PHP's "mail" function as drivers for the
|
||||
| sending of e-mail. You may specify which one you're using throughout
|
||||
| your application here. By default, Laravel is setup for SMTP mail.
|
||||
|
|
||||
| Supported: "smtp", "sendmail", "mailgun", "mandrill", "ses",
|
||||
| "sparkpost", "log", "array"
|
||||
|
|
||||
*/
|
||||
|
||||
'driver' => env('MAIL_DRIVER', 'smtp'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| SMTP Host Address
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may provide the host address of the SMTP server used by your
|
||||
| applications. A default option is provided that is compatible with
|
||||
| the Mailgun mail service which will provide reliable deliveries.
|
||||
|
|
||||
*/
|
||||
|
||||
'host' => env('MAIL_HOST', 'smtp.mailgun.org'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| SMTP Host Port
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This is the SMTP port used by your application to deliver e-mails to
|
||||
| users of the application. Like the host we have set this value to
|
||||
| stay compatible with the Mailgun e-mail application by default.
|
||||
|
|
||||
*/
|
||||
|
||||
'port' => env('MAIL_PORT', 587),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Global "From" Address
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| You may wish for all e-mails sent by your application to be sent from
|
||||
| the same address. Here, you may specify a name and address that is
|
||||
| used globally for all e-mails that are sent by your application.
|
||||
|
|
||||
*/
|
||||
|
||||
'from' => [
|
||||
'address' => env('SHOP_MAIL_FROM'),
|
||||
'name' => env('MAIL_FROM_NAME')
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Global "Admin" Address
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| General admin related admins, such as order notifications.
|
||||
|
|
||||
*/
|
||||
|
||||
'admin' => [
|
||||
'address' => env('ADMIN_MAIL_TO'),
|
||||
'name' => env('ADMIN_MAIL_NAME', 'Admin')
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| E-Mail Encryption Protocol
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may specify the encryption protocol that should be used when
|
||||
| the application send e-mail messages. A sensible default using the
|
||||
| transport layer security protocol should provide great security.
|
||||
|
|
||||
*/
|
||||
|
||||
'encryption' => env('MAIL_ENCRYPTION', 'tls'),
|
||||
|
||||
'stream' => [
|
||||
'ssl' => [
|
||||
'allow_self_signed' => true,
|
||||
'verify_peer' => false,
|
||||
'verify_peer_name' => false,
|
||||
],
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| SMTP Server Username
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| If your SMTP server requires a username for authentication, you should
|
||||
| set it here. This will get used to authenticate with your server on
|
||||
| connection. You may also set the "password" value below this one.
|
||||
|
|
||||
*/
|
||||
|
||||
'username' => env('MAIL_USERNAME'),
|
||||
|
||||
'password' => env('MAIL_PASSWORD'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Sendmail System Path
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| When using the "sendmail" driver to send e-mails, we will need to know
|
||||
| the path to where Sendmail lives on this server. A default path has
|
||||
| been provided here, which will work well on most of your systems.
|
||||
|
|
||||
*/
|
||||
|
||||
'sendmail' => '/usr/sbin/sendmail -bs',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Markdown Mail Settings
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| If you are using Markdown based email rendering, you may configure your
|
||||
| theme and component paths here, allowing you to customize the design
|
||||
| of the emails. Or, you may simply stick with the Laravel defaults!
|
||||
|
|
||||
*/
|
||||
|
||||
'markdown' => [
|
||||
'theme' => 'default',
|
||||
|
||||
'paths' => [
|
||||
resource_path('views/vendor/mail'),
|
||||
],
|
||||
],
|
||||
|
||||
];
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
'admin' => [
|
||||
|
||||
],
|
||||
|
||||
'customer' => [
|
||||
|
||||
]
|
||||
];
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
|
||||
];
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
|
||||
];
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
|
||||
];
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
// use the 'code' of the 'attributes' table here to be able to control which attributes
|
||||
// should be skipped when doing a copy (admin->catalog->products->copy product).
|
||||
// you can also add every relation that should not be copied here to skip them.
|
||||
// defaults to none (which means everything is copied).
|
||||
'skipAttributesOnCopy' => [],
|
||||
|
||||
// Make the original and source product 'related' via the 'product_relations' table
|
||||
'linkProductsOnCopy' => false,
|
||||
|
||||
// Ability to set a global callable that defines if a product is saleable.
|
||||
// Return neither true nor false but null by default to not interrupt the default chain that
|
||||
// defines if a product is saleable. It depends on the isSaleable() method of the product
|
||||
// type if this callable is obeyed.
|
||||
'isSaleable' => null,
|
||||
];
|
||||
|
|
@ -0,0 +1,86 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Default Queue Connection Name
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Laravel's queue API supports an assortment of back-ends via a single
|
||||
| API, giving you convenient access to each back-end using the same
|
||||
| syntax for every one. Here you may define a default connection.
|
||||
|
|
||||
*/
|
||||
|
||||
'default' => env('QUEUE_DRIVER', 'sync'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Queue Connections
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may configure the connection information for each server that
|
||||
| is used by your application. A default configuration has been added
|
||||
| for each back-end shipped with Laravel. You are free to add more.
|
||||
|
|
||||
| Drivers: "sync", "database", "beanstalkd", "sqs", "redis", "null"
|
||||
|
|
||||
*/
|
||||
|
||||
'connections' => [
|
||||
|
||||
'sync' => [
|
||||
'driver' => 'sync',
|
||||
],
|
||||
|
||||
'database' => [
|
||||
'driver' => 'database',
|
||||
'table' => 'jobs',
|
||||
'queue' => 'default',
|
||||
'retry_after' => 90,
|
||||
],
|
||||
|
||||
'beanstalkd' => [
|
||||
'driver' => 'beanstalkd',
|
||||
'host' => 'localhost',
|
||||
'queue' => 'default',
|
||||
'retry_after' => 90,
|
||||
],
|
||||
|
||||
'sqs' => [
|
||||
'driver' => 'sqs',
|
||||
'key' => env('SQS_KEY', 'your-public-key'),
|
||||
'secret' => env('SQS_SECRET', 'your-secret-key'),
|
||||
'prefix' => env('SQS_PREFIX', 'https://sqs.us-east-1.amazonaws.com/your-account-id'),
|
||||
'queue' => env('SQS_QUEUE', 'your-queue-name'),
|
||||
'region' => env('SQS_REGION', 'us-east-1'),
|
||||
],
|
||||
|
||||
'redis' => [
|
||||
'driver' => 'redis',
|
||||
'connection' => 'default',
|
||||
'queue' => 'default',
|
||||
'retry_after' => 90,
|
||||
'block_for' => null,
|
||||
],
|
||||
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Failed Queue Jobs
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| These options configure the behavior of failed queue job logging so you
|
||||
| can control which database and table are used to store the jobs that
|
||||
| have failed. You may change them to any database / table you wish.
|
||||
|
|
||||
*/
|
||||
|
||||
'failed' => [
|
||||
'database' => env('DB_CONNECTION', 'mysql'),
|
||||
'table' => 'failed_jobs',
|
||||
],
|
||||
|
||||
];
|
||||
|
|
@ -0,0 +1,246 @@
|
|||
<?php
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Prettus Repository Config
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
|
|
||||
*/
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Repository Pagination Limit Default
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
*/
|
||||
'pagination' => [
|
||||
'limit' => 15
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Fractal Presenter Config
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
|
||||
Available serializers:
|
||||
ArraySerializer
|
||||
DataArraySerializer
|
||||
JsonApiSerializer
|
||||
|
||||
*/
|
||||
'fractal' => [
|
||||
'params' => [
|
||||
'include' => 'include'
|
||||
],
|
||||
'serializer' => League\Fractal\Serializer\DataArraySerializer::class
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Cache Config
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
*/
|
||||
'cache' => [
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Cache Status
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Enable or disable cache
|
||||
|
|
||||
*/
|
||||
'enabled' => false,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Cache Minutes
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Time of expiration cache
|
||||
|
|
||||
*/
|
||||
'minutes' => 30,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Cache Repository
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Instance of Illuminate\Contracts\Cache\Repository
|
||||
|
|
||||
*/
|
||||
'repository' => 'cache',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Cache Clean Listener
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
|
|
||||
|
|
||||
*/
|
||||
'clean' => [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Enable clear cache on repository changes
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
*/
|
||||
'enabled' => true,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Actions in Repository
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| create : Clear Cache on create Entry in repository
|
||||
| update : Clear Cache on update Entry in repository
|
||||
| delete : Clear Cache on delete Entry in repository
|
||||
|
|
||||
*/
|
||||
'on' => [
|
||||
'create' => true,
|
||||
'update' => true,
|
||||
'delete' => true,
|
||||
]
|
||||
],
|
||||
|
||||
'params' => [
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Skip Cache Params
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
|
|
||||
| Ex: http://prettus.local/?search=lorem&skipCache=true
|
||||
|
|
||||
*/
|
||||
'skipCache' => 'skipCache'
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Methods Allowed
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| methods cacheable : all, paginate, find, findByField, findWhere, getByCriteria
|
||||
|
|
||||
| Ex:
|
||||
|
|
||||
| 'only' =>['all','paginate'],
|
||||
|
|
||||
| or
|
||||
|
|
||||
| 'except' =>['find'],
|
||||
*/
|
||||
'allowed' => [
|
||||
'only' => null,
|
||||
'except' => null
|
||||
]
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Criteria Config
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Settings of request parameters names that will be used by Criteria
|
||||
|
|
||||
*/
|
||||
'criteria' => [
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Accepted Conditions
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Conditions accepted in consultations where the Criteria
|
||||
|
|
||||
| Ex:
|
||||
|
|
||||
| 'acceptedConditions'=>['=','like']
|
||||
|
|
||||
| $query->where('foo','=','bar')
|
||||
| $query->where('foo','like','bar')
|
||||
|
|
||||
*/
|
||||
'acceptedConditions' => [
|
||||
'=',
|
||||
'like',
|
||||
'in'
|
||||
],
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Request Params
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Request parameters that will be used to filter the query in the repository
|
||||
|
|
||||
| Params :
|
||||
|
|
||||
| - search : Searched value
|
||||
| Ex: http://prettus.local/?search=lorem
|
||||
|
|
||||
| - searchFields : Fields in which research should be carried out
|
||||
| Ex:
|
||||
| http://prettus.local/?search=lorem&searchFields=name;email
|
||||
| http://prettus.local/?search=lorem&searchFields=name:like;email
|
||||
| http://prettus.local/?search=lorem&searchFields=name:like
|
||||
|
|
||||
| - filter : Fields that must be returned to the response object
|
||||
| Ex:
|
||||
| http://prettus.local/?search=lorem&filter=id,name
|
||||
|
|
||||
| - orderBy : Order By
|
||||
| Ex:
|
||||
| http://prettus.local/?search=lorem&orderBy=id
|
||||
|
|
||||
| - sortedBy : Sort
|
||||
| Ex:
|
||||
| http://prettus.local/?search=lorem&orderBy=id&sortedBy=asc
|
||||
| http://prettus.local/?search=lorem&orderBy=id&sortedBy=desc
|
||||
|
|
||||
| - searchJoin: Specifies the search method (AND / OR), by default the
|
||||
| application searches each parameter with OR
|
||||
| EX:
|
||||
| http://prettus.local/?search=lorem&searchJoin=and
|
||||
| http://prettus.local/?search=lorem&searchJoin=or
|
||||
|
|
||||
*/
|
||||
'params' => [
|
||||
'search' => 'search',
|
||||
'searchFields' => 'searchFields',
|
||||
'filter' => 'filter',
|
||||
'orderBy' => 'orderBy',
|
||||
'sortedBy' => 'sortedBy',
|
||||
'with' => 'with',
|
||||
'searchJoin' => 'searchJoin',
|
||||
'withCount' => 'withCount'
|
||||
]
|
||||
],
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Generator Config
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
*/
|
||||
'generator' => [
|
||||
'basePath' => app()->path(),
|
||||
'rootNamespace' => 'App\\',
|
||||
'stubsOverridePath' => app()->path(),
|
||||
'paths' => [
|
||||
'models' => 'Entities',
|
||||
'repositories' => 'Repositories',
|
||||
'interfaces' => 'Repositories',
|
||||
'transformers' => 'Transformers',
|
||||
'presenters' => 'Presenters',
|
||||
'validators' => 'Validators',
|
||||
'controllers' => 'Http/Controllers',
|
||||
'provider' => 'RepositoryServiceProvider',
|
||||
'criteria' => 'Criteria'
|
||||
]
|
||||
]
|
||||
];
|
||||
|
|
@ -0,0 +1,91 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Default Search Engine
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This option controls the default search connection that gets used while
|
||||
| using Laravel Scout. This connection is used when syncing all models
|
||||
| to the search service. You should adjust this based on your needs.
|
||||
|
|
||||
| Supported: "algolia", "null"
|
||||
|
|
||||
*/
|
||||
|
||||
'driver' => env('SCOUT_DRIVER', null),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Index Prefix
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may specify a prefix that will be applied to all search index
|
||||
| names used by Scout. This prefix may be useful if you have multiple
|
||||
| "tenants" or applications sharing the same search infrastructure.
|
||||
|
|
||||
*/
|
||||
|
||||
'prefix' => env('SCOUT_PREFIX', ''),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Queue Data Syncing
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This option allows you to control if the operations that sync your data
|
||||
| with your search engines are queued. When this is set to "true" then
|
||||
| all automatic data syncing will get queued for better performance.
|
||||
|
|
||||
*/
|
||||
|
||||
'queue' => env('SCOUT_QUEUE', true),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Chunk Sizes
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| These options allow you to control the maximum chunk size when you are
|
||||
| mass importing data into the search engine. This allows you to fine
|
||||
| tune each of these chunk sizes based on the power of the servers.
|
||||
|
|
||||
*/
|
||||
|
||||
'chunk' => [
|
||||
'searchable' => 500,
|
||||
'unsearchable' => 500,
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Soft Deletes
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This option allows to control whether to keep soft deleted records in
|
||||
| the search indexes. Maintaining soft deleted records can be useful
|
||||
| if your application still needs to search for the records later.
|
||||
|
|
||||
*/
|
||||
|
||||
'soft_delete' => false,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Algolia Configuration
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may configure your Algolia settings. Algolia is a cloud hosted
|
||||
| search engine which works great with Scout out of the box. Just plug
|
||||
| in your application ID and admin API key to get started searching.
|
||||
|
|
||||
*/
|
||||
|
||||
'algolia' => [
|
||||
'id' => env('ALGOLIA_APP_ID', ''),
|
||||
'secret' => env('ALGOLIA_SECRET', ''),
|
||||
],
|
||||
|
||||
];
|
||||
|
|
@ -0,0 +1,81 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Third Party Services
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This file is for storing the credentials for third party services such
|
||||
| as Stripe, Mailgun, SparkPost and others. This file provides a sane
|
||||
| default location for this type of information, allowing packages
|
||||
| to have a conventional place to find your various credentials.
|
||||
|
|
||||
*/
|
||||
|
||||
'mailgun' => [
|
||||
'domain' => env('MAILGUN_DOMAIN'),
|
||||
'secret' => env('MAILGUN_SECRET'),
|
||||
],
|
||||
|
||||
'ses' => [
|
||||
'key' => env('SES_KEY'),
|
||||
'secret' => env('SES_SECRET'),
|
||||
'region' => env('SES_REGION', 'us-east-1'),
|
||||
],
|
||||
|
||||
'sparkpost' => [
|
||||
'secret' => env('SPARKPOST_SECRET'),
|
||||
],
|
||||
|
||||
'exchange-api' => [
|
||||
'default' => 'exchange_rates',
|
||||
|
||||
'fixer' => [
|
||||
'key' => env('FIXER_API_KEY'),
|
||||
'class' => 'Webkul\Core\Helpers\Exchange\FixerExchange'
|
||||
],
|
||||
|
||||
'exchange_rates' => [
|
||||
'key' => env('EXCHANGE_RATES_API_KEY'),
|
||||
'class' => 'Webkul\Core\Helpers\Exchange\ExchangeRates'
|
||||
],
|
||||
],
|
||||
|
||||
'stripe' => [
|
||||
'model' => App\User::class,
|
||||
'key' => env('STRIPE_KEY'),
|
||||
'secret' => env('STRIPE_SECRET'),
|
||||
],
|
||||
|
||||
'facebook' => [
|
||||
'client_id' => env('FACEBOOK_CLIENT_ID'),
|
||||
'client_secret' => env('FACEBOOK_CLIENT_SECRET'),
|
||||
'redirect' => env('FACEBOOK_CALLBACK_URL'),
|
||||
],
|
||||
|
||||
'twitter' => [
|
||||
'client_id' => env('TWITTER_CLIENT_ID'),
|
||||
'client_secret' => env('TWITTER_CLIENT_SECRET'),
|
||||
'redirect' => env('TWITTER_CALLBACK_URL'),
|
||||
],
|
||||
|
||||
'google' => [
|
||||
'client_id' => env('GOOGLE_CLIENT_ID'),
|
||||
'client_secret' => env('GOOGLE_CLIENT_SECRET'),
|
||||
'redirect' => env('GOOGLE_CALLBACK_URL'),
|
||||
],
|
||||
|
||||
'linkedin' => [
|
||||
'client_id' => env('LINKEDIN_CLIENT_ID'),
|
||||
'client_secret' => env('LINKEDIN_CLIENT_SECRET'),
|
||||
'redirect' => env('LINKEDIN_CALLBACK_URL'),
|
||||
],
|
||||
|
||||
'github' => [
|
||||
'client_id' => env('GITHUB_CLIENT_ID'),
|
||||
'client_secret' => env('GITHUB_CLIENT_SECRET'),
|
||||
'redirect' => env('GITHUB_CALLBACK_URL'),
|
||||
],
|
||||
];
|
||||
|
|
@ -0,0 +1,197 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Default Session Driver
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This option controls the default session "driver" that will be used on
|
||||
| requests. By default, we will use the lightweight native driver but
|
||||
| you may specify any of the other wonderful drivers provided here.
|
||||
|
|
||||
| Supported: "file", "cookie", "database", "apc",
|
||||
| "memcached", "redis", "array"
|
||||
|
|
||||
*/
|
||||
|
||||
'driver' => env('SESSION_DRIVER', 'file'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Session Lifetime
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may specify the number of minutes that you wish the session
|
||||
| to be allowed to remain idle before it expires. If you want them
|
||||
| to immediately expire on the browser closing, set that option.
|
||||
|
|
||||
*/
|
||||
|
||||
'lifetime' => env('SESSION_LIFETIME', 30),
|
||||
|
||||
'expire_on_close' => true,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Session Encryption
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This option allows you to easily specify that all of your session data
|
||||
| should be encrypted before it is stored. All encryption will be run
|
||||
| automatically by Laravel and you can use the Session like normal.
|
||||
|
|
||||
*/
|
||||
|
||||
'encrypt' => false,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Session File Location
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| When using the native session driver, we need a location where session
|
||||
| files may be stored. A default has been set for you but a different
|
||||
| location may be specified. This is only needed for file sessions.
|
||||
|
|
||||
*/
|
||||
|
||||
'files' => storage_path('framework/sessions'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Session Database Connection
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| When using the "database" or "redis" session drivers, you may specify a
|
||||
| connection that should be used to manage these sessions. This should
|
||||
| correspond to a connection in your database configuration options.
|
||||
|
|
||||
*/
|
||||
|
||||
'connection' => env('SESSION_CONNECTION', 'session'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Session Database Table
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| When using the "database" session driver, you may specify the table we
|
||||
| should use to manage the sessions. Of course, a sensible default is
|
||||
| provided for you; however, you are free to change this as needed.
|
||||
|
|
||||
*/
|
||||
|
||||
'table' => 'sessions',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Session Cache Store
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| When using the "apc" or "memcached" session drivers, you may specify a
|
||||
| cache store that should be used for these sessions. This value must
|
||||
| correspond with one of the application's configured cache stores.
|
||||
|
|
||||
*/
|
||||
|
||||
'store' => env('SESSION_STORE', NULL),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Session Sweeping Lottery
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Some session drivers must manually sweep their storage location to get
|
||||
| rid of old sessions from storage. Here are the chances that it will
|
||||
| happen on a given request. By default, the odds are 2 out of 100.
|
||||
|
|
||||
*/
|
||||
|
||||
'lottery' => [2, 100],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Session Cookie Name
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may change the name of the cookie used to identify a session
|
||||
| instance by ID. The name specified here will get used every time a
|
||||
| new session cookie is created by the framework for every driver.
|
||||
|
|
||||
*/
|
||||
|
||||
'cookie' => env(
|
||||
'SESSION_COOKIE',
|
||||
\Illuminate\Support\Str::slug(env('APP_NAME', 'laravel'), '_') . '_session'
|
||||
),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Session Cookie Path
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The session cookie path determines the path for which the cookie will
|
||||
| be regarded as available. Typically, this will be the root path of
|
||||
| your application but you are free to change this when necessary.
|
||||
|
|
||||
*/
|
||||
|
||||
'path' => '/',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Session Cookie Domain
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may change the domain of the cookie used to identify a session
|
||||
| in your application. This will determine which domains the cookie is
|
||||
| available to in your application. A sensible default has been set.
|
||||
|
|
||||
*/
|
||||
|
||||
'domain' => env('SESSION_DOMAIN', null),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| HTTPS Only Cookies
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| By setting this option to true, session cookies will only be sent back
|
||||
| to the server if the browser has a HTTPS connection. This will keep
|
||||
| the cookie from being sent to you if it can not be done securely.
|
||||
|
|
||||
*/
|
||||
|
||||
'secure' => env('SESSION_SECURE_COOKIE', null),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| HTTP Access Only
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Setting this value to true will prevent JavaScript from accessing the
|
||||
| value of the cookie and the cookie will only be accessible through
|
||||
| the HTTP protocol. You are free to modify this option if needed.
|
||||
|
|
||||
*/
|
||||
|
||||
'http_only' => true,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Same-Site Cookies
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This option determines how your cookies behave when cross-site requests
|
||||
| take place, and can be used to mitigate CSRF attacks. By default, we
|
||||
| do not enable this as other CSRF protection services are in place.
|
||||
|
|
||||
| Supported: "lax", "strict"
|
||||
|
|
||||
*/
|
||||
|
||||
'same_site' => null,
|
||||
|
||||
];
|
||||
|
|
@ -0,0 +1,37 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
'default' => 'default',
|
||||
|
||||
'themes' => [
|
||||
'default' => [
|
||||
'views_path' => 'resources/themes/default/views',
|
||||
'assets_path' => 'public/themes/default/assets',
|
||||
'name' => 'Default'
|
||||
],
|
||||
|
||||
// 'bliss' => [
|
||||
// 'views_path' => 'resources/themes/bliss/views',
|
||||
// 'assets_path' => 'public/themes/bliss/assets',
|
||||
// 'name' => 'Bliss',
|
||||
// 'parent' => 'default'
|
||||
// ]
|
||||
|
||||
'velocity' => [
|
||||
'views_path' => 'resources/themes/velocity/views',
|
||||
'assets_path' => 'public/themes/velocity/assets',
|
||||
'name' => 'Velocity',
|
||||
'parent' => 'default'
|
||||
],
|
||||
],
|
||||
|
||||
'admin-default' => 'default',
|
||||
|
||||
'admin-themes' => [
|
||||
'default' => [
|
||||
'views_path' => 'resources/admin-themes/default/views',
|
||||
'assets_path' => 'public/admin-themes/default/assets',
|
||||
'name' => 'Default'
|
||||
]
|
||||
]
|
||||
];
|
||||
|
|
@ -0,0 +1,50 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Console Commands
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This option allows you to add additional Artisan commands that should
|
||||
| be available within the Tinker environment. Once the command is in
|
||||
| this array you may execute the command in Tinker using its name.
|
||||
|
|
||||
*/
|
||||
|
||||
'commands' => [
|
||||
// App\Console\Commands\ExampleCommand::class,
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Auto Aliased Classes
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Tinker will not automatically alias classes in your vendor namespaces
|
||||
| but you may explicitly allow a subset of classes to get aliased by
|
||||
| adding the names of each of those classes to the following list.
|
||||
|
|
||||
*/
|
||||
|
||||
'alias' => [
|
||||
//
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Classes That Should Not Be Aliased
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Typically, Tinker automatically aliases classes as you require them in
|
||||
| Tinker. However, you may wish to never alias certain classes, which
|
||||
| you may accomplish by listing the classes in the following array.
|
||||
|
|
||||
*/
|
||||
|
||||
'dont_alias' => [
|
||||
'App\Nova',
|
||||
],
|
||||
|
||||
];
|
||||
|
|
@ -0,0 +1,149 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Application Locales
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Contains an array with the applications available locales.
|
||||
|
|
||||
*/
|
||||
'locales' => [
|
||||
'en',
|
||||
'fr',
|
||||
'es' => [
|
||||
'MX', // mexican spanish
|
||||
'CO', // colombian spanish
|
||||
],
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Locale separator
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This is a string used to glue the language and the country when defining
|
||||
| the available locales. Example: if set to '-', then the locale for
|
||||
| colombian spanish will be saved as 'es-CO' into the database.
|
||||
|
|
||||
*/
|
||||
'locale_separator' => '-',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Default locale
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| As a default locale, Translatable takes the locale of Laravel's
|
||||
| translator. If for some reason you want to override this,
|
||||
| you can specify what default should be used here.
|
||||
| If you set a value here it will only use the current config value
|
||||
| and never fallback to the translator one.
|
||||
|
|
||||
*/
|
||||
'locale' => null,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Use fallback
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Determine if fallback locales are returned by default or not. To add
|
||||
| more flexibility and configure this option per "translatable"
|
||||
| instance, this value will be overridden by the property
|
||||
| $useTranslationFallback when defined
|
||||
|
|
||||
*/
|
||||
'use_fallback' => false,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Use fallback per property
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The property fallback feature will return the translated value of
|
||||
| the fallback locale if the property is empty for the selected
|
||||
| locale. Note that 'use_fallback' must be enabled.
|
||||
|
|
||||
*/
|
||||
'use_property_fallback' => true,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Fallback Locale
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| A fallback locale is the locale being used to return a translation
|
||||
| when the requested translation is not existing. To disable it
|
||||
| set it to false.
|
||||
| If set to null it will loop through all configured locales until
|
||||
| one existing is found or end of list reached. The locales are looped
|
||||
| from top to bottom and for country based locales the simple one
|
||||
| is used first. So "es" will be checked before "es_MX".
|
||||
|
|
||||
*/
|
||||
'fallback_locale' => 'en',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Translation Model Namespace
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Defines the default 'Translation' class namespace. For example, if
|
||||
| you want to use App\Translations\CountryTranslation instead of App\CountryTranslation
|
||||
| set this to 'App\Translations'.
|
||||
|
|
||||
*/
|
||||
'translation_model_namespace' => null,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Translation Suffix
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Defines the default 'Translation' class suffix. For example, if
|
||||
| you want to use CountryTrans instead of CountryTranslation
|
||||
| application, set this to 'Trans'.
|
||||
|
|
||||
*/
|
||||
'translation_suffix' => 'Translation',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Locale key
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Defines the 'locale' field name, which is used by the
|
||||
| translation model.
|
||||
|
|
||||
*/
|
||||
'locale_key' => 'locale',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Always load translations when converting to array
|
||||
|--------------------------------------------------------------------------
|
||||
| Setting this to false will have a performance improvement but will
|
||||
| not return the translations when using toArray(), unless the
|
||||
| translations relationship is already loaded.
|
||||
|
|
||||
*/
|
||||
'to_array_always_loads_translations' => true,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Configure the default behavior of the rule factory
|
||||
|--------------------------------------------------------------------------
|
||||
| The default values used to control the behavior of the RuleFactory.
|
||||
| Here you can set your own default format and delimiters for
|
||||
| your whole app.
|
||||
*
|
||||
*/
|
||||
'rule_factory' => [
|
||||
'format' => \Astrotomic\Translatable\Validation\RuleFactory::FORMAT_ARRAY,
|
||||
'prefix' => '%',
|
||||
'suffix' => '%',
|
||||
],
|
||||
];
|
||||
|
|
@ -0,0 +1,50 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
* Set trusted proxy IP addresses.
|
||||
*
|
||||
* Both IPv4 and IPv6 addresses are
|
||||
* supported, along with CIDR notation.
|
||||
*
|
||||
* The "*" character is syntactic sugar
|
||||
* within TrustedProxy to trust any proxy
|
||||
* that connects directly to your server,
|
||||
* a requirement when you cannot know the address
|
||||
* of your proxy (e.g. if using ELB or similar).
|
||||
*
|
||||
*/
|
||||
'proxies' => null, // [<ip addresses>,], '*', '<ip addresses>,'
|
||||
|
||||
/*
|
||||
* To trust one or more specific proxies that connect
|
||||
* directly to your server, use an array or a string separated by comma of IP addresses:
|
||||
*/
|
||||
// 'proxies' => ['192.168.1.1'],
|
||||
// 'proxies' => '192.168.1.1, 192.168.1.2',
|
||||
|
||||
/*
|
||||
* Or, to trust all proxies that connect
|
||||
* directly to your server, use a "*"
|
||||
*/
|
||||
// 'proxies' => '*',
|
||||
|
||||
/*
|
||||
* Which headers to use to detect proxy related data (For, Host, Proto, Port)
|
||||
*
|
||||
* Options include:
|
||||
*
|
||||
* - Illuminate\Http\Request::HEADER_X_FORWARDED_ALL (use all x-forwarded-* headers to establish trust)
|
||||
* - Illuminate\Http\Request::HEADER_FORWARDED (use the FORWARDED header to establish trust)
|
||||
* - Illuminate\Http\Request::HEADER_X_FORWARDED_AWS_ELB (If you are using AWS Elastic Load Balancer)
|
||||
*
|
||||
* - 'HEADER_X_FORWARDED_ALL' (use all x-forwarded-* headers to establish trust)
|
||||
* - 'HEADER_FORWARDED' (use the FORWARDED header to establish trust)
|
||||
* - 'HEADER_X_FORWARDED_AWS_ELB' (If you are using AWS Elastic Load Balancer)
|
||||
*
|
||||
* @link https://symfony.com/doc/current/deployment/proxies.html
|
||||
*/
|
||||
'headers' => Illuminate\Http\Request::HEADER_X_FORWARDED_ALL,
|
||||
|
||||
];
|
||||
|
|
@ -0,0 +1,43 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Blade File Tracer
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Shows blade file path in front
|
||||
|
|
||||
*/
|
||||
|
||||
'tracer' => false,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| View Storage Paths
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Most templating systems load templates from disk. Here you may specify
|
||||
| an array of paths that should be checked for your views. Of course
|
||||
| the usual Laravel view path has already been registered for you.
|
||||
|
|
||||
*/
|
||||
|
||||
'paths' => [
|
||||
resource_path('views'),
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Compiled View Path
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This option determines where all the compiled Blade templates will be
|
||||
| stored for your application. Typically, this is within the storage
|
||||
| directory. However, as usual, you are free to change this value.
|
||||
|
|
||||
*/
|
||||
|
||||
'compiled' => realpath(storage_path('framework/views')),
|
||||
|
||||
];
|
||||
|
|
@ -0,0 +1 @@
|
|||
*.sqlite
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
<?php
|
||||
|
||||
use Faker\Generator as Faker;
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Model Factories
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This directory should contain each of the model factory definitions for
|
||||
| your application. Factories provide a convenient way to generate new
|
||||
| model instances for testing / seeding your application's database.
|
||||
|
|
||||
*/
|
||||
|
||||
$factory->define(App\User::class, function (Faker $faker) {
|
||||
return [
|
||||
'name' => $faker->name,
|
||||
'email' => $faker->unique()->safeEmail,
|
||||
'password' => '$2y$10$TKh8H1.PfQx37YgCzwiKb.KjNyWgaHb9cbcoQgdIVFlYg7B77UdFm', // secret
|
||||
'remember_token' => str_random(10),
|
||||
];
|
||||
});
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class CreateUsersTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('users', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->string('name');
|
||||
$table->string('email')->unique();
|
||||
$table->string('password');
|
||||
$table->rememberToken();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('users');
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
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->timestamp('created_at')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('password_resets');
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class AddColumnUrlPathToCategoryTranslations extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('category_translations', function (Blueprint $table) {
|
||||
$table->string('url_path', 2048)
|
||||
->comment('maintained by database triggers');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('category_translations', function (Blueprint $table) {
|
||||
$table->dropColumn('url_path');
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,70 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class AddStoredFunctionToGetUrlPathOfCategory extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
$dbPrefix = DB::getTablePrefix();
|
||||
|
||||
$functionSQL = <<< SQL
|
||||
DROP FUNCTION IF EXISTS `get_url_path_of_category`;
|
||||
CREATE FUNCTION get_url_path_of_category(
|
||||
categoryId INT,
|
||||
localeCode VARCHAR(255)
|
||||
)
|
||||
RETURNS VARCHAR(255)
|
||||
DETERMINISTIC
|
||||
BEGIN
|
||||
|
||||
DECLARE urlPath VARCHAR(255);
|
||||
-- Category with id 1 is root by default
|
||||
IF categoryId <> 1
|
||||
THEN
|
||||
SELECT
|
||||
GROUP_CONCAT(parent_translations.slug SEPARATOR '/') INTO urlPath
|
||||
FROM
|
||||
${dbPrefix}categories AS node,
|
||||
${dbPrefix}categories AS parent
|
||||
JOIN ${dbPrefix}category_translations AS parent_translations ON parent.id = parent_translations.category_id
|
||||
WHERE
|
||||
node._lft >= parent._lft
|
||||
AND node._rgt <= parent._rgt
|
||||
AND node.id = categoryId
|
||||
AND parent.id <> 1
|
||||
AND parent_translations.locale = localeCode
|
||||
GROUP BY
|
||||
node.id;
|
||||
|
||||
IF urlPath IS NULL
|
||||
THEN
|
||||
SET urlPath = (SELECT slug FROM ${dbPrefix}category_translations WHERE ${dbPrefix}category_translations.category_id = categoryId);
|
||||
END IF;
|
||||
ELSE
|
||||
SET urlPath = '';
|
||||
END IF;
|
||||
|
||||
RETURN urlPath;
|
||||
END;
|
||||
SQL;
|
||||
|
||||
DB::unprepared($functionSQL);
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
DB::unprepared('DROP FUNCTION IF EXISTS `get_url_path_of_category`;');
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,103 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Webkul\Category\Models\CategoryTranslation;
|
||||
|
||||
class AddTriggerToCategoryTranslations extends Migration
|
||||
{
|
||||
private const TRIGGER_NAME_INSERT = 'trig_category_translations_insert';
|
||||
private const TRIGGER_NAME_UPDATE = 'trig_category_translations_update';
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
$dbPrefix = DB::getTablePrefix();
|
||||
|
||||
$triggerBody = $this->getTriggerBody();
|
||||
$insertTrigger = <<< SQL
|
||||
CREATE TRIGGER %s
|
||||
BEFORE INSERT ON ${dbPrefix}category_translations
|
||||
FOR EACH ROW
|
||||
BEGIN
|
||||
$triggerBody
|
||||
END;
|
||||
SQL;
|
||||
|
||||
$updateTrigger = <<< SQL
|
||||
CREATE TRIGGER %s
|
||||
BEFORE UPDATE ON ${dbPrefix}category_translations
|
||||
FOR EACH ROW
|
||||
BEGIN
|
||||
$triggerBody
|
||||
END;
|
||||
SQL;
|
||||
|
||||
DB::unprepared(sprintf('DROP TRIGGER IF EXISTS %s;', self::TRIGGER_NAME_INSERT));
|
||||
DB::unprepared(sprintf($insertTrigger, self::TRIGGER_NAME_INSERT));
|
||||
|
||||
DB::unprepared(sprintf('DROP TRIGGER IF EXISTS %s;', self::TRIGGER_NAME_UPDATE));
|
||||
DB::unprepared(sprintf($updateTrigger, self::TRIGGER_NAME_UPDATE));
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
DB::unprepared(sprintf('DROP TRIGGER IF EXISTS %s;', self::TRIGGER_NAME_INSERT));
|
||||
DB::unprepared(sprintf('DROP TRIGGER IF EXISTS %s;', self::TRIGGER_NAME_UPDATE));
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns trigger body as string
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
private function getTriggerBody()
|
||||
{
|
||||
$dbPrefix = DB::getTablePrefix();
|
||||
|
||||
return <<<SQL
|
||||
DECLARE parentUrlPath varchar(255);
|
||||
DECLARE urlPath varchar(255);
|
||||
|
||||
-- Category with id 1 is root by default
|
||||
IF NEW.category_id <> 1
|
||||
THEN
|
||||
|
||||
SELECT
|
||||
GROUP_CONCAT(parent_translations.slug SEPARATOR '/') INTO parentUrlPath
|
||||
FROM
|
||||
${dbPrefix}categories AS node,
|
||||
${dbPrefix}categories AS parent
|
||||
JOIN ${dbPrefix}category_translations AS parent_translations ON parent.id = parent_translations.category_id
|
||||
WHERE
|
||||
node._lft >= parent._lft
|
||||
AND node._rgt <= parent._rgt
|
||||
AND node.id = (SELECT parent_id FROM categories WHERE id = NEW.category_id)
|
||||
AND parent.id <> 1
|
||||
AND parent_translations.locale = NEW.locale
|
||||
GROUP BY
|
||||
node.id;
|
||||
|
||||
IF parentUrlPath IS NULL
|
||||
THEN
|
||||
SET urlPath = NEW.slug;
|
||||
ELSE
|
||||
SET urlPath = concat(parentUrlPath, '/', NEW.slug);
|
||||
END IF;
|
||||
|
||||
SET NEW.url_path = urlPath;
|
||||
|
||||
END IF;
|
||||
SQL;
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Webkul\Category\Models\CategoryTranslation;
|
||||
|
||||
class AddUrlPathToExistingCategoryTranslations extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
$sqlStoredFunction = <<< SQL
|
||||
SELECT get_url_path_of_category(:category_id, :locale_code) AS url_path;
|
||||
SQL;
|
||||
|
||||
|
||||
$categoryTranslationsTableName = app(CategoryTranslation::class)->getTable();
|
||||
|
||||
foreach (DB::table($categoryTranslationsTableName)->get() as $categoryTranslation) {
|
||||
$urlPathQueryResult = DB::selectOne($sqlStoredFunction, [
|
||||
'category_id' => $categoryTranslation->category_id,
|
||||
'locale_code' => $categoryTranslation->locale,
|
||||
]);
|
||||
$url_path = $urlPathQueryResult ? $urlPathQueryResult->url_path : '';
|
||||
|
||||
DB::table($categoryTranslationsTableName)
|
||||
->where('id', $categoryTranslation->id)
|
||||
->update(['url_path' => $url_path]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,102 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class AddTriggerToCategories extends Migration
|
||||
{
|
||||
private const TRIGGER_NAME_INSERT = 'trig_categories_insert';
|
||||
private const TRIGGER_NAME_UPDATE = 'trig_categories_update';
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
$triggerBody = $this->getTriggerBody();
|
||||
$dbPrefix = DB::getTablePrefix();
|
||||
|
||||
$insertTrigger = <<< SQL
|
||||
CREATE TRIGGER %s
|
||||
AFTER INSERT ON ${dbPrefix}categories
|
||||
FOR EACH ROW
|
||||
BEGIN
|
||||
$triggerBody
|
||||
END;
|
||||
SQL;
|
||||
|
||||
$updateTrigger = <<< SQL
|
||||
CREATE TRIGGER %s
|
||||
AFTER UPDATE ON ${dbPrefix}categories
|
||||
FOR EACH ROW
|
||||
BEGIN
|
||||
$triggerBody
|
||||
END;
|
||||
SQL;
|
||||
|
||||
DB::unprepared(sprintf('DROP TRIGGER IF EXISTS %s;', self::TRIGGER_NAME_INSERT));
|
||||
DB::unprepared(sprintf($insertTrigger, self::TRIGGER_NAME_INSERT));
|
||||
|
||||
DB::unprepared(sprintf('DROP TRIGGER IF EXISTS %s;', self::TRIGGER_NAME_UPDATE));
|
||||
DB::unprepared(sprintf($updateTrigger, self::TRIGGER_NAME_UPDATE));
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
DB::unprepared(sprintf('DROP TRIGGER IF EXISTS %s;', self::TRIGGER_NAME_INSERT));
|
||||
DB::unprepared(sprintf('DROP TRIGGER IF EXISTS %s;', self::TRIGGER_NAME_UPDATE));
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns trigger body as string
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
private function getTriggerBody(): string
|
||||
{
|
||||
$dbPrefix = DB::getTablePrefix();
|
||||
|
||||
return <<< SQL
|
||||
DECLARE urlPath VARCHAR(255);
|
||||
DECLARE localeCode VARCHAR(255);
|
||||
DECLARE done INT;
|
||||
DECLARE curs CURSOR FOR (SELECT ${dbPrefix}category_translations.locale
|
||||
FROM ${dbPrefix}category_translations
|
||||
WHERE category_id = NEW.id);
|
||||
DECLARE CONTINUE HANDLER FOR NOT FOUND SET done = 1;
|
||||
|
||||
|
||||
IF EXISTS (
|
||||
SELECT *
|
||||
FROM ${dbPrefix}category_translations
|
||||
WHERE category_id = NEW.id
|
||||
)
|
||||
THEN
|
||||
|
||||
OPEN curs;
|
||||
|
||||
SET done = 0;
|
||||
REPEAT
|
||||
FETCH curs INTO localeCode;
|
||||
|
||||
SELECT get_url_path_of_category(NEW.id, localeCode) INTO urlPath;
|
||||
|
||||
UPDATE ${dbPrefix}category_translations
|
||||
SET url_path = urlPath
|
||||
WHERE ${dbPrefix}category_translations.category_id = NEW.id;
|
||||
|
||||
UNTIL done END REPEAT;
|
||||
|
||||
CLOSE curs;
|
||||
|
||||
END IF;
|
||||
SQL;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,115 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class AlterTriggerCategoryTranslations extends Migration
|
||||
{
|
||||
private const TRIGGER_NAME_INSERT = 'trig_category_translations_insert';
|
||||
private const TRIGGER_NAME_UPDATE = 'trig_category_translations_update';
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
$triggerBody = $this->getTriggerBody();
|
||||
$dbPrefix = DB::getTablePrefix();
|
||||
|
||||
$insertTrigger = <<< SQL
|
||||
CREATE TRIGGER %s
|
||||
BEFORE INSERT ON ${dbPrefix}category_translations
|
||||
FOR EACH ROW
|
||||
BEGIN
|
||||
$triggerBody
|
||||
END;
|
||||
SQL;
|
||||
|
||||
$updateTrigger = <<< SQL
|
||||
CREATE TRIGGER %s
|
||||
BEFORE UPDATE ON ${dbPrefix}category_translations
|
||||
FOR EACH ROW
|
||||
BEGIN
|
||||
$triggerBody
|
||||
END;
|
||||
SQL;
|
||||
|
||||
$this->dropTriggers();
|
||||
|
||||
DB::unprepared(sprintf($insertTrigger, self::TRIGGER_NAME_INSERT));
|
||||
DB::unprepared(sprintf($updateTrigger, self::TRIGGER_NAME_UPDATE));
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
$this->dropTriggers();
|
||||
}
|
||||
|
||||
/**
|
||||
* Drop the triggers
|
||||
*/
|
||||
private function dropTriggers()
|
||||
{
|
||||
DB::unprepared(sprintf('DROP TRIGGER IF EXISTS %s;', self::TRIGGER_NAME_INSERT));
|
||||
DB::unprepared(sprintf('DROP TRIGGER IF EXISTS %s;', self::TRIGGER_NAME_UPDATE));
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns trigger body as string
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
private function getTriggerBody()
|
||||
{
|
||||
$dbPrefix = DB::getTablePrefix();
|
||||
|
||||
return <<<SQL
|
||||
DECLARE parentUrlPath varchar(255);
|
||||
DECLARE urlPath varchar(255);
|
||||
|
||||
IF NOT EXISTS (
|
||||
SELECT id
|
||||
FROM ${dbPrefix}categories
|
||||
WHERE
|
||||
id = NEW.category_id
|
||||
AND parent_id IS NULL
|
||||
)
|
||||
THEN
|
||||
|
||||
SELECT
|
||||
GROUP_CONCAT(parent_translations.slug SEPARATOR '/') INTO parentUrlPath
|
||||
FROM
|
||||
${dbPrefix}categories AS node,
|
||||
${dbPrefix}categories AS parent
|
||||
JOIN ${dbPrefix}category_translations AS parent_translations ON parent.id = parent_translations.category_id
|
||||
WHERE
|
||||
node._lft >= parent._lft
|
||||
AND node._rgt <= parent._rgt
|
||||
AND node.id = (SELECT parent_id FROM ${dbPrefix}categories WHERE id = NEW.category_id)
|
||||
AND node.parent_id IS NOT NULL
|
||||
AND parent.parent_id IS NOT NULL
|
||||
AND parent_translations.locale = NEW.locale
|
||||
GROUP BY
|
||||
node.id;
|
||||
|
||||
IF parentUrlPath IS NULL
|
||||
THEN
|
||||
SET urlPath = NEW.slug;
|
||||
ELSE
|
||||
SET urlPath = concat(parentUrlPath, '/', NEW.slug);
|
||||
END IF;
|
||||
|
||||
SET NEW.url_path = urlPath;
|
||||
|
||||
END IF;
|
||||
SQL;
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,77 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class AlterStoredFunctionUrlPathCategory extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
$dbPrefix = DB::getTablePrefix();
|
||||
|
||||
$functionSQL = <<< SQL
|
||||
DROP FUNCTION IF EXISTS `get_url_path_of_category`;
|
||||
CREATE FUNCTION get_url_path_of_category(
|
||||
categoryId INT,
|
||||
localeCode VARCHAR(255)
|
||||
)
|
||||
RETURNS VARCHAR(255)
|
||||
DETERMINISTIC
|
||||
BEGIN
|
||||
|
||||
DECLARE urlPath VARCHAR(255);
|
||||
|
||||
IF NOT EXISTS (
|
||||
SELECT id
|
||||
FROM ${dbPrefix}categories
|
||||
WHERE
|
||||
id = categoryId
|
||||
AND parent_id IS NULL
|
||||
)
|
||||
THEN
|
||||
SELECT
|
||||
GROUP_CONCAT(parent_translations.slug SEPARATOR '/') INTO urlPath
|
||||
FROM
|
||||
${dbPrefix}categories AS node,
|
||||
${dbPrefix}categories AS parent
|
||||
JOIN ${dbPrefix}category_translations AS parent_translations ON parent.id = parent_translations.category_id
|
||||
WHERE
|
||||
node._lft >= parent._lft
|
||||
AND node._rgt <= parent._rgt
|
||||
AND node.id = categoryId
|
||||
AND node.parent_id IS NOT NULL
|
||||
AND parent.parent_id IS NOT NULL
|
||||
AND parent_translations.locale = localeCode
|
||||
GROUP BY
|
||||
node.id;
|
||||
|
||||
IF urlPath IS NULL
|
||||
THEN
|
||||
SET urlPath = (SELECT slug FROM ${dbPrefix}category_translations WHERE ${dbPrefix}category_translations.category_id = categoryId);
|
||||
END IF;
|
||||
ELSE
|
||||
SET urlPath = '';
|
||||
END IF;
|
||||
|
||||
RETURN urlPath;
|
||||
END;
|
||||
SQL;
|
||||
|
||||
DB::unprepared($functionSQL);
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
DB::unprepared('DROP FUNCTION IF EXISTS `get_url_path_of_category`;');
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,117 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class AlterTriggerOnCategories extends Migration
|
||||
{
|
||||
private const TRIGGER_NAME_INSERT = 'trig_categories_insert';
|
||||
private const TRIGGER_NAME_UPDATE = 'trig_categories_update';
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
$triggerBody = $this->getTriggerBody();
|
||||
$dbPrefix = DB::getTablePrefix();
|
||||
|
||||
$insertTrigger = <<< SQL
|
||||
CREATE TRIGGER %s
|
||||
AFTER INSERT ON ${dbPrefix}categories
|
||||
FOR EACH ROW
|
||||
BEGIN
|
||||
$triggerBody
|
||||
END;
|
||||
SQL;
|
||||
|
||||
$updateTrigger = <<< SQL
|
||||
CREATE TRIGGER %s
|
||||
AFTER UPDATE ON ${dbPrefix}categories
|
||||
FOR EACH ROW
|
||||
BEGIN
|
||||
$triggerBody
|
||||
END;
|
||||
SQL;
|
||||
|
||||
$this->dropTriggers();
|
||||
|
||||
DB::unprepared(sprintf($insertTrigger, self::TRIGGER_NAME_INSERT));
|
||||
|
||||
DB::unprepared(sprintf($updateTrigger, self::TRIGGER_NAME_UPDATE));
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
$this->dropTriggers();
|
||||
}
|
||||
|
||||
private function dropTriggers()
|
||||
{
|
||||
DB::unprepared(sprintf('DROP TRIGGER IF EXISTS %s;', self::TRIGGER_NAME_INSERT));
|
||||
DB::unprepared(sprintf('DROP TRIGGER IF EXISTS %s;', self::TRIGGER_NAME_UPDATE));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns trigger body as string
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
private function getTriggerBody(): string
|
||||
{
|
||||
$dbPrefix = DB::getTablePrefix();
|
||||
|
||||
return <<< SQL
|
||||
DECLARE urlPath VARCHAR(255);
|
||||
DECLARE localeCode VARCHAR(255);
|
||||
DECLARE done INT;
|
||||
DECLARE curs CURSOR FOR (SELECT ${dbPrefix}category_translations.locale
|
||||
FROM ${dbPrefix}category_translations
|
||||
WHERE category_id = NEW.id);
|
||||
DECLARE CONTINUE HANDLER FOR NOT FOUND SET done = 1;
|
||||
|
||||
|
||||
IF EXISTS (
|
||||
SELECT *
|
||||
FROM ${dbPrefix}category_translations
|
||||
WHERE category_id = NEW.id
|
||||
)
|
||||
THEN
|
||||
|
||||
OPEN curs;
|
||||
|
||||
SET done = 0;
|
||||
REPEAT
|
||||
FETCH curs INTO localeCode;
|
||||
|
||||
SELECT get_url_path_of_category(NEW.id, localeCode) INTO urlPath;
|
||||
|
||||
IF NEW.parent_id IS NULL
|
||||
THEN
|
||||
SET urlPath = '';
|
||||
END IF;
|
||||
|
||||
UPDATE ${dbPrefix}category_translations
|
||||
SET url_path = urlPath
|
||||
WHERE
|
||||
${dbPrefix}category_translations.category_id = NEW.id
|
||||
AND ${dbPrefix}category_translations.locale = localeCode;
|
||||
|
||||
UNTIL done END REPEAT;
|
||||
|
||||
CLOSE curs;
|
||||
|
||||
END IF;
|
||||
SQL;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,36 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateJobsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('jobs', function (Blueprint $table) {
|
||||
$table->bigIncrements('id');
|
||||
$table->string('queue')->index();
|
||||
$table->longText('payload');
|
||||
$table->unsignedTinyInteger('attempts');
|
||||
$table->unsignedInteger('reserved_at')->nullable();
|
||||
$table->unsignedInteger('available_at');
|
||||
$table->unsignedInteger('created_at');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('jobs');
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
<?php
|
||||
|
||||
namespace Database\Seeders;
|
||||
|
||||
use Illuminate\Database\Seeder;
|
||||
use Webkul\Velocity\Database\Seeders\VelocityMetaDataSeeder;
|
||||
use Webkul\Admin\Database\Seeders\DatabaseSeeder as BagistoDatabaseSeeder;
|
||||
|
||||
class DatabaseSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Seed the application's database.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
$this->call(BagistoDatabaseSeeder::class);
|
||||
$this->call(VelocityMetaDataSeeder::class);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
# Migration Guide:
|
||||
|
||||
#### Note: Only for git users or updating by zip file from the release section from repository
|
||||
|
||||
* Better way to update Bagisto is to overwrite the code by manually downloading the zip file and extract it on the main project directory.
|
||||
|
||||
or
|
||||
* Delete or rename the old installation directory and install the new one using the installation process in the readme of Bagisto.
|
||||
|
||||
|
||||
* Follow these commands below if you're doing overwrite else use your old .env file before deleting/backing up old bagisto release and installing the new release of Bagisto.
|
||||
|
||||
## 1. Migration from v0.1.0 to v0.1.1
|
||||
|
||||
**Run commands below:**
|
||||
|
||||
> **php artisan migrate**
|
||||
|
||||
> **php artisan vendor:publish**
|
||||
|
||||
|
||||
## 2. Migration from v0.1.1 to v0.1.2
|
||||
|
||||
**Run commands below:**
|
||||
|
||||
> **php artisan migrate**
|
||||
|
||||
> **php artisan vendor:publish**
|
||||
|
||||
|
||||
## 3. Migration from v0.1.2 to v0.1.3
|
||||
|
||||
**Run commands below:**
|
||||
|
||||
> **composer install**
|
||||
|
||||
> **php artisan migrate**
|
||||
|
||||
> **php artisan vendor:publish**
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
{
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "npm run development",
|
||||
"development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
|
||||
"watch": "npm run development -- --watch",
|
||||
"watch-poll": "npm run watch -- --watch-poll",
|
||||
"hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js",
|
||||
"prod": "npm run production",
|
||||
"production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --no-progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js"
|
||||
},
|
||||
"devDependencies": {
|
||||
"axios": "^0.21.0",
|
||||
"bootstrap": "^4.0.0",
|
||||
"cross-env": "^5.1",
|
||||
"jquery": "^3.2",
|
||||
"laravel-mix": "^5.0.1",
|
||||
"lodash": "^4.17.19",
|
||||
"popper.js": "^1.12",
|
||||
"resolve-url-loader": "^3.1.0",
|
||||
"sass": "^1.24.5",
|
||||
"sass-loader": "^8.0.2",
|
||||
"vue": "^2.6.11",
|
||||
"vue-template-compiler": "^2.6.11"
|
||||
},
|
||||
"dependencies": {
|
||||
"vee-validate": "^3.3.0"
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,140 @@
|
|||
<?php
|
||||
|
||||
namespace Webkul\API\Http\Controllers\Shop;
|
||||
|
||||
use Webkul\Customer\Repositories\CustomerAddressRepository;
|
||||
use Webkul\API\Http\Resources\Customer\CustomerAddress as CustomerAddressResource;
|
||||
|
||||
class AddressController extends Controller
|
||||
{
|
||||
/**
|
||||
* Contains current guard
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $guard;
|
||||
|
||||
/**
|
||||
* Contains route related configuration
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $_config;
|
||||
|
||||
/**
|
||||
* CustomerAddressRepository object
|
||||
*
|
||||
* @var \Webkul\Customer\Repositories\CustomerAddressRepository
|
||||
*/
|
||||
protected $customerAddressRepository;
|
||||
|
||||
/**
|
||||
* Controller instance
|
||||
*
|
||||
* @param CustomerAddressRepository $customerAddressRepository
|
||||
*/
|
||||
public function __construct(CustomerAddressRepository $customerAddressRepository)
|
||||
{
|
||||
$this->guard = request()->has('token') ? 'api' : 'customer';
|
||||
|
||||
auth()->setDefaultDriver($this->guard);
|
||||
|
||||
$this->middleware('auth:' . $this->guard);
|
||||
|
||||
$this->_config = request('_config');
|
||||
|
||||
$this->customerAddressRepository = $customerAddressRepository;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get user address.
|
||||
*
|
||||
* @return \Illuminate\Http\Resources\Json\AnonymousResourceCollection
|
||||
*/
|
||||
public function get()
|
||||
{
|
||||
$customer = auth($this->guard)->user();
|
||||
|
||||
$addresses = $customer->addresses()->get();
|
||||
|
||||
return CustomerAddressResource::collection($addresses);
|
||||
}
|
||||
|
||||
/**
|
||||
* Store a newly created resource in storage.
|
||||
*
|
||||
* @return \Illuminate\Http\JsonResponse
|
||||
* @throws \Illuminate\Validation\ValidationException
|
||||
*/
|
||||
public function store()
|
||||
{
|
||||
$customer = auth($this->guard)->user();
|
||||
|
||||
if (request()->input('address1') && ! is_array(request()->input('address1'))) {
|
||||
return response()->json([
|
||||
'message' => 'address1 must be an array.',
|
||||
]);
|
||||
}
|
||||
|
||||
if (request()->input('address1')) {
|
||||
request()->merge([
|
||||
'address1' => implode(PHP_EOL, array_filter(request()->input('address1'))),
|
||||
'customer_id' => $customer->id,
|
||||
]);
|
||||
}
|
||||
|
||||
$this->validate(request(), [
|
||||
'address1' => 'string|required',
|
||||
'company' => 'string|nullable',
|
||||
'vat_id' => 'string|nullable',
|
||||
'country' => 'string|required',
|
||||
'state' => 'string|nullable',
|
||||
'city' => 'string|required',
|
||||
'postcode' => 'required',
|
||||
'phone' => 'required',
|
||||
]);
|
||||
|
||||
$customerAddress = $this->customerAddressRepository->create(request()->all());
|
||||
|
||||
return response()->json([
|
||||
'message' => 'Your address has been created successfully.',
|
||||
'data' => new CustomerAddressResource($customerAddress),
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the specified resource in storage.
|
||||
* @param int $id
|
||||
*
|
||||
* @return \Illuminate\Http\JsonResponse
|
||||
* @throws \Illuminate\Validation\ValidationException
|
||||
*/
|
||||
public function update(int $id)
|
||||
{
|
||||
if (request()->input('address1') && ! is_array(request()->input('address1'))) {
|
||||
return response()->json([
|
||||
'message' => 'address1 must be an array.',
|
||||
]);
|
||||
}
|
||||
|
||||
request()->merge(['address1' => implode(PHP_EOL, array_filter(request()->input('address1')))]);
|
||||
|
||||
$this->validate(request(), [
|
||||
'address1' => 'string|required',
|
||||
'company' => 'string|nullable',
|
||||
'vat_id' => 'string|nullable',
|
||||
'country' => 'string|required',
|
||||
'state' => 'string|nullable',
|
||||
'city' => 'string|required',
|
||||
'postcode' => 'required',
|
||||
'phone' => 'required',
|
||||
]);
|
||||
|
||||
$customerAddress = $this->customerAddressRepository->update(request()->all(), $id);
|
||||
|
||||
return response()->json([
|
||||
'message' => 'Your address has been updated successfully.',
|
||||
'data' => new CustomerAddressResource($customerAddress),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,304 @@
|
|||
<?php
|
||||
|
||||
namespace Webkul\API\Http\Controllers\Shop;
|
||||
|
||||
use Cart;
|
||||
use Exception;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Http\Response;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use Illuminate\Support\Facades\Event;
|
||||
use Webkul\Checkout\Repositories\CartRepository;
|
||||
use Webkul\Checkout\Repositories\CartItemRepository;
|
||||
use Webkul\Customer\Repositories\WishlistRepository;
|
||||
use Webkul\API\Http\Resources\Checkout\Cart as CartResource;
|
||||
|
||||
class CartController extends Controller
|
||||
{
|
||||
/**
|
||||
* Contains current guard
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $guard;
|
||||
|
||||
/**
|
||||
* CartRepository object
|
||||
*
|
||||
* @var \Webkul\Checkout\Repositories\CartRepository
|
||||
*/
|
||||
protected $cartRepository;
|
||||
|
||||
/**
|
||||
* CartItemRepository object
|
||||
*
|
||||
* @var \Webkul\Checkout\Repositories\CartItemRepository
|
||||
*/
|
||||
protected $cartItemRepository;
|
||||
|
||||
/**
|
||||
* WishlistRepository object
|
||||
*
|
||||
* @var \Webkul\Checkout\Repositories\WishlistRepository
|
||||
*/
|
||||
protected $wishlistRepository;
|
||||
|
||||
/**
|
||||
* Controller instance
|
||||
*
|
||||
* @param \Webkul\Checkout\Repositories\CartRepository $cartRepository
|
||||
* @param \Webkul\Checkout\Repositories\CartItemRepository $cartItemRepository
|
||||
* @param \Webkul\Checkout\Repositories\WishlistRepository $wishlistRepository
|
||||
*/
|
||||
public function __construct(
|
||||
CartRepository $cartRepository,
|
||||
CartItemRepository $cartItemRepository,
|
||||
WishlistRepository $wishlistRepository
|
||||
) {
|
||||
$this->guard = request()->has('token') ? 'api' : 'customer';
|
||||
|
||||
auth()->setDefaultDriver($this->guard);
|
||||
|
||||
// $this->middleware('auth:' . $this->guard);
|
||||
|
||||
$this->_config = request('_config');
|
||||
|
||||
$this->cartRepository = $cartRepository;
|
||||
|
||||
$this->cartItemRepository = $cartItemRepository;
|
||||
|
||||
$this->wishlistRepository = $wishlistRepository;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get customer cart.
|
||||
*
|
||||
* @return \Illuminate\Http\JsonResponse
|
||||
*/
|
||||
public function get()
|
||||
{
|
||||
$customer = auth($this->guard)->user();
|
||||
|
||||
$cart = Cart::getCart();
|
||||
|
||||
return response()->json([
|
||||
'data' => $cart ? new CartResource($cart) : null,
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Store a newly created resource in storage.
|
||||
*
|
||||
* @param int $id
|
||||
*
|
||||
* @return \Illuminate\Http\JsonResponse
|
||||
*/
|
||||
public function store($id): ?JsonResponse
|
||||
{
|
||||
if (request()->get('is_buy_now')) {
|
||||
Event::dispatch('shop.item.buy-now', $id);
|
||||
}
|
||||
|
||||
Event::dispatch('checkout.cart.item.add.before', $id);
|
||||
|
||||
try {
|
||||
$result = Cart::addProduct($id, request()->except('_token'));
|
||||
|
||||
if (is_array($result) && isset($result['warning'])) {
|
||||
return response()->json([
|
||||
'error' => $result['warning'],
|
||||
], 400);
|
||||
}
|
||||
|
||||
if ($customer = auth($this->guard)->user()) {
|
||||
$this->wishlistRepository->deleteWhere(['product_id' => $id, 'customer_id' => $customer->id]);
|
||||
}
|
||||
|
||||
Event::dispatch('checkout.cart.item.add.after', $result);
|
||||
|
||||
Cart::collectTotals();
|
||||
|
||||
$cart = Cart::getCart();
|
||||
|
||||
return response()->json([
|
||||
'message' => __('shop::app.checkout.cart.item.success'),
|
||||
'data' => $cart ? new CartResource($cart) : null,
|
||||
]);
|
||||
} catch (Exception $e) {
|
||||
Log::error('API CartController: ' . $e->getMessage(),
|
||||
['product_id' => $id, 'cart_id' => cart()->getCart() ?? 0]);
|
||||
|
||||
return response()->json([
|
||||
'error' => [
|
||||
'message' => $e->getMessage(),
|
||||
'code' => $e->getCode()
|
||||
]
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the specified resource in storage.
|
||||
*
|
||||
* @return \Illuminate\Http\JsonResponse
|
||||
*/
|
||||
public function update(Request $request)
|
||||
{
|
||||
$this->validate($request, [
|
||||
'qty' => 'required|array',
|
||||
]);
|
||||
|
||||
$requestedQuantity = $request->get('qty');
|
||||
|
||||
foreach ($requestedQuantity as $qty) {
|
||||
if ($qty <= 0) {
|
||||
return response()->json([
|
||||
'message' => trans('shop::app.checkout.cart.quantity.illegal'),
|
||||
], Response::HTTP_UNAUTHORIZED);
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($requestedQuantity as $itemId => $qty) {
|
||||
$item = $this->cartItemRepository->findOneByField('id', $itemId);
|
||||
|
||||
Event::dispatch('checkout.cart.item.update.before', $itemId);
|
||||
|
||||
Cart::updateItems(['qty' => $requestedQuantity]);
|
||||
|
||||
Event::dispatch('checkout.cart.item.update.after', $item);
|
||||
}
|
||||
|
||||
Cart::collectTotals();
|
||||
|
||||
$cart = Cart::getCart();
|
||||
|
||||
return response()->json([
|
||||
'message' => __('shop::app.checkout.cart.quantity.success'),
|
||||
'data' => $cart ? new CartResource($cart) : null,
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the specified resource from storage.
|
||||
*
|
||||
* @return \Illuminate\Http\JsonResponse
|
||||
*/
|
||||
public function destroy()
|
||||
{
|
||||
Event::dispatch('checkout.cart.delete.before');
|
||||
|
||||
Cart::deActivateCart();
|
||||
|
||||
Event::dispatch('checkout.cart.delete.after');
|
||||
|
||||
$cart = Cart::getCart();
|
||||
|
||||
return response()->json([
|
||||
'message' => __('shop::app.checkout.cart.item.success-remove'),
|
||||
'data' => $cart ? new CartResource($cart) : null,
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the specified resource from storage.
|
||||
*
|
||||
* @param int $id
|
||||
*
|
||||
* @return \Illuminate\Http\JsonResponse
|
||||
*/
|
||||
public function destroyItem($id)
|
||||
{
|
||||
Event::dispatch('checkout.cart.item.delete.before', $id);
|
||||
|
||||
Cart::removeItem($id);
|
||||
|
||||
Event::dispatch('checkout.cart.item.delete.after', $id);
|
||||
|
||||
Cart::collectTotals();
|
||||
|
||||
$cart = Cart::getCart();
|
||||
|
||||
return response()->json([
|
||||
'message' => __('shop::app.checkout.cart.item.success-remove'),
|
||||
'data' => $cart ? new CartResource($cart) : null,
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Function to move a already added product to wishlist will run only on customer authentication.
|
||||
*
|
||||
* @param \Webkul\Checkout\Repositories\CartItemRepository $id
|
||||
*
|
||||
* @return \Illuminate\Http\JsonResponse
|
||||
*/
|
||||
public function moveToWishlist($id)
|
||||
{
|
||||
Event::dispatch('checkout.cart.item.move-to-wishlist.before', $id);
|
||||
|
||||
Cart::moveToWishlist($id);
|
||||
|
||||
Event::dispatch('checkout.cart.item.move-to-wishlist.after', $id);
|
||||
|
||||
Cart::collectTotals();
|
||||
|
||||
$cart = Cart::getCart();
|
||||
|
||||
return response()->json([
|
||||
'message' => __('shop::app.checkout.cart.move-to-wishlist-success'),
|
||||
'data' => $cart ? new CartResource($cart) : null,
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Apply coupon code.
|
||||
*
|
||||
* @return \Illuminate\Http\JsonResponse
|
||||
*/
|
||||
public function applyCoupon()
|
||||
{
|
||||
$couponCode = request()->get('code');
|
||||
|
||||
try {
|
||||
if (strlen($couponCode)) {
|
||||
Cart::setCouponCode($couponCode)->collectTotals();
|
||||
|
||||
if (Cart::getCart()->coupon_code == $couponCode) {
|
||||
return response()->json([
|
||||
'success' => true,
|
||||
'message' => trans('shop::app.checkout.total.success-coupon'),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
return response()->json([
|
||||
'success' => false,
|
||||
'message' => trans('shop::app.checkout.total.invalid-coupon'),
|
||||
]);
|
||||
} catch (\Exception $e) {
|
||||
report($e);
|
||||
|
||||
return response()->json([
|
||||
'success' => false,
|
||||
'message' => trans('shop::app.checkout.total.coupon-apply-issue'),
|
||||
]);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove coupon code.
|
||||
*
|
||||
* @return \Illuminate\Http\JsonResponse
|
||||
*/
|
||||
public function removeCoupon()
|
||||
{
|
||||
Cart::removeCouponCode()->collectTotals();
|
||||
|
||||
return response()->json([
|
||||
'success' => true,
|
||||
'message' => trans('shop::app.checkout.total.remove-coupon'),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,40 @@
|
|||
<?php
|
||||
|
||||
namespace Webkul\API\Http\Controllers\Shop;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use Webkul\Category\Repositories\CategoryRepository;
|
||||
use Webkul\API\Http\Resources\Catalog\Category as CategoryResource;
|
||||
|
||||
class CategoryController extends Controller
|
||||
{
|
||||
/**
|
||||
* CategoryRepository object
|
||||
*
|
||||
* @var \Webkul\Category\Repositories\CategoryRepository
|
||||
*/
|
||||
protected $categoryRepository;
|
||||
|
||||
/**
|
||||
* Create a new controller instance.
|
||||
*
|
||||
* @param Webkul\Category\Repositories\CategoryRepository $categoryRepository
|
||||
* @return void
|
||||
*/
|
||||
public function __construct(CategoryRepository $categoryRepository)
|
||||
{
|
||||
$this->categoryRepository = $categoryRepository;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a listing of the resource.
|
||||
*
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
return CategoryResource::collection(
|
||||
$this->categoryRepository->getVisibleCategoryTree(request()->input('parent_id'))
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,227 @@
|
|||
<?php
|
||||
|
||||
namespace Webkul\API\Http\Controllers\Shop;
|
||||
|
||||
use Cart;
|
||||
use Exception;
|
||||
use Illuminate\Support\Str;
|
||||
use Webkul\Payment\Facades\Payment;
|
||||
use Webkul\Shipping\Facades\Shipping;
|
||||
use Webkul\Sales\Repositories\OrderRepository;
|
||||
use Webkul\Checkout\Repositories\CartRepository;
|
||||
use Webkul\Shop\Http\Controllers\OnepageController;
|
||||
use Webkul\Checkout\Repositories\CartItemRepository;
|
||||
use Webkul\Checkout\Http\Requests\CustomerAddressForm;
|
||||
use Webkul\API\Http\Resources\Sales\Order as OrderResource;
|
||||
use Webkul\API\Http\Resources\Checkout\Cart as CartResource;
|
||||
use Webkul\API\Http\Resources\Checkout\CartShippingRate as CartShippingRateResource;
|
||||
|
||||
class CheckoutController extends Controller
|
||||
{
|
||||
/**
|
||||
* Contains current guard
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $guard;
|
||||
|
||||
/**
|
||||
* CartRepository object
|
||||
*
|
||||
* @var \Webkul\Checkout\Repositories\CartRepository
|
||||
*/
|
||||
protected $cartRepository;
|
||||
|
||||
/**
|
||||
* CartItemRepository object
|
||||
*
|
||||
* @var \Webkul\Checkout\Repositories\CartItemRepository
|
||||
*/
|
||||
protected $cartItemRepository;
|
||||
|
||||
/**
|
||||
* Controller instance
|
||||
*
|
||||
* @param \Webkul\Checkout\Repositories\CartRepository $cartRepository
|
||||
* @param \Webkul\Checkout\Repositories\CartItemRepository $cartItemRepository
|
||||
* @param \Webkul\Sales\Repositories\OrderRepository $orderRepository
|
||||
*/
|
||||
public function __construct(
|
||||
CartRepository $cartRepository,
|
||||
CartItemRepository $cartItemRepository,
|
||||
OrderRepository $orderRepository
|
||||
)
|
||||
{
|
||||
$this->guard = request()->has('token') ? 'api' : 'customer';
|
||||
|
||||
auth()->setDefaultDriver($this->guard);
|
||||
|
||||
// $this->middleware('auth:' . $this->guard);
|
||||
|
||||
$this->_config = request('_config');
|
||||
|
||||
$this->cartRepository = $cartRepository;
|
||||
|
||||
$this->cartItemRepository = $cartItemRepository;
|
||||
|
||||
$this->orderRepository = $orderRepository;
|
||||
}
|
||||
|
||||
/**
|
||||
* Saves customer address.
|
||||
*
|
||||
* @param \Webkul\Checkout\Http\Requests\CustomerAddressForm $request
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function saveAddress(CustomerAddressForm $request)
|
||||
{
|
||||
$data = request()->all();
|
||||
|
||||
$data['billing']['address1'] = implode(PHP_EOL, array_filter($data['billing']['address1']));
|
||||
|
||||
$data['shipping']['address1'] = implode(PHP_EOL, array_filter($data['shipping']['address1']));
|
||||
|
||||
if (isset($data['billing']['id']) && str_contains($data['billing']['id'], 'address_')) {
|
||||
unset($data['billing']['id']);
|
||||
unset($data['billing']['address_id']);
|
||||
}
|
||||
|
||||
if (isset($data['shipping']['id']) && Str::contains($data['shipping']['id'], 'address_')) {
|
||||
unset($data['shipping']['id']);
|
||||
unset($data['shipping']['address_id']);
|
||||
}
|
||||
|
||||
|
||||
if (Cart::hasError() || ! Cart::saveCustomerAddress($data) || ! Shipping::collectRates()) {
|
||||
abort(400);
|
||||
}
|
||||
|
||||
$rates = [];
|
||||
|
||||
foreach (Shipping::getGroupedAllShippingRates() as $code => $shippingMethod) {
|
||||
$rates[] = [
|
||||
'carrier_title' => $shippingMethod['carrier_title'],
|
||||
'rates' => CartShippingRateResource::collection(collect($shippingMethod['rates'])),
|
||||
];
|
||||
}
|
||||
|
||||
Cart::collectTotals();
|
||||
|
||||
return response()->json([
|
||||
'data' => [
|
||||
'rates' => $rates,
|
||||
'cart' => new CartResource(Cart::getCart()),
|
||||
]
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Saves shipping method.
|
||||
*
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function saveShipping()
|
||||
{
|
||||
$shippingMethod = request()->get('shipping_method');
|
||||
|
||||
if (Cart::hasError()
|
||||
|| !$shippingMethod
|
||||
|| ! Cart::saveShippingMethod($shippingMethod)
|
||||
) {
|
||||
abort(400);
|
||||
}
|
||||
|
||||
Cart::collectTotals();
|
||||
|
||||
return response()->json([
|
||||
'data' => [
|
||||
'methods' => Payment::getPaymentMethods(),
|
||||
'cart' => new CartResource(Cart::getCart()),
|
||||
]
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Saves payment method.
|
||||
*
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function savePayment()
|
||||
{
|
||||
$payment = request()->get('payment');
|
||||
|
||||
if (Cart::hasError() || ! $payment || ! Cart::savePaymentMethod($payment)) {
|
||||
abort(400);
|
||||
}
|
||||
|
||||
return response()->json([
|
||||
'data' => [
|
||||
'cart' => new CartResource(Cart::getCart()),
|
||||
]
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Check for minimum order.
|
||||
*
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function checkMinimumOrder()
|
||||
{
|
||||
$minimumOrderAmount = (float) core()->getConfigData('sales.orderSettings.minimum-order.minimum_order_amount') ?? 0;
|
||||
|
||||
$status = Cart::checkMinimumOrder();
|
||||
|
||||
return response()->json([
|
||||
'status' => ! $status ? false : true,
|
||||
'message' => ! $status ? trans('shop::app.checkout.cart.minimum-order-message', ['amount' => core()->currency($minimumOrderAmount)]) : 'Success',
|
||||
'data' => [
|
||||
'cart' => new CartResource(Cart::getCart()),
|
||||
]
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Saves order.
|
||||
*
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function saveOrder()
|
||||
{
|
||||
if (Cart::hasError()) {
|
||||
abort(400);
|
||||
}
|
||||
|
||||
Cart::collectTotals();
|
||||
|
||||
$this->validateOrder();
|
||||
|
||||
$cart = Cart::getCart();
|
||||
|
||||
if ($redirectUrl = Payment::getRedirectUrl($cart)) {
|
||||
return response()->json([
|
||||
'success' => true,
|
||||
'redirect_url' => $redirectUrl,
|
||||
]);
|
||||
}
|
||||
|
||||
$order = $this->orderRepository->create(Cart::prepareDataForOrder());
|
||||
|
||||
Cart::deActivateCart();
|
||||
|
||||
return response()->json([
|
||||
'success' => true,
|
||||
'order' => new OrderResource($order),
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Validate order before creation
|
||||
*
|
||||
* @throws Exception
|
||||
*/
|
||||
public function validateOrder(): void
|
||||
{
|
||||
app(OnepageController::class)->validateOrder();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
<?php
|
||||
|
||||
namespace Webkul\API\Http\Controllers\Shop;
|
||||
|
||||
use Illuminate\Foundation\Bus\DispatchesJobs;
|
||||
use Illuminate\Routing\Controller as BaseController;
|
||||
use Illuminate\Foundation\Validation\ValidatesRequests;
|
||||
use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
|
||||
|
||||
class Controller extends BaseController
|
||||
{
|
||||
use AuthorizesRequests, DispatchesJobs, ValidatesRequests;
|
||||
}
|
||||
|
|
@ -0,0 +1,58 @@
|
|||
<?php
|
||||
|
||||
namespace Webkul\API\Http\Controllers\Shop;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class CoreController extends Controller
|
||||
{
|
||||
/**
|
||||
* Returns a listing of the resource.
|
||||
*
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function getConfig()
|
||||
{
|
||||
$configValues = [];
|
||||
|
||||
foreach (explode(',', request()->input('_config')) as $config) {
|
||||
$configValues[$config] = core()->getConfigData($config);
|
||||
}
|
||||
|
||||
return response()->json([
|
||||
'data' => $configValues,
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a listing of the resource.
|
||||
*
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function getCountryStateGroup()
|
||||
{
|
||||
return response()->json([
|
||||
'data' => core()->groupedStatesByCountries(),
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a listing of the resource.
|
||||
*
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function switchCurrency()
|
||||
{
|
||||
return response()->json([]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a listing of the resource.
|
||||
*
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function switchLocale()
|
||||
{
|
||||
return response()->json([]);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,117 @@
|
|||
<?php
|
||||
|
||||
namespace Webkul\API\Http\Controllers\Shop;
|
||||
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Illuminate\Support\Facades\Event;
|
||||
use Webkul\Customer\Http\Requests\CustomerRegistrationRequest;
|
||||
use Webkul\Customer\Repositories\CustomerGroupRepository;
|
||||
use Webkul\Customer\Repositories\CustomerRepository;
|
||||
|
||||
class CustomerController extends Controller
|
||||
{
|
||||
/**
|
||||
* Contains current guard
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $guard;
|
||||
|
||||
/**
|
||||
* Contains route related configuration
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $_config;
|
||||
|
||||
/**
|
||||
* Repository object
|
||||
*
|
||||
* @var \Webkul\Customer\Repositories\CustomerRepository
|
||||
*/
|
||||
protected $customerRepository;
|
||||
|
||||
/**
|
||||
* Repository object
|
||||
*
|
||||
* @var \Webkul\Customer\Repositories\CustomerGroupRepository
|
||||
*/
|
||||
protected $customerGroupRepository;
|
||||
|
||||
/**
|
||||
* Create a new controller instance.
|
||||
*
|
||||
* @param \Webkul\Customer\Repositories\CustomerRepository $customerRepository
|
||||
* @param \Webkul\Customer\Repositories\CustomerGroupRepository $customerGroupRepository
|
||||
* @return void
|
||||
*/
|
||||
public function __construct(
|
||||
CustomerRepository $customerRepository,
|
||||
CustomerGroupRepository $customerGroupRepository
|
||||
) {
|
||||
$this->guard = request()->has('token') ? 'api' : 'customer';
|
||||
|
||||
$this->_config = request('_config');
|
||||
|
||||
if (isset($this->_config['authorization_required']) && $this->_config['authorization_required']) {
|
||||
|
||||
auth()->setDefaultDriver($this->guard);
|
||||
|
||||
$this->middleware('auth:' . $this->guard);
|
||||
}
|
||||
|
||||
$this->customerRepository = $customerRepository;
|
||||
|
||||
$this->customerGroupRepository = $customerGroupRepository;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to store user's sign up form data to DB.
|
||||
*
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function create(CustomerRegistrationRequest $request)
|
||||
{
|
||||
$request->validated();
|
||||
|
||||
$data = [
|
||||
'first_name' => $request->get('first_name'),
|
||||
'last_name' => $request->get('last_name'),
|
||||
'email' => $request->get('email'),
|
||||
'password' => $request->get('password'),
|
||||
'password' => bcrypt($request->get('password')),
|
||||
'channel_id' => core()->getCurrentChannel()->id,
|
||||
'is_verified' => 1,
|
||||
'customer_group_id' => $this->customerGroupRepository->findOneWhere(['code' => 'general'])->id
|
||||
];
|
||||
|
||||
Event::dispatch('customer.registration.before');
|
||||
|
||||
$customer = $this->customerRepository->create($data);
|
||||
|
||||
Event::dispatch('customer.registration.after', $customer);
|
||||
|
||||
return response()->json([
|
||||
'message' => 'Your account has been created successfully.',
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a current user data.
|
||||
*
|
||||
* @param int $id
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function get($id)
|
||||
{
|
||||
if (Auth::user($this->guard)->id === (int) $id) {
|
||||
return new $this->_config['resource'](
|
||||
$this->customerRepository->findOrFail($id)
|
||||
);
|
||||
}
|
||||
|
||||
return response()->json([
|
||||
'message' => 'Invalid Request.',
|
||||
], 403);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,42 @@
|
|||
<?php
|
||||
|
||||
namespace Webkul\API\Http\Controllers\Shop;
|
||||
|
||||
use Illuminate\Foundation\Auth\SendsPasswordResetEmails;
|
||||
use Illuminate\Support\Facades\Password;
|
||||
use Webkul\Customer\Http\Requests\CustomerForgotPasswordRequest;
|
||||
|
||||
class ForgotPasswordController extends Controller
|
||||
{
|
||||
use SendsPasswordResetEmails;
|
||||
|
||||
/**
|
||||
* Store a newly created resource in storage.
|
||||
*
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function store(CustomerForgotPasswordRequest $request)
|
||||
{
|
||||
$request->validated();
|
||||
|
||||
$response = $this->broker()->sendResetLink($request->only(['email']));
|
||||
|
||||
return $response == Password::RESET_LINK_SENT
|
||||
? response()->json([
|
||||
'message' => trans($response),
|
||||
])
|
||||
: response()->json([
|
||||
'error' => trans($response),
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the broker to be used during password reset.
|
||||
*
|
||||
* @return \Illuminate\Contracts\Auth\PasswordBroker
|
||||
*/
|
||||
public function broker()
|
||||
{
|
||||
return Password::broker('customers');
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue