-
Notifications
You must be signed in to change notification settings - Fork 11.6k
Closed
Description
Hi,
- Laravel Version: 5.6.20
- PHP Version: 7.2
- Database Driver & Version:
mysql Ver 14.14 Distrib 5.7.22, for Linux (x86_64) using EditLine wrapper
Description:
Migration :
Schema::create('google_places', function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('place_id');
});
Here is the code : GooglePlace::where('place_id', $place_id)->first();
Error produced by Eloquent Model :
SQLSTATE[HY000]: General error: (SQL: select * from `google_places` where `place_id` = ChIJ_bzdbKTazRIR4-0ippvrlZo limit 1)
I have tested the sql statement on mysql cli and added quotes around the place_id:
select * from `google_places` where `place_id` = 'ChIJ_bzdbKTazRIR4-0ippvrlZo' limit 1
and the query works.
How i can add quotes with an Eloquent Model?
Thanks for reply.
Metadata
Metadata
Assignees
Labels
No labels