Search
 
SCRIPT & CODE EXAMPLE
 

PHP

asset not working in laravel

Add this in your .htaccess file

<IfModule mod_rewrite.c>
    <IfModule mod_negotiation.c>
        Options -MultiViews
    </IfModule>

    RewriteEngine On

    RewriteCond %{REQUEST_FILENAME} -d [OR]
    RewriteCond %{REQUEST_FILENAME} -f
    RewriteRule ^ ^$1 [N]

    RewriteCond %{REQUEST_URI} (.w+$) [NC]
    RewriteRule ^(.*)$ public/$1 

    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^ index.php
</IfModule>
Comment

asset function in laravel not working

php artisan cache:clear
php artisan route:cache
php artisan config:cache
php artisan view:clear
Comment

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);
    }
}
Comment

PREVIOUS NEXT
Code Example
Php :: how remove column in migration laravel 
Php :: php sort by key 
Php :: how to check if query is successfully inserted laravel 
Php :: php tutorial 
Php :: laravel rate limit 
Php :: laravel check if environment is production 
Php :: how do i use $variables as values in php 7 mysqli insert 
Php :: do_shortcode not working 
Php :: php xml parser 
Php :: laravel relation with limit 
Php :: laravel datatables 
Php :: auto reload for laravel 
Php :: is legged in wodpress 
Php :: phpmyadmin export database 
Php :: wp php blog info image 
Php :: php glob sort by unsigned int 
Php :: wordpress highlight text excerpt 
Php :: php round function Passing parameters with mode. 
Php :: create resource controller in admin folder laravel 
Php :: laravel swagger 
Php :: Regullar date format for php 
Php :: include navbar or part in layout in laravel blade template 
Php :: sort relation model count yii2 
Php :: laravel copy image 
Php :: php draw line pixel 
Php :: laravel downgrade php version 
Php :: php check if type is mysqli_result 
Php :: smtp_port" setting in php.ini or use ini_set() 
Php :: check url parameter if not redirect wordpress 
Php :: selecting data from two tables in database php 
ADD CONTENT
Topic
Content
Source link
Name
1+1 =