AVI
AVI

Reputation: 5703

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>

Upvotes: 0

Views: 510

Answers (2)

Ravi Hirani
Ravi Hirani

Reputation: 6539

Another alternative:-

<link rel="stylesheet" href="{{ url('/') }}./src/css/main.css" type="text/css"/>

Upvotes: 3

Arnab Rahman
Arnab Rahman

Reputation: 1013

Write like this:

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

Upvotes: 5

Related Questions