@danimohamadnejad I'm not sure what are you trying to do but if you want to interact with database using terminal, you can use Tinker like this:
php artisan tinker
User::get()
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I am running a php file through terminal like:
php file.php. the file is inside of laravel 11 project root directory.
How can I boot laravel 11 app inside of this file manually so that I can use laravel different modules like Eloquent for example?
Something like:
User:get() ?
Please or to participate in this conversation.