Questions

9,124 Laravel questions with worked answers.

EloquentErrors

Eloquent select rows with empty string or null value

Selecting Rows with Empty Strings or Null Values in Laravel Eloquent In Laravel Eloquent, there might be instances where you need to filter your model's...

4 July 2026 · Stefan Bogdanescu
AuthenticationEloquent

Get current personal access token in Laravel sanctum from request

Title: Retrieving Current Personal Access Token in Laravel Sanctum from Request

4 July 2026 · Stefan Bogdanescu
ErrorsEmail

Laravel 5 : Parse error: syntax error, unexpected '?', expecting variable (T_VARIABLE)

Title: Troubleshooting Laravel's Parse Error Issues on Live Server: A Comprehensive Guide for Developers

4 July 2026 · Stefan Bogdanescu
Blade

Carbon: displaying hours and minutes?

Title: Displaying Hours, Minutes, and Seconds with Carbon in Laravel Views

4 July 2026 · Stefan Bogdanescu
DatabaseMigrations

Run raw SQL in migration

Title: Executing Raw SQL in Laravel Migrations: A Comprehensive Guide

4 July 2026 · Stefan Bogdanescu
RoutingErrors

Route [login] not defined

Title: Route [login] not defined: Understanding and Resolving Laravel Routing Issues

4 July 2026 · Stefan Bogdanescu
APIRouting

How to call API from controller Laravel without using curl and guzzle as its not working

Title: A Reliable Approach to Calling APIs from Laravel Controllers Without Using Curl or Guzzle

4 July 2026 · Stefan Bogdanescu
DeploymentConfiguration

Access to Laravel 5 app locally from an external device

Title: Accessing Laravel 5 App Locally from External Devices - A Developer's Guide

4 July 2026 · Stefan Bogdanescu
FilesRouting

Laravel- redirect with variable and display it in the view file

Title: Laravel Redirects with Variables and Displaying Them in View Files

4 July 2026 · Stefan Bogdanescu
RoutingTesting

Laravel passing data using ajax to controller

Title: Laravel Passing Data Using Ajax to Controller

4 July 2026 · Stefan Bogdanescu
FilesConfiguration

Image Intervention w/ Laravel Storage

Title: Effortlessly Resize Images with Intervention & Laravel Storage

4 July 2026 · Stefan Bogdanescu
DatabaseAPI

Laravel lockforupdate (Pessimistic Locking)

Pessimistic locking involves locking a row (or multiple rows) in the database to prevent other connections from modifying it until you finish your...

4 July 2026 · Stefan Bogdanescu
DatabaseArtisan

Setting up Laravel on a Mac php artisan migrate error: No such file or directory

Title: Troubleshooting Laravel Migrations on Mac: Resolving Errors with "No such file or directory" Body: Pulling a Laravel Project from Git to Mac: You've...

4 July 2026 · Stefan Bogdanescu
RoutingAuthentication

Laravel controller construct

Title: Understanding Laravel Controller Construct: A Comprehensive Guide

4 July 2026 · Stefan Bogdanescu
BladeLivewire

Laravel Livewire component not refreshing/reloading automatically after refreshing it

Title: Troubleshooting Livewire Component Updates: Ensuring Automatic Refresh After Manual Page Refreshes

4 July 2026 · Stefan Bogdanescu
QueuesArtisan

What is the difference queue:work and queue:listen

Title: Unraveling the Difference Between Laravel's queue:work and queue:listen Commands

4 July 2026 · Stefan Bogdanescu
ConfigurationFiles

Get environment value in controller

Title: Accessing Environment Variables in Laravel Controllers - A Comprehensive Guide

4 July 2026 · Stefan Bogdanescu
APIDatabase

Laravel Eloquent JSON Contains, how to provide WhereIn logic (one of array values)

Title: Laravel Eloquent JSON Contains and WhereIn Logic: Exploring Possible Solutions for Filtering Array Values in JSON Arrays

4 July 2026 · Stefan Bogdanescu
DatabaseAPI

DB::statement(); in Laravel (5.5)

// Transform geoJSON to the WGS84 coordinate system (3857) for consistency. $geom = DB::raw("STTRANSFORM(STGeomFromGeoJSON('".$geom."'), 3857)");

4 July 2026 · Stefan Bogdanescu
BladeDatabase

Concatenation with Blade in Laravel

Title: Dynamic Concatenation with Blade in Laravel for Table Column Names

4 July 2026 · Stefan Bogdanescu
AuthenticationEloquent

Can Anyone Explain Laravel 5.2 Multi Auth with Example

Title: A Comprehensive Guide on Implementing Laravel 5.2 Multi Auth for Multiple User Groups

4 July 2026 · Stefan Bogdanescu
FilesBlade

how to add logout link in topmenu in header section?

Are you facing challenges in making your logout link function properly within the top menu? You're not alone. In this guide, we'll walk through the process...

4 July 2026 · Stefan Bogdanescu
MigrationsDatabase

Laravel migrations nice way of disabling foreign key checks

Title: Simplifying Laravel Migration Management with Foreign Key Checks

4 July 2026 · Stefan Bogdanescu
QueuesEmail

How to cancel queued job in Laravel or Redis

Title: Canceling Queued Jobs in Laravel and Redis

4 July 2026 · Stefan Bogdanescu

Our network