How to use ReactJs in Laravel | EasyCode Sardar
First of all let me install laravel from npm command that we will grab from laravel.com official website.
I will install laravel via Composer Create-Project.
composer create-project --prefer-dist laravel/laravel ProjectName
After installing laravel we will create new database in our phpmyadmin name anything as you want.
Open any coder editor you like and add this laravel project as workplace. and open file called "welcome.blade.php".
file path should be:
ProjectName/resources/views/welcome.blade.phpIn welcome blade file you have add/enable your js file for reactjs. and you will give a reactjs component id to any div for display reactjs data. my code is below:
ProjectName/resources/js/News.js