_id stringlengths 2 7 | title stringlengths 3 151 | partition stringclasses 3
values | text stringlengths 33 8k | language stringclasses 1
value | meta_information dict |
|---|---|---|---|---|---|
q257700 | SelectHierarchyTrait.getSelectHierarchy | test | public static function getSelectHierarchy($belongsTo = null)
{
$query = static::roots();
if (!is_null($belongsTo)) {
$query->where('belongs_to', $belongsTo);
}
$roots = $query->with('children')->get();
$options = [0 => 'None']; | php | {
"resource": ""
} |
q257701 | SelectHierarchyTrait.getRenderedNode | test | public static function getRenderedNode(Node $node)
{
$options = [];
if ($node->isRoot()) {
$name = $node->name;
} else {
$depth = str_repeat('--', $node->depth);
$name = sprintf('%s %s', $depth, $node->name);
}
$options[$node->id] = $nam... | php | {
"resource": ""
} |
q257702 | ComposerServiceProvider.boot | test | public function boot(Factory $view)
{
foreach ($this->composers as | php | {
"resource": ""
} |
q257703 | Destroy.handle | test | public function handle(Filesystem $filesystem)
{
try {
if ($filesystem->delete($this->attachment->getStorageFilePath())) {
return $this->attachment->delete();
}
| php | {
"resource": ""
} |
q257704 | InventoryStockProcessor.index | test | public function index($itemId)
{
$item = $this->inventory->findOrFail($itemId);
$navbar = $this->presenter->navbar($item);
| php | {
"resource": ""
} |
q257705 | InventoryStockProcessor.create | test | public function create($itemId)
{
$item = $this->inventory->findOrFail($itemId);
| php | {
"resource": ""
} |
q257706 | InventoryStockProcessor.store | test | public function store(InventoryStockRequest $request, $itemId)
{
$item = $this->inventory->findOrFail($itemId);
| php | {
"resource": ""
} |
q257707 | InventoryStockProcessor.show | test | public function show($itemId, $stockId)
{
$item = $this->inventory->findOrFail($itemId);
$stock = $item->stocks()->findOrFail($stockId);
| php | {
"resource": ""
} |
q257708 | InventoryStockProcessor.edit | test | public function edit($itemId, $stockId)
{
$item = $this->inventory->findOrFail($itemId);
$stock = $item->stocks()->findOrFail($stockId);
| php | {
"resource": ""
} |
q257709 | InventoryStockProcessor.update | test | public function update(InventoryStockRequest $request, $itemId, $stockId)
{
$item = $this->inventory->findOrFail($itemId);
| php | {
"resource": ""
} |
q257710 | InventoryStockProcessor.destroy | test | public function destroy($itemId, $stockId)
{
$item = $this->inventory->findOrFail($itemId);
| php | {
"resource": ""
} |
q257711 | Controller.index | test | public function index($id)
{
$asset = $this->asset->model()->findOrFail($id);
| php | {
"resource": ""
} |
q257712 | Controller.create | test | public function create($id)
{
$asset = $this->asset->model()->findOrFail($id);
| php | {
"resource": ""
} |
q257713 | Controller.store | test | public function store(MeterRequest $request, $id)
{
$meter = $this->meter->create($request, $id);
if ($meter) {
$message = 'Successfully created meter.';
return redirect()->route('maintenance.assets.meters.index', [$id])->withSuccess($message); | php | {
"resource": ""
} |
q257714 | Controller.show | test | public function show($id, $meterId)
{
$asset = $this->asset->model()->findOrFail($id);
$meter = $asset->meters()->findOrFail($meterId);
| php | {
"resource": ""
} |
q257715 | Controller.edit | test | public function edit($id, $meterId)
{
$asset = $this->asset->model()->findOrFail($id);
$meter = $asset->meters()->findOrFail($meterId);
| php | {
"resource": ""
} |
q257716 | Controller.update | test | public function update(MeterRequest $request, $id, $meterId)
{
$meter = $this->meter->update($request, $id, $meterId);
if ($meter) {
$message = 'Successfully updated meter.';
return redirect()->route('maintenance.assets.meters.show', | php | {
"resource": ""
} |
q257717 | Controller.destroy | test | public function destroy($id, $meterId)
{
$asset = $this->asset->model()->findOrFail($id);
$meter = $asset->meters()->findOrFail($meterId);
if ($meter->delete()) {
$message = 'Successfully deleted meter.';
return redirect()->route('maintenance.assets.meters.index', ... | php | {
"resource": ""
} |
q257718 | NotificationController.store | test | public function store($workOrderId)
{
if ($this->workOrderNotificationValidator->passes()) {
$workOrder = $this->workOrder->find($workOrderId);
$data = $this->inputAll();
$data['work_order_id'] = $workOrder->id;
$this->workOrderNotification->setInput($data)-... | php | {
"resource": ""
} |
q257719 | NotificationController.update | test | public function update($workOrderId, $notificationId)
{
if ($this->workOrderNotificationValidator->passes()) {
$workOrder = $this->workOrder->find($workOrderId);
$notifications = $this->workOrderNotification->find($notificationId);
$data = $this->inputAll();
... | php | {
"resource": ""
} |
q257720 | WorkOrderViewer.startedAtFormatted | test | public function startedAtFormatted()
{
if ($this->entity->started_at) {
$date = new \DateTime();
| php | {
"resource": ""
} |
q257721 | WorkOrderViewer.completedAtFormatted | test | public function completedAtFormatted()
{
if ($this->entity->completed_at) {
$date = new \DateTime();
| php | {
"resource": ""
} |
q257722 | WorkOrderAssignedProcessor.index | test | public function index()
{
$workOrders = $this->presenter->tableAssigned($this->workOrder);
$navbar = $this->presenter->navbar();
| php | {
"resource": ""
} |
q257723 | WorkOrderCommentPresenter.form | test | public function form(WorkOrder $workOrder, Comment $comment)
{
return $this->form->of('work-orders.comments', function (FormGrid $form) use ($workOrder, $comment) {
if ($comment->exists) {
$method = 'PATCH';
$url = route('work-orders.comments.update', [$workOrder-... | php | {
"resource": ""
} |
q257724 | WorkOrderSession.getHours | test | public function getHours()
{
if (array_key_exists('out', $this->attributes)) {
if ($this->attributes['out']) {
$hours = | php | {
"resource": ""
} |
q257725 | EventViewer.startDateFormatted | test | public function startDateFormatted(Event $apiObject)
{
$start = new \DateTime();
| php | {
"resource": ""
} |
q257726 | EventViewer.endDateFormatted | test | public function endDateFormatted(Event $apiObject)
{
$end = new \DateTime();
| php | {
"resource": ""
} |
q257727 | EventViewer.endTimeFormatted | test | public function endTimeFormatted(Event $apiObject)
{
if (!$apiObject->all_day) {
$end = | php | {
"resource": ""
} |
q257728 | EventViewer.recurFrequencyFormatted | test | public function recurFrequencyFormatted(Event $apiObject)
{
if ($this->recurFrequency($apiObject)) {
| php | {
"resource": ""
} |
q257729 | EventViewer.recurFrequency | test | public function recurFrequency(Event $apiObject)
{
if ($apiObject->rruleArray && array_key_exists('FREQ', $apiObject->rruleArray)) | php | {
"resource": ""
} |
q257730 | EventViewer.recurDays | test | public function recurDays(Event $apiObject)
{
if ($apiObject->rruleArray && array_key_exists('BYDAY', $apiObject->rruleArray)) | php | {
"resource": ""
} |
q257731 | EventViewer.tags | test | public function tags()
{
/*
* Make sure we pass in the parent event if this event is a recurrence
* so we can use it's tags
*/
if ($this->entity->parentEvent) {
$event = $this->entity->parentEvent;
} else | php | {
"resource": ""
} |
q257732 | StockController.store | test | public function store(InventoryStockRequest $request, $itemId)
{
if ($this->processor->store($request, $itemId)) {
flash()->success('Success!', 'Successfully created stock.');
return redirect()->route('maintenance.inventory.stocks.index', [$itemId]);
} else {
fla... | php | {
"resource": ""
} |
q257733 | StockController.update | test | public function update(InventoryStockRequest $request, $itemId, $stockId)
{
if ($this->processor->update($request, $itemId, $stockId)) {
flash()->success('Success!', 'Successfully updated stock.');
return redirect()->route('maintenance.inventory.stocks.show', [$itemId, $stockId]);
... | php | {
"resource": ""
} |
q257734 | StockController.destroy | test | public function destroy($itemId, $stockId)
{
if ($this->processor->destroy($itemId, $stockId)) {
flash()->success('Success!', 'Successfully deleted stock.');
return redirect()->route('maintenance.inventory.stocks.index', [$itemId]);
} else {
| php | {
"resource": ""
} |
q257735 | WorkOrderAttachmentPresenter.table | test | public function table(WorkOrder $workOrder)
{
$attachments = $workOrder->attachments();
return $this->table->of('work-orders.attachments', function (TableGrid $table) use ($workOrder, $attachments) {
$table->with($attachments)->paginate($this->perPage);
$table->column('type... | php | {
"resource": ""
} |
q257736 | WorkOrderAttachmentPresenter.form | test | public function form(WorkOrder $workOrder, Attachment $attachment)
{
return $this->form->of('work-orders.attachments', function (FormGrid $form) use ($workOrder, $attachment) {
$files = true;
if ($attachment->exists) {
$url = route('maintenance.work-orders.attachment... | php | {
"resource": ""
} |
q257737 | AuthController.authenticate | test | public function authenticate(LoginRequest $request)
{
$throttles = $this->isUsingThrottlesLoginsTrait();
if ($throttles && $this->hasTooManyLoginAttempts($request)) {
return $this->sendLockoutResponse($request);
}
$credentials = $this->getCredentials($request);
... | php | {
"resource": ""
} |
q257738 | AuthController.handleUserWasAuthenticated | test | protected function handleUserWasAuthenticated(Request $request, $throttles)
{
if ($throttles) {
$this->clearLoginAttempts($request);
}
$user = auth()->user();
| php | {
"resource": ""
} |
q257739 | AuthController.handleLdapUserWasAuthenticated | test | protected function handleLdapUserWasAuthenticated(User $user, AdldapUser $adldapUser)
{
if ($adldapUser->inGroup('Help Desk')) { | php | {
"resource": ""
} |
q257740 | InventoryStockObserver.deleted | test | public function deleted(InventoryStock $stock)
{
$movements = $stock->movements()->get();
if (count($movements) > 0) {
| php | {
"resource": ""
} |
q257741 | InventoryStockObserver.restored | test | public function restored(InventoryStock $stock)
{
$movements = $stock->movements()->onlyTrashed()->get();
if (count($movements) > 0) {
| php | {
"resource": ""
} |
q257742 | WorkOrderPriorityPresenter.table | test | public function table(Priority $priority)
{
return $this->table->of('work-orders.priorities', function (TableGrid $table) use ($priority) {
$table->with($priority);
$table->column('priority', function (Column $column) {
$column->value = function (Priority $priority) ... | php | {
"resource": ""
} |
q257743 | WorkOrderPriorityPresenter.form | test | public function form(Priority $priority)
{
return $this->form->of('work-orders.priorities', function (FormGrid $form) use ($priority) {
if ($priority->exists) {
$url = route('maintenance.work-orders.priorities.update', [$priority->getKey()]);
$method = 'PATCH';
... | php | {
"resource": ""
} |
q257744 | WorkOrderPartStockPresenter.table | test | public function table(WorkOrder $workOrder, Inventory $item)
{
$stocks = $item->stocks();
return $this->table->of('work-orders.parts.stocks', function (TableGrid $table) use ($workOrder, $item, $stocks) {
$table->with($stocks)->paginate($this->perPage);
$table->column('loca... | php | {
"resource": ""
} |
q257745 | WorkOrderPartStockPresenter.formTake | test | public function formTake(WorkOrder $workOrder, Inventory $inventory, InventoryStock $stock)
{
return $this->form->of('work-orders.parts.stocks.take', function (FormGrid $form) use ($workOrder, $inventory, $stock) {
$form->attributes([
'method' => 'POST',
'url' ... | php | {
"resource": ""
} |
q257746 | WorkOrderPartStockPresenter.formPut | test | public function formPut(WorkOrder $workOrder, Inventory $inventory, InventoryStock $stock)
{
return $this->form->of('work-orders.parts.stocks.put', function (FormGrid $form) use ($workOrder, $inventory, $stock) {
$form->attributes([
'method' => 'POST',
'url' =>... | php | {
"resource": ""
} |
q257747 | InventoryController.destroy | test | public function destroy($id)
{
if ($this->processor->destroy($id)) {
flash()->success('Success!', 'Successfully deleted inventory item.');
return redirect()->route('maintenance.inventory.index');
} else {
| php | {
"resource": ""
} |
q257748 | Flash.create | test | public function create($title, $message, $level = 'info', $key = 'flash_message')
{
$timer = $this->timer;
| php | {
"resource": ""
} |
q257749 | WorkOrderReportController.create | test | public function create($workOrderId)
{
try {
return $this->processor->create($workOrderId);
} catch (ReportExistsException $e) {
flash()->error('Error!', 'This work order | php | {
"resource": ""
} |
q257750 | WorkOrderReportController.store | test | 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 {
... | php | {
"resource": ""
} |
q257751 | EventableController.index | test | public function index($resourceId)
{
$routes = $this->routes;
$eventable = $this->getEventableRepository()->model()->findOrFail($resourceId);
| php | {
"resource": ""
} |
q257752 | EventableController.store | test | public function store(EventRequest $request, $resourceId)
{
$eventable = $this->getEventableRepository()->model()->findOrFail($resourceId);
$event = $this->event->create($request);
if ($event && method_exists($eventable, 'events')) {
$eventable->events()->attach($event->id);
... | php | {
"resource": ""
} |
q257753 | EventableController.show | test | public function show($resourceId, $eventId)
{
$routes = $this->routes;
$eventable = $this->getEventableRepository()->model()->findOrFail($resourceId);
if (method_exists($eventable, 'events')) {
$event = $eventable->events()->find($eventId);
if ($event) {
| php | {
"resource": ""
} |
q257754 | EventableController.update | test | public function update(EventRequest $request, $resourceId, $eventId)
{
$eventable = $this->getEventableRepository()->model()->findOrFail($resourceId);
$event = $this->event->update($request, $eventId);
if ($event) {
$message = 'Successfully updated event.';
return ... | php | {
"resource": ""
} |
q257755 | EventableController.destroy | test | public function destroy($resourceId, $eventId)
{
$eventable = $this->getEventableRepository()->model()->findOrFail($resourceId);
if (method_exists($eventable, 'events')) {
$event = $eventable->events()->find($eventId);
if ($event && $this->event->delete($event->id)) {
... | php | {
"resource": ""
} |
q257756 | HasCategoryTrait.scopeCategory | test | public function scopeCategory($query, $categoryId = null)
{
if ($categoryId) {
// Get descendants and self inventory category nodes
$categories = Category::find($categoryId)->getDescendantsAndSelf();
// Perform a sub-query on main query
$query->where(function... | php | {
"resource": ""
} |
q257757 | LoginPresenter.form | test | public function form()
{
return $this->form->of('label', function (FormGrid $form) {
$form->attributes(['url' => route('maintenance.login.index')]);
$form->submit = 'Sign In';
$form->fieldset(function (Fieldset $fieldset) {
$fieldset->control('input:text... | php | {
"resource": ""
} |
q257758 | ManualController.store | test | public function store(ManualRequest $request, $id)
{
$asset = $this->asset->find($id);
$attachments = $this->manual->upload($request, $asset, $asset->manuals());
if ($attachments) {
$message = 'Successfully uploaded files.';
return redirect()->route('maintenance.as... | php | {
"resource": ""
} |
q257759 | ManualController.show | test | public function show($id, $manualId)
{
$asset = $this->asset->find($id);
$manual = $asset->manuals()->find($manualId);
if ($manual) {
| php | {
"resource": ""
} |
q257760 | ManualController.update | test | public function update(AttachmentUpdateRequest $request, $id, $manualId)
{
$asset = $this->asset->find($id);
$manual = $this->manual->update($request, $asset->manuals(), $manualId);
if ($manual) {
$message = 'Successfully updated manual.';
return redirect()->route(... | php | {
"resource": ""
} |
q257761 | WorkOrderController.store | test | public function store($assetId, $workOrderId)
{
if ($this->asset->attachWorkOrder($assetId, $workOrderId)) {
$message = 'Successfully attached work order.';
return redirect()->route('maintenance.assets.work-orders.index', [$assetId])->withSuccess($message);
| php | {
"resource": ""
} |
q257762 | WorkOrderController.remove | test | public function remove($assetId, $workOrderId)
{
if ($this->asset->detachWorkOrder($assetId, $workOrderId)) {
$message = 'Successfully detached work order.';
return redirect()->route('maintenance.assets.work-orders.index', [$assetId])->withSuccess($message);
| php | {
"resource": ""
} |
q257763 | UpdateController.store | test | public function store($workRequestId)
{
if ($this->updateValidator->passes()) {
$workRequest = $this->workRequest->find($workRequestId);
$update = $this->update->setInput($this->inputAll())->create();
$this->workRequest->saveUpdate($workRequest, $update);
$... | php | {
"resource": ""
} |
q257764 | UpdateController.destroy | test | public function destroy($workRequestId, $updateId)
{
$workRequest = $this->workRequest->find($workRequestId);
if ($this->update->destroy($updateId)) {
$this->message = 'Successfully deleted update';
$this->messageType = 'success';
$this->redirect = route('mainten... | php | {
"resource": ""
} |
q257765 | WorkOrderPartStockProcessor.index | test | public function index($workOrderId, $itemId)
{
$workOrder = $this->workOrder->findOrFail($workOrderId);
$item = $this->inventory->findOrFail($itemId);
$stocks = $this->presenter->table($workOrder, $item);
| php | {
"resource": ""
} |
q257766 | WorkOrderPartStockProcessor.getTake | test | public function getTake($workOrderId, $itemId, $stockId)
{
$workOrder = $this->workOrder->findOrFail($workOrderId);
$item = $this->inventory->findOrFail($itemId);
$stock = $item->stocks()->findOrFail($stockId);
| php | {
"resource": ""
} |
q257767 | WorkOrderPartStockProcessor.postTake | test | public function postTake(PartTakeRequest $request, $workOrderId, $itemId, $stockId)
{
$workOrder = $this->workOrder->findOrFail($workOrderId);
$item = $this->inventory->findOrFail($itemId);
| php | {
"resource": ""
} |
q257768 | WorkOrderPartStockProcessor.getPut | test | public function getPut($workOrderId, $itemId, $stockId)
{
$workOrder = $this->workOrder->findOrFail($workOrderId);
$item = $this->inventory->findOrFail($itemId);
$stock = $workOrder->parts()->findOrFail($stockId);
| php | {
"resource": ""
} |
q257769 | WorkOrderPartStockProcessor.postPut | test | public function postPut(PartReturnRequest $request, $workOrderId, $itemId, $stockId)
{
$workOrder = $this->workOrder->findOrFail($workOrderId);
// Even though the inventory item isn't necessary here, we'll
// find it anyway so we can check for the requests validity
// and ensure the... | php | {
"resource": ""
} |
q257770 | WorkRequestProcessor.index | test | public function index()
{
$workRequests = $this->presenter->table($this->workRequest);
$navbar = $this->presenter->navbar();
| php | {
"resource": ""
} |
q257771 | WorkRequestProcessor.edit | test | public function edit($id)
{
$workRequest = $this->workRequest->findOrFail($id);
| php | {
"resource": ""
} |
q257772 | WorkRequestProcessor.update | test | public function update(WorkHttpRequest $request, $id)
{
$workRequest = $this->workRequest->findOrFail($id);
| php | {
"resource": ""
} |
q257773 | NestedSetController.create | test | public function create($id = null)
{
// If an ID is supplied then we're creating a child category
if ($id) {
$category = $this->repository->find($id);
if ($category) {
return view('categories.nodes.create', [
'category' => $category,
... | php | {
"resource": ""
} |
q257774 | NestedSetController.store | test | public function store(CategoryRequest $request, $id = null)
{
$category = $this->repository->create($request, $id);
if ($category) {
$message = "Successfully created $this->resource";
return redirect()->route($this->routes['index'])->withSuccess($message);
} else {
... | php | {
"resource": ""
} |
q257775 | NestedSetController.edit | test | public function edit($id)
{
$category = $this->repository->find($id);
return view('categories.edit', [
'category' => $category,
| php | {
"resource": ""
} |
q257776 | NestedSetController.update | test | public function update(CategoryRequest $request, $id)
{
$category = $this->repository->update($request, $id);
if ($category) {
$message = "Successfully updated $this->resource";
return redirect()->route($this->routes['index'])->withSuccess($message);
} else {
... | php | {
"resource": ""
} |
q257777 | NestedSetController.destroy | test | public function destroy($id)
{
$record = $this->repository->find($id);
if ($record->delete()) {
$message = "Successfully deleted $this->resource.";
| php | {
"resource": ""
} |
q257778 | WorkOrderSessionPresenter.table | test | public function table(WorkOrder $workOrder)
{
$sessions = $workOrder->sessions();
return $this->table->of('work-orders.sessions', function (TableGrid $table) use ($sessions) {
$table->with($sessions)->paginate($this->perPage);
$table->attributes([
'class' =>... | php | {
"resource": ""
} |
q257779 | WorkOrderSessionPresenter.tablePerWorker | test | public function tablePerWorker(WorkOrder $workOrder)
{
$sessions = $workOrder->getUniqueSessions();
return $this->table->of('work-orders.sessions.per-worker', function (TableGrid $table) use ($sessions) {
$table->with($sessions);
$table->attributes([
'class'... | php | {
"resource": ""
} |
q257780 | InventoryObserver.deleted | test | public function deleted(Inventory $model)
{
$stocks = $model->stocks()->get();
if (count($stocks) > 0) {
| php | {
"resource": ""
} |
q257781 | InventoryObserver.restored | test | public function restored(Inventory $model)
{
$stocks = $model->stocks()->onlyTrashed()->get();
if (count($stocks) > 0) {
| php | {
"resource": ""
} |
q257782 | InventoryProcessor.index | test | public function index()
{
$inventory = $this->presenter->tableNoVariants($this->inventory);
$navbar = $this->presenter->navbar();
| php | {
"resource": ""
} |
q257783 | InventoryProcessor.store | test | public function store(InventoryRequest $request)
{
$item = $this->inventory->newInstance();
| php | {
"resource": ""
} |
q257784 | InventoryProcessor.show | test | public function show($id)
{
$item = $this->inventory->find($id);
$variants = $this->presenter->tableVariants($item);
$stocks = $this->presenter->tableStocks($item);
$navbarProfile = $this->presenter->navbarProfile($item);
| php | {
"resource": ""
} |
q257785 | InventoryProcessor.edit | test | public function edit($id)
{
$item = $this->inventory->findOrFail($id);
| php | {
"resource": ""
} |
q257786 | InventoryStockPresenter.table | test | public function table(Inventory $item)
{
$stocks = $item->stocks();
return $this->table->of('inventory.stocks', function (TableGrid $table) use ($item, $stocks) {
$table->with($stocks);
$table->attributes([
'class' => 'table table-hover table-striped',
... | php | {
"resource": ""
} |
q257787 | InventoryStockPresenter.tableMovements | test | public function tableMovements(Inventory $item, InventoryStock $stock)
{
$movements = $stock->movements();
return $this->table->of('inventory.stocks.movements', function (TableGrid $table) use ($item, $movements) {
$table->with($movements)->paginate($this->perPage);
$table-... | php | {
"resource": ""
} |
q257788 | InventoryStockPresenter.form | test | public function form(Inventory $item, InventoryStock $stock)
{
return $this->form->of('inventory.stocks', function (FormGrid $form) use ($item, $stock) {
if ($stock->exists) {
$method = 'PATCH';
$url = route('maintenance.inventory.stocks.update', [$item->getKey(),... | php | {
"resource": ""
} |
q257789 | InventoryStockPresenter.navbar | test | public function navbar(Inventory $item)
{
return $this->fluent([
'id' => 'inventory-stocks',
'title' => 'Item Stocks',
| php | {
"resource": ""
} |
q257790 | WorkOrderPartPresenter.table | test | public function table(WorkOrder $workOrder)
{
$parts = $workOrder->parts();
return $this->table->of('work-orders.parts', function (TableGrid $table) use ($workOrder, $parts) {
$table->with($parts)->paginate($this->perPage);
$table->pageName = 'page-parts';
$tab... | php | {
"resource": ""
} |
q257791 | WorkOrderPartPresenter.tableInventory | test | public function tableInventory(WorkOrder $workOrder, Inventory $inventory)
{
$inventory = $inventory->noVariants();
return $this->table->of('work-orders.inventory', function (TableGrid $table) use ($inventory, $workOrder) {
$table->with($inventory)->paginate($this->perPage);
... | php | {
"resource": ""
} |
q257792 | WorkOrderPartPresenter.navbarParts | test | public function navbarParts(WorkOrder $workOrder)
{
return $this->fluent([
'id' => 'work-orders-parts',
'title' => 'Parts Added',
| php | {
"resource": ""
} |
q257793 | WorkOrderSessionProcessor.index | test | public function index($workOrderId)
{
$workOrder = $this->workOrder->findOrFail($workOrderId);
$sessions = $this->presenter->table($workOrder);
| php | {
"resource": ""
} |
q257794 | WorkOrderSessionProcessor.start | test | public function start($workOrderId)
{
$workOrder = $this->workOrder->findOrFail($workOrderId);
| php | {
"resource": ""
} |
q257795 | WorkOrderSessionProcessor.end | test | public function end($workOrderId)
{
$workOrder = $this->workOrder->findOrFail($workOrderId);
| php | {
"resource": ""
} |
q257796 | InventoryStockMovement.getChangeAttribute | test | public function getChangeAttribute()
{
if ($this->before > $this->after) {
return sprintf('- %s', $this->before - $this->after);
} elseif ($this->after > $this->before) {
| php | {
"resource": ""
} |
q257797 | NoteController.store | test | public function store(NoteRequest $request, $id)
{
$note = $this->inventory->createNote($request, $id);
if ($note) {
$message = 'Successfully created note.';
return redirect()->route('maintenance.inventory.show', | php | {
"resource": ""
} |
q257798 | NoteController.show | test | public function show($id, $noteId)
{
$item = $this->inventory->find($id);
$note = $item->notes()->find($noteId);
if ($note) {
| php | {
"resource": ""
} |
q257799 | NoteController.update | test | public function update(NoteRequest $request, $id, $noteId)
{
$note = $this->inventory->updateNote($request, $id, $noteId);
if ($note) {
$message = 'Successfully updated note.';
return | php | {
"resource": ""
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.