i do a script on root of my site. This script is lauch by cron. At the end of script, i try to send mail with the result of process by use Mail facade laravel, but it doens't work.
On the top of my script i put this:
require_once('../../vendor/autoload.php');
use Illuminate\Support\Facades\Mail;
and call
Mail::send(...)
but i have "a facade root has not been set".
Thanks for your help
Edit: I add theses lines
require __DIR__.'/../' . 'bootstrap/autoload.php';
$app = require_once __DIR__.'/../' . 'bootstrap/app.php';
$kernel = $app->make('Illuminate\Contracts\Http\Kernel');
$kernel->handle(;
$request = Illuminate\Http\Request::capture()
);
for replace
require_once('../../vendor/autoload.php');
Now i have no error message, but I don't receive the mail
Someone can help me