1. Go to this page and download the library: Download erdemozveren/laravelmacros library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
erdemozveren / laravelmacros example snippets
public function formFields() {
return [
"*"=>[ // wildcard will be applied to all elements
"options"=>
["style"=>"color:red!important"]
],
"parent_id"=>[ // "parent_id" is the name attribute
"type"=>"select", // input type (e.g. "select" will look for "cSelect")
"label"=>"Parent", // label text
"data"=>User::pluck('full_name','id'), // [ONLY FOR select] you can write any data source that laravel collective accepts
"options"=>[ // optional
"