app/Http/Controllers/WorkOrder/WorkOrderSessionController.php
public function end($workOrderId)
    {
        if ($this->processor->end($workOrderId)) {
            flash()->success('Success!', 'Successfully ended your session. Your hours have been logged.');

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

            return redirect()->route('maintenance.work-orders.show', [$workOrderId]);
        }
    }
public function end($workOrderId)
    {
        if ($this->processor->end($workOrderId)) {
            flash()->success('Success!', 'Successfully ended your session. Your hours have been logged.');

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

            return redirect()->route('maintenance.work-orders.show', [$workOrderId]);
        }
    }
Ends a maintenance workers session on a work order.

@param int|string $workOrderId

@return \Illuminate\Http\RedirectResponse