Closed spyric closed 8 years ago
Or I shouldn't to pass eloquent model to email view?
Yeh, don't do that. If you don't use the sync queue, you'll get a serialization error surely?
I have tried with database driver too... Same result
In database info stores like this:
So I think it's breaking change and this should eigher be fixed (I tried to do it my self but didn't find a way to fix it) or be mentioned in upgrade docs
I'm saying why doesn't it crash on L5.2?
I think because Taylor has changed way to serialization of data.
Here how task looks in Laravel 5.2
So I think that in 5.2 ::entity::|App\\User|1
was replaced by object after query to database. In 5.3 we are getting plain object that is not associaded with model
In 8952983 were removed functions:
Almost all the time we use Eloquent model inside the Email template files. So now we will need to move to arrays (when using queues)?
thank you
@huglester I hope no, and @taylorotwell will approve my pull request and all will work like before, because I very often use Eloquents mutators in emails and it's very helpfull.
Also if you will use Mailable way, models will be serialized. Two similar ways and two different results for one action . It's something strange, imho
Fixed by Taylor
Here a code that works normal in laravel 5.2
in emails/new_employee.blade.php in 5.2 you will get an Eloquent model, but in 5.3 you will get an array with attributes.
Is it normal behaviour? Or I shouldn't to pass eloquent model to email view?