该应用程序在Eclipse中运行良好。但是我无法通过gradle(class Location extends Model
{
protected $fillable = [/*An array that contains a list of fields of your table*/];
//When you do Locations::create($arrayOfData);, Laravel will do insert into ($fillables) values ($arrayOfData).
//Hidden means they'll be hidden whenever you fetch an object type of Location
protected $hidden = ["created_at","updated_at"];
//Here, we establish a relationship this model has to reports
//You can further down and set custom to what are the foreign keys and local keys on the link above
public function reports()
{
return $this->hasMany("App\Models\Report");
}
}
class Report extends Model {
protected $fillable =['id','location_id',...];
protected $hidden = ["created_at","updated_at"];
public function reports() {
return $this->belongsTo("App\Models\Location");
}
}
)
结构类似于:
Location::with('report')->get();
(父母)
gradle clean build
financial-calculator
library
要使用api
我父母的api
文件:
library
父settings.gradle
文件:
rootProject.name = 'financial-calculator'
include 'library'
include 'api'
rootProject.children.each { it.name = rootProject.name + '-' + it.name }
您将在link下找到完整的小型项目
感谢您的提示。