lunarphp / lunar

An open-source package that brings the power of modern headless e-commerce functionality to Laravel.
https://lunarphp.io
MIT License
2.57k stars 338 forks source link

Extending media with Lunar #1971

Closed KonstantinDyulin closed 2 hours ago

KonstantinDyulin commented 3 hours ago

Expected Behaviour:

Extend my own model to use media

Actual Behaviour:

When i try save some media for model that use a Lunar HasMedia trait i get an error: Снимок экрана 2024-09-27 124838

Steps To Reproduce:

Install Livewire Starter Kit Add HasMedia Trait to User model Try to add media for that model Снимок экрана 2024-09-27 124657

glennjacobs commented 2 hours ago

This isn't really a Lunar question, it's more for Spaties Media Library. I would suggest seeking support there

https://spatie.be/docs/laravel-medialibrary/v11/introduction

KonstantinDyulin commented 1 hour ago

This isn't really a Lunar question, it's more for Spaties Media Library. I would suggest seeking support there

https://spatie.be/docs/laravel-medialibrary/v11/introduction

No this is seem like a lunar question, because if i associate model with default Spaties HasMedia interface and InteractWithMedia trait, it works

alecritson commented 1 hour ago

Using Spatie's default interface for your own custom models should be fine.