app/Http/Controllers/ComicController.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(Request $request)
    {
        $request->validate( $this->validationData(), $this->validationErrors() );
        $data = $request->all();
        $new_comic = new Comic();
        $new_comic->fill($data);
        $new_comic->save();
        return redirect()->route('comics.show', $new_comic);
    }
public function store ( Request $ request ) { $ request -> validate ( $ this -> validationData ( ) , $ this -> validationErrors ( ) ) ; $ data = $ request -> all ( ) ; $ new_comic = new Comic ( ) ; $ new_comic -> fill ( $ data ) ; $ new_comic -> save ( ) ; return redirect ( ) -> route ( 'comics.show' , $ new_comic ) ; }
Store a newly created resource in storage.
Store a newly created resource in storage .