Skip to content
Advertisement

How to connect internal Bootsrap 5.2 with laravel 7

Hey i still learning laravel framework and i try to connect my bootstrap v.5.2 with my laravel v.7 project but it cant connect, i store css and js folder on bootsrap folder in the same level as app, config, database public, etc. and i already tried to connect it with the code:

<link href="bootstrap/css/bootstrap.min.css" rel="stylesheet" >

<script src="bootstrap/js/bootstrap.min.js"></script>

but it still cant connect?

Advertisement

Answer

Put Your bootstrap files (i.e bootstrap.min.css and bootstrap.min.js) in a new folder inside public.

Example:

public/css/bootstrap.min.css
public/js/bootstrap.min.js

Then to use them in blade:

<link href="{{ asset('css/bootstrap.min.css') }}" rel="stylesheet">
<script src="{{ asset('js/bootstrap.min.js') }}"></script>
User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement