JokerFan JokerFan - 5 months ago 62
CSS Question

CSS not loading in Laravel 5.2

Situation:

I'm creating a web application using Laravel, but for the moment CSS that i created aren't loading.

Folder Structure

enter image description here

Laravel Version

Laravel Framework version 5.2.36

master.blade.php code

<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>@yield('title')</title>
<link rel ="stylesheet" href= "{{ URL::secure('src/css/main.css') }}">
@yield('styles')
</head>
<body>
@include('includes.header')
<div class="main">
@yield('content')
</div>
</body>
</html>

Answer

Write like this:

<link rel ="stylesheet" href= "{{ asset('src/css/main.css') }}">
Comments