⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.19
Server IP:
178.33.27.10
Server:
Linux cpanel.dev-unit.com 3.10.0-1160.108.1.el7.x86_64 #1 SMP Thu Jan 25 16:17:31 UTC 2024 x86_64
Server Software:
Apache/2.4.57 (Unix) OpenSSL/1.0.2k-fips
PHP Version:
8.2.11
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
home
/
id
/
hospital.dev-unit.com
/
app
/
Models
/
View File Name :
SuperAdminEnquiry.php
<?php namespace App\Models; use Eloquent; use Illuminate\Database\Eloquent\Builder; use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Model; use Illuminate\Support\Carbon; /** * App\Models\SuperAdminEnquiry * * @property int $id * @property string $first_name * @property string $last_name * @property string $email * @property string $phone * @property string $message * @property bool $status * @property Carbon|null $created_at * @property Carbon|null $updated_at * * @method static Builder|SuperAdminEnquiry newModelQuery() * @method static Builder|SuperAdminEnquiry newQuery() * @method static Builder|SuperAdminEnquiry query() * @method static Builder|SuperAdminEnquiry whereCreatedAt($value) * @method static Builder|SuperAdminEnquiry whereEmail($value) * @method static Builder|SuperAdminEnquiry whereFirstName($value) * @method static Builder|SuperAdminEnquiry whereId($value) * @method static Builder|SuperAdminEnquiry whereLastName($value) * @method static Builder|SuperAdminEnquiry whereMessage($value) * @method static Builder|SuperAdminEnquiry wherePhone($value) * @method static Builder|SuperAdminEnquiry whereStatus($value) * @method static Builder|SuperAdminEnquiry whereUpdatedAt($value) * * @mixin Eloquent */ class SuperAdminEnquiry extends Model { use HasFactory; public $table = 'super_admin_enquiries'; public $fillable = [ 'first_name', 'last_name', 'email', 'phone', 'message', 'status', ]; const ALL = 2; const READ = 1; const UNREAD = 0; const STATUS_ARR = [ self::ALL => 'All', self::READ => 'Read', self::UNREAD => 'Unread', ]; protected $appends = ['full_name']; /** * Validation rules * * @var array */ public static $rules = [ 'first_name' => 'required', 'last_name' => 'required', 'email' => 'required|email:filter', 'phone' => 'required', 'message' => 'required|max:5000', ]; /** * @var string[] */ public static $reCaptchaAttributes = [ 'g-recaptcha-response.recaptcha' => 'Captcha verification failed', 'g-recaptcha-response.required' => 'The Google reCaptcha field is required', ]; /** * Get the attributes that should be cast. * * @return array<string, string> */ protected function casts(): array { return [ 'id' => 'integer', 'first_name' => 'string', 'last_name' => 'string', 'email' => 'string', 'phone' => 'string', 'message' => 'string', 'status' => 'boolean', ]; } public function getFullNameAttribute(): string { return ucfirst($this->first_name).' '.ucfirst($this->last_name); } }