Using Laravel Facades outside Laravel
问题 I have a Laravel application which I use as an API to a much larger application built in Joomla. I really love using Laravel and decided to use Eloquent within the Joomla application. I got this working by importing the bootstrap\autoload.php file in the Laravel application and creating a Capsule require JPATH_ROOT.'/../laravel_app/bootstrap/autoload.php'; $capsule = new Capsule(); $config = new JConfig(); $capsule->addConnection([ 'driver' => 'mysql', 'host' => $config->host, 'database' =>