mirror of
https://github.com/ZorgCC/lumen-generators.git
synced 2025-03-06 10:20:29 +03:00
bug fixes
This commit is contained in:
parent
04ce3077cd
commit
4a60029604
@ -1,7 +1,8 @@
|
|||||||
{
|
{
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"format": {
|
"fields": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
|
"separator": ":",
|
||||||
"fields": [
|
"fields": [
|
||||||
"name",
|
"name",
|
||||||
{
|
{
|
||||||
|
21
lumen-test/app/Test.php
Normal file
21
lumen-test/app/Test.php
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
<?php namespace App;
|
||||||
|
|
||||||
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
|
||||||
|
class Test extends Model {
|
||||||
|
|
||||||
|
protected $fillable = [];
|
||||||
|
|
||||||
|
protected $dates = [];
|
||||||
|
|
||||||
|
public function users()
|
||||||
|
{
|
||||||
|
return $this->hasMany('App\User');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function number()
|
||||||
|
{
|
||||||
|
return $this->hasMany('Phone');
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
8
lumen-test/composer.lock
generated
8
lumen-test/composer.lock
generated
@ -3699,12 +3699,12 @@
|
|||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/webNeat/lumen-generators.git",
|
"url": "https://github.com/webNeat/lumen-generators.git",
|
||||||
"reference": "558ebd5f0a9e2c7e9043d9bff5073873057c5df9"
|
"reference": "04ce3077cd2723b38424e1ea94844582b67c6b79"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/webNeat/lumen-generators/zipball/558ebd5f0a9e2c7e9043d9bff5073873057c5df9",
|
"url": "https://api.github.com/repos/webNeat/lumen-generators/zipball/04ce3077cd2723b38424e1ea94844582b67c6b79",
|
||||||
"reference": "558ebd5f0a9e2c7e9043d9bff5073873057c5df9",
|
"reference": "04ce3077cd2723b38424e1ea94844582b67c6b79",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@ -3736,7 +3736,7 @@
|
|||||||
"lumen",
|
"lumen",
|
||||||
"rest"
|
"rest"
|
||||||
],
|
],
|
||||||
"time": "2015-09-23 02:22:02"
|
"time": "2015-09-23 03:58:39"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"aliases": [],
|
"aliases": [],
|
||||||
|
@ -6,6 +6,8 @@ class TestingModel extends Model {
|
|||||||
|
|
||||||
protected $fillable = [];
|
protected $fillable = [];
|
||||||
|
|
||||||
protected $dates = ["started_at"];
|
protected $dates = [];
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -73,6 +73,8 @@ class ModelCommand extends BaseCommand {
|
|||||||
$item['type'] = $type;
|
$item['type'] = $type;
|
||||||
if(! $item['model']){
|
if(! $item['model']){
|
||||||
$item['model'] = $this->getNamespace() . '\\' . ucwords(str_singular($item['name']));
|
$item['model'] = $this->getNamespace() . '\\' . ucwords(str_singular($item['name']));
|
||||||
|
} else if(strpos($item['model'], '\\') === false ){
|
||||||
|
$item['model'] = $this->getNamespace() . '\\' . $item['model'];
|
||||||
}
|
}
|
||||||
$relations[] = $template->with($item)->get();
|
$relations[] = $template->with($item)->get();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user