I am trying to store json type data in my database.
migration:
$table->json('email_signature')->nullable();
Model:
protected $casts = [
'email_signature' => 'array'
];
Controller:
$system->email_signature = $request->input('email_signature');
Data is storing correctly, but when $request is empty, in database it is stored as [null]. If is was NULL then I could make a query using whereNotNull to find if it is null or not. Can it be stored as NULL? Or, how can I catch that [null] value in a query to find if it is null or not?