i have read here but it does not seem to be quite what I am looking for
I am trying to use
Auth::user() from within wordpress functions.php
I am using corcel to call wordpress from within laravel
but the opposite, calling laravel from within wordpress seems a bit more tricky.
When I do
require_once __DIR__.'/../../../mylaravel/bootstrap/autoload.php';
$app = require_once __DIR__.'/../../../mylaravelbootstrap/app.php';
use Illuminate\Support\Facades\Auth;
i get
FATAL ERROR: UNCAUGHT RUNTIMEEXCEPTION: A FACADE ROOT HAS NOT BEEN SET. IN /VAR/WWW/HTML/FOO.LOCAL/MYLARAVEL/VENDOR/LARAVEL/FRAMEWORK/SRC/ILLUMINATE/SUPPORT/FACADES/FACADE.PHP ON LINE 234
what is the correct way to initialize laravel from outside of laravel context?
I am trying to call laravel from wordpress, laravel is a subfolder installation of the wordpress installation, and does not know about its existence.
Basically:
/VAR/WWW/HTML/FOO.LOCAL/ <- is the wordpress installation
/VAR/WWW/HTML/FOO.LOCAL/MYLARAVEL <- is where laravel is
from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2kF8JYw
via IFTTT
Aucun commentaire:
Enregistrer un commentaire