app/Http/Controllers/CustomerStoryController.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)
    {
        $this->validate($request, [
            'title' => 'required|max:200',
            'writer' => 'required|max:200',
            'description' => 'required',
            'image_thumb' => 'required',
            'contentInfo' => 'required'
        ]);
        $cusStory = new CustomerStory();
        $cusStory = CustomerStory::setData($cusStory, $request);
        $cusStory->save();
        return redirect()->route('customer_story.index');
    }
public function store ( Request $ request ) { $ this -> validate ( $ request , [ 'title' => 'required|max:200' , 'writer' => 'required|max:200' , 'description' => 'required' , 'image_thumb' => 'required' , 'contentInfo' => 'required' ] ) ; $ cusStory = new CustomerStory ( ) ; $ cusStory = CustomerStory :: setData ( $ cusStory , $ request ) ; $ cusStory -> save ( ) ; return redirect ( ) -> route ( 'customer_story.index' ) ; }
Store a newly created resource in storage.
Store a newly created resource in storage .