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

1.0.1 2023-09-03 13:23 UTC

This package is auto-updated.

Last update: 2024-10-26 22:14:12 UTC


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"
/>

Textarea

<x-textarea
    name="description"
    label="Description"
    :value="$description"
    :errors="$errors"
/>

Select

<x-select
    name="test"
    label="select test"
    :options="$options"
    :value="$selectedValue"
    :errors="$errors"
/>

fileUpload

<x-fileUpload
    name="tests"
    label="selects test"
    :accept="config('larainputgenerator.upload**see example**')"
    :multiple=true
/>

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.