Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create Admin Helper Function #12

Open
drewroberts opened this issue May 3, 2021 · 1 comment
Open

Create Admin Helper Function #12

drewroberts opened this issue May 3, 2021 · 1 comment
Assignees

Comments

@drewroberts
Copy link
Member

Patrick, could you create a helper function in the tipoff/authorization package that simplifies this?

https://github.com/tipoff/demo/blob/649858eff8389720d6277caf7f7a836fc52ed1d0/database/migrations/2021_03_29_100000_add_admin_user.php#L11-L20

@drewroberts
Copy link
Member Author

Maybe something like:

createAdmin() to be used in Laravel applications like:

createAdmin([ 
     'first_name' => 'admin', 
     'last_name' => 'admin', 
     'email' => 'admin@example.com', 
 ]);

It then defaults a password of 'password' for the user and assigns admin rights.

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

No branches or pull requests

2 participants