Skip to content

Instantly share code, notes, and snippets.

@Denkong
Last active October 8, 2018 15:50
Show Gist options
  • Save Denkong/d0ab370ae179d72616bd4c46f7580ab4 to your computer and use it in GitHub Desktop.
Save Denkong/d0ab370ae179d72616bd4c46f7580ab4 to your computer and use it in GitHub Desktop.
LARAVEL+REACT
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