Answers for "laravel assets url add public"

PHP
3

laravel get public path url

// Path to the project's root folder    
echo base_path();

// Path to the 'app' folder    
echo app_path();        

// Path to the 'public' folder    
echo public_path();

// Path to the 'storage' folder    
echo storage_path();

// Path to the 'storage/app' folder    
echo storage_path('app');
Posted by: Guest on November-08-2020
0

get public url as laravel asset() in jquery

$("select#lang").css("background-image",
  '{{ URL::asset('/images/flags/') }}' + $("select#lang").val() + '.png)');
Posted by: Guest on September-25-2020

Browse Popular Code Answers by Language