This is a public shared error.
PHP
array_diff(): Argument #2 must be of type array, int given
$relationship->associate($state);
$record->wasRecentlyCreated && $record->save();
return;
}
if ($modifyQueryUsing) {
$component->evaluate($modifyQueryUsing, [
'query' => $relationship->getQuery(),
]);
}
/** @var Collection $relatedRecords */
$relatedRecords = $relationship->getResults();
$recordsToDetach = array_diff(
$relatedRecords
->pluck($relationship->getRelatedKeyName())
->map(static fn ($key): string => strval($key))
->all(),
$state ?? [],
);
if (count($recordsToDetach) > 0) {
$relationship->detach($recordsToDetach);
}
$pivotData = $component->getPivotData();
if ($pivotData === []) {
App
Request
https://meinrad_laravel.test/admin/products/create
GET
curl "https://meinrad_laravel.test/admin/products/create" \
-X GET \
-H 'cookie: <CENSORED>' \
-H 'priority: u=1, i' \
-H 'accept-language: en-GB,en-US;q=0.9,en;q=0.8' \
-H 'accept-encoding: gzip, deflate, br, zstd' \
-H 'referer: https://meinrad_laravel.test/admin/products/create' \
-H 'sec-fetch-dest: empty' \
-H 'sec-fetch-mode: cors' \
-H 'sec-fetch-site: same-origin' \
-H 'origin: https://meinrad_laravel.test' \
-H 'accept: */*' \
-H 'sec-ch-ua-platform: "macOS"' \
-H 'user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36' \
-H 'sec-ch-ua-mobile: ?0' \
-H 'content-type: application/json' \
-H 'sec-ch-ua: "Not/A)Brand";v="8", "Chromium";v="126", "Google Chrome";v="126"' \
-H 'x-socket-id: 68956336.919133857' \
-H 'cache-control: no-cache' \
-H 'pragma: no-cache' \
-H 'content-length: 2229' \
-H 'host: meinrad_laravel.test' \
-d {"_token":"0d2mQO87hyhsnnZMV7BCDyXEMNXBU8t7j77Thys4","components":[{"snapshot":"{\"data\":{\"record\":null,\"data\":[{\"name\":\"Apple\",\"product_type_id\":\"2\",\"attribute_id\":1,\"skus\":[[[{\"sku\":\"J-AP-S\",\"price\":\"4\",\"attributeValues\":1,\"min_portions\":null,\"max_portions\":null,\"media\":[{\"0ce1b704-0049-4a46-afe3-3da356e76c0a\":[\"livewire-file:Wia7Fl5dZ6OzrGu9J67CWChZgYI9F5-metaV2hhdHNBcHAgSW1hZ2UgMjAyMi0wMi0xOSBhdCAyMi41Ny4wMC5qcGVn-.jpg\",{\"s\":\"fil\"}]},{\"s\":\"arr\"}]},{\"s\":\"arr\"}],[{\"sku\":\"J-AP-L\",\"price\":\"7\",\"attributeValues\":2,\"min_portions\":null,\"max_portions\":null,\"media\":[{\"e086d364-447f-4bf4-bae8-0efb7c5060ee\":[\"livewire-file:Fg98zXZnOW9oYTISYPn1yCWzoCOUIn-metaV2hhdHNBcHAgSW1hZ2UgMjAyMy0xMC0yMiBhdCAxNy4wMC41Mi5qcGVn-.jpg\",{\"s\":\"fil\"}]},{\"s\":\"arr\"}]},{\"s\":\"arr\"}]],{\"s\":\"arr\"}],\"description\":null,\"category_id\":\"2\",\"meal_types\":[[\"2\"],{\"s\":\"arr\"}]},{\"s\":\"arr\"}],\"previousUrl\":\"https:\\/\\/meinrad_laravel.test\\/admin\\/products\\/create\",\"mountedActions\":[[],{\"s\":\"arr\"}],\"mountedActionsArguments\":[[],{\"s\":\"arr\"}],\"mountedActionsData\":[[],{\"s\":\"arr\"}],\"defaultAction\":null,\"defaultActionArguments\":null,\"componentFileAttachments\":[[],{\"s\":\"arr\"}],\"mountedFormComponentActions\":[[],{\"s\":\"arr\"}],\"mountedFormComponentActionsArguments\":[[],{\"s\":\"arr\"}],\"mountedFormComponentActionsData\":[[],{\"s\":\"arr\"}],\"mountedFormComponentActionsComponents\":[[],{\"s\":\"arr\"}],\"mountedInfolistActions\":[[],{\"s\":\"arr\"}],\"mountedInfolistActionsData\":[[],{\"s\":\"arr\"}],\"mountedInfolistActionsComponent\":null,\"mountedInfolistActionsInfolist\":null,\"savedDataHash\":\"f4f7d505cedfda82e7af76bcc0f6b47a\"},\"memo\":{\"id\":\"h3xvYbyvkO0pQp4mncnX\",\"name\":\"app.filament.resources.product-resource.pages.create-product\",\"path\":\"admin\\/products\\/create\",\"method\":\"GET\",\"children\":[],\"scripts\":[\"2778863608-1\",\"1862246771-0\"],\"assets\":[],\"errors\":[],\"locale\":\"de_CH\"},\"checksum\":\"e352b9bbbc31cbaecf0f5bbfe331b46aa92754439c69a229aab402adc6480b4f\"}","updates":{"data.description":"asdfasdf asdf s"},"calls":[{"path":null,"method":"create","params":[]}]}]}
Headers
- cookie
<CENSORED>
- priority
u=1, i
- accept-language
en-GB,en-US;q=0.9,en;q=0.8
- accept-encoding
gzip, deflate, br, zstd
- referer
https://meinrad_laravel.test/admin/products/create
- sec-fetch-dest
empty
- sec-fetch-mode
cors
- sec-fetch-site
same-origin
- origin
https://meinrad_laravel.test
- accept
*/*
- sec-ch-ua-platform
"macOS"
- user-agent
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36
- sec-ch-ua-mobile
?0
- content-type
application/json
- sec-ch-ua
"Not/A)Brand";v="8", "Chromium";v="126", "Google Chrome";v="126"
- x-socket-id
68956336.919133857
- cache-control
no-cache
- pragma
no-cache
- content-length
2229
- host
meinrad_laravel.test
Body
{
"_token": "0d2mQO87hyhsnnZMV7BCDyXEMNXBU8t7j77Thys4",
"components": [
{
"snapshot": "{\"data\":{\"record\":null,\"data\":[{\"name\":\"Apple\",\"product_type_id\":\"2\",\"attribute_id\":1,\"skus\":[[[{\"sku\":\"J-AP-S\",\"price\":\"4\",\"attributeValues\":1,\"min_portions\":null,\"max_portions\":null,\"media\":[{\"0ce1b704-0049-4a46-afe3-3da356e76c0a\":[\"livewire-file:Wia7Fl5dZ6OzrGu9J67CWChZgYI9F5-metaV2hhdHNBcHAgSW1hZ2UgMjAyMi0wMi0xOSBhdCAyMi41Ny4wMC5qcGVn-.jpg\",{\"s\":\"fil\"}]},{\"s\":\"arr\"}]},{\"s\":\"arr\"}],[{\"sku\":\"J-AP-L\",\"price\":\"7\",\"attributeValues\":2,\"min_portions\":null,\"max_portions\":null,\"media\":[{\"e086d364-447f-4bf4-bae8-0efb7c5060ee\":[\"livewire-file:Fg98zXZnOW9oYTISYPn1yCWzoCOUIn-metaV2hhdHNBcHAgSW1hZ2UgMjAyMy0xMC0yMiBhdCAxNy4wMC41Mi5qcGVn-.jpg\",{\"s\":\"fil\"}]},{\"s\":\"arr\"}]},{\"s\":\"arr\"}]],{\"s\":\"arr\"}],\"description\":null,\"category_id\":\"2\",\"meal_types\":[[\"2\"],{\"s\":\"arr\"}]},{\"s\":\"arr\"}],\"previousUrl\":\"https:\\/\\/meinrad_laravel.test\\/admin\\/products\\/create\",\"mountedActions\":[[],{\"s\":\"arr\"}],\"mountedActionsArguments\":[[],{\"s\":\"arr\"}],\"mountedActionsData\":[[],{\"s\":\"arr\"}],\"defaultAction\":null,\"defaultActionArguments\":null,\"componentFileAttachments\":[[],{\"s\":\"arr\"}],\"mountedFormComponentActions\":[[],{\"s\":\"arr\"}],\"mountedFormComponentActionsArguments\":[[],{\"s\":\"arr\"}],\"mountedFormComponentActionsData\":[[],{\"s\":\"arr\"}],\"mountedFormComponentActionsComponents\":[[],{\"s\":\"arr\"}],\"mountedInfolistActions\":[[],{\"s\":\"arr\"}],\"mountedInfolistActionsData\":[[],{\"s\":\"arr\"}],\"mountedInfolistActionsComponent\":null,\"mountedInfolistActionsInfolist\":null,\"savedDataHash\":\"f4f7d505cedfda82e7af76bcc0f6b47a\"},\"memo\":{\"id\":\"h3xvYbyvkO0pQp4mncnX\",\"name\":\"app.filament.resources.product-resource.pages.create-product\",\"path\":\"admin\\/products\\/create\",\"method\":\"GET\",\"children\":[],\"scripts\":[\"2778863608-1\",\"1862246771-0\"],\"assets\":[],\"errors\":[],\"locale\":\"de_CH\"},\"checksum\":\"e352b9bbbc31cbaecf0f5bbfe331b46aa92754439c69a229aab402adc6480b4f\"}",
"updates": {
"data.description": "asdfasdf asdf s"
},
"calls": [
{
"path": null,
"method": "create",
"params": []
}
]
}
]
}
Session
- _token
0d2mQO87hyhsnnZMV7BCDyXEMNXBU8t7j77Thys4
- url
[]
- _flash
{ "old": [], "new": [] }
- previousRoute
manage
- lastNavigationRoute
profile.info
- _previous
{ "url": "https://meinrad_laravel.test/admin/products/create" }
- login_web_59ba36addc2b2f9401580f014c7f58ea4e30989d
6
- password_hash_web
$2y$12$pPKZeaH4st5tDVoKla4CKO3u50meTKweRzDBnWZCGk/5qsHijcoQy
Context
User
k.nowak1@gmail.com
ID: 6
{
"id": 6,
"first_name": "Kasper",
"email": "k.nowak1@gmail.com",
"email_verified_at": "2024-07-10T13:25:12.000000Z",
"created_at": "2024-07-10T13:15:40.000000Z",
"updated_at": "2024-07-10T13:15:40.000000Z",
"uuid": "9c7d3e8a-196f-4d8b-a208-f5a25f9b0b44",
"last_name": "Nowak",
"company": null,
"is_company": false,
"phone_number": "+4528292744",
"address": "Balle Kirkevej 49",
"latitude": 56.1865,
"longitude": 9.5213,
"road": "Balle Kirkevej",
"house_number": "49",
"postal_code": "8600",
"city": "Silkeborg",
"country": "Denmark",
"bexio_id": null,
"bexio_nr": null,
"billing_period_id": null,
"current_group_id": 1,
"full_name": "Kasper Nowak",
"location": {
"lat": 56.1865,
"lng": 9.5213
},
"roles": [
{
"id": 1,
"name": "super_admin",
"guard_name": "web",
"created_at": "2024-07-10T13:15:30.000000Z",
"updated_at": "2024-07-10T13:15:30.000000Z",
"pivot": {
"model_type": "App\\Models\\User",
"model_id": 6,
"role_id": 1
}
}
]
}
8:18:11 AM
6.919936ms
pgsql
select * from "sessions" where "id" = 2yrDEktV9NLOD7vTaca6qNuBBsMJljEVKB866JgZ limit 1
8:27:03 AM
2.640128ms
pgsql
select * from "users" where "id" = 6 limit 1
8:27:06 AM
0.979968ms
pgsql
select * from "products" where "products"."deleted_at" is null
8:27:08 AM
1.44ms
pgsql
select "meal_types".*, "meal_type_product"."product_id" as "pivot_product_id", "meal_type_product"."meal_type_id" as "pivot_meal_type_id", "meal_type_product"."created_at" as "pivot_created_at", "meal_type_product"."updated_at" as "pivot_updated_at" from "meal_types" inner join "meal_type_product" on "meal_types"."id" = "meal_type_product"."meal_type_id" where "meal_type_product"."product_id" in (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16)
8:27:11 AM
1.00992ms
pgsql
select "attributes".*, "attribute_product"."product_id" as "pivot_product_id", "attribute_product"."attribute_id" as "pivot_attribute_id" from "attributes" inner join "attribute_product" on "attributes"."id" = "attribute_product"."attribute_id" where "attribute_product"."product_id" in (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16)
8:27:12 AM
0.740096ms
pgsql
select * from "product_skus" where "product_skus"."product_id" in (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16) and "product_skus"."deleted_at" is null
8:27:13 AM
0.839936ms
pgsql
select * from "media" where "media"."model_id" in (1, 2, 3, 4, 5, 6, 7, 8, 9, 10) and "media"."model_type" = App\Models\ProductSku
8:27:14 AM
1.370112ms
pgsql
select "attribute_values".*, "attribute_value_product_sku"."product_sku_id" as "pivot_product_sku_id", "attribute_value_product_sku"."attribute_value_id" as "pivot_attribute_value_id" from "attribute_values" inner join "attribute_value_product_sku" on "attribute_values"."id" = "attribute_value_product_sku"."attribute_value_id" where "attribute_value_product_sku"."product_sku_id" in (1, 2, 3, 4, 5, 6, 7, 8, 9, 10)
8:27:16 AM
0.52992ms
pgsql
select * from "bulk_pricing_levels" where "bulk_pricing_levels"."product_sku_id" in (1, 2, 3, 4, 5, 6, 7, 8, 9, 10)
8:27:17 AM
0.790016ms
pgsql
select * from "categories" where "categories"."id" in (1, 2, 3) order by "sort" asc
8:27:18 AM
0.460032ms
pgsql
select * from "categories" where "categories"."id" in (1)
8:27:19 AM
0.580096ms
pgsql
select * from "product_types" where "product_types"."id" in (1, 2, 3)
8:27:22 AM
1.299968ms
pgsql
select "roles".*, "model_has_roles"."model_id" as "pivot_model_id", "model_has_roles"."role_id" as "pivot_role_id", "model_has_roles"."model_type" as "pivot_model_type" from "roles" inner join "model_has_roles" on "roles"."id" = "model_has_roles"."role_id" where "model_has_roles"."model_id" in (6) and "model_has_roles"."model_type" = App\Models\User
8:27:31 AM
0.489984ms
pgsql
select * from "product_types" where "name" = Simple limit 1
8:27:33 AM
0.329984ms
pgsql
select * from "product_types" where "product_types"."id" = 2 limit 1
8:27:34 AM
0.339968ms
pgsql
select * from "product_skus" where "product_skus"."product_id" is null and "product_skus"."product_id" is not null and "product_skus"."deleted_at" is null
8:27:35 AM
0.290048ms
pgsql
select * from "product_types" where "product_types"."id" = 2 limit 1
8:27:35 AM
0.310016ms
pgsql
select * from "product_types" where "product_types"."id" = 2 limit 1
8:27:36 AM
0.329984ms
pgsql
select * from "product_types" where "product_types"."id" = 2 limit 1
8:27:36 AM
0.290048ms
pgsql
select * from "product_types" where "product_types"."id" = 2 limit 1
8:27:38 AM
0.570112ms
pgsql
select * from "cache" where "key" = spatie.permission.cache limit 1
8:27:41 AM
0.570112ms
pgsql
select * from "product_types" where "product_types"."id" = 2 limit 1
8:27:43 AM
0.519936ms
pgsql
select * from "product_types" where "product_types"."id" = 2 limit 1
8:27:44 AM
0.389888ms
pgsql
select * from "product_types" where "product_types"."id" = 2 limit 1
8:27:45 AM
0.310016ms
pgsql
select * from "product_types" where "product_types"."id" = 2 limit 1
8:27:45 AM
0.389888ms
pgsql
select * from "product_types" where "product_types"."id" = 2 limit 1
8:27:46 AM
0.400128ms
pgsql
select * from "product_types" where "product_types"."id" = 2 limit 1
8:27:47 AM
0.280064ms
pgsql
select * from "product_types" where "product_types"."id" = 2 limit 1
8:27:47 AM
0.280064ms
pgsql
select * from "product_types" where "product_types"."id" = 2 limit 1
8:27:49 AM
0.359936ms
pgsql
select * from "product_types" where "product_types"."id" = 2 limit 1
8:27:50 AM
0.310016ms
pgsql
select * from "product_types" where "product_types"."id" = 2 limit 1
8:27:51 AM
0.260096ms
pgsql
select * from "product_types" where "product_types"."id" = 2 limit 1
8:27:51 AM
0.290048ms
pgsql
select * from "product_types" where "product_types"."id" = 2 limit 1
8:27:52 AM
0.27008ms
pgsql
select * from "product_types" where "product_types"."id" = 2 limit 1
8:27:52 AM
0.280064ms
pgsql
select * from "product_types" where "product_types"."id" = 2 limit 1
8:27:53 AM
0.27008ms
pgsql
select * from "product_types" where "product_types"."id" = 2 limit 1
8:27:53 AM
0.359936ms
pgsql
select * from "product_types" where "product_types"."id" = 2 limit 1
8:27:54 AM
0.280064ms
pgsql
select * from "product_types" where "product_types"."id" = 2 limit 1
8:27:54 AM
0.809984ms
pgsql
select * from "product_types" where "product_types"."id" = 2 limit 1
8:27:56 AM
6.640128ms
pgsql
select * from "product_types" where "product_types"."id" = 2 limit 1
8:28:03 AM
0.509952ms
pgsql
select * from "product_types" where "product_types"."id" = 2 limit 1
8:28:04 AM
0.36992ms
pgsql
select * from "product_types" where "product_types"."id" = 2 limit 1
8:28:05 AM
0.36992ms
pgsql
select * from "product_types" where "product_types"."id" = 2 limit 1
8:28:06 AM
0.310016ms
pgsql
select * from "product_types" where "product_types"."id" = 2 limit 1
8:28:07 AM
0.719872ms
pgsql
select * from "product_types" where "product_types"."id" = 2 limit 1
8:28:08 AM
0.400128ms
pgsql
select * from "product_types" where "product_types"."id" = 2 limit 1
8:28:09 AM
0.389888ms
pgsql
select * from "product_types" where "product_types"."id" = 2 limit 1
8:28:10 AM
0.91008ms
pgsql
select * from "product_types" where "product_types"."id" = 2 limit 1
8:28:11 AM
0.339968ms
pgsql
select * from "product_types" where "product_types"."id" = 2 limit 1
8:28:14 AM
2.4ms
pgsql
select * from "product_types" where "product_types"."id" = 2 limit 1
8:28:16 AM
0.549888ms
pgsql
select * from "product_types" where "product_types"."id" = 2 limit 1
8:28:17 AM
2.680064ms
pgsql
select * from "product_types" where "product_types"."id" = 2 limit 1
8:28:20 AM
0.659968ms
pgsql
select * from "product_types" where "product_types"."id" = 2 limit 1
8:28:21 AM
5.819904ms
pgsql
select * from "product_types" where "product_types"."id" = 2 limit 1
8:28:28 AM
2.010112ms
pgsql
select * from "product_types" where "product_types"."id" = 2 limit 1
8:28:34 AM
13.700096ms
pgsql
select count(*) as aggregate from "product_types" where "product_types"."id" = 2
8:28:48 AM
0.570112ms
pgsql
select count(*) as aggregate from "product_skus" where "sku" = J-AP-S
8:28:49 AM
0.519936ms
pgsql
select count(*) as aggregate from "product_skus" where "sku" = J-AP-L
8:28:51 AM
2.24ms
pgsql
select count(*) as aggregate from "categories" where "categories"."id" = 2
8:28:54 AM
0.900096ms
pgsql
select * from "product_types" where "product_types"."id" = 2 limit 1
8:28:55 AM
0.679936ms
pgsql
select * from "product_types" where "product_types"."id" = 2 limit 1
8:28:58 AM
0.630016ms
pgsql
select * from "product_types" where "product_types"."id" = 2 limit 1
8:28:59 AM
0.519936ms
pgsql
select * from "product_types" where "product_types"."id" = 2 limit 1
8:29:00 AM
1.090048ms
pgsql
select * from "product_types" where "product_types"."id" = 2 limit 1
8:29:02 AM
1.929984ms
pgsql
select * from "product_types" where "product_types"."id" = 2 limit 1
8:29:04 AM
0.460032ms
pgsql
select * from "product_types" where "product_types"."id" = 2 limit 1
8:29:05 AM
0.389888ms
pgsql
select * from "product_types" where "product_types"."id" = 2 limit 1
8:29:06 AM
0.869888ms
pgsql
select * from "product_types" where "product_types"."id" = 2 limit 1
8:29:09 AM
2.949888ms
pgsql
select * from "product_types" where "product_types"."id" = 2 limit 1
8:29:13 AM
1.080064ms
pgsql
select * from "product_types" where "product_types"."id" = 2 limit 1
8:29:14 AM
0.48ms
pgsql
select * from "product_types" where "product_types"."id" = 2 limit 1
8:29:15 AM
0.560128ms
pgsql
select * from "product_types" where "product_types"."id" = 2 limit 1
8:29:16 AM
0.470016ms
pgsql
select * from "product_types" where "product_types"."id" = 2 limit 1
8:29:17 AM
0.379904ms
pgsql
select * from "product_types" where "product_types"."id" = 2 limit 1
8:29:18 AM
0.410112ms
pgsql
select * from "product_types" where "product_types"."id" = 2 limit 1
8:29:18 AM
0.48ms
pgsql
select * from "product_types" where "product_types"."id" = 2 limit 1
8:29:20 AM
0.420096ms
pgsql
select * from "bulk_pricing_levels" where "bulk_pricing_levels"."product_sku_id" is null and "bulk_pricing_levels"."product_sku_id" is not null
8:29:20 AM
0.359936ms
pgsql
select * from "bulk_pricing_levels" where "bulk_pricing_levels"."product_sku_id" is null and "bulk_pricing_levels"."product_sku_id" is not null
8:29:22 AM
0.420096ms
pgsql
select * from "product_types" where "product_types"."id" = 2 limit 1
8:29:23 AM
0.36992ms
pgsql
select * from "product_types" where "product_types"."id" = 2 limit 1
8:29:25 AM
0.539904ms
pgsql
select * from "product_types" where "product_types"."id" = 2 limit 1
8:29:26 AM
0.379904ms
pgsql
select * from "product_types" where "product_types"."id" = 2 limit 1
8:29:27 AM
1.76ms
pgsql
insert into "products" ("name", "product_type_id", "description", "category_id", "updated_at", "created_at") values (Apple, 2, asdfasdf asdf s, 2, 2024-07-10 17:39:23, 2024-07-10 17:39:23) returning "id"
8:29:31 AM
0.64ms
pgsql
select * from "product_types" where "product_types"."id" = 2 limit 1
8:29:32 AM
0.389888ms
pgsql
select * from "product_types" where "product_types"."id" = 2 limit 1
8:29:33 AM
1.700096ms
pgsql
select "attributes".*, "attribute_product"."product_id" as "pivot_product_id", "attribute_product"."attribute_id" as "pivot_attribute_id" from "attributes" inner join "attribute_product" on "attributes"."id" = "attribute_product"."attribute_id" where "attribute_product"."product_id" = 17