1
我想讓我的路線訪問公共文件夾,因爲我試圖使用laravel作爲API和角度作爲前端。我從Laravel 5.2視圖設置爲公共文件夾
'paths' => [
realpath(base_path('resources/views')),
],
在我的公用文件夾改變從config文件夾視圖文件要
'paths' => [
realpath(base_path('public/views')),
],
我創建了一個文件夾視圖,並放置在一個稱爲test.html 現在
Route::get('/',function(){
return view('test.html');
});
文件
它顯示錯誤
in FileViewFinder.php line 137
at FileViewFinder->findInPaths('test.html', array('C:\xampp\htdocs\customer_portal\public\views')) in FileViewFinder.php line 79
at FileViewFinder->find('test.html') in Factory.php line 165
at Factory->make('test.html', array(), array()) in helpers.php line 779
at view('test.html') in routes.php line 36
at RouteServiceProvider->{closure}()
你知道我在做什麼錯嗎?
請不要編輯解決方案爲您的問題。相反,請將其作爲下面的單獨答案發布。請參閱http://stackoverflow.com/help/self-answer。 – Matt