app/Http/Controllers/Dashboard/Pages.php
/**
     * Update the specified resource in storage.
     *
     * @param  \Illuminate\Http\Request  $request
     * @param  int  $id
     * @return \Illuminate\Http\Response
     */
Update the specified resource in storage.
Update the specified resource in storage .
public function update(Page $page)
    {
        $requestArray = request()->validate([
            'name'          => ['required' , 'max:191'] ,
            'des'           => ['required' , 'min:10'],
            'meta_keywords' => ['max:191'],
            'meta_des'      => ['max:191']
        ]);
        $page->update($requestArray);
        alert()->success('Page is Updated' , 'Done');
        return redirect()->route('pages.index');
    }
public function update ( Page $ page ) { $ requestArray = request ( ) -> validate ( [ 'name' => [ 'required' , 'max:191' ] , 'des' => [ 'required' , 'min:10' ] , 'meta_keywords' => [ 'max:191' ] , 'meta_des' => [ 'max:191' ] ] ) ; $ page -> update ( $ requestArray ) ; alert ( ) -> success ( 'Page is Updated' , 'Done' ) ; return redirect ( ) -> route ( 'pages.index' ) ; }
Update the specified resource in storage.
Update the specified resource in storage .