This is a sample project showing how to create Rest API using Laravel 8 CREATING A NEW LARAVEL APPLICATION – SAMPLE REST API Steps:
- Open the terminal and CD into your desired directory within WAMP server, for instance: C:\wamp\www\githubprojects
- Type the following command to create new Laravel application:
Composer create-project Laravel/Laravel projectone
- CD into the newly created project in the terminal, for instance:
C:\wamp\www\githubprojects\githubprojectone
- To run the application, type this:
Php artisan serve This will output response like this Starting Laravel development server: http://127.0.0.1:8000
-
Open the browser and type the above url.
-
You can also access the website normally by typing the web address like this:
http://localhost/githubprojects/githubprojectone/public/
- To prevent exposing the files in the root directory in WAMP, a little adjustment will be made. Rename the server.php as index.php and cut the .htaccess in the public folder and paste it into the root directory