I am using Laravel 5 and have a model Book.
I have two environments - dev and production
In dev: In tinkerwhen I do
Book::first()
It gives me
App\Book {
id: 1,
name: ...
By product: The same gives me
App\Book {
id: "1",
name: ...
Please note that idthere is intin dev, but stringin production
Because of this, the condition seems to be
if($id === $book->id)
which works correctly on dev does not work on production.
Any idea why this is so? Is there any way to get the working environment to give me intinstead string?
PS:
- Laravel dev, git. ,
composer.json composer.lock , dev production. composer install ββ , dev. mysql.- Dev Laravel
homestead. Book - , . , .