still untag() didsnt work
hizone opened this issue · comments
hizone commented
Bruno Gaspar commented
Hello @Haizone
I just tested, again, and it's working as expected.
Here's the code i used to test + the package unit tests
$user = App\User::firstOrCreate(['email' => 'first@user.com', 'name' => 'First User', 'password' => '123']);
$user->tag(['foo', 'bar', 'baz']);
dump($user->tags()->get()->pluck('slug', 'name')->toArray());
$user->untag('foo');
dump($user->tags()->get()->pluck('slug', 'name')->toArray());
$user->untag();
dump($user->tags()->get()->pluck('slug', 'name')->toArray());
Here is the dump
array:3 [▼
"foo" => "foo"
"bar" => "bar"
"baz" => "baz"
]
array:2 [▼
"bar" => "bar"
"baz" => "baz"
]
[]
Laravel: 5.6.15
Cartalyst Tags: 6.0.1
Ensure that you're using the latest version of the Cartalyst Tags as well.