In this video, we are going to install Laravel 9 for the backend of our React App. We will create GET Users API that we will use to show the users from the database on our React App.
1) Create Laravel 9 Project :-
Run below command to create Laravel 9 Project with name laravel9.
composer create-project laravel/laravel laravel9
2) Create Database laravel9
3) Connect Database with .env file of laravel9 Project
4) Run "php artisan migrate" command to populate the database with default laravel tables including users table
5) Insert few users either from PHPMyadmin or Laravel Seeder commands.
6) Create APIController in laravel9 Project
php artisan make:controller APIController
7) Create Route in api.php file
Route::get('users','App\Http\Controllers\APIController@getUsers');
8) Create getUsers function :-
Create getUsers function at APIController to get all users from users table and return with json.
9) Include User Model :-
Don't forgot to include User Model at APIController
Our Get API is ready to fetch all the users that we can either run in Postman, VSCode Thunder Bird or in any Browser as well.
►Laravel 9 Tutorial (Create Multi-Vendor E-commerce Website) - https://www.youtube.com/playlist?list=PLLUtELdNs2ZYTlQ97V1Tl8mirS3qXHNFZ
►Laravel 9 Playlist - https://www.youtube.com/playlist?list=PLLUtELdNs2ZYVb9lco6OnloSFyBLZU3tz
►Click here to subscribe for Laravel & other updates - https://www.youtube.com/stackdevelopers
Popular Stack Developers Series that can help you:-
►Laravel Tutorial for Beginners - https://www.youtube.com/playlist?list=PLLUtELdNs2ZaHaFmydqjcQ-YyeQ19Cd6u
►GIT Tutorial for Beginners - https://www.youtube.com/playlist?list=PLLUtELdNs2ZZVQ-dLOMFWvmCCduzJ8c6R
►Laravel API Tutorial - https://www.youtube.com/playlist?list=PLLUtELdNs2ZbcCsd4yAAiBU2L3ROREk8P
►Laravel Interview Questions - https://www.youtube.com/playlist?list=PLLUtELdNs2ZbzB_1Jdp_yFcORwOfWP8RU
►jQuery Tutorial - https://www.youtube.com/playlist?list=PLLUtELdNs2ZbMYoUA46GIonOH29KcjtxA
►Laravel Basic E-commerce Series - https://www.youtube.com/playlist?list=PLLUtELdNs2ZY5drPxIWzpq5crhantlzp7
►Laravel Dating Series - https://www.youtube.com/playlist?list=PLLUtELdNs2ZZrPUnxjlomErJfNvkyS6Hf
►Join this channel to get the complete source code of all series:
https://www.youtube.com/channel/UCExO2i-tLU1NyVZD6zOJQlw/join
Follow Stack Developers on Social Media to get updates and resolve your queries
►Like Facebook Page to get updates - http://facebook.com/stackdevelopers2/
►Join Facebook Group to resolve your queries - http://facebook.com/groups/stackdevelopers
►Follow on Instagram - https://www.instagram.com/stackdevelopers2/
►Follow on GitHub - https://github.com/stackdevelopers
#laravel9 #laravel9tutorial #laravel