PHPackages                             soufiene-slimi/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. soufiene-slimi/laravel-form-template

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

soufiene-slimi/laravel-form-template
====================================

Save form templates to re-use them later

1.0.2(6y ago)72732MITPHPPHP ^7.1CI failing

Since Jun 5Pushed 1y ago1 watchersCompare

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

READMEChangelog (3)Dependencies (3)Versions (4)Used By (2)

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

31

—

LowBetter than 66% of packages

Maintenance34

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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

2221d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/10948245?v=4)[Soufiene Slimi](/maintainers/soufiene-slimi)[@soufiene-slimi](https://github.com/soufiene-slimi)

---

Top Contributors

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

---

Tags

templateformlaravel-form-template

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[craftcms/cms

Craft CMS

3.6k3.6M3.1k](/packages/craftcms-cms)[moonshine/moonshine

Laravel administration panel

1.3k253.1k81](/packages/moonshine-moonshine)[tallstackui/tallstackui

TallStackUI is a powerful suite of Blade components that elevate your workflow of Livewire applications.

725173.2k14](/packages/tallstackui-tallstackui)[pressbooks/pressbooks

Pressbooks is an open source book publishing tool built on a WordPress multisite platform. Pressbooks outputs books in multiple formats, including PDF, EPUB, web, and a variety of XML flavours, using a theming/templating system, driven by CSS.

45444.2k1](/packages/pressbooks-pressbooks)[ublabs/blade-simple-icons

A package to easily make use of Simple Icons in your Laravel Blade views.

1963.4k](/packages/ublabs-blade-simple-icons)[technikermathe/blade-lucide-icons

A package to easily make use of Lucide icons in your Laravel Blade views.

18421.4k11](/packages/technikermathe-blade-lucide-icons)

PHPackages © 2026

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