mirror of
https://github.com/axeloz/filesharing.git
synced 2025-05-06 18:13:55 +02:00
59 lines
1 KiB
PHP
59 lines
1 KiB
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Foundation\Auth\User as Authenticatable;
|
|
use \Orbit\Concerns\Orbital;
|
|
use Illuminate\Database\Schema\Blueprint;
|
|
use Illuminate\Support\Facades\Hash;
|
|
use Illuminate\Database\Eloquent\Casts\Attribute;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class User extends Authenticatable
|
|
{
|
|
use Orbital;
|
|
|
|
/**
|
|
* The attributes that are mass assignable.
|
|
*
|
|
* @var array<int, string>
|
|
*/
|
|
protected $fillable = [
|
|
'username',
|
|
'password',
|
|
];
|
|
|
|
/**
|
|
* The attributes that should be hidden for serialization.
|
|
*
|
|
* @var array<int, string>
|
|
*/
|
|
protected $hidden = [
|
|
'password',
|
|
];
|
|
|
|
|
|
public $incrementing = false;
|
|
|
|
|
|
public function getKeyName()
|
|
{
|
|
return 'username';
|
|
}
|
|
|
|
public function getIncrementing()
|
|
{
|
|
return false;
|
|
}
|
|
|
|
public static function schema(Blueprint $table)
|
|
{
|
|
$table->string('username');
|
|
$table->string('password');
|
|
}
|
|
|
|
public function bundles() {
|
|
return $this->hasMany(Bundle::class);
|
|
}
|
|
|
|
}
|