Flare Laravel Error Tracking
Get all these insights and more when you sign up for FlareLearn more
This is a public shared error.
Illuminate \ Database \ QueryException
PHP 
SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`mypet`.`treatments`, CONSTRAINT `treatments_team_id_foreign` FOREIGN KEY (`team_id`) REFERENCES `teams` (`id`) ON DELETE CASCADE)
insert into `treatments` (`date`, `description`, `notes`, `doctor_id`, `vaccines`, `patient_id`, `updated_at`, `created_at`) values (2023-09-26, test, test, 2, [{"name":"Parvovirosis","date":"2023-09-26"}], 2, 2023-09-26 14:33:39, 2023-09-26 14:33:39)
|
| Composer provides a convenient, automatically generated class loader for
| this application. We just need to utilize it! We'll simply require it
| into the script here so we don't need to manually load our classes.
|
*/
require __DIR__.'/../vendor/autoload.php';
/*
|--------------------------------------------------------------------------
| Run The Application
|--------------------------------------------------------------------------
|
| Once we have the application, we can handle the incoming request using
| the application's HTTP kernel. Then, we will send the response back
| to this client's browser, allowing them to enjoy our application.
|
*/
$app = require_once __DIR__.'/../bootstrap/app.php';
$kernel = $app->make(Kernel::class);
$response = $kernel->handle(
$request = Request::capture()
)->send();
$kernel->terminate($request, $response);

App

Routing

Action
Livewire\Mechanisms\HandleRequests\HandleRequests@handleUpdate
Route name
livewire.update
Middleware
  • web

Browser

Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36

Request

http://localhost/admin/2/patients/2/edit
GET
curl "http://localhost/admin/2/patients/2/edit" \
   -X GET \
   -H 'host: localhost' \
   -H 'accept: */*' \
   -H 'cookie: XSRF-TOKEN=eyJpdiI6IjZ4dFMrM1grdTcyU3Evam1ZbkZ0S2c9PSIsInZhbHVlIjoiN21TbHRvOGV5bVFubjlIQ2M1QzA2ZHJpdm1NM1l3eVk1eVI5RHdRc1dDSGF2UHVzLytwNFNTbzJWcGpBZmFBZjQ2RGJ5bUFmVXo0d3ZONlk5UUZ2UGF6QlQ4NVVxOXdrMExrNEF6OXdFYktmWEdNWWFvWUlyeVdheU1jTnVXK3MiLCJtYWMiOiI1OGZkYTkyNzlmNTdjNGJhYzE2OWQ3NjEyYTFhYmNjYWU2MjYzNzgwYjg0MWE3MzM3YTFjOTM0MzQzMDc0ZGFjIiwidGFnIjoiIn0%3D; laravel_session=eyJpdiI6Ik1DMk1uVUpEcDZVdElDS2Q5MEUrMEE9PSIsInZhbHVlIjoiV2luUi84d1NVLzloVjhQdlZvSi81YkpablphWjFoZitvZXM3U0FudGMyY1NsNWNFWGp4WjZWeDNCRmNxMXJuRmlLSkpaV1g3R2M0T08veG1paWZydi9rODVPcXQvaXZMZEVDTEs4U3duZ01CQUZEUllyQ21kQThlUXpKUUNrY3giLCJtYWMiOiIwNDFhZDk4ZTQwODFhNWViMjA1NjkwNjIyYTU0MTllOTI2Zjk2ZDc4NzM5ZTNjY2ViYWM4Mjg3ZDYzNTVlY2ZmIiwidGFnIjoiIn0%3D' \
   -H 'origin: http://localhost' \
   -H 'referer: http://localhost/admin/2/patients/2/edit' \
   -H 'sec-gpc: 1' \
   -H 'sec-ch-ua: "Brave";v="117", "Not;A=Brand";v="8", "Chromium";v="117"' \
   -H 'connection: keep-alive' \
   -H 'user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36' \
   -H 'content-type: application/json' \
   -H 'content-length: 2377' \
   -H 'sec-fetch-dest: empty' \
   -H 'sec-fetch-mode: cors' \
   -H 'sec-fetch-site: same-origin' \
   -H 'accept-encoding: gzip, deflate, br' \
   -H 'accept-language: en-US,en' \
   -H 'sec-ch-ua-mobile: ?0' \
   -H 'sec-ch-ua-platform: "macOS"' \
   -d {"_token":"nmLiudkOyYelRXOCWk8FiIPHbc8dCDEymDgoVkWW","components":[{"calls":[{"path":null,"method":"callMountedTableAction","params":[]}],"updates":{"mountedTableActionsData.0.vaccines.e6744996-dce8-42a9-8d68-7dc3b792d62c.date":"2023-09-26","mountedTableActionsData.0.vaccines.e6744996-dce8-42a9-8d68-7dc3b792d62c.name":"Parvovirosis"},"snapshot":"{\"data\":{\"ownerRecord\":[null,{\"class\":\"App\\\\Models\\\\Patient\",\"key\":2,\"s\":\"mdl\"}],\"pageClass\":\"App\\\\Filament\\\\Resources\\\\PatientResource\\\\Pages\\\\EditPatient\",\"mountedActions\":[[],{\"s\":\"arr\"}],\"mountedActionsArguments\":[[],{\"s\":\"arr\"}],\"mountedActionsData\":[[],{\"s\":\"arr\"}],\"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,\"isTableLoaded\":false,\"tableGrouping\":null,\"tableGroupingDirection\":null,\"tableRecordsPerPage\":10,\"isTableReordering\":false,\"tableColumnSearches\":[[],{\"s\":\"arr\"}],\"tableSearch\":\"\",\"tableSortColumn\":null,\"tableSortDirection\":null,\"toggledTableColumns\":[[],{\"s\":\"arr\"}],\"mountedTableActions\":[[\"create\"],{\"s\":\"arr\"}],\"mountedTableActionsData\":[[[{\"date\":\"2023-09-26\",\"team_id\":2,\"description\":\"test\",\"notes\":\"test\",\"doctor_id\":\"2\",\"vaccines\":[{\"e6744996-dce8-42a9-8d68-7dc3b792d62c\":[{\"name\":null,\"date\":null},{\"s\":\"arr\"}]},{\"s\":\"arr\"}]},{\"s\":\"arr\"}]],{\"s\":\"arr\"}],\"mountedTableActionRecord\":null,\"selectedTableRecords\":[[],{\"s\":\"arr\"}],\"mountedTableBulkAction\":null,\"mountedTableBulkActionData\":[[],{\"s\":\"arr\"}],\"tableFilters\":null,\"paginators\":[{\"treatmentsRelationManagerPage\":1},{\"s\":\"arr\"}]},\"memo\":{\"id\":\"cMhY8ncr7nqMkkJVrXaR\",\"name\":\"app.filament.resources.patient-resource.relation-managers.treatments-relation-manager\",\"path\":\"admin\\/2\\/patients\\/2\\/edit\",\"method\":\"GET\",\"children\":[],\"errors\":[],\"locale\":\"es\"},\"checksum\":\"9cc54e7da7e5e744f2ec9e3c1dde535235b4d06744ab11e23af47677dd7d374e\"}"}]}

Headers

host
localhost
accept
*/*
cookie
XSRF-TOKEN=eyJpdiI6IjZ4dFMrM1grdTcyU3Evam1ZbkZ0S2c9PSIsInZhbHVlIjoiN21TbHRvOGV5bVFubjlIQ2M1QzA2ZHJpdm1NM1l3eVk1eVI5RHdRc1dDSGF2UHVzLytwNFNTbzJWcGpBZmFBZjQ2RGJ5bUFmVXo0d3ZONlk5UUZ2UGF6QlQ4NVVxOXdrMExrNEF6OXdFYktmWEdNWWFvWUlyeVdheU1jTnVXK3MiLCJtYWMiOiI1OGZkYTkyNzlmNTdjNGJhYzE2OWQ3NjEyYTFhYmNjYWU2MjYzNzgwYjg0MWE3MzM3YTFjOTM0MzQzMDc0ZGFjIiwidGFnIjoiIn0%3D; laravel_session=eyJpdiI6Ik1DMk1uVUpEcDZVdElDS2Q5MEUrMEE9PSIsInZhbHVlIjoiV2luUi84d1NVLzloVjhQdlZvSi81YkpablphWjFoZitvZXM3U0FudGMyY1NsNWNFWGp4WjZWeDNCRmNxMXJuRmlLSkpaV1g3R2M0T08veG1paWZydi9rODVPcXQvaXZMZEVDTEs4U3duZ01CQUZEUllyQ21kQThlUXpKUUNrY3giLCJtYWMiOiIwNDFhZDk4ZTQwODFhNWViMjA1NjkwNjIyYTU0MTllOTI2Zjk2ZDc4NzM5ZTNjY2ViYWM4Mjg3ZDYzNTVlY2ZmIiwidGFnIjoiIn0%3D
origin
http://localhost
referer
http://localhost/admin/2/patients/2/edit
sec-gpc
1
sec-ch-ua
"Brave";v="117", "Not;A=Brand";v="8", "Chromium";v="117"
connection
keep-alive
user-agent
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36
content-type
application/json
content-length
2377
sec-fetch-dest
empty
sec-fetch-mode
cors
sec-fetch-site
same-origin
accept-encoding
gzip, deflate, br
accept-language
en-US,en
sec-ch-ua-mobile
?0
sec-ch-ua-platform
"macOS"

Body

{
    "_token": "nmLiudkOyYelRXOCWk8FiIPHbc8dCDEymDgoVkWW",
    "components": [
        {
            "calls": [
                {
                    "path": null,
                    "method": "callMountedTableAction",
                    "params": []
                }
            ],
            "updates": {
                "mountedTableActionsData.0.vaccines.e6744996-dce8-42a9-8d68-7dc3b792d62c.date": "2023-09-26",
                "mountedTableActionsData.0.vaccines.e6744996-dce8-42a9-8d68-7dc3b792d62c.name": "Parvovirosis"
            },
            "snapshot": "{\"data\":{\"ownerRecord\":[null,{\"class\":\"App\\\\Models\\\\Patient\",\"key\":2,\"s\":\"mdl\"}],\"pageClass\":\"App\\\\Filament\\\\Resources\\\\PatientResource\\\\Pages\\\\EditPatient\",\"mountedActions\":[[],{\"s\":\"arr\"}],\"mountedActionsArguments\":[[],{\"s\":\"arr\"}],\"mountedActionsData\":[[],{\"s\":\"arr\"}],\"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,\"isTableLoaded\":false,\"tableGrouping\":null,\"tableGroupingDirection\":null,\"tableRecordsPerPage\":10,\"isTableReordering\":false,\"tableColumnSearches\":[[],{\"s\":\"arr\"}],\"tableSearch\":\"\",\"tableSortColumn\":null,\"tableSortDirection\":null,\"toggledTableColumns\":[[],{\"s\":\"arr\"}],\"mountedTableActions\":[[\"create\"],{\"s\":\"arr\"}],\"mountedTableActionsData\":[[[{\"date\":\"2023-09-26\",\"team_id\":2,\"description\":\"test\",\"notes\":\"test\",\"doctor_id\":\"2\",\"vaccines\":[{\"e6744996-dce8-42a9-8d68-7dc3b792d62c\":[{\"name\":null,\"date\":null},{\"s\":\"arr\"}]},{\"s\":\"arr\"}]},{\"s\":\"arr\"}]],{\"s\":\"arr\"}],\"mountedTableActionRecord\":null,\"selectedTableRecords\":[[],{\"s\":\"arr\"}],\"mountedTableBulkAction\":null,\"mountedTableBulkActionData\":[[],{\"s\":\"arr\"}],\"tableFilters\":null,\"paginators\":[{\"treatmentsRelationManagerPage\":1},{\"s\":\"arr\"}]},\"memo\":{\"id\":\"cMhY8ncr7nqMkkJVrXaR\",\"name\":\"app.filament.resources.patient-resource.relation-managers.treatments-relation-manager\",\"path\":\"admin\\/2\\/patients\\/2\\/edit\",\"method\":\"GET\",\"children\":[],\"errors\":[],\"locale\":\"es\"},\"checksum\":\"9cc54e7da7e5e744f2ec9e3c1dde535235b4d06744ab11e23af47677dd7d374e\"}"
        }
    ]
}

Session

url
[]
_flash
{
    "new": [],
    "old": []
}
_token
nmLiudkOyYelRXOCWk8FiIPHbc8dCDEymDgoVkWW
_previous
{
    "url": "http://localhost/admin/2/patients/2/edit"
}
password_hash_web
$2y$10$nDjlr0aAr7SxJM2nX1Wq8OZJkuHPMIwG3IpGMlkrA5Tgl1jeMMv8e
login_web_59ba36addc2b2f9401580f014c7f58ea4e30989d
1

Cookies

XSRF-TOKEN
nmLiudkOyYelRXOCWk8FiIPHbc8dCDEymDgoVkWW
laravel_session
eWExqhjF4gZsXDjz01Amq2lUypp1xS8aauk3B8V2

Context

User

mauricio.montoyav@gmail.com

mauricio.montoyav@gmail.com

ID: 1

{
    "id": 1,
    "logo": null,
    "name": "Mauricio",
    "email": "mauricio.montoyav@gmail.com",
    "teams": [
        {
            "id": 2,
            "city": null,
            "name": "Mauricio",
            "slug": "test",
            "email": null,
            "phone": null,
            "pivot": {
                "team_id": 2,
                "user_id": 1
            },
            "status": null,
            "address": null,
            "country": null,
            "created_at": "2023-09-25T14:40:34.000000Z",
            "updated_at": "2023-09-25T14:40:34.000000Z",
            "identification": null
        }
    ],
    "address": null,
    "website": null,
    "created_at": "2023-09-25T02:04:03.000000Z",
    "updated_at": "2023-09-25T14:40:29.000000Z",
    "company_name": null,
    "email_verified_at": "2023-09-25T14:40:29.000000Z"
}

Versions

laravel version
10.22.0
Laravel locale
es
Laravel config cached
true
Laravel debug
true
4:59:24 PM
Runtime 9.55008ms
Connection mysql
select * from `users` where `id` = 1 limit 1
4:59:34 PM
Runtime 1.00992ms
Connection mysql
select * from `teams` where `id` = 2 limit 1
4:59:35 PM
Runtime 1.289984ms
Connection mysql
select `teams`.*, `team_user`.`user_id` as `pivot_user_id`, `team_user`.`team_id` as `pivot_team_id` from `teams` inner join `team_user` on `teams`.`id` = `team_user`.`team_id` where `team_user`.`user_id` = 1
4:59:38 PM
Runtime 0.760064ms
Connection mysql
select * from `patients` where `patients`.`id` = 2 limit 1
5:00:09 PM
Runtime 1.32992ms
Connection mysql
select count(*) as aggregate from `doctors` where `id` = 2