transform fields in form request

using this snippet we can transform request input key to match database column names
 avatar
decayingMind
php
2 years ago
128 B
4
Indexable
<? php
public fuction prepareForValidation()
{
    $this->merge([
        'column_name' => $this->request_key_name
        ]);
}
Editor is loading...