To pass a string to the where method in Laravel's Eloquent ORM, you can use the whereRaw method. This allows you to write raw SQL expressions as part of your query.
Here's an example of how you can modify your code to achieve this:
$MyRequest = '[["type", "For_Sale"],["live", "1"]]';
$Items = Extra::whereRaw(json_decode($MyRequest))->orderBy('display_order', 'ASC')->paginate(8);
In this example, we use json_decode to convert the JSON string $MyRequest into an array. Then, we pass this array to the whereRaw method, which will treat it as a raw SQL expression.
Make sure that the JSON string is properly formatted with double quotes around the keys and values.