Last active
October 8, 2018 15:50
-
-
Save Denkong/d0ab370ae179d72616bd4c46f7580ab4 to your computer and use it in GitHub Desktop.
LARAVEL+REACT
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1) Устанавливаем Laravel | |
2) php artisan preset react - проект/resurser/js/app.js - точка входа | |
3) npm install - устанавливаем зависимости | |
4) вводим данные БД в env и выполняем php artisan migrate и php artisan make:auth - Для создание регистрации | |
5) | |
<meta name="csrf-token" content="{{ csrf_token() }}"> | |
<link href="{{asset('css/app.css')}}" rel="stylesheet" type="text/css"> | |
<div id="example"></div> | |
<script src="{{asset('js/app.js')}}" ></script> | |
6) | |
npm run dev - компиляция | |
npm run watch - слежка за изменениями | |
7)ДЛЯ возможности использования ES6 нужно использовать babel | |
см.https://medium.com/@kallolpratim/how-to-configure-es6-with-laravel-react-using-babel-e936ad4d8ca5 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment