src/Discussion/Discussion.php
public static function start($title, User $user)
    {
        $discussion = new static;

        $discussion->title = $title;
        $discussion->created_at = Carbon::now();
        $discussion->user_id = $user->id;

        $discussion->setRelation('user', $user);

        $discussion->raise(new Started($discussion));

        return $discussion;
    }
public static function start($title, User $user)
    {
        $discussion = new static;

        $discussion->title = $title;
        $discussion->created_at = Carbon::now();
        $discussion->user_id = $user->id;

        $discussion->setRelation('user', $user);

        $discussion->raise(new Started($discussion));

        return $discussion;
    }
public static function start ( $ title , User $ user ) { $ discussion = new static ; $ discussion -> title = $ title ; $ discussion -> created_at = Carbon :: now ( ) ; $ discussion -> user_id = $ user -> id ; $ discussion -> setRelation ( 'user' , $ user ) ; $ discussion -> raise ( new Started ( $ discussion ) ) ; return $ discussion ; }
Start a new discussion. Raises the DiscussionWasStarted event.

@param string $title
@param User $user
@return static
Start a new discussion . Raises the DiscussionWasStarted event .