laravel 5.5 assets

0

Hej,
nowiutka paczka Laravel 5.5.
w katalogu resources są:

  1. assets
    1.1. js
    1.2 saas

dodałem sobie katalog css i na widoku

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

nie działa. Dlaczego? za chwilę będę podpinał kupny panel admina i mam wątpliwości gdzie wszystko trzymać. Dla grafik stworzyłbym folder img i tam wszytko zapakował. Ale na razie nawet css sie chodzi.

0

zacytuję SO

you have to put your css, js, images etc in the public folder. The root of the asset method is the public folder so if you have a public/css/style.css file, you can get its path by using asset('css/style.css'). The asset folder is for storing less or sass files which have to be compiled into a css file.

3
The asset function generates a URL for an asset using the current scheme of the request (HTTP or HTTPS):

$url = asset('img/photo.jpg');

asset() to funkcja, helper.

2

nie użyłeś "npm run", poczytaj o korzystaniu z webpacka w laravelu

1 użytkowników online, w tym zalogowanych: 0, gości: 1