Cleanup code in MountController.php, again.
This commit is contained in:
parent
050075b835
commit
66b9169458
2 changed files with 17 additions and 31 deletions
|
@ -2,6 +2,8 @@
|
|||
|
||||
namespace Pterodactyl\Models;
|
||||
|
||||
use Illuminate\Validation\Rules\NotIn;
|
||||
|
||||
/**
|
||||
* @property int $id
|
||||
* @property string $uuid
|
||||
|
@ -63,6 +65,20 @@ class Mount extends Model
|
|||
'user_mountable' => 'sometimes|boolean',
|
||||
];
|
||||
|
||||
/**
|
||||
* Implement language verification by overriding Eloquence's gather
|
||||
* rules function.
|
||||
*/
|
||||
public static function getRules()
|
||||
{
|
||||
$rules = parent::getRules();
|
||||
|
||||
$rules['source'][] = new NotIn(Mount::$invalidSourcePaths);
|
||||
$rules['target'][] = new NotIn(Mount::$invalidSourcePaths);
|
||||
|
||||
return $rules;
|
||||
}
|
||||
|
||||
/**
|
||||
* Disable timestamps on this model.
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue