ehtu / ehtu-blade
Tools for Laravel frontend
1.02
2021-10-28 18:31 UTC
This package is auto-updated.
Last update: 2026-04-09 23:37:59 UTC
README
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