So Many people confused after removing the public from URL coz of CSS and js file not found on console message like 404 not found.so I am giving you the Best and easy solution for my friends.
No Need This type changes for change asset path - laravel
1) There is no need to modify the Vendor folder of the asset method
2) There is no more need to write one by one public into each and every link and script into the laravel projects.
3)No, override the method of an asset from vendor or nothing another provider creation for it overrides it
1) goes to .env file write like below i write
ASSET_URL = 'http://localhost/laravel/public'
above syntax for local, you can write this syntax for any abc.com - 'abc.com/public'
2)goes to the Config/app.php file
find asset_url into your file and replace this like below
'asset_url' => env('ASSET_URL'),
That's it.
Happy Coding.
If you like this blog change asset path - laravel you can like and share and comment also.
Thank you.
No Need This type changes for change asset path - laravel
Related Link: Composer update killed/out of memory
1) There is no need to modify the Vendor folder of the asset method
2) There is no more need to write one by one public into each and every link and script into the laravel projects.
3)No, override the method of an asset from vendor or nothing another provider creation for it overrides it
So I am explaining to you that is an easy solution just follows before steps for change asset path - laravel
1) goes to .env file write like below i write
ASSET_URL = 'http://localhost/laravel/public'
above syntax for local, you can write this syntax for any abc.com - 'abc.com/public'
2)goes to the Config/app.php file
find asset_url into your file and replace this like below
'asset_url' => env('ASSET_URL'),
That's it.
Happy Coding.
If you like this blog change asset path - laravel you can like and share and comment also.
Thank you.
Thanks Man :))
ردحذفإرسال تعليق