-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mutator issue - Property of non-object #78
Comments
Can you show the full stack trace |
Yep. I changed the name of the models to HotelsRequest and HotelsRequestAllotment, just fyi (And it's not an actual Request, it's just the name)
|
Any updates on this? A lot of the models I'm working with are using accessors to grab values and it's really a challange when trying to get the excel file. |
👀I've also run into this. |
Same issue here. |
I have also the same issue, Does anyone overcome this issue? |
Same here - any workaround would be great! |
Same problem here. @patrickbrouwers Do you have any ideas about how to solve this? |
Not really, haven't ran into it myself and don't have the time to dive into it. If anyone finds a fix, feel free to PR or if it's important you could consider getting support on a commercial basis https://laravel-excel.com/commercial-support |
I have also the same issue, Does anyone overcome this issue? |
Me too. Any idea if this will be looked into? |
No priority for me now, sorry. As mentioned before we can look into it on commercial basis. |
Not sure where the issue is, but I resolved it in a hacky way by setting the value of the getter... e.g. protected $appends = ['name']; public function getNameAttribute() { |
The same issue, any update on this ? |
I have two models. Car and Type. Car has a mutator getting the type name from the first relation of type. Every Car will always have at least one type relation.
public function getTypeAttribute() { return $this->types->first()->name }
This works perfectly fine on form, index etc. but when I want to perform an action to download the sheet, it tells me I'm trying to get Property of a non-object.
I'm not sure if it's because the package doesn't support mutator attributes or not.
The text was updated successfully, but these errors were encountered: