App\Http\Controllers\Admin\Forum\ForumCoversController::store PHP Method

store() public method

public store ( )
    public function store()
    {
        if (($this->coverParams()['forum_id'] ?? null) === null) {
            abort(422);
        }
        $cover = ForumCover::firstOrCreate(['forum_id' => $this->coverParams()['forum_id']]);
        $cover->update($this->coverParams());
        return redirect(route('admin.forum.forum-covers.index') . '#forum-' . $cover->forum_id);
    }