Polyscope - The agent-first dev environment for Laravel

Laraform – Full-Stack Form Builder for Vue.js & Laravel (sponsor)

Published on by

Laraform – Full-Stack Form Builder for Vue.js & Laravel (sponsor) image

Are you tired of going through the same repetitive and sometimes challenging process of creating forms? Do you feel your energy is drained by implementing conditional logic, step by step forms or making elements repeatable? Do you wish a single library could do all of that?

Good news for you! Laraform was created to help you to get rid of boring work and build forms like magic. Check it out at https://laraform.io.

What is Laraform?

Laraform is a full-stack library that supercharges and standardizes the entire form building process. With Laraform you can create even the most complex forms with ease, using:

  • two-sided validation
  • eloquent ORM
  • nested & repeatable elements
  • file uploads
  • conditional logic
  • wizards
  • localization
  • custom elements.

How does Laraform work?

Laraform uses a single PHP class that defines every aspect of a form. You can create elements, wizard steps, processing hooks, assign a database model or even a Vue.js component that can extend the functionality further on the frontend. Just to give you an idea here is what a login form on the backend and frontend looks like:

// app/Forms/LoginForm.php
 
class LoginForm extends \Laraform
{
public $component = ‘login-form’
 
public function schema() {
return {
"email" => [
"type" => "text",
"label" => "Email address",
"rules" => "required|email",
],
"password" => [
"type" => "password",
"label" => "Password",
"rules" => "required"
],
"remember" => [
"type" => "toggle",
"text" => "Remember me"
]
];
}
 
public function after() {
$credentials = [
'email' => $this->data['email'],
'password' => $this->data['password'],
];
 
$remember = $this->data['remember'];
 
if (!Auth::attempt($credentials, $remember)) {
return $this->fail('Invalid email or password');
}
}
}
// resources/js/components/forms/LoginForm.vue
 
<script>
export default {
mixins: [Laraform],
name: 'login-form'
data: () => ({
created() {
this.on('fail', (response) => {
notifier.error(response.message)
})
 
this.on('success', () => {
location.href = ‘/profile’
})
}
})
}
</script>

For more examples check out our website.

Features

Laraform comes with 34 built-in elements including multiple file uploads or nested & repeatable elements which makes it a truly unique player. What’s even better, it manages all the Eloquent relationships automatically so even if you have a deeply nested form and model with lots of relations Laraform will take over data processing.

All the validation rules you define for the elements are based on Laravel’s validation logic, but they will work on the frontend too. Laraform currently supports 54 validation rules compatible with Laravel.

Do you care about user experience? Break your long ugly forms into steps with wizard or use conditions to make anything dependent on a field’s value.

Laraform is made for developers and gives you freedom in terms of customization and extensibility. You can create custom elements, validators, themes, templates, anything you want, really.

How can you benefit from Laraform?

Just give you an idea of how much time Laraform can save you, let’s check our Shopify example.

The standard Shopify checkout is a multistep form with numerous fields, conditionals, and custom elements. This can easily take days if not weeks to create even for an experienced developer. With Laraform it took just a few hours and about 400 lines of code. Check out for yourself.

Saving 90% of time easily translates into a massive competitive advantage for freelancers and agencies. Laraform unifies the creation of forms, allowing developers to speak a common language, which not only result in more bug-free products but becomes a base of more efficient collaboration.

Beta phase

Laraform took its first test flight around mid-2019. Since that we’ve started to build a small community of early adopters who support and believe in the product. We hope to grow along with this community and constantly deliver new releases with the most useful features to our users. We are happy to have you in the community as well! We might be in an early stage, but we are dedicated to our mission and with your support, we can get there. We are really looking forward to hearing all the feedback and ideas you will have so we can align our development roadmap accordingly.

Call for developers

Laraform is on a mission to become the world’s best form builder library for developers. It’s been our passion for a long time and through the years it manifested into a product. Now we are looking for others who share the same passion. If you are a like-minded developer with decent programming experience and feel like Laraform could be your thing too, feel free to drop us a line at hello@laraform.io!

Resources

***

Many thanks to Laraform for sponsoring Laravel News this week.

Eric L. Barnes photo

Eric is the creator of Laravel News and has been covering Laravel since 2012.

Filed in:
Cube

Laravel Newsletter

Join 40k+ other developers and never miss out on new tips, tutorials, and more.

image
SerpApi

The Web Search API for Your LLM and AI Applications

Visit SerpApi
Tinkerwell logo

Tinkerwell

The must-have code runner for Laravel developers. Tinker with AI, autocompletion and instant feedback on local and production environments.

Tinkerwell
Get expert guidance in a few days with a Laravel code review logo

Get expert guidance in a few days with a Laravel code review

Expert code review! Get clear, practical feedback from two Laravel devs with 10+ years of experience helping teams build better apps.

Get expert guidance in a few days with a Laravel code review
PhpStorm logo

PhpStorm

The go-to PHP IDE with extensive out-of-the-box support for Laravel and its ecosystem.

PhpStorm
Laravel Cloud logo

Laravel Cloud

Easily create and manage your servers and deploy your Laravel applications in seconds.

Laravel Cloud
Acquaint Softtech logo

Acquaint Softtech

Acquaint Softtech offers AI-ready Laravel developers who onboard in 48 hours at $3000/Month with no lengthy sales process and a 100 percent money-back guarantee.

Acquaint Softtech
Kirschbaum logo

Kirschbaum

Providing innovation and stability to ensure your web application succeeds.

Kirschbaum
Shift logo

Shift

Running an old Laravel version? Instant, automated Laravel upgrades and code modernization to keep your applications fresh.

Shift
Harpoon: Next generation time tracking and invoicing logo

Harpoon: Next generation time tracking and invoicing

The next generation time-tracking and billing software that helps your agency plan and forecast a profitable future.

Harpoon: Next generation time tracking and invoicing
Lucky Media logo

Lucky Media

Get Lucky Now - the ideal choice for Laravel Development, with over a decade of experience!

Lucky Media
SaaSykit: Laravel SaaS Starter Kit logo

SaaSykit: Laravel SaaS Starter Kit

SaaSykit is a Multi-tenant Laravel SaaS Starter Kit that comes with all features required to run a modern SaaS. Payments, Beautiful Checkout, Admin Panel, User dashboard, Auth, Ready Components, Stats, Blog, Docs and more.

SaaSykit: Laravel SaaS Starter Kit

The latest

View all →
Axios npm Package Compromised With Remote Access Trojan image

Axios npm Package Compromised With Remote Access Trojan

Read article
Build an AI Chat Agent with Laravel 12, MongoDB Atlas Vector Search, and Voyage AI image

Build an AI Chat Agent with Laravel 12, MongoDB Atlas Vector Search, and Voyage AI

Read article
PHP Debugger: A Lightweight Xdebug Alternative Built for Speed image

PHP Debugger: A Lightweight Xdebug Alternative Built for Speed

Read article
Laravel USPS: A Modern Wrapper for the USPS API image

Laravel USPS: A Modern Wrapper for the USPS API

Read article
Debugbar releases v4.2.0 and add a new Boost skill image

Debugbar releases v4.2.0 and add a new Boost skill

Read article
New Expressive Model Attributes in Laravel 13.2.0 image

New Expressive Model Attributes in Laravel 13.2.0

Read article