jonassiewertsen / statamic-livewire

A Laravel Livewire integration for Statamics antlers engine
83 stars 14 forks source link

RestoreCurrentSite Trait #51

Closed marcorieser closed 5 months ago

marcorieser commented 5 months ago

When using Livewire in a multisite setup the current site gets lost between requests. This seems a common issue so I thought it could be nice to have a solution directly in the addon.

Usage:

<?php

namespace App\Livewire;

class MyComponent extends Component
{
  use \Jonassiewertsen\Livewire\RestoreCurrentSite;
}
jonassiewertsen commented 5 months ago

I like this change!

Should we add some informations to the docs @marcorieser ?

marcorieser commented 5 months ago

I like this change!

Should we add some informations to the docs @marcorieser ?

👍🏻 will PR