I have an email configured in the services.admin.key
that has the email of the admin of the app.
The app only has one admin. Do you know the best approach so that someone who has access to the code from Git could run a command to configure the user? For example, if its a table with three columns:
name: admin
email: the email configured in`services.admin.key`
password: sometestpass
How can I allow someone who has access to the project to run some command to create one user with these details? Do you know what the best approach for this is? I doubt how to approach this properly if it should be with a seeder or another approach?
For example, I have this method on the user model that I use in some views to check if the current user is an admin.
public function isAdministrator ()
{
if ($this->email == config('services.admin.key'))
{
return true;
}
return false;
}