his is the correct way// that skips mutators $model->getOriginal('name');https://laravel.com/api/5.2/Illuminate/Database/Eloquent/Model.html#method_getOriginalgetOriginal() doesn't just skip mutators, it also returns the "original" value of…
Dropping in Laravel 5.3 is an easy way to compare if two model instances you’ve got represent the same record in your database. The new is()
method checks to see if the model keys, table and connection names match up.
if (auth()->user()->is($post->author)) {
// The currently authenicated user is the author of the post.
}
For more information, see the relevant pull requests: #14281 and #14316.