I have a large table called Applications (30+ columns). Based on the columns that are filled out will determine if the application is complete.
How would I say the following in a query?
If all columns Do Not = Null, Except Application_Status Update Application Status to True.
Possible Long Way:
$appCheck = Application::where('a, !=, null')
->where('b', '!=', null)
->where('c', '!=', null)
->where(etc... 30 more columns..., '!=', null)
->except(['m','n','application_status'])
)->first();
if($appCheck == true){
$appCheck->update([
'application_status' => 1,
])
}
Is there a Short Hand way to do this so I don't have to write out each column name? IE...
$appCheck = Applicaiton::whereNotNull('*')->except(['m','n','application_status'])->first()
if($appCheck == true){
$appCheck->update([
'application_status' => 1,
])
}