8 months ago

Set a default value if input field is blank

Posted 8 months ago by RootTech

On my RegisterController, 'Referrer'= required | max :255

my create function looks up to referrer to create data

'Referrer' => $data('Referrer')

So how do I set a default value if the input field is blank?

like @if (empty ('Referrer') 'Referrer' = 1 @else then the normal input field @endif

Please sign in or create an account to participate in this conversation.