20 lines
443 B
PHP
20 lines
443 B
PHP
<?php
|
|
|
|
namespace App\Repositories\Shop;
|
|
|
|
use App\Models\Shop\Article;
|
|
|
|
class Searches
|
|
{
|
|
public static function search($options)
|
|
{
|
|
return collect(Articles::getArticlesToSell([
|
|
'ids' => Article::search($options['search_name'])->get()->pluck('id'),
|
|
]))->sortBy('searchOrder')->toArray();
|
|
}
|
|
public static function getResults($options)
|
|
{
|
|
return Articles::getArticlesToSell($options);
|
|
}
|
|
}
|