Skip to content

Releases: hotwired-laravel/turbo-laravel

0.2.0

08 Feb 02:34
Compare
Choose a tag to compare

Removed

  • The domId method was removed from the TurboFacade. Prefer using the namespaced helper function dom_id instead

Changed

  • The response()->turboStreamView() now has an alternative syntax and accepts the view name and a second parameter for the view data when using this syntax. For IDE users, I would recommend using turboStreamView(view()) for better auto-completion, but the new syntax might feel better
  • The documentation was updated and moved to a docs/ folder (still using simple markdown files, though)
  • Refactored the route redirection
  • Added a new @domclass helper, which can also be used to generate DOM classes from Eloquent Models

Added

  • Adds test to solidify that soft-deletes will be handled as regular deletes. I thought this could be handled differently, but it should really be treated like a regular delete and in applications where you need to handle it differently (like updating the model on the page with a deleted badge or something instead of removing it) you can implement that on the {resource}/turbo/deleted_stream.blade.php view.

0.1.2

31 Jan 21:57
Compare
Choose a tag to compare

Changed

  • Changed the @hotwired/turbo dependency to require ^7.0.0-beta.4 when installing the package (see 3c1a695)

0.1.1

31 Jan 21:56
Compare
Choose a tag to compare

Changed

  • Guessed redirect route keeps the query params when redirecting. This is useful when you have the form rendering on different frames, depending on where it was requested from (see 6a84341)

0.1.0

31 Jan 21:54
Compare
Choose a tag to compare

Removed

  • Removes unnecessary methods from the Brodcasts trait. Those methods were mainly placeholders and already implemented on the TurboStreamModelRenderer. They can still be overwritten by the model that uses the trait (and also by models that don't use the trait) (see b79a073)

Fixed

  • Fixes checking for turbo stream headers. It was not using the constant in the Turbo class (see 61d19b1)

0.0.5

19 Jan 04:27
Compare
Choose a tag to compare

Added

  • Adds the Turbo Alpine Bridge when using Jetstream #6

Changed

  • Made Stimulus option by passing the --stimulus flag to the turbo:install command, since we can use either that or Alpine
  • Made some tweaks to reuse the same asset stubs for plain and jetstream Laravel installs (with and without Stimulus too)

0.0.4

17 Jan 02:45
Compare
Choose a tag to compare

Added

  • DOM ID generation now strips out only the root namespaces of the model's FQCN. The root namespaces are configurable, so if anyone is using non-conventional namespaces, they should add their namespaces to the turbo-laravel.models_namespace config key. This way, we will respect nested-namespaces for models inside a sub folder (App\\Models\\Account\\User will generate account_user_id for existing instances and create_account_user for new instances, for example)

Changed

  • DOM ID generation now returns create_{$resource} instead of {$resource}_new for new model instances (still uses the prefix)

0.0.3

17 Jan 02:43
Compare
Choose a tag to compare

Added

  • Adds a namespaced dom_id function that can be used outside of Blade views.

0.0.2

15 Jan 17:03
Compare
Choose a tag to compare

Fixed

  • Fixes the @domid generation for new model instances (8726d37)