Spamworldpro Mini Shell
Spamworldpro


Server : Apache
System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64
User : corals ( 1002)
PHP Version : 7.4.33
Disable Function : exec,passthru,shell_exec,system
Directory :  /home/corals/mcoil.corals.io/app/Shop/SocialNetworks/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/corals/mcoil.corals.io/app/Shop/SocialNetworks/SocialNetwork.php
<?php

namespace App\Shop\SocialNetworks;

use Illuminate\Database\Eloquent\Model;

class SocialNetwork extends Model
{
    protected $fillable = [
        'title',
        'text',
        'icon',
        'button_text',
        'link_button',
        'background_img',
        'created_at',
        'updated_at',
        'meta_alt_icon',
        'meta_alt_bg'
    ];


    public function setLinkButtonAttribute($value) {
        $value = ($value == 'javascript:void(0);') ? null : $value;
        $scheme = parse_url($value, PHP_URL_SCHEME);
        if (empty($scheme) && !empty($value)) {
            $value = 'http://'.ltrim($value, '/');
        }
        if(!empty($value)){
            $this->attributes['link_button'] =  $value;
        } else {
            $this->attributes['link_button'] = null;
        }
    }

    public function getLinkButtonAttribute() {
        if(!empty($this->attributes['link_button']) && $this->attributes['link_button'] != 'javascript:void(0);') {
            $this->attributes['link_button'] =  preg_replace('/^(?!https?:\/\/)/', 'http://', $this->attributes['link_button']);  
        } else {
            $this->attributes['link_button'] = 'javascript:void(0);';
        }
        return $this->attributes['link_button'];
    }

    public function getIconAttribute() {
        if(!empty($this->attributes['icon'])) {
            return \Storage::url($this->attributes['icon']);
        } else {
            return 'images/Homepage/Twitter-Feed-Icon.png';
        }
    }

    public function getBackgroundImgAttribute() {
        if(!empty($this->attributes['background_img'])) {
            return \Storage::url($this->attributes['background_img']);
        } else {
            return 'images/Homepage/Twitter-Feed-Background.jpg';
        }
    }
}

Spamworldpro Mini