A
A
antonio02262018-03-26 20:36:38
Laravel
antonio0226, 2018-03-26 20:36:38

How to pull layout on laravel?

Hello everyone… The task is to pull the layout on the lara. In my head I understand how it should be. I created a folder in the public directory, uploaded pictures, scripts and fonts there. Next, we created a folder in views and named it layouts.blade.php. I took out the header and footer there, the content was left empty. Created a route

Route::get('/', function () {
    return view('index');
});

in index.blade.php I wrote @extends('layouts.layout')
As a result, there is no layout, it displays only text without styles. In the same folder I created style.blade.php and wrote it there
<link rel="stylesheet" href="{{ asset('bootstrap/css/bootstrap.min.css') }}">
    <link rel="stylesheet" href="{{ asset('select2/select2.min.css') }}">
    <link rel="stylesheet" href="{{ asset('nprogress/nprogress.css') }}">
    <link rel="stylesheet" href="{{ asset('css/style.css') }}">

But the layout also flew, in the console it says that it cannot find the files. The files are in the public directory, what am I doing wrong?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question