app/Http/Controllers/Admin/DomainController.php
/**
     * Update the specified resource in storage.
     *
     * @param  \Illuminate\Http\Request  $request
     * @param  int  $id
     * @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector
     */
Update the specified resource in storage.
Update the specified resource in storage .
public function update(Request $request, $id)
    {
        $this->validate($request, [
            'domain' => 'required|max:999',
            'paydate' => 'required|max:999',
            'expiredate' => 'required|max:999',
            'paymethod' => 'required|max:999',
            'paysumma' => 'required|max:999',
            'email' => 'required|max:999'
        ]);
        $domain = Domain::find($id);
        $domain->domain = $request->input('domain');
        $domain->paydate = $request->input('paydate');
        $domain->expiredate = $request->input('expiredate');
        $domain->paymethod = $request->input('paymethod');
        $domain->paysumma = $request->input('paysumma');
        $domain->email = $request->input('email');
        $domain->update();
        return redirect('/domain')->with('success','Все данные обновлены');
    }
public function update ( Request $ request , $ id ) { $ this -> validate ( $ request , [ 'domain' => 'required|max:999' , 'paydate' => 'required|max:999' , 'expiredate' => 'required|max:999' , 'paymethod' => 'required|max:999' , 'paysumma' => 'required|max:999' , 'email' => 'required|max:999' ] ) ; $ domain = Domain :: find ( $ id ) ; $ domain -> domain = $ request -> input ( 'domain' ) ; $ domain -> paydate = $ request -> input ( 'paydate' ) ; $ domain -> expiredate = $ request -> input ( 'expiredate' ) ; $ domain -> paymethod = $ request -> input ( 'paymethod' ) ; $ domain -> paysumma = $ request -> input ( 'paysumma' ) ; $ domain -> email = $ request -> input ( 'email' ) ; $ domain -> update ( ) ; return redirect ( '/domain' ) -> with ( 'success' , 'Все данные обновлены'); }
Update the specified resource in storage.
Update the specified resource in storage .