otiteca971/laravel-elm

This package is abandoned and no longer maintained. No replacement package was suggested.

Render your Elm programs in Laravel --- forked from tightenco/laravel-elm

2.3.1 2019-01-15 13:26 UTC

This package is auto-updated.

Last update: 2021-12-15 21:19:42 UTC


README

So you want to render an elm program inside a laravel application?

This package makes it easy.

Recommended: The partner Javascript library with the same name, npm i --dev laravel-elm

https://github.com/loganhenson/laravel-elm

Installation

Begin by installing this package through Composer.

{
    "require": {
        "tightenco/laravel-elm": "~1.0"
    }
}

And add the service provider and facade alias to your application config.

config/app.php

...
'providers' => [
    '...',
    Tightenco\Elm\ElmServiceProvider::class
];
...
...
'aliases' => [
    '...',
    'Elm' => Tightenco\Elm\ElmFacade::class,
];

You may then use the helpful Elm facade in your controllers.

use Elm;
...
public function index()
{
    return view('home', [
        'example' => Elm::make('example', [
            'name' => Auth::user()->name
        ])
    ]);
}

License

View the license for this repo.