One Hat Cyber Team
Your IP :
18.117.82.179
Server IP :
192.145.235.60
Server :
Linux ngx365.inmotionhosting.com 5.14.0-427.33.1.el9_4.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Aug 30 09:45:56 EDT 2024 x86_64
Server Software :
Apache
PHP Version :
8.2.27
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
home
/
centos12
/
public_html
/
centosuit
/
app
/
Models
/
View File Name :
SocialAuthSetting.php
<?php namespace App\Models; /** * App\Models\SocialAuthSetting * * @property int $id * @property string|null $facebook_client_id * @property string|null $facebook_secret_id * @property string $facebook_status * @property string|null $google_client_id * @property string|null $google_secret_id * @property string $google_status * @property string|null $twitter_client_id * @property string|null $twitter_secret_id * @property string $twitter_status * @property string|null $linkedin_client_id * @property string|null $linkedin_secret_id * @property string $linkedin_status * @property \Illuminate\Support\Carbon|null $created_at * @property \Illuminate\Support\Carbon|null $updated_at * @property-read mixed $social_auth_enable * @method static \Illuminate\Database\Eloquent\Builder|SocialAuthSetting newModelQuery() * @method static \Illuminate\Database\Eloquent\Builder|SocialAuthSetting newQuery() * @method static \Illuminate\Database\Eloquent\Builder|SocialAuthSetting query() * @method static \Illuminate\Database\Eloquent\Builder|SocialAuthSetting whereCreatedAt($value) * @method static \Illuminate\Database\Eloquent\Builder|SocialAuthSetting whereFacebookClientId($value) * @method static \Illuminate\Database\Eloquent\Builder|SocialAuthSetting whereFacebookSecretId($value) * @method static \Illuminate\Database\Eloquent\Builder|SocialAuthSetting whereFacebookStatus($value) * @method static \Illuminate\Database\Eloquent\Builder|SocialAuthSetting whereGoogleClientId($value) * @method static \Illuminate\Database\Eloquent\Builder|SocialAuthSetting whereGoogleSecretId($value) * @method static \Illuminate\Database\Eloquent\Builder|SocialAuthSetting whereGoogleStatus($value) * @method static \Illuminate\Database\Eloquent\Builder|SocialAuthSetting whereId($value) * @method static \Illuminate\Database\Eloquent\Builder|SocialAuthSetting whereLinkedinClientId($value) * @method static \Illuminate\Database\Eloquent\Builder|SocialAuthSetting whereLinkedinSecretId($value) * @method static \Illuminate\Database\Eloquent\Builder|SocialAuthSetting whereLinkedinStatus($value) * @method static \Illuminate\Database\Eloquent\Builder|SocialAuthSetting whereTwitterClientId($value) * @method static \Illuminate\Database\Eloquent\Builder|SocialAuthSetting whereTwitterSecretId($value) * @method static \Illuminate\Database\Eloquent\Builder|SocialAuthSetting whereTwitterStatus($value) * @method static \Illuminate\Database\Eloquent\Builder|SocialAuthSetting whereUpdatedAt($value) * @mixin \Eloquent */ class SocialAuthSetting extends BaseModel { protected $table = 'social_auth_settings'; protected $guarded = ['id']; protected $appends = ['social_auth_enable', 'social_auth_enable_count']; protected $casts = [ 'facebook_secret_id' => 'encrypted', 'google_secret_id' => 'encrypted', 'linkedin_secret_id' => 'encrypted', 'twitter_secret_id' => 'encrypted', ]; public function getSocialAuthEnableAttribute() { return in_array('enable', [ $this->linkedin_status, $this->google_status, $this->twitter_status, $this->facebook_status ]); } public function getSocialAuthEnableCountAttribute() { $statuses = [ $this->linkedin_status, $this->google_status, $this->twitter_status, $this->facebook_status ]; return count(array_filter($statuses, function ($status) { return $status == 'enable'; })); } }