mirror of
https://github.com/Neetpone/ponepaste.git
synced 2025-03-12 22:50:07 +01:00
16 lines
332 B
PHP
16 lines
332 B
PHP
<?php
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
require_once(__DIR__ . '/Tag.php');
|
|
|
|
class Paste extends Model {
|
|
protected $table = 'pastes';
|
|
|
|
public function user() {
|
|
return $this->belongsTo(User::class);
|
|
}
|
|
|
|
public function tags() {
|
|
return $this->belongsToMany(Tag::class, 'paste_taggings');
|
|
}
|
|
}
|