Home url, url for link, url for css & js & for images in laravel

Home url, url for link, url for css & js & for images in laravel

To include external CSS and JavaScript files in a Laravel application, you can use the asset helper function. For example, to include a CSS file, you can use the following code in your blade template

A.  Home Url

{{URL::To('system')}} 
url('/');

B.  Url for Css, Js & Images 

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

C.  Storage Path : 

<?php
  $path = asset('storage/uploads/document/abvatar_1716443528.jpg');
?>

php artisan storage:link

<img src="{{$path}}">

C.  Image url : 

<img src="{{ asset('uploads') }}/{{$d->thumbnail}}" width="100px" height="80px" />

D.  Base url : 

URL::to('/');

Leave a Reply