Kundenhoheit
This commit is contained in:
parent
d8b5206031
commit
dc63fa9fb2
52 changed files with 2436 additions and 557 deletions
|
|
@ -25,11 +25,10 @@ class ProductController extends Controller
|
|||
public function index()
|
||||
{
|
||||
if(Request::get('show_active_products')){
|
||||
\Auth::user()->setSetting(['show_active_products' => Request::get('show_active_products')]);
|
||||
set_user_attr('show_active_products', Request::get('show_active_products'));
|
||||
}
|
||||
if(\Auth::user()->getSetting('show_active_products') === "true"){
|
||||
if(get_user_attr('show_active_products') === "true"){
|
||||
$values = Product::where('active', true)->orderBy('pos', 'DESC')->orderBy('id', 'DESC')->get();
|
||||
|
||||
}else{
|
||||
$values = Product::orderBy('pos', 'DESC')->orderBy('id', 'DESC')->get();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue