Hello, i was trying to create a condition for display the Register button form in my app.
I need to show the register button only first time when there are not registered users in db, and make disappear it if user with id 1 will be registered. (basically because the user 1 will be admin, and for next users the admin will see the Register route for create new users and roles)
But I recommend doing that logic using env variables. No need to run a query every time the page refresh just to see whether there's a user in the database or not.
I mixed because mohamed's answer missed the App\Models
Yes this is working, and now i'm working on middleware, but i didn't really understand how to do like @tykus said.
I can't find register middleware in Middleware/Kernel.php