34 lines
580 B
PHP
34 lines
580 B
PHP
<?php
|
|
|
|
namespace App;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Notifications\Notifiable;
|
|
|
|
class Photo extends Model
|
|
{
|
|
use Notifiable;
|
|
|
|
/**
|
|
* The attributes that are mass assignable.
|
|
*
|
|
* @var array
|
|
*/
|
|
protected $fillable = [
|
|
'album_id', 'name', 'description', 'file_name', 'mime_type', 'file_size'
|
|
];
|
|
|
|
/**
|
|
* The attributes that should be hidden for arrays.
|
|
*
|
|
* @var array
|
|
*/
|
|
protected $hidden = [
|
|
];
|
|
|
|
public function album()
|
|
{
|
|
return $this->belongsTo(Album::class);
|
|
}
|
|
}
|