Aimeos Laravel package

The repository contains the web shop package for Laravel 5 integrating the Aimeos e-commerce library into Laravel. The package provides controllers for e.g. faceted filter, product lists and detail views, for searching products as well as baskets and the checkout process. A full set of pages including routing is also available for a quick start.

Installation or update

This document is for the latest Aimeos Laravel 2016.04 release and later. If you want to upgrade between major versions, please have a look into the upgrade guide!

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:

"prefer-stable": true, "minimum-stability": "dev", "require": { "aimeos/aimeos-laravel": "~2016.04", ... }, "scripts": { ... "post-update-cmd": [ "php artisan vendor:publish --tag=public --force", "php artisan vendor:publish", "php artisan migrate", ... ] }

Afterwards, install the Aimeos shop package using

composer update

Caution: Make sure that the database is set up and it is configured in your config/database.php or .env file (depending on the Laravel version). 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!

Next, the Aimeos provider class must be added to the providers array of the config/app.php file so the application and Laravel command task will work:

return array( 'providers' => array( ... Aimeos\Shop\ShopServiceProvider::class, ), );

In the last step you must now execute these artisan commands to get a working or updated Aimeos installation:

php artisan vendor:publish php artisan migrate php artisan aimeos:setup --option=setup/default/demo:1 php artisan aimeos:cache

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.

Note: For Laravel 5.1 the routes section in your config/shop.php must be changed like this because in 5.1 there’s no middleware group “web” as in 5.2:

'routes' => array( 'login' => array(), 'admin' => array('middleware' => array('auth')), 'account' => array('middleware' => array('auth')), 'default' => array(), 'confirm' => array(), 'update' => array(), ),

Setup


Originally published at www.laravelfeed.com.

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.