Skip to content

Instantly share code, notes, and snippets.

@reinink
Last active May 14, 2021 11:04
Show Gist options
  • Save reinink/769049155a49cbbae9d4b15f26b099d9 to your computer and use it in GitHub Desktop.
Save reinink/769049155a49cbbae9d4b15f26b099d9 to your computer and use it in GitHub Desktop.

Laravel Developer - Interview Exercise

  • Setup a fresh Laravel 5.8 application.
  • Use Tailwind CSS as the CSS framework.
    • CDN version is fine.
    • Bonus points if installed via NPM.
  • Create a new contact page at /contact.
  • Create a contact form on the page.
  • The form should be built as a Vue component.
  • The form should submit via ajax.
  • The form should have the following fields:
    • Name
    • Email
    • Phone
    • Message
  • Implement proper server-side form validation, and display those errors client-side.
    • All fields are required.
    • Name and Email have a max length of 50 characters.
    • Email must be a valid email.
    • Message has a max length of 500 characters.
  • On a successful form submission:
    • Save the form data to the database in an inquiries table.
    • Send an email notification to [email protected]. An actual email is not required. Feel free to use mailtrap.io or other to test.
  • Write a basic HTTP test to verifying:
    • The form validation works.
    • That the value is being saved to the database.
    • That the email notification was sent.
  • Provide the final codebase as a Git repository.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment