FatalThrowableError
Call to a member function toArray() on null
查詢的數據爲null 不能直接對這樣的數據使用->toArray();
PaperInfo::select(['id', 'question', 'correct', 'answer'])->where('paper_id', $paperId)->first();
Call to a member function toArray() on null
查詢的數據爲null 不能直接對這樣的數據使用->toArray();
PaperInfo::select(['id', 'question', 'correct', 'answer'])->where('paper_id', $paperId)->first();
解決辦法; 在yarn 後面加 --no-bin-links 如 yarn install --no-bin-links