This repository was archived by the owner on Jul 15, 2021. It is now read-only.

Description
The standard way, i.e. $user->comment($post, 'Lorem ipsum...') returns the $user object itself. Is there any way to get the comment object that was just created? It wouldn't be wise to manually look through the $post->comments collection for this.
Perhaps a facade could help. Something like LaravelComment::comment($user, $comment, ...)?
At the moment, I've extended the CanComment trait with my own method called commentAndReturn() which does the same thing as comment() but returns the Comment model instead of User. It would be nice to have a more eloquent alternative.