Open x1mdev opened 6 years ago
Same issue.
[2017-11-24 11:03:14] local.ERROR: Call to undefined relationship [sender] on model [Nahid\Talk\Messages\Message]. {"userId":1,"email":"c2xxxx@zoho.com","exception":"[object] (Illuminate\Database\Eloquent\RelationNotFoundException(code: 0): Call to undefined relationship [sender] on model [Nahid\Talk\Messages\Message]. at /home/vagrant/store/vendor/laravel/framework/src/Illuminate/Database/Eloquent/RelationNotFoundException.php:34)
Please Help!
Same here when i try to get all the messages by User id and pass them to view.
$myMessages = Talk::getMessagesByUserId(Auth::user()->id); return view('messaging.list', compact('myMessages', 'myMessages'));
EDIT: Found The Solution for my case:
Added to UserModel
Check this Docs https://laravel.com/docs/5.1/eloquent#soft-deleting
Don't forget the new migration for the SoftDeletes...
Same issue. Kindly resolve.
If you dont want to use softdelete on your user model, then just add a dummy withTrash function in the user model: public function scopeWithtrashed($query) { return $query; }
Hi, i'm trying to implement Talk into my project but i'm getting this error:
This happens when I try to send a message to a user.
I could not find the issue in my project, so I installed a fresh nahid/talk-example and configured it as told.
The above error is copied from the error page I got in the talk-example application again trying to send a message->does not work-> refresh page-> get error. It also happens when i return to /home (in talk-example) and try to send message to another user.
Anyone else had this issue?