New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

morningtrain/laravel-react

A context helper package for Laravel
2,644
Install
composer require morningtrain/laravel-react
Latest Version:2.3.0
PHP:^7.4|^8.0
Laravel:7 – 10
Older releases:5 · 6
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...

655,942,320 9,702
laravel/framework

The Laravel Framework.

617,629,957 34,997
laravel/tinker

Powerful REPL for the Laravel framework.

524,145,802 7,444
laravel/serializable-closure

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

442,489,569 607
nunomaduro/collision

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

418,503,470 4,663

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