New

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

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
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...

648,266,899 9,701
laravel/framework

The Laravel Framework.

604,216,237 34,982
laravel/tinker

Powerful REPL for the Laravel framework.

512,508,631 7,443
laravel/serializable-closure

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

429,221,767 607
nunomaduro/collision

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

407,699,310 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