LoginSignup
4
0

More than 3 years have passed since last update.

51歳からのプログラム 備忘録 A facade root has not been set

Last updated at Posted at 2019-05-17

1行コード書いて、エラーと格闘。
でも楽しくてやめられない。
時間が掛かりすぎているけれど、楽しいから、まいっか。

色々いじっていたら
A facade root has not been set
というエラーが出た。

Facade.php:234が呼び出されたよう。
Handler.php:397

ヘルパーの397行目を参照すると

$paths=collect(config('view.paths'));
View::replaceNamespace('errors',$paths->map(function($path))

configのpaths配列を操作するコレクションインスタンスを生成してエラーチェックしてるよう。

そういえば、config以下に設置した、プログラムで必要な配列を纏め書きしたファイルをいじってたっけ。

でも、エラー内容が正確に分からないので、とりあえず、commandで、
php artisan serve
としてみたら

laravel>php artisan serve

In param.php line 34:
  syntax error, unexpected ',',expecting ']'

と返ってきた。
やっぱり配列を整理して記載したファイル(laravel/config/param.php)の34行目が犯人!
配列の書式を正しく直しておしまい。

またやりそうなので、備忘です。

4
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
0