vendredi 11 décembre 2015

Quotation marks around id in eloquent models are necessary on production site but don't work on localhost

So I have a query that, on my production installation requires quotations around "id" in the 'where' method, otherwise returns no results. On my local installation, the exact opposite is happening. If I'm using quotations, it's not functioning.

Production

'invoices' => Auth::user()->invoices->where('paid', "0")

Localhost

'invoices' => Auth::user()->invoices->where('paid', 0)

It's really strange, and I'd really like to not have go in and change this whenever I deploy from github. Is this a common issue? I can't seem to find anything about it.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire