Closed fridzema closed 6 years ago
You can easily change the function yourself:
protected function gate()
{
Gate::define('viewTelescope', function ($user) {
return in_array($user->id, [1,2]);
});
}
@backstageel thanks, i have already done this for myself but i think this way is better as default.
Laravel Spark use Email aswell
Depending on the email is much safer. What if you're testing a feature that lets you delete your user so you can re-register it.. you might do this on your own user in a production environment, then you'd have to change the hardcoded gate
No plans to support this at the moment.
I think it is more convenient to check on user id in in the viewTelescope Gate.
Reasons: User email can easily be changed and breaks access to telescope. Performance.