I need to access to my app services in a simple php script. I don't want to create a HTTP/Console kernel. If the following is the content test.php
file in the app root, what else should I call to make it working?
require_once __DIR__ . "/vendor/autoload.php"; //composer
$app = new Illuminate\Foundation\Application(realpath(__DIR__));
$app->boot(); // not sure about this
$app->make('db')->table('user')->get()->toArray();
Currently I get the following error:
PHP Fatal error: Uncaught ReflectionException: Class db does not exist in foo\vendor\laravel\framework\src\Illuminate\Container\Container.php:752
Fatal error: Uncaught ReflectionException: Class db does not exist in foo\vendor\laravel\framework\src\Illuminate\Container\Container.php:752