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

Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future. Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future.
Community Partners