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

store() public method

public store ( )
    public function store()
    {
        $data = Input::all();
        $taskId = isset($data['id']) ? $data['id'] : false;
        if (isset($data['client_id']) && $data['client_id']) {
            $data['client'] = $data['client_id'];
        }
        $task = $this->taskRepo->save($taskId, $data);
        $task = Task::scope($task->public_id)->with('client')->first();
        $transformer = new TaskTransformer(Auth::user()->account, Input::get('serializer'));
        $data = $this->createItem($task, $transformer, 'task');
        return $this->response($data);
    }