https://github.com/morning-train/laravelreact
https://github.com/morning-train/laravelreact
Last synced: 10 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/morning-train/laravelreact
- Owner: Morning-Train
- License: gpl-3.0
- Created: 2019-03-19T13:43:20.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2023-05-08T05:10:28.000Z (about 3 years ago)
- Last Synced: 2025-08-19T05:23:29.514Z (10 months ago)
- Language: PHP
- Size: 37.1 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# Laravel React
React for Laravel
## Install
Via Composer
``` bash
$ composer require morningtrain/laravel-react
```
## Usage
#### View
In your controller:
``` php
return view('your_view')->with([
'component' => 'Welcome',
'props' => [
'title' => 'From controller',
],
'options' => [],
]);
```
And in your view:
``` php
@react()
```
Or straight from view:
``` php
@react([
'component' => 'Welcome',
'props' => [
'title' => 'From view',
],
'options' => [],
])
```
## Credits
- [Morning Train](https://morningtrain.dk/)