index.php page call outside of the public folder in Laravel project

Step 1 . Copy index.php in public folder

Step 2. paste in Laravel project folder

Step 3.  Open server.php file  Location :-  vendor\laravel\framework\src\Illuminate\Foundation\resources\server.php

 Edit in line no. 16

This :-

require_once $publicPath.'/index.php';

To this :-

require_once $publicPath.'\..\index.php';

Step 4. remove or rename index.php in public folder

Step 5. open index.php file Laravel project folder

Edit in line no. 34

This :-

require __DIR__.'/../vendor/autoload.php';

To this :-

require __DIR__.'/vendor/autoload.php';

AND

Edit in line no. 47

This :-

Before :-

$app = require_once __DIR__.'/../bootstrap/app.php';

To this :-

$app = require_once __DIR__.'/bootstrap/app.php';

Step 6. Now you can Run you Laravel project