app/Http/Controllers/M_templatesController.php
/**
     * Update the specified resource in storage.
     *
     * @param  \Illuminate\Http\Request  $request
     * @param  \App\M_templates  $template
     * @return \Illuminate\Http\Response
     */
Update the specified resource in storage.
Update the specified resource in storage .
public function update(Request $request, M_templates $m_template)
    {
         request()->validate([
            'name' => 'required',
        ]);
        $m_template->update($request->all());
        return redirect()->route('m_templates.index')
                        ->with('success','Template updated successfully');
    }
public function update ( Request $ request , M_templates $ m_template ) { request ( ) -> validate ( [ 'name' => 'required' , ] ) ; $ m_template -> update ( $ request -> all ( ) ) ; return redirect ( ) -> route ( 'm_templates.index' ) -> with ( 'success' , 'Template updated successfully' ) ; }
Update the specified resource in storage.
Update the specified resource in storage .