benmacha/templatebundle

Symfony Template Bundle

Installs: 146

Dependents: 0

Suggesters: 0

Security: 0

Stars: 2

Watchers: 2

Forks: 0

Open Issues: 0

Language:HTML

Type:symfony-bundle

1.1.0.1 2019-04-20 19:21 UTC

This package is auto-updated.

Last update: 2024-04-04 19:34:24 UTC


README

By D'Ali Ben Macha contact@benmacha.tn https://dali.benmacha.tn

Symfony bundle to generate template with a nice design in your Symfony application.

Latest Stable Version Total Downloads Latest Unstable Version License

Installation

The easiest way to install and configure the TemplateBundle with Symfony is by using Composer: Add the benmacha/templatebundle package to your require section in the composer.json file.

$ composer require benmacha/templatebundle ^1.0

Add the Bundle to your application's kernel:

<?php
public function registerBundles()
{
    $bundles = array(
        // ...
            new Benmacha\TemplateBundle\BenmachaTemplateBundle(),
        // ...
    );
    ...
}

Configure the Bundle in your config.yml:

benmacha_template:
    site_name: 'Ben Macha' #required
    logo_path: 'bundles/benmachatemplate/img/logo-2.png' #required
    logo_path_mobile: 'bundles/benmachatemplate/img/logo-2-mob.png' #required
    user:
        class: AppBundle\Entity\User
        picture: image

Usage

To generate a CRUD, run this command NB: The menu will be generated

$  php bin/console benmacha:generate:crud

Don't forget to extend the repository like this

<?php

namespace AppBundle\Repository;

use Benmacha\TemplateBundle\Repository\BaseRepository; //add this line

class UserRepository extends BaseRepository // make this extend
{
     // Your code   
}