Suggested Validation before publishing MultiAuth (custom gaurd)
akshay-bhagat opened this issue · comments
MultiAuth should check below items before publishing the custom guard
- check if Controller with same name already exist?
- check if Views with same name already exist?
- check if Database Factory with same name already exist?
- check if Migration file with same table name already exist?
- check if Model with same name already exist?
- check if Middleware with same name already exist?
- check if Notification with same table name already exist?
Consider a scenario:
// creating a gaurd with name user, which is by default exists
$ php artisan multiauth:make user
It will create user table migration and other related files which can be repeated or overwrites existing files..
Below is one of the output of such scenario:
Yes got your point, can you please tell me if this happened with multiauth:make user
only or with any guard name?
I have tested with user
guard, but while creating some other guard, there is possibilities of having same name file generated by multiauth:make {guard}
like Controller, view, model, etc. and it will be overwritten. (Thus loss of previous data.)
Hey, I have fixed this problem, now if you run make user
command then it will give error if already exist provider.
Thanks for your effort.