🤩 File Manager - Mr.X
PHP:
8.3.33
Server:
Apache
OS:
Linux 5.14.0-611.49.1.el9_7.x86_64
User:
websparkit
Navigate
Upload:
Upload
New File
New Folder
Editing:User.php
<?php namespace App\Models; // use Illuminate\Contracts\Auth\MustVerifyEmail; use Database\Factories\UserFactory; use Illuminate\Database\Eloquent\Attributes\Fillable; use Illuminate\Database\Eloquent\Attributes\Hidden; use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Foundation\Auth\User as Authenticatable; use Illuminate\Notifications\Notifiable; use Spatie\Permission\Traits\HasRoles; #[Fillable(['name', 'email', 'password', 'profile_photo_path'])] #[Hidden(['password', 'remember_token'])] class User extends Authenticatable { protected $fillable = ['name', 'email', 'password', 'profile_photo_path']; protected $hidden = ['password', 'remember_token']; /** @use HasFactory<UserFactory> */ use HasFactory, Notifiable, HasRoles; /** * Get the attributes that should be cast. * * @return array<string, string> */ protected function casts(): array { return [ 'email_verified_at' => 'datetime', 'password' => 'hashed', ]; } public function clientProjects() { return $this->hasMany(Project::class, 'client_id'); } public function techLeadProjects() { return $this->hasMany(Project::class, 'tech_lead_id'); } public function assignedTasks() { return $this->hasMany(ProjectTask::class, 'developer_id'); } public function attendances() { return $this->hasMany(Attendance::class); } public function leads() { return $this->hasMany(Lead::class, 'sales_person_id'); } public function projectCredentials() { return $this->belongsToMany(ProjectCredential::class, 'credential_user')->withTimestamps(); } public function getProfilePhotoUrlAttribute() { return $this->profile_photo_path ? \Illuminate\Support\Facades\Storage::url($this->profile_photo_path) : 'https://ui-avatars.com/api/?name=' . urlencode($this->name) . '&color=FF6D28&background=0B2447'; } }
Save Changes
Cancel
Create New File
Create New Folder