PHPackages                             vonsogt/laravel-form-template - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Templating &amp; Views](/categories/templating)
4. /
5. vonsogt/laravel-form-template

ActiveLibrary[Templating &amp; Views](/categories/templating)

vonsogt/laravel-form-template
=============================

Save form templates to re-use them later

1.0.2(5y ago)09MITPHPPHP ^7.1

Since Jun 5Pushed 5y agoCompare

[ Source](https://github.com/vonsogt/laravel-form-template)[ Packagist](https://packagist.org/packages/vonsogt/laravel-form-template)[ Docs](https://github.com/soufiene-slimi/laravel-form-template)[ RSS](/packages/vonsogt-laravel-form-template/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependencies (3)Versions (4)Used By (0)

Laravel Form Template
=====================

[](#laravel-form-template)

[![Latest Version on Packagist](https://camo.githubusercontent.com/08e3505a9e471a1e1f4e8e3e0ae4f40da1d8d57dc9782a185aa1ed2293739431/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f736f756669656e652d736c696d692f6c61726176656c2d666f726d2d74656d706c6174652e737667)](https://packagist.org/packages/soufiene-slimi/laravel-form-template)[![Build Status](https://camo.githubusercontent.com/7428d645dc5c98306e9271d0471e58a145b06a248e051495379de408f52468f2/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f736f756669656e652d736c696d692f6c61726176656c2d666f726d2d74656d706c6174652f6261646765732f6275696c642e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/soufiene-slimi/laravel-form-template/build-status/master)[![Quality Score](https://camo.githubusercontent.com/72d15a2714967e2a7341283400098c9301935038e8e6f0fac1b29544cd1e67fa/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f736f756669656e652d736c696d692f6c61726176656c2d666f726d2d74656d706c6174652e737667)](https://scrutinizer-ci.com/g/soufiene-slimi/laravel-form-template)[![Total Downloads](https://camo.githubusercontent.com/a6c3be3302f75dd4fa0f060e9aab005420bee8cc45c4fa5da88f85ea3f670ad4/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f736f756669656e652d736c696d692f6c61726176656c2d666f726d2d74656d706c6174652e737667)](https://packagist.org/packages/soufiene-slimi/laravel-form-template)

This laravel package allow you to save some form templates to apply them whenever you want. the utility is to avoid filling some inputs again and again, that most of the time have the same values, or maybe to apply some template based on the user choice.

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require soufiene-slimi/laravel-form-template
```

Then run:

```
php artisan migrate
```

Usage
-----

[](#usage)

First of all you don't need to import anything since the package provide an alias.

### Creating a new template

[](#creating-a-new-template)

```
// creating a new template named 'Template 1' with
// data ['name' => 'foo','email' => 'foo@administrator.com']
\Template::make('Template 1', [
    'name' => 'foo',
    'email' => 'foo@administrator.',
]);
// creating a new template named 'Template 1' using a model instance
\Template::makeForModel('Template 1', $user);
// creating a new template named 'Template 1' using a model instance
// and some extra data
\Template::makeForModel('Template 1', $user, ['status_id' => 2]);
// creating a new template named 'Template 1' using a model instance,
//some extra data, and keeping all the model attributes
\Template::makeForModel('Template 1', $user, ['foo' => 'bar'], false);
```

> Note that you can configure the attributes that will be removed from a model during the template creation by publishing the configuration and updating the **excluded** key.

### Applying a template

[](#applying-a-template)

To apply a template, first you have to use the **old()** function in your input:

```

```

Then find the template and apply it

```
\Template::first()->apply();
```

> Template is an instance of the **Illuminate\\Database\\Eloquent\\Model**, this mean that you can use all the **Laravel ORM** features.

To publish the configuration file run:

```
php artisan vendor:publish  --provider=SoufieneSlimi\LaravelFormTemplate\LaravelFormTemplateServiceProvider
```

### Changelog

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

### Security

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Soufiene Slimi](https://github.com/soufiene-slimi)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 77.8% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

3

Last Release

2167d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/110f07a01b9ef14f977c4226df2deb2e0311a76d8ba3495c745e82891fe0bf61?d=identicon)[vonsogt](/maintainers/vonsogt)

---

Top Contributors

[![soufiene-slimi](https://avatars.githubusercontent.com/u/10948245?v=4)](https://github.com/soufiene-slimi "soufiene-slimi (7 commits)")[![vonsogt](https://avatars.githubusercontent.com/u/35516476?v=4)](https://github.com/vonsogt "vonsogt (2 commits)")

---

Tags

templateformlaravel-form-template

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/vonsogt-laravel-form-template/health.svg)

```
[![Health](https://phpackages.com/badges/vonsogt-laravel-form-template/health.svg)](https://phpackages.com/packages/vonsogt-laravel-form-template)
```

###  Alternatives

[mopa/bootstrap-bundle

Easy integration of twitters bootstrap into symfony2

7042.9M33](/packages/mopa-bootstrap-bundle)[ytake/laravel-smarty

Smarty template engine for Laravel and Lumen

87401.6k](/packages/ytake-laravel-smarty)[laravie/html

HTML and Form Builders for the Laravel Framework

36184.6k4](/packages/laravie-html)[brackets/admin-ui

Administration user interface template

29258.6k3](/packages/brackets-admin-ui)[sineld/bladeset

A very simple blade extension which allows variables to be set within blade templates.

4423.2k](/packages/sineld-bladeset)[mopa/bootstrap-sandbox-bundle

Seperate live docs from code

256.8k](/packages/mopa-bootstrap-sandbox-bundle)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
