Files
UNIT3D-Community-Edition/app/Type.php
HDVinnie 87ce42daf3 (Update) Refactor Torrent Request System
- renamed  models/functions and more to avoid conflict with
`App\Http\Requests` which will be used to refactor all HTTP Validation
rules into dedicated form requests
2018-03-22 20:10:37 -04:00

50 lines
934 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://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
* @author HDVinnie
*/
namespace App;
use Illuminate\Database\Eloquent\Model;
class Type extends Model
{
public $timestamps = false;
/**
* Validation rules
*
*/
public $rules = [
'name' => 'required',
'slug' => 'required',
'position' => 'required'
];
/**
* Has many torrents
*
*
*/
public function torrents()
{
return $this->hasMany(\App\Torrent::class);
}
/**
* Has many requests
*
*/
public function requests()
{
return $this->hasMany(\App\TorrentRequest::class);
}
}