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
Larafast: Laravel SaaS Starter Kit

Larafast is a Laravel SaaS Starter Kit with ready-to-go features for Payments, Auth, Admin, Blog, SEO, and beautiful themes.

Visit Larafast: Laravel SaaS Starter Kit
Laravel Forge logo

Laravel Forge

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

Laravel Forge
Tinkerwell logo

Tinkerwell

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

Tinkerwell
No Compromises logo

No Compromises

Joel and Aaron, the two seasoned devs from the No Compromises podcast, are now available to hire for your Laravel project. ⬧ Flat rate of $7500/mo. ⬧ No lengthy sales process. ⬧ No contracts. ⬧ 100% money back guarantee.

No Compromises
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
Bacancy logo

Bacancy

Supercharge your project with a seasoned Laravel developer with 4-6 years of experience for just $2500/month. Get 160 hours of dedicated expertise & a risk-free 15-day trial. Schedule a call now!

Bacancy
Lucky Media logo

Lucky Media

Bespoke software solutions built for your business. We ♥ Laravel

Lucky Media
Lunar: Laravel E-Commerce logo

Lunar: Laravel E-Commerce

E-Commerce for Laravel. An open-source package that brings the power of modern headless e-commerce functionality to Laravel.

Lunar: Laravel E-Commerce
LaraJobs logo

LaraJobs

The official Laravel job board

LaraJobs
All Green logo

All Green

All Green is a SaaS test runner that can execute your whole Laravel test suite in mere seconds so that you don't get blocked – you get feedback almost instantly and you can deploy to production very quickly.

All Green
Larafast: Laravel SaaS Starter Kit logo

Larafast: Laravel SaaS Starter Kit

Larafast is a Laravel SaaS Starter Kit with ready-to-go features for Payments, Auth, Admin, Blog, SEO, and beautiful themes. Available with VILT and TALL stacks.

Larafast: Laravel SaaS Starter Kit
SaaSykit: Laravel SaaS Starter Kit logo

SaaSykit: Laravel SaaS Starter Kit

SaaSykit is a 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
Rector logo

Rector

Your partner for seamless Laravel upgrades, cutting costs, and accelerating innovation for successful companies

Rector

The latest

View all →
Asserting Exceptions in Laravel Tests image

Asserting Exceptions in Laravel Tests

Read article
Reversible Form Prompts and a New Exceptions Facade in Laravel 11.4 image

Reversible Form Prompts and a New Exceptions Facade in Laravel 11.4

Read article
Basset is an alternative way to load CSS & JS assets image

Basset is an alternative way to load CSS & JS assets

Read article
Integrate Laravel with Stripe Connect Using This Package image

Integrate Laravel with Stripe Connect Using This Package

Read article
The Random package generates cryptographically secure random values image

The Random package generates cryptographically secure random values

Read article
Automatic Blade Formatting on Save in PhpStorm image

Automatic Blade Formatting on Save in PhpStorm

Read article