タグ登録機能の追加

This commit is contained in:
shibafu
2018-01-08 08:50:22 +09:00
parent d7b16cd6d5
commit b1dcc36565
7 changed files with 96 additions and 12 deletions

19
app/Tag.php Normal file
View File

@@ -0,0 +1,19 @@
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Tag extends Model
{
//
protected $fillable = [
'name'
];
public function ejaculations()
{
return $this->belongsToMany('App\Ejaculation')->withTimestamps();
}
}