简体   繁体   中英

CSS don't work in (( Create )) Controller - laravel

I'm new in laravel. everything is ok when return view is in index function like below in Http/Controllers :

public function index() 
 { 
    return view('admin.post.post'); }

but when move the return view to create function like below :

public function create()
 {
   return view('admin.post.post'); }

page load without css and js and in inspect element no css is loaded in chrome's inspect element. i use laravel blade lauyout. Laravel : 5.6.21 PHP : 7.1.16

I have seen your codes.note these points:

  • Do not use Space as much as possible in the folder name. for example, convert Raw files to Raw_files

  • Place image files, CSS files and javascript files in the Public folder, so you can access them

  • Use the asset function to load CSS,javascript and images files. for example :

    <link rel="stylesheet" href={{asset('Raw_files/admin/dist/css/AdminLTE.min.css')}}">

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM