Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ayman-benmada/sylius-media-plugin
The Media plugin provides a library to manage your media
https://github.com/ayman-benmada/sylius-media-plugin
library media sylius sylius-plugin symfony
Last synced: 25 days ago
JSON representation
The Media plugin provides a library to manage your media
- Host: GitHub
- URL: https://github.com/ayman-benmada/sylius-media-plugin
- Owner: ayman-benmada
- License: mit
- Created: 2024-05-02T22:09:42.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2024-05-12T19:28:26.000Z (8 months ago)
- Last Synced: 2024-11-21T20:10:11.126Z (about 1 month ago)
- Topics: library, media, sylius, sylius-plugin, symfony
- Language: PHP
- Homepage:
- Size: 1.76 MB
- Stars: 7
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
Sylius Media Plugin
The Media plugin provides a library to manage your media![presentation photo](https://github.com/ayman-benmada/Sylius-Media-Plugin/blob/main/src/Resources/public/presentation-1.png?raw=true)
![presentation photo](https://github.com/ayman-benmada/Sylius-Media-Plugin/blob/main/src/Resources/public/presentation-2.png?raw=true)
![presentation photo](https://github.com/ayman-benmada/Sylius-Media-Plugin/blob/main/src/Resources/public/presentation-3.png?raw=true)
![presentation photo](https://github.com/ayman-benmada/Sylius-Media-Plugin/blob/main/src/Resources/public/presentation-4.png?raw=true)## Example
Here you will find example that allow you to add media to any form.
## Installation
Require plugin with composer :
```bash
composer require abenmada/sylius-media-plugin
```Change your `config/bundles.php` file to add the line for the plugin :
```php
['all' => true],
]
```Then create the config file in `config/packages/abenmada_media_plugin.yaml` :
```yaml
imports:
- { resource: "@MediaPlugin/Resources/config/services.yaml" }
```Then import the routes in `config/routes/abenmada_media_plugin.yaml` :
```yaml
abenmada_media_plugin_routing:
resource: "@MediaPlugin/Resources/config/routes.yaml"
prefix: /%sylius_admin.path_name%
```Update the entity `src/Entity/Channel/Channel.php` :
```php
medias = new ArrayCollection();
parent::__construct();
}
}
```Run the migration :
```bash
bin/console doctrine:migration:migrate
```