Файловый менеджер - Редактировать - /var/www/vhosts/aviointeriors.dev1.mndrn.cloud/app/update/Models.tar
Назад
Company.php 0000644 00000001623 15233463205 0006670 0 ustar 00 <?php namespace App\Models; use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Relations\BelongsTo; use Illuminate\Database\Eloquent\Relations\BelongsToMany; use Illuminate\Database\Eloquent\Relations\hasMany; use Illuminate\Database\Eloquent\Relations\hasOne; class Company extends Model { use HasFactory; public $table = 'companies'; public $primaryKey = 'id'; protected $fillable = [ 'name' ]; public function users(): hasMany { return $this->hasMany(User::class); } public function cabinClasses(): hasMany { return $this->hasMany(CabinClass::class); } public function folder(): hasMany { return $this->hasMany(Folder::class); } public function delete() { $this->cabinClasses()->delete(); return parent::delete(); } } CabinClass.php 0000644 00000001043 15233463205 0007260 0 ustar 00 <?php namespace App\Models; use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Relations\BelongsTo; use Illuminate\Database\Eloquent\Relations\HasMany; class CabinClass extends Model { public $table = 'cabin_class'; public $primaryKey = 'id'; protected $fillable = [ 'name', 'company_id' ]; public function company(): belongsTo { return $this->belongsTo(Company::class); } public function products(): hasMany { return $this->hasMany(Product::class); } } EmailQueue.php 0000644 00000000654 15233463205 0007321 0 ustar 00 <?php namespace App\Models; use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Relations\BelongsTo; class EmailQueue extends Model { public $table = 'mail_queue'; public $primaryKey = 'id'; protected $fillable = [ 'label', 'type', 'status', 'info', 'mail_json', 'to', 'from', 'cc', 'ccn', 'send_at' ]; } UserNotification.php 0000644 00000000344 15233463205 0010546 0 ustar 00 <?php namespace App\Models; use Illuminate\Database\Eloquent\Model; class UserNotification extends Model { public $table = 'user_notifications'; public $primaryKey = 'id'; protected $fillable = ['cta_label']; } Admin.php 0000644 00000002370 15233463205 0006312 0 ustar 00 <?php namespace App\Models; use Illuminate\Auth\Authenticatable; use Illuminate\Contracts\Auth\Access\Authorizable as AuthorizableContract; use Illuminate\Contracts\Auth\Authenticatable as AuthenticatableContract; use Illuminate\Database\Eloquent\Model; use Laravel\Lumen\Auth\Authorizable; use Tymon\JWTAuth\Contracts\JWTSubject; class Admin extends Model implements AuthenticatableContract, AuthorizableContract, JWTSubject { use Authenticatable, Authorizable; public $table = 'admin'; public $primaryKey = 'id'; /** * The attributes that are mass assignable. * * @var array */ protected $fillable = [ 'name', 'email', 'password', 'api_token' ]; /** * The attributes excluded from the model's JSON form. * * @var array */ protected $hidden = [ 'password', ]; /** * Get the identifier that will be stored in the subject claim of the JWT. * * @return mixed */ public function getJWTIdentifier() { return $this->getKey(); } /** * Return a key value array, containing any custom claims to be added to the JWT. * * @return array */ public function getJWTCustomClaims() { return []; } } Product.php 0000644 00000001213 15233463205 0006675 0 ustar 00 <?php namespace App\Models; use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Relations\BelongsTo; use Illuminate\Database\Eloquent\Relations\HasMany; class Product extends Model { public $table = 'products'; public $primaryKey = 'id'; protected $fillable = [ 'serial_number', 'user_id', 'user_first_name', 'user_last_name', 'active', 'document_path' ]; public function cabinClass(): belongsTo { return $this->belongsTo(CabinClass::class); } public function documents(): hasMany { return $this->hasMany(Document::class); } } Rating.php 0000644 00000000637 15233463205 0006512 0 ustar 00 <?php namespace App\Models; use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Relations\BelongsTo; class Rating extends Model { public $table = 'ratings'; public $primaryKey = 'id'; protected $fillable = [ 'user_id', 'rate', 'type', 'company_id' ]; public function latest($column = 'updated_at') { return $this->orderBy($column, 'desc'); } } Question.php 0000644 00000000404 15233463205 0007065 0 ustar 00 <?php namespace App\Models; use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Relations\BelongsTo; class Question extends Model { public $table = 'questions'; public $primaryKey = 'id'; protected $fillable = [ ]; } Document.php 0000644 00000000633 15233463205 0007040 0 ustar 00 <?php namespace App\Models; use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Relations\BelongsTo; class Document extends Model { public $table = 'documents'; public $primaryKey = 'id'; protected $fillable = [ 'path', 'extension', 'size' ]; public function product(): belongsTo { return $this->belongsTo(Product::class); } } AdminNotification.php 0000644 00000001005 15233463205 0010653 0 ustar 00 <?php namespace App\Models; use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Relations\BelongsTo; use App\Models\User; class AdminNotification extends Model { public $table = 'admin_notifications'; public $primaryKey = 'id'; protected $fillable = ['cta_label']; public function instigator(): belongsTo { return $this->belongsTo(User::class); } public function latest($column = 'created_at') { return $this->orderBy($column, 'desc'); } } User.php 0000644 00000003725 15233463205 0006205 0 ustar 00 <?php namespace App\Models; use Illuminate\Auth\Authenticatable; use Illuminate\Contracts\Auth\Access\Authorizable as AuthorizableContract; use Illuminate\Contracts\Auth\Authenticatable as AuthenticatableContract; use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Model; use Laravel\Lumen\Auth\Authorizable; use Tymon\JWTAuth\Contracts\JWTSubject; use Illuminate\Database\Eloquent\Relations\BelongsTo; use Illuminate\Database\Eloquent\Relations\HasMany; use Illuminate\Notifications\Notifiable; # use Illuminate\Contracts\Auth\CanResetPassword as CanResetPassword; use Illuminate\Auth\Passwords\CanResetPassword as CanResetPasswordTrait; use Illuminate\Contracts\Auth\CanResetPassword as CanResetPasswordInterface; class User extends Model implements AuthenticatableContract, AuthorizableContract, JWTSubject, CanResetPasswordInterface { use Authenticatable, Authorizable, HasFactory, CanResetPasswordTrait, Notifiable; public $table = 'users'; public $primaryKey = 'id'; /** * The attributes that are mass assignable. * * @var string[] */ protected $fillable = [ 'first_name', 'last_name', 'email', 'password', 'active' ]; /** * The attributes excluded from the model's JSON form. * * @var string[] */ protected $hidden = [ 'password', ]; public function getEmailForPasswordReset(){} public function sendPasswordResetNotification($token){} /** * Get the identifier that will be stored in the subject claim of the JWT. * * @return mixed */ public function getJWTIdentifier() { return $this->getKey(); } /** * Return a key value array, containing any custom claims to be added to the JWT. * * @return array */ public function getJWTCustomClaims() { return []; } public function company(): BelongsTo { return $this->belongsTo(Company::class); } } PasswordReset.php 0000644 00000000423 15233463205 0010064 0 ustar 00 <?php namespace App\Models; use Illuminate\Database\Eloquent\Model; class PasswordReset extends Model { public $table = 'password_resets'; public $primaryKey = 'email'; protected $fillable = [ 'email', 'token', 'created_at' ]; } Folder.php 0000644 00000000562 15233463205 0006476 0 ustar 00 <?php namespace App\Models; use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Relations\BelongsTo; class Folder extends Model { public $table = 'folders'; public $primaryKey = 'id'; protected $fillable = [ 'path' ]; public function company(): belongsTo { return $this->belongsTo(Company::class); } }
| ver. 1.4 |
Github
|
.
| PHP 8.2.5 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка