Advertisements API

Advanced information for expert users.

Models

  • Laralum\Roles\Models\Role

    • users()

      Returns the role users relationship (Laralum\Users\Models\User).

    • hasUser($user)

      Returns a boolean indicating if Role has user $user.

    • hasPermission($permission)

      Returns a boolean indicating if Role has permission $permission.

    • addUser($user)

      Adds the user $user to the role.

    • addUsers($users)

      Adds all the users in array $users to the role.

    • deleteUser($user)

      Deletes the user $user to the role.

    • deleteUsers($users)

      Deletes all the users in array $users to the role.

    • addPermission($permission)

      Adds the permission $permission to the role.

    • addPermissions($permissions)

      Adds all the permissions in array $permissions to the role.

    • deletePermission($permission)

      Deletes the permission $permission to the role.

    • deletePermissions($permissions)

      Deletes all the permissions in array $permissions to the role.

Traits

  • Laralum\Roles\Traits\HasRoles

    • hasPermission($permission)

      Returns a boolean indicating if User has permission $permission.

  • Laralum\Roles\Traits\HasRolesAndPermissions

    • roles()

      Returns all Roles.

    • hasRole(Role $role)

      Returns a boolean indicating if User has role $role.

Did you know?

Laralum was created by two students of the Polytechnic University of Catalonia.


Donations

Please consider donating if you liked the project, we currently have no funding and we're spending a lot of time maintaining and developing this project.


The creators

Èrik Campobadal Forés

Aitor Riba Archilla


Major Contributors

Krishan König

Laraketai

Snow McFox