PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Wednesday, November 16, 2022

[FIXED] How to configure AdminLTE 3 javascript links with laravel 6?

 November 16, 2022     adminlte, laravel, laravel-6     No comments   

Issue

I configured AdminLTE with laravel 6. I am getting error 404 in console. I used NPM to install adminLTE, my adminlte files are in node_modules folder. Kindly look at the link if I am doing it right.

File structure I have

|-> node_modules

|-> resources

     |-> views

          |-> admin

                |-> users

                      |->index.blade.php

A link from index.blade.php

<script src="../../node_modules/admin-lte/plugins/jquery/jquery.min.js"></script>

Solution

Why are you doing like this? Your jquery and other necessary plugins are already included in app.js file. Just run npm run dev. And then include the public js/app.js to your index.blade.php file.
If you need extra plugins just include them in bootstrap.js file.

Note:If your app.js is empty just run composer require laravel/ui.It will create app.js and bootstrap.js with necessary configraton.



Answered By - Nayeem
Answer Checked By - Terry (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing