app/Http/Controllers/TypeClientServiceController.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, [
            'name'=>'required|max:100',
            'descript' =>'required',
        ]);
        $type = new TypeClientService();
        $type->name = $request->name;
        $type->image = $request->image;
        $type->descript = Purifier::clean($request->descript);
        $type->save();
        return redirect()->route('type_client_service.index');
    }
public function store ( Request $ request ) { $ this -> validate ( $ request , [ 'name' => 'required|max:100' , 'descript' => 'required' , ] ) ; $ type = new TypeClientService ( ) ; $ type -> name = $ request -> name ; $ type -> image = $ request -> image ; $ type -> descript = Purifier :: clean ( $ request -> descript ) ; $ type -> save ( ) ; return redirect ( ) -> route ( 'type_client_service.index' ) ; }
Store a newly created resource in storage.
Store a newly created resource in storage .