Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

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);
    }
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #asset #function #laravel #working
ADD COMMENT
Topic
Name
7+2 =