tequilarapido/javascript-blade

Simple and straightforward Blade directive to passe data to javascript


Keywords
javascript, laravel, laravel-package
License
MIT

Documentation

Simple and straightforward Blade directive to pass data to javascript

Contents

Installation

You can install the package using composer

$ composer require tequilarapido/javascript-blade

Add to application providers :

Tequilarapido\JavascriptBlade\JavascriptBladeProvider::class

Usage

@javascript('i18n', $translations)

// Produces

<script>
window.App || window.App = {}; App.i18n = '<json encoded translations>';
</script>

Changelog

Please see CHANGELOG for more information what has changed recently.

Testing

$ composer test

Security

If you discover any security related issues, please email :author_email instead of using the issue tracker.

Contributing

Please see CONTRIBUTING for details.

Credits

License

The MIT License (MIT). Please see License File for more information.