auth pages not getting css in laravel

ganesh picture ganesh · Sep 26, 2019 · Viewed 19.2k times · Source

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.

Answer

Habib Rayan picture Habib Rayan · Sep 26, 2019

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

for help see this video: https://www.youtube.com/watch?v=hOYW3jqh19I&t=9s