You can use Laravel's Eloquent ORM to achieve the same result. Here's an example:
$products = Product::selectRaw('*, MATCH(name) AGAINST(? IN BOOLEAN MODE) AS relevance', ['DDR5'])
->whereRaw('MATCH(name) AGAINST(? IN BOOLEAN MODE) > 0', ['DDR5'])
->get();
In this example, we're using the selectRaw method to select all columns from the products table and also calculate the relevance score using MySQL's MATCH function. We're passing the search term DDR5 as a parameter to the selectRaw method.
Then, we're using the whereRaw method to filter the results based on the relevance score. We're passing the search term DDR5 as a parameter to the whereRaw method as well.
Finally, we're calling the get method to retrieve the results.
Note that you'll need to define a Product model that extends Laravel's Illuminate\Database\Eloquent\Model class and represents the products table in your database.