Releases: hotwired-laravel/turbo-laravel
Releases · hotwired-laravel/turbo-laravel
0.3.1
0.3.0
Changed
- Breaking Change: The
Tonysm\TurboLaravel\TurboFacade
was renamed toTonysm\TurboLaravel\Facades\Turbo
- The LaravelBroadcaster was moved to the
Broadcasters
folder 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
Response
facade instead of theResponseFactory
as 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
@channel
blade 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.php
file so uses don't have to think about the convention (optional)
0.2.0
Removed
- The
domId
method was removed from theTurboFacade
. Prefer using the namespaced helper functiondom_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 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
@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
0.1.1
0.1.0
Removed
- Removes unnecessary methods from the
Brodcasts
trait. 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
--stimulus
flag to theturbo: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
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 generateaccount_user_id
for existing instances andcreate_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)