app/Http/Controllers/TaskController.php
/**
     * Store a newly created resource in storage.
     *
     * @param  \Illuminate\Http\Request  $request
     * @return \Illuminate\Http\Response
     */
Store a newly created resource in storage.
Store a newly created resource in storage .
public function store(TaskStoreRequest $request)
    {
        $input = $request->validated();
        $task = $this->task_service->create(
            $input['label'],
            $input['is_complete'] ?? 0,
            auth()->user()->id
        );
        return new TaskResource($task);
    }
public function store ( TaskStoreRequest $ request ) { $ input = $ request -> validated ( ) ; $ task = $ this -> task_service -> create ( $ input [ 'label' ] , $ input [ 'is_complete' ] ?? 0 , auth ( ) -> user ( ) -> id ) ; return new TaskResource ( $ task ) ; }
Store a newly created resource in storage.
Store a newly created resource in storage .