- Home
- laravel
How To Remove Public From URL In Laravel 5.4 By CodersWorld
Date 13 May, 2017
Details :
Step 1: Rename the server.php in the your Laravel root folder to index.php
Step 2 : Copy the .htaccess file from public folder to your Laravel root folder
Step 3: Goto vendor / laravel / framework / src / Illuminate / Foundation
Inside Foundation folder open helpers.php
Step 4: Now change the asset() function like below code
function asset($path, $secure = null)
{
return app('url')->asset("public/".$path, $secure);
}
Step 5: You just need to add "public/". in path. now everything is done