Hi there,
I'm using homestead to develop a 5.2 Laravel app. It comes with PHP 7. On my production server i run PHP 5.5.9 from ubuntu ppas.
After my last pull things broke. When I typehint "int" in my functions, on my production server i get the following error when calling myfunction(5)
must be an instance of App\Http\Controllers\int, integer given
Also when i filter a collection with the where method $collection->where('active',1) it will always return an empty result on my production server but a correct filtered one in homestead.
Are those results of the differing php version?
Where can i read more about this?
Hi,
thanks, the link explains the typehinting issue.
About the collection: it derives from a Model::all() call. I checked the attributes via dd and it looks like the active attribute (set as bool in the migration) is a string in my collection.