PHPackages                             ahmed-ebraheim72/html-fields - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. ahmed-ebraheim72/html-fields

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

ahmed-ebraheim72/html-fields
============================

a package to help you to make form fields easier to use in laravel 13

1.0.0(2mo ago)04MITJavaScript

Since May 7Pushed 2mo agoCompare

[ Source](https://github.com/ahmedebraheim72/html-fields)[ Packagist](https://packagist.org/packages/ahmed-ebraheim72/html-fields)[ RSS](/packages/ahmed-ebraheim72-html-fields/feed)WikiDiscussions main Synced 1w ago

READMEChangelogDependencies (2)Versions (2)Used By (0)

Laravel package for form fields
===============================

[](#laravel-package-for-form-fields)

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

[](#installation)

#### You can install the package via composer

[](#you-can-install-the-package-via-composer)

```
composer require ahmed-ebraheim72/html-fields
```

asdasdasd

### Publish the configuration file

[](#publish-the-configuration-file)

```
php artisan vendor:publish --provider="HtmlFields\HtmlFieldsServiceProvider"
```

Usage
-----

[](#usage)

You can make field with any type

```
    /**
     * @param $name is a field name
     * @param $label
     * @param null $value
     * @param array $field_attributes
     * @return string
     */
    field()->text('name','label','value',[]);
```

##### Output

[](#output)

```

        {{$label}}

```

### Params

[](#params)

Fields is created using [laravel collective](https://laravelcollective.com)

```
     $name  // is a field name (string | required)

     $label // is a label name (string | required)

     $value // is a value of input (string | the default value is null)
      you can use it with laravel collective form model
      Form::model($model,[attributes])

     $field_attributes // is input attributes like class , style
     //it take some default values like class : form-control and you can override
     // there values like ['class' => 'your-class' , 'style' => 'color:red']
     // (array | not required)
     // default :
      [
          "placeholder" => $label,
          "class" => "form-control",
          "data-name" => $name,
          "id" => $name
      ]

```

configuration file
------------------

[](#configuration-file)

where you Publishing the provider you will find `config/field.php` file you can control the content of `HTML` response by creating and switching themes

#### themes map keys

[](#themes-map-keys)

```
   {{-- container --}}
   {{-- label --}}          {{$label}}
   {{-- field_div --}}

   {{-- field_error --}}

```

#### Control Themes in `config/field.php`

[](#control-themes-in-configfieldphp)

```
    'default_theme' => env('FIELD_DEFAULT_THEME','default'),

        'themes' => [

            'default' => [

                'container' => [
                    'active' => true,
                    'class' => 'form-group'
                ],

                'label' => [
                    'active' => true,
                    'options' => [
                        'class' => 'col-md-2',
                        'style' => ''
                    ],
                ],

                'field_div' => [
                    'active' => true,
                    'options' => [
                        'class' => 'col-md-9',
                        'style' => ''
                    ],
                ],

                'field_error' => [
                    'active' => true,
                    'options' => [
                        'class' => 'help-block',
                        'style' => ''
                    ],
                ],
            ],
        ],
```

you can change the default theme by set key `FIELD_DEFAULT_THEME` with your default theme name in `.env` file or change it in `config/field.php` `'default_theme' => env('FIELD_DEFAULT_THEME','your default theme name')`

#### switching themes while creating field

[](#switching-themes-while-creating-field)

you can easily but your theme name to field function

```
    field('theme_name')->text('name','label','value',[]);
```

if you used field without entered theme name automatically function use the default theme

```
    field()->text('name','label','value',[]); // take default theme in config file
```

### CK editor (5) :

[](#ck-editor-5-)

\###usage

first you must append `script and style files` to your layouts

```
    {{-- styles --}}

    {{-- scripts --}}

```

after appending script and style files , you can use it simple like this

```
    field()->ckEditor5('name','label','value',[]);
```

don't forget to add this script on submitting your form

```
    if (window.editors == undefined) {
        $.each(editors, function (index, editor) {
            editor.updateSourceElement()
        });
    }
```

###  Health Score

33

—

LowBetter than 72% of packages

Maintenance85

Actively maintained with recent releases

Popularity3

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity34

Early-stage or recently created project

 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

Unknown

Total

1

Last Release

78d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/229567492?v=4)[Ahmed Ebraheim](/maintainers/ahmedebraheim72)[@ahmedebraheim72](https://github.com/ahmedebraheim72)

---

Top Contributors

[![ahmedebraheim72](https://avatars.githubusercontent.com/u/229567492?v=4)](https://github.com/ahmedebraheim72 "ahmedebraheim72 (8 commits)")

### Embed Badge

![Health badge](/badges/ahmed-ebraheim72-html-fields/health.svg)

```
[![Health](https://phpackages.com/badges/ahmed-ebraheim72-html-fields/health.svg)](https://phpackages.com/packages/ahmed-ebraheim72-html-fields)
```

###  Alternatives

[illuminate/support

The Illuminate Support package.

583113.0M42.8k](/packages/illuminate-support)[spatie/holidays

Calculate public holidays

402860.1k2](/packages/spatie-holidays)[craftcms/feed-me

Import content from XML, RSS, CSV or JSON feeds into entries, categories, Craft Commerce products, and more.

293952.6k34](/packages/craftcms-feed-me)[solspace/craft-freeform

The most flexible and user-friendly form building plugin!

54681.3k20](/packages/solspace-craft-freeform)[pimcore/data-importer

Adds a comprehensive import functionality to Pimcore Datahub

47855.5k5](/packages/pimcore-data-importer)[japanese-date/japanese-date

日本の暦、祝日を取り扱うライブラリ

1610.0k](/packages/japanese-date-japanese-date)

PHPackages © 2026

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