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 to show validation error in laravel blade 
Php :: How to check even or odd number in php 
Php :: how to calculate age in laravel 
Php :: how to use old for select in blade laravel 
Php :: findorfail laravel 
Php :: php if url contains 
Php :: whereNull in laravel 
Php :: wordpress loop permalink 
Php :: php remove null bytes from string 
Php :: grep only in php files 
Php :: get age with carbon in laravel 
Php :: serve php file 
Php :: create laravel project 8.16.1 
Php :: index.php wordpress 
Php :: php add hours to current date 
Php :: codeigniter last insert id 
Php :: date casting from datetime to d-m-Y laravel using cast 
Php :: close mysql connection in php 
Php :: wordpress disallow_file_edit 
Php :: php string cut first x characters 
Php :: order alphabetically wp php 
Php :: php string mayusculas 
Php :: array_unique 
Php :: get stock product woocommerce by id 
Php :: auth pages not getting css in laravel 
Php :: string to uppercase laravel 
Php :: define home url wp 
Php :: wordpress get fiture image 
Php :: hashing passwords in yii 1 
Php :: check table exists in db laravel 
ADD CONTENT
Topic
Content
Source link
Name
1+4 =