Skip to content
This repository was archived by the owner on May 30, 2025. It is now read-only.

v0.14.9

Latest

Choose a tag to compare

@osmianski osmianski released this 14 Jan 09:55
· 2 commits to v0.14 since this release

Technology Stack Update

  • TailwindCSS is updated to 3.0
  • PHP 8.1 support
  • Apache support
  • Windows support

js() Helper Function

Use new js() helper function for passing options to JS controller in a Blade template:

<div data-messenger='{!! \Osm\js(['message' => 'Lorem ipsum ...'])!!}'>
    ...
</div>

In the JS controller, all passed options are put into the options property:

import Controller from "../../js/Controller";
import {register} from '../../js/scripts';

export default register('messenger', class Messenger extends Controller {
    get events() {
        return Object.assign({}, super.events, {
            'click': 'onClick',
        });
    }

    onClick() {
        console.log(this.options.message);        
    }
}); 

Related Releases