Giter Club home page Giter Club logo

larainputgenerator's Introduction

LaraInputGenerator

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.

larainputgenerator's People

Contributors

zakariayacine avatar dependabot[bot] avatar github-actions[bot] avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.