skip to Main Content

Today I installed laravel 6.x version for a new project.

I have PHP 7.3 in my system so laravel 6 was successfully installed.

Then I run this command to set the Auth UI for VueJS.

artisan ui vue —auth

along with this command:

composer require laravel/ui --dev

But when I checked my login page, it was just an html skeleton.

I checked over the internet and found a solution and tried to run this command,

npm run dev

But still am getting an ugly login page without css and Js files. I checked for CSS and JS files but found no solution.

Anyone please help and tell me how can I setup the front end scaffolding.

Thanks in advance

3

Answers


  1. Do one thing,

    1) Create app.css and put into project_name/public/css/

    2) Create app.js and put into project_name/public/js/

    I believe it will work.

    If not, make sure you have used these commands before.

    npm install
    npm run dev
    

    Thanks.

    Login or Signup to reply.
  2. The command to implement Auth is as follows:

    composer require laravel/ui
    php artisan ui vue --auth
    

    If your Login and Register page only shows plain HTML. And CSS is not loading properly then run this two command:

    npm install
    npm run dev
    

    OR

    Simply you’ve to follow this two-step.

    composer require laravel/ui
    php artisan ui:auth
    
    Login or Signup to reply.
  3. This will solve your problem for sure!

    Check if your npm install shows any deprecation error,
    if shows then go to nodejs official site https://nodejs.org/en/ and download and install latest one in your system.

    Then in your terminal run:

        npm install  
        npm run dev 
    

    That’s it.

    In your laravel public folder, css and js should have shown after that npm run dev command.
    Now your login and register page should be nice looking as expected.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search