Create New Item
Item Type
File
Folder
Item Name
Search file in folder and subfolders...
Are you sure want to rename?
File Manager
/
app
/
Models
:
Faq.php
Advanced Search
Upload
New Item
Settings
Back
Back Up
Advanced Editor
Save
<?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 . '%'); } }