Laravel 5 InvalidArgumentException in FileViewFinder.php line 137: View [.admin] not found

后端 未结 7 1056
野趣味
野趣味 2021-02-19 07:32

This is student.php and my function for admin:

 public function admin(Request $request){

       if($request->isMethod(\'get\')){
       retu         


        
7条回答
  •  南旧
    南旧 (楼主)
    2021-02-19 07:59

    A view should an extension .blade.php.

    So your file that has the admin form should have the name admin.blade.php

    Note :

    If you have the view under any sub directory like somefolder/admin.blade.php

    Then you should do like this

    return \View::make('somefolder/admin');

    Learn more about templating here :)

提交回复
热议问题