app/Http/Controllers/Asset/ImageController.php
public function store(ImageRequest $request, $id)
    {
        $asset = $this->asset->find($id);

        $attachments = $this->image->upload($request, $asset, $asset->images());

        if ($attachments) {
            $message = 'Successfully uploaded files.';

            return redirect()->route('maintenance.assets.images.index', [$asset->id])->withSuccess($message);
        } else {
            $message = 'There was an issue uploading the files you selected. Please try again.';

            return redirect()->route('maintenance.assets.images.create', [$id])->withErrors($message);
        }
    }
public function store(ImageRequest $request, $id)
    {
        $asset = $this->asset->find($id);

        $attachments = $this->image->upload($request, $asset, $asset->images());

        if ($attachments) {
            $message = 'Successfully uploaded files.';

            return redirect()->route('maintenance.assets.images.index', [$asset->id])->withSuccess($message);
        } else {
            $message = 'There was an issue uploading the files you selected. Please try again.';

            return redirect()->route('maintenance.assets.images.create', [$id])->withErrors($message);
        }
    }
Uploads images and attaches them to the specified asset.

@param ImageRequest $request
@param int|string   $id

@return \Illuminate\Http\RedirectResponse