vendredi 3 mai 2019

Allow laravel to filter requests based on field types

So i have 300 different fields in my form generating from a database.These fields can be either a drop-down or text field which need to be saved in two different databases. To get all the fields that are dropdown i will have to use

$request->input('name')
$request->input('email')
$request->input('username')

and 100 other fields.

rather than doing that and to filter requests based on input types

if(input_type==text){
save to this table
}
else if (input type==select){
save to this table
}



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire