登录注册功能
This commit is contained in:
26
app/Models/LabelModel.php
Normal file
26
app/Models/LabelModel.php
Normal file
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use App\BaseApp\BaseModel;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
|
||||
|
||||
/**
|
||||
* 标签表
|
||||
*/
|
||||
class LabelModel extends BaseModel
|
||||
{
|
||||
//
|
||||
protected $table = 'labels';
|
||||
|
||||
protected $guarded = [];
|
||||
|
||||
/**
|
||||
* 项目关联
|
||||
* @return BelongsToMany
|
||||
*/
|
||||
public function projects(): BelongsToMany
|
||||
{
|
||||
return $this->belongsToMany(ProjectModel::class, 'project_labels_relations', 'label_id', 'project_id');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user