Skip to content

Laravel Blade Helper (Livewire Components, Forms, Validation, Menus, etc)

License

Notifications You must be signed in to change notification settings

EhtuCom/ehtu-blade

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Laravel Livewire Blade HTML helper 💪🏎️🚨

Just to make my own life easy with Laravel and Livewire

Important note: This package it's just an Alpha test and my first Laravel Package so be careful using it! or don't use it at all :S

Forms and inputs elements

Input text with validation errors

Example for input text

<x-EhtuBlade::input.text wire:model.lazy="model.attribute" name="attribute" errorTarget="model.attribute"/>

Input Select with validation errors

Input select example:
💡:keyvalues should be an associative array defined in the Livewire component

<x-EhtuBlade::input.select 
        wire:model.lazy="model.attribute"  
        name="atribute"
        :keyValues="$preuVariacio::PREU_VARIACIONS_ZONES"
        errorTarget="model.attribute" />

Daterange picker with validation errors

DataRangePicker example:

<span>From to  <x-input.date-range-picker wire:model.defer="dateRange" id="dateRange" /></span>

To use dateRangePicker include the following files in your html header and footer:
Header:

<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/daterangepicker/daterangepicker.css" />

Footer:

<script type="text/javascript" src="https://cdn.jsdelivr.net/jquery/latest/jquery.min.js"></script>
<script type="text/javascript" src="https://cdn.jsdelivr.net/momentjs/latest/moment.min.js"></script>
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/daterangepicker/daterangepicker.min.js"></script>

Check documentacion about date range picker at http://www.daterangepicker.com/#examples

About

Laravel Blade Helper (Livewire Components, Forms, Validation, Menus, etc)

Resources

License

Stars

Watchers

Forks

Packages

No packages published