lundi 4 avril 2016

Laravel 5.1 Block users using Bican roles

I was wondering, how I could ban people via this package...

So I'm currently using Laravel 5.1 and I'm trying to 'ban' users from my site. I have a table called 'banned' wich has the following tructure:

    +---------------+--------------+------------+-------------+------------------+----------------+--+
    | TABLE_NAME | COLUMN_NAME | COLUMN_DEFAULT | IS_NULLABLE | DATA_TYPE | CHARACTER_MAXIMUM_LENGTH | 
    +---------------+--------------+------------+-------------+------------------+----------------+--+
    | banned     | id          | NULL           | NO          | int       | NULL                     |
    | banned     | user_id     | NULL           | NO          | int       | NULL                     |
    | banned     | banned_by   | NULL           | NO          | int       | NULL                     |
    | banned     | reason      | NULL           | NO          | varchar   |                      255 |
    | banned     | expires     | NULL           | NO          | datetime  | NULL                     |
    | banned     | lifted      | NULL           | YES         | datetime  | NULL                     |
    | banned     | lifted_by   | NULL           | YES         | int       | NULL                     |
    +---------------+--------------+------------+-------------+------------------+----------------+--+

I also have the standard structure of the roles (bican roles).

Now, I want to be able to display a custom banned view to my banned users with the data from inside the 'banned' table.

What would be the best way to do this?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire