39 lines
664 B
PHP
39 lines
664 B
PHP
<?php
|
|
|
|
namespace App;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class Tag extends Model
|
|
{
|
|
/**
|
|
* The database table used by the model.
|
|
*
|
|
* @var string
|
|
*/
|
|
protected $table = 'tags';
|
|
|
|
/**
|
|
* Define the relationship with tags.
|
|
*
|
|
* @var array
|
|
*/
|
|
public function notes()
|
|
{
|
|
return $this->belongsToMany('App\Note');
|
|
}
|
|
|
|
/**
|
|
* The attributes excluded from the model's JSON form.
|
|
*
|
|
* @var array
|
|
*/
|
|
protected $hidden = ['deleted'];
|
|
|
|
/**
|
|
* We shall set a blacklist of non-modifiable model attributes.
|
|
*
|
|
* @var array
|
|
*/
|
|
protected $guarded = ['id'];
|
|
}
|