nova-mail icon indicating copy to clipboard operation
nova-mail copied to clipboard

When nova uses diff guard

Open nenads opened this issue 5 years ago • 4 comments

/** * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ public function sender() { return $this->belongsTo(config('auth.providers.users.model')); }

Should sender be same model provider that is used by nova guard ?

nenads avatar Dec 20 '19 15:12 nenads

something like this: $guard = config('nova.guard'); $senderModel = config('auth.guards.' . $guard . '.provider'); return $this->belongsTo(config('auth.providers.'. $senderModel .'.model'));

nenads avatar Dec 20 '19 16:12 nenads

@nenads thanks for your question. It seems like what you are wanting to do is use a different model for the sender than what is set as your base auth user model, correct?

brandonferens avatar Dec 20 '19 16:12 brandonferens

Yes. I gess quick fix it to get Nova guard provider. Maybe ideal is to have morph on sender to.

BR

On Fri, Dec 20, 2019, 17:18 Brandon Ferens [email protected] wrote:

@nenads https://github.com/nenads thanks for your question. It seems like what you are wanting to do is use a different model for the sender than what is set as your base auth user model, correct?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/kirschbaum-development/nova-mail/issues/27?email_source=notifications&email_token=AAN5LMGI6CIKZJ4H5IN2ZILQZTV7FA5CNFSM4J57UINKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEHNLI4Y#issuecomment-567981171, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAN5LMA3PWHNPI6NXOA3Y2TQZTV7FANCNFSM4J57UINA .

nenads avatar Dec 20 '19 23:12 nenads

We are working on a fix for this and may have it out next week, but as it is Christmas...

brandonferens avatar Dec 21 '19 00:12 brandonferens