Answers for "asset function in laravel"

PHP
2

laravel asset

// To access laravel assets
asset('sp-icon/Vodacom-Original.svg')

// To echo the value use braces
{{ asset('you-are-in-public/your-file-name') }}
Posted by: Guest on September-08-2021
0

asset function in laravel not working

php artisan cache:clear
php artisan route:cache
php artisan config:cache
php artisan view:clear
Posted by: Guest on May-03-2021
0

asset function in laravel not working

if (! function_exists('asset')) {
    /**
     * Generate an asset path for the application.
     *
     * @param  string  $path
     * @param  bool    $secure
     * @return string
     */
    function asset($path, $secure = null)
    {
        return app('url')->asset("public/".$path, $secure);
    }
}
Posted by: Guest on May-03-2021

Browse Popular Code Answers by Language