Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

auth pages not getting css in laravel

I am beginner to laravel. I have created project. And I have run following commands to it.

composer require laravel/ui --dev
npm install
npm run dev
php artisan ui vue
php artisan ui vue --auth

after this command I get Login and Register menus on my welcome page. Now my laravel welcome page loads properly. But when I click on login it shows plain html. I serached and checked app.blade.php for links of css and js. It looks fine. layouts/app.blade.php having following links

<link href="{{ asset('css/app.css') }}" rel="stylesheet">
<script src="{{ asset('js/app.js') }}" defer></script>

Where should be the problem? Why Login and Register not getting css, when welcome page gets css? Please guide.

like image 943
ganesh Avatar asked Sep 04 '25 16:09

ganesh


1 Answers

Step 1:

  • Download nodejs
  • Install nodejs in your pc

Step 2:

  • then open your project root and command
  • composer require laravel/ui
  • php artisan ui vue --auth
  • npm install
  • npm run dev

After npm command it will generate node_module folder inside your project remove that folder.

npm command only for .css and .js file.

like image 116
Habib Rayan Avatar answered Sep 07 '25 16:09

Habib Rayan