coosos/user-role-type-bundle
| Package | Version |
|---|---|
| PHP | ^7.1 |
| Symfony | ^3.4, ^4.0, ~5.0 |
Open a command console, enter your project directory and execute the following command to download the latest stable version of this bundle :
composer require "coosos/user-role-type-bundle" "^2.0"
This command is used if composer is installed in your system.
Then, enable the bundle by adding the following line in the app/AppKernel.php
file of your project :
// app/AppKernel.php
// ...
class AppKernel extends Kernel
{
public function registerBundles()
{
$bundles = array(
// ...
new Coosos\UserRoleTypeBundle\CoososUserRoleTypeBundle(),
);
// ...
}
// ...
}
use Coosos\UserRoleTypeBundle\Form\Type;
...
$builder->add("roles", UserRoleType::class, ["coosos_security_checked" => "strict"]);
example
{{ form_start(userForm) }}
{{ form_row(userForm.roles.ROLE_ADMIN) }}
{{ form_end(userForm) }}
How can I help you explore Laravel packages today?