I have these fillables:
# Fillable Fields
protected $fillable = array(
'name',
'active',
'type'
);
By now I have this rules:
# Validate Rules
private static $rules = array(
'name' => 'required',
'type' => 'required',
);
# Validate Messages
private static $messages = array(
'name.required' => 'Sie müssen einen Namen Adresse angeben',
'type.required' => 'Sie müssen einen Typ Adresse angeben',
);
I wonder if it is possible to check if one of my other entries of my table have already a "active" Flag (Boolean 1)
So let's say I have 3 entries. None of them is active. All of them have a 0 in the active column. Now I save a new entry with active = 1. And after that I will try to save an entry with active = 1 again. But this mustn't be possible, because there is already an entry with active = 1. Any idea?