定制 zakariayacine/larainputgenerator 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

zakariayacine/larainputgenerator

最新稳定版本:1.0.1

Composer 安装命令:

composer require zakariayacine/larainputgenerator

包简介

LaraInputGenerator is a powerful and versatile Laravel package designed to streamline input automation tasks within your Laravel applications. Say goodbye to repetitive and time-consuming form and input generation code. With LaraInputGenerator, you can effortlessly create input forms, validation rul

README 文档

README

LaraInputGenerator is a Laravel package designed to simplify input automation tasks within your Laravel applications. With LaraInputGenerator, you can effortlessly create input forms, textareas, selects, and file uploads with ease.

License Latest Version on Packagist Total Downloads

Installation

You can install LaraInputGenerator via Composer. Open your terminal and navigate to your Laravel project directory, then run:

composer require zakariayacine/larainputgenerator

To publish the package's assets, including Blade components, run the following command:

php artisan vendor:publish --tag=larainputgenerator-config

This command will make the package's components available for use in your views.

Usage

Input

<x-InputField
    label="informations of the input"
    type="text"
    name="name of the input"
    :value="$var"
    :errors="$errors"
/>
Parameter Type Description
label string Required. Label of the input
type Parameter Required. Can be: 'text', 'password', 'email', 'tel', 'number', 'date', 'time', 'datetime-local', 'file', 'checkbox', 'radio'
name string Required. The name of the input
value variable NOT Required. Value can be a string or an integer
errors variable Required. Errors are used in request validation

Textarea

<x-textarea
    name="description"
    label="Description"
    :value="$description"
    :errors="$errors"
/>
Parameter Type Description
label string Required. Label of the textarea
name string Required. The name of the textarea
value variable NOT Required. Value can be a string or an integer
errors variable Required. Errors are used in request validation

Select

<x-select
    name="test"
    label="select test"
    :options="$options"
    :value="$selectedValue"
    :errors="$errors"
/>
Parameter Type Description
label string Required. Label of the select
name string Required. The name of the select
options array Required. Example: ['option1' => 'Option 1', 'option2' => 'Option 2']
value variable NOT Required. Value can be a string or an integer
errors variable Required. Errors are used in request validation

fileUpload

<x-fileUpload
    name="tests"
    label="selects test"
    :accept="config('larainputgenerator.upload**see example**')"
    :multiple=true
/>
Parameter Type Description
label string Required. Label of the upload file system
name string Required. The name of the upload file system
accept variable Required. Example: config('larainputgenerator.uploadImages'), config('larainputgenerator.uploadVideos'), config('larainputgenerator.uploadDocuments'), config('larainputgenerator.uploadAudio'), config('larainputgenerator.uploadAll')
multiple bool NOT Required. Value can be a string or an integer

For more details and advanced usage examples, please refer to the official documentation.

License

This package is open-sourced software licensed under the MIT License.

统计信息

  • 总下载量: 13
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-09-03