Example #1
0
 public function __construct($name)
 {
     $split = explode('\\', $name);
     $this->full_name = $name;
     $this->name = array_pop($split);
     $this->namespace = implode('\\', $split);
     $this->table(pluralize(underscore($this->name)));
     $this->id($name . 'Id');
 }
Example #2
0
(\<?php 
    echo $def->type;
    ?>
 $value) {
    $this->scopes[] = [function($query) use($value) {
      return $query->orWhere('<?php 
    echo $def->alias;
    ?>
', $value);
    }, []];
    
    return $this;
  }
  
  public function withMany<?php 
    echo pluralize(camelize($def->alias));
    ?>
(array $values) {
    $this->scopes[] = [function($query) use($values) {
      return $query->whereIn('<?php 
    echo $def->alias;
    ?>
', $values);
    }, []];
    
    return $this;
  }
  
  public function orderBy<?php 
    echo camelize($def->alias);
    ?>