laravel-pivot-softdeletes icon indicating copy to clipboard operation
laravel-pivot-softdeletes copied to clipboard

Make your Eloquent models pivots be able to soft deleted in Laravel/Lumen

Results 7 laravel-pivot-softdeletes issues
Sort by recently updated
recently updated
newest added

Hi! When I do the "normal" `->detach($post->id)` I get as expected the timestamp at the `deleted_at` column. But when I'd like to set the reassignment again by using `->attach()` like:...

Steps: 1. `->sync([1,2,3])` - create 3 new rows in pivot 2. `->sync([2,3])` - mark first row as deleted 3. `->sync([1,2,3])` - fails, because it try to insert first row again,...

enhancement

Do you think that `detach()` method should detach all related models OR only those are attached? I mean if call something like this: `Post::find(495)->tags()->detach();` twice `deleted_at` column will be updated...

New format for phpunit.xml (ran phpunit --migrate-configuration) * Added composer.lock for to .gitignore * Added sqlite to require-dev (needed for running unit tests)

First of all, great small package! It seems like MorphToMany Relationships are not supported. ```php /** * The rooms this item is stored in. * * @return \Illuminate\Database\Eloquent\Relations\MorphToMany */ public...

```php class Post extends Model { public function tags() { return $this->belongsToMany(Tag::class)->withSoftDeletes()->withTrashedPivots(); } } ``` ```php Post::whereHas('tags'); // works as expected Post::whereHas('tags', function ($query) { $query->where('tags.x', 'y'); }); // does...

👋 Hello, I'm using this package and it works great with my own controller and so but I just found when detaching from Nova the softdeletes are not used at...