PHPackages                             mostafasewidan/sewidan-field - 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. mostafasewidan/sewidan-field

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

mostafasewidan/sewidan-field
============================

this package helps to make form fields Easier to use

v1.0.1(2y ago)12.0k2JavaScript

Since Jul 12Pushed 1y ago2 watchersCompare

[ Source](https://github.com/MostafaSewidan/sewidan-fields)[ Packagist](https://packagist.org/packages/mostafasewidan/sewidan-field)[ RSS](/packages/mostafasewidan-sewidan-field/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (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 mostafasewidan/sewidan-field
```

asdasdasd

### Publish the configuration file

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

```
php artisan vendor:publish --provider="SewidanField\SewidanFieldServiceProvider"
```

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

28

—

LowBetter than 54% of packages

Maintenance29

Infrequent updates — may be unmaintained

Popularity22

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

 Bus Factor1

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

1036d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/bf3e5c893c005b20c81373350044f93f205d95b05320968c2225648d358c9662?d=identicon)[MostafaSewidan](/maintainers/MostafaSewidan)

---

Top Contributors

[![MostafaSewidan](https://avatars.githubusercontent.com/u/35866891?v=4)](https://github.com/MostafaSewidan "MostafaSewidan (73 commits)")[![AhmedSafwat1](https://avatars.githubusercontent.com/u/38819467?v=4)](https://github.com/AhmedSafwat1 "AhmedSafwat1 (1 commits)")

### Embed Badge

![Health badge](/badges/mostafasewidan-sewidan-field/health.svg)

```
[![Health](https://phpackages.com/badges/mostafasewidan-sewidan-field/health.svg)](https://phpackages.com/packages/mostafasewidan-sewidan-field)
```

###  Alternatives

[ashallendesign/short-url

A Laravel package for creating shortened URLs for your web apps.

1.4k1.9M4](/packages/ashallendesign-short-url)[intervention/zodiac

Zodiac Sign Calculator

58191.7k](/packages/intervention-zodiac)[erlandmuchasaj/laravel-gzip

Gzip your responses.

40129.3k2](/packages/erlandmuchasaj-laravel-gzip)[solspace/craft-calendar

The most powerful event management and calendaring plugin!

1830.8k1](/packages/solspace-craft-calendar)

PHPackages © 2026

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