src/lib/Http/Controllers/ItemController.php
public function postAddPhotos(Request $request)
    {
        if (!$request->hasFile('photos')) {
            return response('', 400);
        }

        foreach ($request->file('photos') as $file) {
            $photo = Photo::upload($file->getRealPath());

            session()->push('photos', [
                'photo_id' => $photo->getKey(),
                'filename' => $file->getClientOriginalName(),
            ]);
        }
    }
public function postAddPhotos(Request $request)
    {
        if (!$request->hasFile('photos')) {
            return response('', 400);
        }

        foreach ($request->file('photos') as $file) {
            $photo = Photo::upload($file->getRealPath());

            session()->push('photos', [
                'photo_id' => $photo->getKey(),
                'filename' => $file->getClientOriginalName(),
            ]);
        }
    }
public function postAddPhotos ( Request $ request ) { if ( ! $ request -> hasFile ( 'photos' ) ) { return response ( '' , 400 ) ; } foreach ( $ request -> file ( 'photos' ) as $ file ) { $ photo = Photo :: upload ( $ file -> getRealPath ( ) ) ; session ( ) -> push ( 'photos' , [ 'photo_id' => $ photo -> getKey ( ) , 'filename' => $ file -> getClientOriginalName ( ) , ] ) ; } }
Process and store several photos.

@param \Illuminate\Http\Request $request

@return \Illuminate\Http\RedirectResponse
Process and store several photos .