Glenn Jacobs
Glenn Jacobs
> > We've used the Laravel Actions package before, in fact it was used in v1 of GetCandy. However, we decided against it for v2. > > Curious why you...
Yeah, a factory class is what I had in my head. So you can register the model overrides from anywhere and then easily load the correct one.
Maybe it could be that you put something like this in your AppServiceProvider... ```php use GetCandy\Facades\ModelFactory; use App\Models\Product; ModelFactory::register('Product', Product::class); ``` And then to use the model, something like ```php...
Could even add autoloading namespaces, e.g. ```php use GetCandy\Facades\ModelFactory; ModelFactory::addNamespace('GetCandy\Core\Models'); ``` Would just need to consider priority of loading if more than one namespace added.
That is exactly it, swapping all the models out would be a big chore, hence we're not doing it right now. If the trait can work, it might be an...
I think this is definitely needed. @alecritson are we happy this is safe enough to do when it comes to updates, etc?
> That’ll work for the tests, but does it not need registered to be picked up in real world usage? I don't think so, the package registers itself with Laravel...
@alecritson can you fix the conflicts? :-)
Closing this, as it's not longer relevant with our plans to move to Filament v3.
Having tested the performance and flexibility of Filament tables, we've decided that they are not suitable for this project. This isn't a dig at Filament, we ❤️ Filament, but this...