app/Http/Controllers/SettingController.php
/**
     * Update the specified resource in storage.
     *
     * @param  \Illuminate\Http\Request  $request
     * @param  \App\Models\Setting  $setting
     * @return \Illuminate\Http\Response
     */
Update the specified resource in storage.
Update the specified resource in storage .
public function update(Request $request, Setting $setting)
    {
        $data = new Setting();
        $paye = $request->input('paye');
        $nassa = $request->input('nassa');
        $aids_levy = $request->input('aids_levy');
        DB::update('UPDATE settings SET paye = ?, nassa = ?, aids_levy = ? WHERE `settings`.`id` = 1', [$paye, $nassa, $aids_levy]);
        return view('admin.settings.settings')
            ->with('settings', Setting::all())
            ->with('message', 'Settings updated successfully');
    }
public function update ( Request $ request , Setting $ setting ) { $ data = new Setting ( ) ; $ paye = $ request -> input ( 'paye' ) ; $ nassa = $ request -> input ( 'nassa' ) ; $ aids_levy = $ request -> input ( 'aids_levy' ) ; DB :: update ( 'UPDATE settings SET paye = ?, nassa = ?, aids_levy = ? WHERE `settings`.`id` = 1' , [ $ paye , $ nassa , $ aids_levy ] ) ; return view ( 'admin.settings.settings' ) -> with ( 'settings' , Setting :: all ( ) ) -> with ( 'message' , 'Settings updated successfully' ) ; }
Update the specified resource in storage.
Update the specified resource in storage .