App\Http\Controllers\DraftController::store PHP Method

store() public method

public store ( )
    public function store()
    {
        if (Auth::guest() !== true) {
            try {
                $etc = Input::except(['_token', 'key', 'rep']);
                $draft = XeDraft::set(Input::get('key'), Input::get(Input::get('rep')), $etc);
            } catch (\Exception $e) {
                echo $e->getMessage() . '|' . $e->getFile() . '|' . $e->getLine();
                throw $e;
            }
            return XePresenter::makeApi(['draftId' => $draft->id]);
        }
        return XePresenter::makeApi(['draftId' => null]);
    }