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

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

tocaan/sewidan-field
====================

this package helps to make form fields Easier to use

246JavaScript

Since Apr 6Pushed 4y agoCompare

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

READMEChangelogDependenciesVersions (1)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 tocaan/sewidan-field
```

### 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
```

###  Health Score

17

—

LowBetter than 6% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity26

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/22634d946ccae8799787bebcd8ea49cb4df8936e767c8acf972d990e3e0e8b8b?d=identicon)[tocaan](/maintainers/tocaan)

---

Top Contributors

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

### Embed Badge

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

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

###  Alternatives

[yonas/directory-hash-php

A standard algorithm to compute the hash of a directory and all it's files.

112.0k](/packages/yonas-directory-hash-php)

PHPackages © 2026

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