app/Http/Controllers/AnnouncementController.php
/**
     * Store a newly created resource in storage.
     *
     * @param  \Illuminate\Http\Request  $request
     * @return \Illuminate\Http\Response
     */
Store a newly created resource in storage.
Store a newly created resource in storage .
public function store(Request $request)
    {
        $store  =   Announcement::create([
            "subject" => $request->subject,
            "message" => $request->message,
            "show_staff" => $request->show_staff ?? 0,
            "show_customer" => $request->show_clients ?? 0,
            "show_my_name" => $request->show_my_name ?? 0,
        ]);
        return redirect()->back()->with('success','Announcement Created!');
    }
public function store ( Request $ request ) { $ store = Announcement :: create ( [ " subject " => $ request -> subject , " message " => $ request -> message , " show_staff " => $ request -> show_staff ?? 0 , " show_customer " => $ request -> show_clients ?? 0 , " show_my_name " => $ request -> show_my_name ?? 0 , ] ) ; return redirect ( ) -> back ( ) -> with ( 'success' , 'Announcement Created!' ) ; }
Store a newly created resource in storage.
Store a newly created resource in storage .