app/Http/Controllers/Admin/ActivityController.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)
    {
        $oldImage = $request->input('oldImage');
        $image = $request->input('image');
        $created = $request->input('created');
        $updated = $request->input('updated');
        if ($logo === null && $image === null) {
            Activity::find($id)->update([
            'activity_image' => $image,
            'created_at' => $created,
            'updated_at' => $updated,
            ]);
            return redirect()->to("adminpages/activity");
        }
            Activity::find($id)->update([
            'activity_image' => $image,
            'created_at' => $created,
            'updated_at' => $updated,
            ]);
            return redirect()->to("adminpages/activity");
    }
public function update ( Request $ request , $ id ) { $ oldImage = $ request -> input ( 'oldImage' ) ; $ image = $ request -> input ( 'image' ) ; $ created = $ request -> input ( 'created' ) ; $ updated = $ request -> input ( 'updated' ) ; if ( $ logo === null && $ image === null ) { Activity :: find ( $ id ) -> update ( [ 'activity_image' => $ image , 'created_at' => $ created , 'updated_at' => $ updated , ] ) ; return redirect ( ) -> to ( " adminpages/activity " ) ; } Activity :: find ( $ id ) -> update ( [ 'activity_image' => $ image , 'created_at' => $ created , 'updated_at' => $ updated , ] ) ; return redirect ( ) -> to ( " adminpages/activity " ) ; }
Update the specified resource in storage.
Update the specified resource in storage .