Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Crud Bundle Laravel Package

ecommit/crud-bundle

View on GitHub
Deep Wiki
Context7

Installation

Prérequis :

  • Projet Symfony fonctionnel
  • Entité utilisateur avec Doctrine
  • NodeJS
  • Webpack Encore
  • Pour une compatibilité avec un maximum de navigateurs Internet, il est conseillé :
  • Un gestionnaire de thème chargé par Webpack Encore parmi :
    • Bootstrap 3
    • Bootstrap 4
    • Bootstrap 5
    • Votre thème personnalisé (créer un thème Twig qui hérite [@EcommitCrud](https://github.com/EcommitCrud)/Theme/base.html.twig)
  • Un gestionnaire d'icones chargé par Webpack Encore parmi :
    • Fontawesome 4
    • Fontawesome 5 Solid
    • Fontawesome 6 Solid
    • Votre thème personnalisé (créer un thème Twig qui hérite [@EcommitCrud](https://github.com/EcommitCrud)/IconTheme/base.html.twig)

Installez le bundle avec Composer : A la racine de votre projet Symfony, éxécutez la commande suivante :

$ composer require ecommit/crud-bundle:3.*[@dev](https://github.com/dev)
$ npm install --save-dev [@ecommit](https://github.com/ecommit)/crud-bundle@file:vendor/ecommit/crud-bundle/assets

Activez le bundle dans le fichier de configuration config/bundles.php de votre projet :

return [
    //...
    Ecommit\CrudBundle\EcommitCrudBundle::class => ['all' => true],
    //...
];

Ajoutez à votre projet le fichier de configuration config/packages/ecommit_crud.yaml :

ecommit_crud:
    #Theme
    #Themes disponibles :
    #[@EcommitCrud](https://github.com/EcommitCrud)/Theme/base.html.twig
    #[@EcommitCrud](https://github.com/EcommitCrud)/Theme/bootstrap3.html.twig (boostrap3 requis)
    #[@EcommitCrud](https://github.com/EcommitCrud)/Theme/bootstrap4.html.twig (boostrap4 requis)
    #[@EcommitCrud](https://github.com/EcommitCrud)/Theme/bootstrap5.html.twig (boostrap5 requis)
    #Ou faire son propre terme (doit hériter de l'un des thèmes précédents)
    theme: '[@EcommitCrud](https://github.com/EcommitCrud)/Theme/bootstrap5.html.twig'

    #Theme pour les icones
    #Themes disponibles :
    #[@EcommitCrud](https://github.com/EcommitCrud)/IconTheme/base.html.twig
    #[@EcommitCrud](https://github.com/EcommitCrud)/IconTheme/fontawesome4.html.twig (fontawesome4 requis)
    #[@EcommitCrud](https://github.com/EcommitCrud)/IconTheme/fontawesome5_solid.html.twig (fontawesome5 Solid requis)
    #[@EcommitCrud](https://github.com/EcommitCrud)/IconTheme/fontawesome6_solid.html.twig (fontawesome5 Solid requis)
    #Ou faire son propre terme (doit hériter de l'un des thèmes précédents)
    icon_theme: '[@EcommitCrud](https://github.com/EcommitCrud)/IconTheme/fontawesome6_solid.html.twig'

Votre entité Doctrine "utilisateur" doit implémenter l'interface Ecommit\CrudBundle\Entity\UserCrudInterface. Exemple :

<?php

namespace App\Entity;

use Ecommit\CrudBundle\Entity\UserCrudInterface;
use Symfony\Component\Security\Core\User\UserInterface;

class User implements UserInterface, UserCrudInterface
{
    //...
}

La configuration Doctrine doit être adaptée en conséquence :

#config/packages/doctrine.yaml

doctrine:
    orm:
        resolve_target_entities:
            #Adaptez App\Entity\User en fonction du nom de votre classe utilisateur
            Ecommit\CrudBundle\Entity\UserCrudInterface: App\Entity\User

Dans votre entrée principale Webpack Encore, rajoutez les instructions suivantes :

//Exemple dans assets/js/app.js
import '[@ecommit](https://github.com/ecommit)/crud-bundle/js/crud';
import * as modalManager from '[@ecommit](https://github.com/ecommit)/crud-bundle/js/modal/modal-manager';
//Choix du moteur de modal (exemple avec Boostrap5)
//Bootstrap5 requis (et chargé via Webpack Encore)
var modalEngine = require('[@ecommit](https://github.com/ecommit)/crud-bundle/js/modal/engine/bootstrap5');
modalManager.defineEngine(modalEngine);

Recompiliez avec Webpack Encore:

npm run dev

Mettez à jour vos entités Doctrine :

php bin/console doctrine:schema:update --force

#Ou si vous utilisez Doctrine Migrations:
#php bin/console doctrine:migrations:diff
#php bin/console doctrine:migrations:migrate
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
nexmo/api-specification
capell-app/block-library
axium/identity
cetria/laravel-dummy-models
cetria/reflection-helper
agropredict/sso-auth-bundle
evolvestudio/spam-protection
datacore/hub-sdk
develia/commons
cuci/prototurk-sdk
cuci/prototurk-sdk-symfony
develia/geo-bundle
dreamzy/livewire-charts
touchestate-sdk/php-sdk
ecotone/kafka
22h/doctrine-garbage-collection-bundle
agtp/agtp-php
agtp/mod-php
splash/sonata-admin
splash/metadata