app/Http/Controllers/AnnouncementController.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(Request $request, $id)
    {
        $data = Announcement::findOrFail($id);
        $data->update([
            "subject" => $request->subject,
            "message" => $request->message,
            "show_staff" => $request->show_staff,
            "show_customer" => $request->show_clients,
            "show_my_name" => $request->show_my_name,
        ]);
        return redirect()->back()->with('success','Announcement Updated!');
    }
public function update ( Request $ request , $ id ) { $ data = Announcement :: findOrFail ( $ id ) ; $ data -> update ( [ " subject " => $ request -> subject , " message " => $ request -> message , " show_staff " => $ request -> show_staff , " show_customer " => $ request -> show_clients , " show_my_name " => $ request -> show_my_name , ] ) ; return redirect ( ) -> back ( ) -> with ( 'success' , 'Announcement Updated!' ) ; }
Update the specified resource in storage.
Update the specified resource in storage .