0

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>
2
  • Why is there a src folder in your public folder? Commented Jun 23, 2016 at 9:11
  • Is it loading with asset like so <link rel ="stylesheet" href= "{{ URL::asset('src/css/main.css') }}">? Commented Jun 23, 2016 at 9:11

2 Answers 2

5

Write like this:

<link rel ="stylesheet" href= "{{ asset('src/css/main.css') }}">
Sign up to request clarification or add additional context in comments.

Comments

3

Another alternative:-

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

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.