22 lines
341 B
PHP
22 lines
341 B
PHP
|
<?php
|
||
|
|
||
|
namespace App;
|
||
|
|
||
|
use Illuminate\Database\Eloquent\Model;
|
||
|
|
||
|
class Label extends Model
|
||
|
{
|
||
|
/**
|
||
|
* The attributes that are mass assignable.
|
||
|
*
|
||
|
* @var array
|
||
|
*/
|
||
|
protected $fillable = [
|
||
|
'name'
|
||
|
];
|
||
|
|
||
|
public function photos()
|
||
|
{
|
||
|
return $this->belongsToMany(Photo::class, 'photo_labels');
|
||
|
}
|
||
|
}
|