Closed shimberger closed 10 years ago
Thinking about this, it's something I've actually overlooked. I'll be looking into making this change in the near future. The proposed config structure would be something like you suggested except not an array:
'multi' => array(
'user' => array(
'driver' => 'eloquent',
'model' => 'Models\User',
'reminder' => 'email.user-reminder'
),
'admin' => array(
'driver' => 'eloquent',
'model' => 'Models\Admin',
'reminder' => 'email.admin-reminder'
)
),
Thank you so much. That makes sense. To be honest I didn't spent too much time proposing my structure (roughly the time it took to copy & paste ;)). If there is any way I can help please let me know.
It's a relatively quick fix so I should be able to do it in no time. Depends if I get a break from work, but I'll try and implement it asap.
No worries about the structure, all I needed was the suggestion :)
In the meantime of this feature, you can use this little trick :
@if($user instanceof Admin)
@include('your.custom.admin.reminder', compact('token', 'user'))
@elseif($user instanceof User)
@include('your.custom.user.reminder', compact('token', 'user'))
@endif
Yeah, I haven't had chance to look further at this, sorry. If somebody would like to make a PR I can take a look?
It would be nice to have completely different email templates. Would it be possible to add a key to the different providers e.g.:
I would be willing to work on this but my experience with Laravel is limited so I don't know how easy this would be. A starting hint would be nice.