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(TaskRequest $request)
    {
        $task = new Task;
        $task->user_id = Auth::id();
        $task->task = $request->task;
        $task->save();
        return redirect()->route('index');
    }
public function store ( TaskRequest $ request ) { $ task = new Task ; $ task -> user_id = Auth :: id ( ) ; $ task -> task = $ request -> task ; $ task -> save ( ) ; return redirect ( ) -> route ( 'index' ) ; }
Store a newly created resource in storage.
Store a newly created resource in storage .