* @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0 */ namespace App\Models; use Illuminate\Database\Eloquent\Model; class Collection extends Model { protected $guarded = []; protected $primaryKey = 'id'; public $timestamps = false; protected $table = 'collection'; /** * Has Many Comments. * * @return \Illuminate\Database\Eloquent\Relations\HasMany */ public function comments() { return $this->hasMany(Comment::class, 'collection_id'); } public function movie() { return $this->belongsToMany(Movie::class); } }