How Socialite Works in Laravel for Authentication

User clicks the “Login with {Provider}” button. 2. Redirect the user to the provider’s OAuth page. 3. User logs in and authorizes the application. 4. The provider redirects the user back to your application with an access token. 5. Use Socialite to retrieve the user’s information and handle authentication in your app.

January 2025 · 2 min · Pavan Kushvaha

Handle events for Eloquent models in Laravel

Laravel’s Eloquent provides several model events that allow you to hook into the lifecycle of a model. These events can be used to execute custom logic when specific actions occur.

January 2025 · 5 min · Pavan Kushvaha