Answers for "laravel asset path not working"

PHP
1

laravel not finding asset files in public directory

Add ASSET_URL=public in your .env file and run php artisan config:cache
Posted by: Guest on August-23-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