Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

jher's avatar
Level 1

How to Register command in Laravel 11 without accessing the database table

Hello I am new to using task scheduling in laravel 11, When I registered my command in Laravel 10 in the Kernel.php it runs successfully. But when I tried to register my command on the new Laravel 11 project in the console.php(Since Kernel.php is no longer included in the app/Console) Schedule::command('email:send-scheduled')->everyTenSeconds();, I received and error response about "Illuminate\Database\QueryException" even though I am not querying/storing any data in the database.

0 likes
1 reply
Snapey's avatar

look at the stack trace to understand where the problem originates

1 like

Please or to participate in this conversation.