source:
app/Models/Tag.php@
ff9da8b
Last change on this file since ff9da8b was 0924b6c, checked in by , 4 years ago | |
---|---|
|
|
File size: 234 bytes |
Line | |
---|---|
1 | <?php |
2 | |
3 | namespace App\Models; |
4 | |
5 | use Illuminate\Database\Eloquent\Model; |
6 | |
7 | class Tag extends Model |
8 | { |
9 | protected $table = "tags"; |
10 | |
11 | public function post() |
12 | { |
13 | return $this->belongsToMany(Post::class, "posts_tags"); |
14 | } |
15 | } |
Note:
See TracBrowser
for help on using the repository browser.