question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Bug] Relationship dependencies

See original GitHub issue

Bug report

Tried to specify the dependencies option of a relationship field but I get this error :

Call to undefined function array_wrap() (View: C:\laragon\www\effigia\vendor\backpack\crud\src\resources\views\crud\fields\relationship\fetch_or_create.blade.php)

What I did

field option :

'dependencies' => ['customer_id'],

Backpack, Laravel, PHP, DB version

When I run php artisan backpack:version the output is:

PHP VERSION:

PHP 7.2.11 (cli) (built: Oct 10 2018 02:04:07) ( ZTS MSVC15 (Visual C++ 2017) x64 ) Copyright © 1997-2018 The PHP Group Zend Engine v3.2.0, Copyright © 1998-2018 Zend Technologies

LARAVEL VERSION:

v7.13.0@6fa69bfbd57744a5bbec5538ce483919b3fd625f

BACKPACK VERSION:

4.1.6@cbd4143d3eb8302916012af205565cd3183f274f

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

3reactions
pxpmcommented, Jun 5, 2020

Haaa it wasn’t meant to be “be dumb if you want”, it’s more like “from our side we are not going to use the helpers, but you can install them and use them wherever you want if that is your preference” hehe

Thanks @dividy 👍

2reactions
pxpmcommented, Jun 5, 2020

I am sorry @dividy You are not doing wrong, we did. 🔨

Laravel helpers were removed but we didn’t removed it from fetch.

I am submitting a PR to fix it, meanwhile just replace line 95 of fetch_and_create.blade.php with: data-dependencies="{{ isset($field['dependencies'])?json_encode(Arr::wrap($field['dependencies'])): json_encode([]) }}"

Best, Pedro

Read more comments on GitHub >

github_iconTop Results From Across the Web

Detecting Dependencies Between Bug Reports to Improve ...
In this paper, we propose an auto- mated bugs triage approach based on the dependencies between the open bug reports. Our approach starts...
Read more >
DependLoc: A Dependency-based Framework For Bug ...
In this work, we propose a novel framework DependLoc for bug localization which leverages the dependency relationship among source code files.
Read more >
The Dependency - Supersedence Rule in Configuration ...
As mentioned before, this conflict between the “dependency“ and the “supersedence“ relationship is often seen as a bug in Configuration Manager ...
Read more >
137543 – support displaying task relationships and ... - Bugs
Some examples we've come across: 1) Dependent Bugzilla reports. Several projects use the "depends on" attribute to structure related reports. The Task List ......
Read more >
Show Relations and dependencies of cards on views / boards
This would then highlight all related items that are on the board (bugs, stories, other "relationships"). This would be a helpful way to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found