-
Run
composer require odiseoteam/sylius-banner-plugin --no-scripts
-
Enable the plugin in bundles.php
<?php
// config/bundles.php
return [
// ...
Vich\UploaderBundle\VichUploaderBundle::class => ['all' => true],
Odiseo\SyliusBannerPlugin\OdiseoSyliusBannerPlugin::class => ['all' => true],
];
- Import the plugin configurations
# config/packages/_sylius.yaml
imports:
# ...
- { resource: "@OdiseoSyliusBannerPlugin/Resources/config/config.yaml" }
- Add the shop and admin routes
# config/routes.yaml
odiseo_sylius_banner_plugin_admin:
resource: "@OdiseoSyliusBannerPlugin/Resources/config/routing/admin.yaml"
prefix: /admin
odiseo_sylius_banner_plugin_shop:
resource: "@OdiseoSyliusBannerPlugin/Resources/config/routing/shop.yaml"
prefix: /{_locale}/banners
requirements:
_locale: ^[A-Za-z]{2,4}(_([A-Za-z]{4}|[0-9]{3}))?(_([A-Za-z]{2}|[0-9]{3}))?$
-
Create banner folder: run
mkdir public/media/banner-image -p
and insert a .gitkeep file in that folder -
Finish the installation updating the database schema and installing assets
php bin/console doctrine:migrations:migrate
php bin/console sylius:theme:assets:install
php bin/console cache:clear