Skip to content

Simple and straightforward Blade directive to passe data to javascript

License

Notifications You must be signed in to change notification settings

tequilarapido/javascript-blade

Repository files navigation

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.

About

Simple and straightforward Blade directive to passe data to javascript

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages