{"id":42896255,"url":"https://github.com/askdkc/whereraw_laravel","last_synced_at":"2026-01-30T15:11:01.151Z","repository":{"id":37588775,"uuid":"497559353","full_name":"askdkc/whereraw_laravel","owner":"askdkc","description":null,"archived":false,"fork":false,"pushed_at":"2025-05-12T08:52:39.000Z","size":410,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-12T10:00:46.160Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/askdkc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-05-29T10:36:54.000Z","updated_at":"2025-05-12T08:52:36.000Z","dependencies_parsed_at":"2024-03-25T14:54:57.303Z","dependency_job_id":"817fb372-0153-46b1-9e25-29c16ecca5e5","html_url":"https://github.com/askdkc/whereraw_laravel","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/askdkc/whereraw_laravel","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/askdkc%2Fwhereraw_laravel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/askdkc%2Fwhereraw_laravel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/askdkc%2Fwhereraw_laravel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/askdkc%2Fwhereraw_laravel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/askdkc","download_url":"https://codeload.github.com/askdkc/whereraw_laravel/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/askdkc%2Fwhereraw_laravel/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28914898,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-30T12:13:43.263Z","status":"ssl_error","status_checked_at":"2026-01-30T12:13:22.389Z","response_time":66,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-01-30T15:11:00.447Z","updated_at":"2026-01-30T15:11:01.140Z","avatar_url":"https://github.com/askdkc.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"## This is demo code to show whereRaw optional array handling error\n\nThis project uses PostgreSQL and [PGroonga](https://pgroonga.github.io). Please install both to continue.\n\nIf you are using macOS, you can install PGroonga with brew.\n```\n% brew install pgroonga\n```\n\n## Install and Reproduce the error\n\nClone this repo and do following.\n\n```\n% createdb whereraw_laravel\n\n% cp -p .env.example .env\n\n% composer install\n\n% php artisan key:generate\n% php artisan migrate --seed\n\n% php artisan serve\n```\n\n## Demo\nAccess http://127.0.0.1:8000\n\nClick \"Without Optional\" -\u003e Works fine.\n\n\nClick \"With Optional\" -\u003e SQLSTATE[08P01]: \u003c\u003cUnknown error\u003e\u003e.\n\n\u003cbr\u003e\u003cbr\u003e\n## Got 2 solutions for this\n\nI got 2 solutions. One from PGroonga Collaborator and other from Laravel Community.\n\n### PGroonga Way\n\nI got this solution via [Twitter](https://twitter.com/ktou/status/1531114276207079426).\n```\n$query-\u003ewhereRaw('jsonbdata \u0026` (\\'(paths @ \"title\" || paths @ \"body\") \u0026\u0026 query(\"string\", \\' || pgroonga_escape(?) || \\')\\')', [\"cat alice\"]);\n```\nCheck out [this branch](https://github.com/askdkc/whereraw_laravel/tree/pgroonga-way).\n\n\n### Laravel/PHP Way\n\nI got this solution from Laravel [issue report](https://github.com/laravel/framework/issues/42557) which I posted.\n\n```\n$input = 'cat alice';\n$query-\u003ewhereRaw('jsonbdata \u0026` ?', [\n    '(paths @ \"title\" || paths @ \"body\") \u0026\u0026 query(\"string\", \"'. addslashes($input) .'\")'\n    ]);\n```\nCheck out [this branch](https://github.com/askdkc/whereraw_laravel/tree/php-laravel-way).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faskdkc%2Fwhereraw_laravel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faskdkc%2Fwhereraw_laravel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faskdkc%2Fwhereraw_laravel/lists"}