public function store(ReportRequest $request, $workOrderId)
    {
        if ($this->processor->store($request, $workOrderId)) {
            flash()->success('Success!', 'Successfully created work order report.');

            return redirect()->route('maintenance.work-orders.show', [$workOrderId]);
        } else {
            flash()->error('Error!', 'There was an issue creating a work order report. Please try again');

            return redirect()->route('maintenance.work-orders.report.create', [$workOrderId]);
        }
    }
public function store(ReportRequest $request, $workOrderId)
    {
        if ($this->processor->store($request, $workOrderId)) {
            flash()->success('Success!', 'Successfully created work order report.');

            return redirect()->route('maintenance.work-orders.show', [$workOrderId]);
        } else {
            flash()->error('Error!', 'There was an issue creating a work order report. Please try again');

            return redirect()->route('maintenance.work-orders.report.create', [$workOrderId]);
        }
    }
public function store ( ReportRequest $ request , $ workOrderId ) { if ( $ this -> processor -> store ( $ request , $ workOrderId ) ) { flash ( ) -> success ( 'Success!' , 'Successfully created work order report.' ) ; return redirect ( ) -> route ( 'maintenance.work-orders.show' , [ $ workOrderId ] ) ; } else { flash ( ) -> error ( 'Error!' , 'There was an issue creating a work order report. Please try again' ) ; return redirect ( ) -> route ( 'maintenance.work-orders.report.create' , [ $ workOrderId ] ) ; } }
Creates a new report for the specified work order.

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

@return \Illuminate\Http\RedirectResponse
Creates a new report for the specified work order .