morningtrain/laravel-react

A context helper package for Laravel
2,633
Install
composer require morningtrain/laravel-react
Latest Version:2.3.0
PHP:^7.4|^8.0
License:GPL-3.0-only
Last Updated:May 8, 2023
Links: GitHub  ·  Packagist
Maintainer: morningtrain

Laravel React

React for Laravel

Install

Via Composer

$ composer require morningtrain/laravel-react

Usage

View

In your controller:

return view('your_view')->with([
    'component' => 'Welcome',
    'props'     => [
        'title' => 'From controller',
    ],
    'options'   => [],
]);

And in your view:

@react()

Or straight from view:

@react([
    'component' => 'Welcome',
    'props' => [
        'title' => 'From view',
    ],
    'options' => [],
])

Credits

Related Packages

doctrine/dbal

Powerful PHP database abstraction layer (DBAL) with many features for database s...

641,106,524 9,700
laravel/framework

The Laravel Framework.

593,882,149 34,959
laravel/tinker

Powerful REPL for the Laravel framework.

502,645,077 7,441
laravel/serializable-closure

Laravel Serializable Closure provides an easy and secure way to serialize closur...

418,291,778 609
nunomaduro/collision

Cli error handling for console/command-line PHP applications.

394,964,158 4,660

Version History

Version Released PHP Laravel License
2.3.0 ^7.4|^8.0 ^7.0|^8.0|^9.0|^10.0 GPL-3.0-only
2.2.0 ^7.4|^8.0 ^7.0|^8.0|^9.0 GPL-3.0-only
2.1.2 ^7.4|^8.0 ^7.0|^8.0 GPL-3.0-only
2.1.1 ^7.4|^8.0 ^7.0|^8.0 GPL-3.0-only
2.1.0 ^7.4 ^7.0|^8.0 GPL-3.0-only