Giter Club home page Giter Club logo

Comments (7)

yassilah avatar yassilah commented on September 23, 2024 1

Alright, I found the error (Nova was updated and not sending Models back from the Update/Create requests). Can you try to update the package to 2.0.4 and tell me if that works?

from laravel-nova-nested-form.

jpmaga avatar jpmaga commented on September 23, 2024 1

@yassipad Cheers, mate! Seems to be working fine now with some quick testing.

from laravel-nova-nested-form.

jpmaga avatar jpmaga commented on September 23, 2024

Update: If I try to delete all the nested items, it works. Just doesn't work if I try to delete only one on a list with more than one.

from laravel-nova-nested-form.

thanoseleftherakos avatar thanoseleftherakos commented on September 23, 2024

Any solution to this?
Im facing the exact same problem.

from laravel-nova-nested-form.

jpmaga avatar jpmaga commented on September 23, 2024

Any solution to this?
Im facing the exact same problem.

Sorry mate, no luck on this end so far. I confess I haven't had enough time to look at the source to see what might cause this to provide some more insight, though.

from laravel-nova-nested-form.

yassilah avatar yassilah commented on September 23, 2024

Hi,
Sorry for the late reply. I assume you're both using the latest package version? Do you have event hooks (::saved, ::created or ::deleted) on your models? Do you have special policies? If the nested resources are not being deleted, it means somehow they are being sent for update because they were modified, is there any chance some value on your models is being changed before being displayed?

from laravel-nova-nested-form.

jpmaga avatar jpmaga commented on September 23, 2024

Hey,
I am using version 2.0.2. I am not using event hooks. Here is the model:

namespace App;

use Illuminate\Database\Eloquent\Model;
use Spatie\Translatable\HasTranslations;

class SolutionHighlights extends Model
{
    use HasTranslations;

    public $translatable = ['title', 'content'];

    protected $casts = [
        'property_id' => 'array',
    ];

    protected $appends = ['properties'];

    public function getPropertiesAttribute()
    {
        return Property::find($this->property_id);
    }

    public function solution()
    {
        return $this->belongsTo(Solution::class);
    }
}

Nothing out of the ordinary other than the translation package from spatie.

from laravel-nova-nested-form.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.