Download the PHP package erdemozveren/laravelmacros without Composer
On this page you can find all versions of the php package erdemozveren/laravelmacros. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download erdemozveren/laravelmacros
More information about erdemozveren/laravelmacros
Files in erdemozveren/laravelmacros
Package laravelmacros
Short Description Laravel helper macros for your project
License MIT
Homepage https://github.com/erdemozveren/laravelmacros
Informations about the package laravelmacros
laravelmacros
I'm lazy,so i made package with some handful shourtcuts for Laravel.
Compatibility:Laravel 5.8+ , Not stable for production
- Installation
- Getting Started
Usage
- Form Builder
- Generate Form
- Auto generate form fields
- Form Macros
Installation
Via Composer
For customization, first publish config file
Now you can edit default configuration for inputs,settings etc.
Getting Started
laravelmacros
aims to build simple skeleton for forms and form proccess easy
To getting started add in your model use erdemozveren\laravelmacros\Traits\FormBuilderTrait;
then in class use it as trait use FormBuilderTrait;
now you ready to continue!
this package add Laravel collective macros to get things easier,you can use it by just simply add "c" to start and Upper case next letter,like this;
Form::text('email', '[email protected]') --> Form::cText('email', '[email protected]')
Usage
Form Builder
add formFields function to model
Generate Form
In your blade file you can use like this
or
if you want to exclude one or more elements in one form just pass option _exclude
with array of fields name
Auto generate form fields
it will ask you some questions then give you formFields
function code to copy into model file
Form Macros
These macros extended from laravel collective
and can be used in model binding too.
Value of the input will be (in order) ;
- Session Flash Data (Old Input)
- Data From Current Request (via
Request::input
method) - Explicitly Passed Value
- Model Attribute Data
Change log
Please see the changelog for more information on what has changed recently.
Contributing
Please see contributing.md for details and a todolist.
Security
If you discover any security related issues, please email author email instead of using the issue tracker.
Credits
- Erdem Özveren
- All Contributors
License
MIT