Skip to content
This repository has been archived by the owner on Mar 18, 2022. It is now read-only.

where do you place this code in romanbican/role, am new in laravel, i tried placing in a role model but it was highlighted with red #179

Open
kapkory opened this issue Jun 11, 2016 · 4 comments

Comments

@kapkory
Copy link

kapkory commented Jun 11, 2016

use Bican\Roles\Models\Role;

$adminRole = Role::create([
'name' => 'Admin',
'slug' => 'admin',
'description' => '', // optional
'level' => 1, // optional, set to 1 by default
]);

$moderatorRole = Role::create([
'name' => 'Forum Moderator',
'slug' => 'forum.moderator',
]);

@kapkory kapkory changed the title where do you place this code, am new in laravel, i tried placing in a role model but it was highlighted with red where do you place this code in romanbican/role, am new in laravel, i tried placing in a role model but it was highlighted with red Jun 11, 2016
@muneebarif11
Copy link

You can create a view for roles to create and in store method of you class, you can put your above code there.

@yong0011
Copy link

Oh @kapkory , I am experiencing the same issue.

@kapkory
Copy link
Author

kapkory commented Jun 28, 2016

i didn't use it altogether, i placed a function authenticated in my
authcontroller, and placed my redirection code and it worked fine

On Tue, Jun 28, 2016 at 8:52 AM, YongCS [email protected] wrote:

Oh @kapkory https://github.com/kapkory , I am experiencing the same
issue.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#179 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/AS80I2foiGl3vWa5lXeOT9J3JXp_6a5iks5qQLa1gaJpZM4IzgfT
.

@yong0011
Copy link

That's a great way to add your function. Thanks

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants