public function create($workOrderId)
    {
        $workOrder = $this->workOrder->findOrFail($workOrderId);

        if ($workOrder->isComplete()) {
            throw new ReportExistsException();
        }

        $form = $this->presenter->form($workOrder, $this->report);

        return view('work-orders.report.create', compact('form'));
    }
public function create($workOrderId)
    {
        $workOrder = $this->workOrder->findOrFail($workOrderId);

        if ($workOrder->isComplete()) {
            throw new ReportExistsException();
        }

        $form = $this->presenter->form($workOrder, $this->report);

        return view('work-orders.report.create', compact('form'));
    }
public function create ( $ workOrderId ) { $ workOrder = $ this -> workOrder -> findOrFail ( $ workOrderId ) ; if ( $ workOrder -> isComplete ( ) ) { throw new ReportExistsException ( ) ; } $ form = $ this -> presenter -> form ( $ workOrder , $ this -> report ) ; return view ( 'work-orders.report.create' , compact ( 'form' ) ) ; }
Displays the form for creating a work order report.

@param int|string $workOrderId

@throws ReportExistsException

@return \Illuminate\View\View
Displays the form for creating a work order report .