How to run laravel index.php file in main folder?
Hello Dev,
In shared hosting main domain we can't set domain path. it's run direct index.php file but our index.php file is in public folder. Now this moment we have to provide index.php file in main folder. then we are provide you best way how to run without public index.php file.
You have many question like how to run index.php file in main folder in laravel. how to give js and css file path in layout file. how to access server.php file index.php file. this all question you have to follow two steps.
First Rename File
First Rename "server.php" file to "index.php" file.
Second Cut Files and Folders
Then cut all file and folder from public folder remaining index.php and past all file and folder in main folder. then run project using following command
php -S localhost:8000
- How to Notifications With database Driver in Laravel 11?
- How to Send Email Via Notification in Laravel 11?
- How to Install and Configure Laravel 11 Debugbar?
- How to Like Dislike System in Laravel 11?
- How to Paginate a Model with Relationship in Laravel 11?
- Laravel 11 Upload Files to Amazon S3 Example
- Laravel 11 Send WhatsApp Messages Example
- Laravel 11 Rest API Authentication Using JWT Tutorial