Category: Laravel, PHP

Our Admin Hompage should be this: admin/home.vue 👇 We need it because there are some functions/api routes that we don’t want to be available to the public.

The respective route in api.php should be: Now that we have a login component, we need to create a user.

The code for reload+redirecting the site and going to admin route is window.location.href = "/admin"; This works but it is not efficient.

Our login method should be this: Now, the navigation guard will look at window.AuthCheck and find that it‘s value is 1 and let the authenticated user go to the admin path.
Newsletter

Get the latest Laravel/PHP jobs, events and curated articles straight to your inbox, once a week

Glimpse streamlines Laravel development by seamlessly deploying GitHub pull requests to preview environments with the help of Laravel Forge. Glimpse streamlines Laravel development by seamlessly deploying GitHub pull requests to preview environments with the help of Laravel Forge.
Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Shirts painstakingly handcrafted by under-caffeinated developers. Shirts painstakingly handcrafted by under-caffeinated developers.
Community Partners