File "Faq.php"

Full Path: /home/fundopuh/trader.fxex.org/app/Models/Faq.php
File size: 579 bytes
MIME-type: text/x-php
Charset: utf-8

<?php  
// this Code is Cracked by dharunMods-YouTube-Channel

namespace App\Models;

use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class Faq extends Model
{
    use HasFactory;

    protected $guarded = [];

    // scopre search
    public function scopeSearch(Builder $query, $val)
    {
        if ($val == '') {
            return $query;
        }
        return $query->where('question', 'like', '%' . $val . '%')
            ->orWhere('answer', 'like', '%' . $val . '%');
    }
}