Roles and Permissions in Laravel With spatie/laravel-permission
The most widely used role/permission package for Laravel — assigning roles, checking permissions in code and Blade, and the middleware that gates routes by role.
GUIDES
The most widely used role/permission package for Laravel — assigning roles, checking permissions in code and Blade, and the middleware that gates routes by role.
Rendering multiple locations from a database onto one map, each with its own clickable info window, is a matter of looping your data into the Maps JavaScript API's marker and InfoWindow objects.
Laravel Socialite handles both Google and Facebook login with the same driver-based API — sharing a page out to social media, by contrast, needs no package at all.
Remember-me works through a separate long-lived cookie and token column, entirely independent of the normal session — this is exactly why closing the browser doesn't log the user out even after the session itself would have expired.
Passwordless auth trades a stored password hash for a short-lived, single-use numeric code sent by email or SMS — the same pattern whether the endpoint is a traditional web form or a JSON API.
Cookie::queue() versus attaching a cookie directly to a response, why cookies are encrypted by default, and the correct way to actually delete one.
Three different front-end libraries for the same basic pattern: an AJAX endpoint returning matching records, and a widget that queries it as the user types.
Beyond the input fields you validate, the Request object exposes headers, raw JSON, the client's IP, and the current domain — all through the same object already injected into your controller methods.
Setting up tymon/jwt-auth for a stateless API, and why JWT is the wrong choice for a normal server-rendered app with sessions.
Angular needs a small service (or a package) to touch document.cookie safely, while Laravel wraps cookies in its own facade with automatic encryption baked in.
This 419 error almost always means the CSRF token sent with an AJAX request is missing, stale, or the session simply expired — the fix depends on which of those three it actually is.
GDPR requires genuine opt-in consent before non-essential cookies are set — this means holding off on analytics and marketing cookies until the user actually agrees, not just displaying a banner.