Support the ongoing development of Laravel.io →
posted 10 years ago
Eloquent
Last updated 1 year ago.
0

Try something like this:

'data4' => KSMschema::where('opmerkingen', '<>', '')->get();
// note <> instead of != 

or if your field opmerkingen supports NULL values you could also use this:

'data4' => KSMschema::whereNotNull('opmerkingen')->get();
Last updated 1 year ago.
0

It works. Thanx :D But do you know why laravel uses '<>' in stead of the mysql notation '!=' ? I am curious why they made such a decision.

Last updated 1 year ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

JeffreyR jeffreyr Joined 11 Feb 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.