mirror of
https://github.com/HDInnovations/UNIT3D-Community-Edition.git
synced 2026-02-08 20:49:10 -06:00
49 lines
886 B
PHP
49 lines
886 B
PHP
<?php
|
|
/**
|
|
* NOTICE OF LICENSE
|
|
*
|
|
* UNIT3D is open-sourced software licensed under the GNU General Public License v3.0
|
|
* The details is bundled with this project in the file LICENSE.txt.
|
|
*
|
|
* @project UNIT3D
|
|
* @license https://choosealicense.com/licenses/gpl-3.0/ GNU General Public License v3.0
|
|
* @author BluCrew
|
|
*/
|
|
|
|
namespace App;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class Type extends Model
|
|
{
|
|
public $timestamps = false;
|
|
|
|
/**
|
|
* Validation rules
|
|
*
|
|
*/
|
|
public $rules = [
|
|
'name' => 'required',
|
|
'slug' => 'required',
|
|
];
|
|
|
|
/**
|
|
* Has many torrents
|
|
*
|
|
*
|
|
*/
|
|
public function torrents()
|
|
{
|
|
return $this->hasMany(\App\Torrent::class);
|
|
}
|
|
|
|
/**
|
|
* Has many requests
|
|
*
|
|
*/
|
|
public function requests()
|
|
{
|
|
return $this->hasMany(\App\Requests::class);
|
|
}
|
|
}
|