Releases: hotwired-laravel/turbo-laravel
Releases · hotwired-laravel/turbo-laravel
0.4.0
0.3.2
0.3.1
0.3.0
Changed
- Breaking Change: The
Tonysm\TurboLaravel\TurboFacadewas renamed toTonysm\TurboLaravel\Facades\Turbo - The LaravelBroadcaster was moved to the
Broadcastersfolder and an interface was extracted. I was thinking of adding a fake broadcaster, but didn't quite work - Response macros are now bound to the
Responsefacade instead of theResponseFactoryas the documentation states - [internal] Changes the test routes registration (using Orchestra TestBench
Added
- Adds a
turbo_channel(Model $model)function that generates the broadcasting channel for a specific model using the package conventions (optional) - Adds a
@channelblade directive to be used on views to generate the broadcasting channel name for a given model (optional) - Adds a
turbo_channel_auth(string $className, string $wildcard)helper function to be used to generate a channel name for a given model to be used in theroutes/channels.phpfile so uses don't have to think about the convention (optional)
0.2.0
Removed
- The
domIdmethod was removed from theTurboFacade. Prefer using the namespaced helper functiondom_idinstead
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 usingturboStreamView(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
@domclasshelper, 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
deletedbadge or something instead of removing it) you can implement that on the{resource}/turbo/deleted_stream.blade.phpview.
0.1.2
0.1.1
0.1.0
Removed
- Removes unnecessary methods from the
Brodcaststrait. Those methods were mainly placeholders and already implemented on theTurboStreamModelRenderer. 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
Added
- Adds the Turbo Alpine Bridge when using Jetstream #6
Changed
- Made Stimulus option by passing the
--stimulusflag to theturbo:installcommand, 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
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_namespaceconfig key. This way, we will respect nested-namespaces for models inside a sub folder (App\\Models\\Account\\Userwill generateaccount_user_idfor existing instances andcreate_account_userfor new instances, for example)
Changed
- DOM ID generation now returns
create_{$resource}instead of{$resource}_newfor new model instances (still uses the prefix)