Ejemplo n.º 1
0
 /**
  * ControllerGenerator constructor.
  *
  * @param array $options [ resource=If the controller should use the resource template;
  *                         scaffold=If the controller should use the scaffold template;
  *                         repository=If the controller should use the repository scaffold template ]
  */
 public function __construct(array $options = [])
 {
     parent::__construct('controller', $options);
     $this->resource = array_get($options, 'resource', false);
     $this->scaffold = array_get($options, 'scaffold', false);
     $this->repository = array_get($options, 'repository', false);
 }
Ejemplo n.º 2
0
 /**
  * ModelGenerator constructor.
  *
  * @param array $options [ fillable=List of fillable fields, comma separated;
  *                         fields=List of fields (with its descriptions), comma separated;
  *                         table_name=The name of the table, if different than the model name ]
  */
 public function __construct(array $options = array())
 {
     parent::__construct('model', $options);
     $this->fillable = array_get($options, 'fillable', null);
     $this->fields = array_get($options, 'fields', null);
     $this->tableName = array_get($options, 'table_name', null);
 }
Ejemplo n.º 3
0
 /**
  * MigrationGenerator constructor.
  *
  * @param array $options [ action=The name of the action being performed;
  *                         table=The table object with its fields;
  *                         generate_foreign=If the foreign keys should be generated;
  *                         only_foreign=If only the foreign keys should be generated ]
  */
 public function __construct(array $options = array())
 {
     parent::__construct('migration', $options);
     $this->table = $options['table'];
     $this->generateForeign = array_get($options, 'generate_foreign', true);
     $this->onlyForeign = array_get($options, 'only_foreign', false);
     $this->rawName = array_get($options, 'raw_name', null);
 }
Ejemplo n.º 4
0
 /**
  * RequestGenerator constructor.
  *
  * @param array $options [ auth=If the user is authorized to make the request (Default: true);
  *                         rules=List of comma-separated fields and rules;
  *                         fields=List of fields (with its descriptions), comma separated;
  *                         table_name=The name of the table, if different than the model name ]
  */
 public function __construct(array $options = [])
 {
     parent::__construct('request', $options);
     $this->auth = array_get($options, 'auth', false);
     $this->rules = array_get($options, 'rules', null);
     $this->fields = array_get($options, 'fields', null);
     $this->tableName = array_get($options, 'table_name', null);
 }
Ejemplo n.º 5
0
 /**
  * PivotGenerator constructor.
  *
  * @param array $options
  */
 public function __construct(array $options = array())
 {
     parent::__construct('migration', $options);
 }
Ejemplo n.º 6
0
 /**
  * ModelGenerator constructor.
  *
  * @param array $options [ fillable=List of fillable fields, comma separated;
  *                         fields=List of fields (with its descriptions), comma separated;
  *                         table_name=The name of the table, if different than the model name ]
  */
 public function __construct(array $options = array())
 {
     parent::__construct('lang', $options);
     $this->language = array_get($options, 'language', 'en');
     $this->translations = array_get($options, 'translations', null);
 }
Ejemplo n.º 7
0
 /**
  * ModelGenerator constructor.
  *
  * @param array $options
  */
 public function __construct(array $options = array())
 {
     parent::__construct('repository', $options);
 }
Ejemplo n.º 8
0
 /**
  * FormGenerator constructor.
  *
  * @param array $options [ fields=The form fields ]
  */
 public function __construct(array $options = [])
 {
     parent::__construct('view', $options);
     $this->fields = array_get($options, 'fields', null);
 }