public function store(AttachmentRequest $request, $workOrderId)
    {
        if ($uploaded = $this->processor->store($request, $workOrderId)) {
            $count = (is_array($uploaded) ? count($uploaded) : 0);

            flash()->success('Success!', "Successfully uploaded $count file(s).");

            return redirect()->route('maintenance.work-orders.attachments.index', [$workOrderId]);
        } else {
            flash()->error('Error!', 'There was an issue uploading the files you selected. Please try again.');

            return redirect()->route('maintenance.work-orders.attachments.create', [$workOrderId]);
        }
    }
public function store(AttachmentRequest $request, $workOrderId)
    {
        if ($uploaded = $this->processor->store($request, $workOrderId)) {
            $count = (is_array($uploaded) ? count($uploaded) : 0);

            flash()->success('Success!', "Successfully uploaded $count file(s).");

            return redirect()->route('maintenance.work-orders.attachments.index', [$workOrderId]);
        } else {
            flash()->error('Error!', 'There was an issue uploading the files you selected. Please try again.');

            return redirect()->route('maintenance.work-orders.attachments.create', [$workOrderId]);
        }
    }
public function store ( AttachmentRequest $ request , $ workOrderId ) { if ( $ uploaded = $ this -> processor -> store ( $ request , $ workOrderId ) ) { $ count = ( is_array ( $ uploaded ) ? count ( $ uploaded ) : 0 ) ; flash ( ) -> success ( 'Success!' , "Successfully uploaded $count file(s)." ) ; return redirect ( ) -> route ( 'maintenance.work-orders.attachments.index' , [ $ workOrderId ] ) ; } else { flash ( ) -> error ( 'Error!' , 'There was an issue uploading the files you selected. Please try again.' ) ; return redirect ( ) -> route ( 'maintenance.work-orders.attachments.create' , [ $ workOrderId ] ) ; } }
Processes storing the attachment record.

@param AttachmentRequest $request
@param int|string        $workOrderId

@return \Illuminate\Http\RedirectResponse
Processes storing the attachment record .