blue-twilight/app/Upload.php

39 lines
694 B
PHP

<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Notifications\Notifiable;
class Upload extends Model
{
use Notifiable;
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
'is_completed', 'is_processing', 'number_photos', 'number_successful', 'number_failed'
];
/**
* The attributes that should be hidden for arrays.
*
* @var array
*/
protected $hidden = [
];
public function album()
{
return $this->belongsTo(Album::class);
}
public function uploadPhotos()
{
return $this->hasMany(UploadPhoto::class);
}
}