app/Http/Controllers/PostController.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()
    {
       $post = $this->postRepo->create(request()->only('cAccount','cName','cGender','cBirthday','cEmail','cExplain'));
    if ($post) {
        return redirect()->route('post.show', $post->id);
    }
    return back();
    }
public function store ( ) { $ post = $ this -> postRepo -> create ( request ( ) -> only ( 'cAccount' , 'cName' , 'cGender' , 'cBirthday' , 'cEmail' , 'cExplain' ) ) ; if ( $ post ) { return redirect ( ) -> route ( 'post.show' , $ post -> id ) ; } return back ( ) ; }
Store a newly created resource in storage.
Store a newly created resource in storage .