app/Http/Controllers/Admin/ActivityController.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)
    {
        $image = $request->file('image');
        $created = $request->input('created');
        $updated = $request->input('updated');
        Activity::create([
            'activity_image' => $image->getClientOriginalName(),
            'created_at' => $created,
            'updated_at' => $updated,
        ]);
        $image->store('/assets/activity');
        return redirect()->to('adminpages/activity');
    }
public function store ( Request $ request ) { $ image = $ request -> file ( 'image' ) ; $ created = $ request -> input ( 'created' ) ; $ updated = $ request -> input ( 'updated' ) ; Activity :: create ( [ 'activity_image' => $ image -> getClientOriginalName ( ) , 'created_at' => $ created , 'updated_at' => $ updated , ] ) ; $ image -> store ( '/assets/activity' ) ; return redirect ( ) -> to ( 'adminpages/activity' ) ; }
Store a newly created resource in storage.
Store a newly created resource in storage .