Set a default value if input field is blank

Posted 1 month 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.

Reply to

Use Markdown with GitHub-flavored code blocks.