vendredi 21 décembre 2018

Fatal error: Uncaught RuntimeException: A facade root has not been set

I want to create restore.php file for laravel script. I added restore file on public folder. and when I want to use artisan command on this file, show me this error.

( ! ) Fatal error: Uncaught RuntimeException: A facade root has not been set. in C:\wamp64\www\myscript\vendor\laravel\framework\src\Illuminate\Support\Facades\Facade.php on line 218 ( ! ) RuntimeException: A facade root has not been set. in C:\wamp64\www\myscript\vendor\laravel\framework\src\Illuminate\Support\Facades\Facade.php on line 218

restore.php:

<?php
 use Illuminate\Support\Facades\Artisan;


include '../vendor/autoload.php';

Artisan::call('down', ['--message' => 'Restore Mode']);

Note: I do not want to use Laravel controller for restore database because maybe script was down.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire