mirror of
https://github.com/openclassify/openclassify.git
synced 2026-01-11 18:01:10 -06:00
Merge pull request #1212 from openclassify/dia
#4751 [coupon-module] Improve UX
This commit is contained in:
commit
93b8667b37
@ -129,4 +129,15 @@ class CategoryModel extends CatsCategoryEntryModel implements CategoryInterface
|
||||
{
|
||||
return $this->where('parent_category_id', $this->getId())->get();
|
||||
}
|
||||
|
||||
public function scopeWithTrans($query)
|
||||
{
|
||||
return $query
|
||||
->leftJoin('cats_category_translations as cats_trans', function ($join) {
|
||||
$join->on('cats_category.id', '=', 'cats_trans.entry_id');
|
||||
$join->whereIn(
|
||||
'locale', [config('app.locale'), setting_value('streams::default_locale'), 'en']
|
||||
);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@ -19,4 +19,6 @@ interface CategoryInterface extends EntryInterface
|
||||
public function setCategoryIconUrl($url);
|
||||
|
||||
public function getSubCategories();
|
||||
|
||||
public function scopeWithTrans($query);
|
||||
}
|
||||
|
||||
@ -12,7 +12,7 @@ class CacheController extends PublicController
|
||||
$profile_img = $user ? $this->dispatch(
|
||||
new MakeImageInstance($user->file ?: 'theme::images/no_profile.svg', 'img')
|
||||
)->url() : $user;
|
||||
$user = $user ? $user->first_name . ' ' . $user->last_name : $user;
|
||||
$user = $user ? $user->name() : $user;
|
||||
|
||||
$getAddBlockHtml = new addBlock('navigation/dropdown', []);
|
||||
$addBlockHtml = $getAddBlockHtml->handle();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user