dockeradz's avatar

prototyping on command line

Maybe there is a better way to do this. I create scripts to prototype or test code in the app. Usually this is testing classes or doing a one off maintenance task. I would like to have a script to call code in a controller which includes calls to a Model. When I do this from a script from the command line I get:

Fatal error: Uncaught Error: Call to a member function connection() on null in .../vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php:1818

I'm assuming this is due to the app not being booted properly. Assuming that is the issue is there a way to do this from the command line, or is there a better way to prototype this code?

0 likes
0 replies

Please or to participate in this conversation.