refactor: split double assign

This commit is contained in:
HDVinnie
2020-04-24 11:26:36 -04:00
parent 3051805447
commit 18ab6d178a

View File

@@ -154,8 +154,10 @@ class TopicController extends Controller
$topic->name = $request->input('title');
$topic->slug = Str::slug($request->input('title'));
$topic->state = 'open';
$topic->first_post_user_id = $topic->last_post_user_id = $user->id;
$topic->first_post_user_username = $topic->last_post_user_username = $user->username;
$topic->first_post_user_id = $user->id;
$topic->last_post_user_id = $user->id;
$topic->first_post_user_username = $user->username;
$topic->last_post_user_username = $user->username;
$topic->views = 0;
$topic->pinned = false;
$topic->forum_id = $forum->id;