If you use Laravel 5.4+ and don't have the latest MySQL version installed, you will probably get an error like Specified key was too long; max key length is 767 bytes. To circumvent this problem, you should change the database charset/collation in your config/database.php file before the tables are created to:
'mysql' => [
'charset' => 'utf8',
'collation' => 'utf8_unicode_ci',
The Aimeos Laravel web shop package is a composer based library that can be installed easiest by using Composer. Add these lines to your composer.json of your Laravel project:
"php artisan vendor:publish --tag=public --force",
"php artisan migrate",
The additional line in the require section tells composer to install the Aimeos Laravel package. You can also use the "dev-master" branch name if you want to install the latest version. Please have a look at the Aimeos Packagist page to find out what branches and versions are available.
To enable the use of the latest development version, you have to set the minimum-stability option to dev. Otherwise, composer might fail with an error that the library dependency can't be resolved.
In previous versions an additional section "repositories" was required in the composer.json file. This is not the case any more and have to be removed! Otherwise, composer will ask you for the credentials of a private repository that doesn't exist.
Make sure that the database is set up and it is configured in your .env file. Sometimes, the .env files are not available in the Laravel application and you will get exceptions that the connection to the database failed. In that case, add the database credentials to the resource/db section of your ./config/shop.php file too!
Afterwards, you can install the Aimeos shop package by executing this command on the command line:
Next, the Aimeos provider class must be added to the providers array of the config/app.php file so you are able to run the Aimeos Laravel tasks:
'providers' => array(
The Aimeos package provides a setup task that automatically sets up your Laravel application for Aimeos and creates or updates the required database tables used by Aimeos. This is done by executing these four commands:
php artisan vendor:publish php artisan migrate php artisan aimeos:setup --option=setup/default/demo:1 php artisan aimeos:cache
Note: If you are encountering an error during setup, please make sure that you've executed php artisan vendor:publish first! In a production environment or if you don't want that the demo data gets installed, leave out the --option=setup/default/demo:1 option.
Since Laravel 5.0 CSRF protection is enabled by default but for the /confirm and /update routes, you may have to disable CSRF if one of the payment providers is sending data via POST requests. More details about excluding CSRF for routes can be found in the Laravel documentation