Kundenhoheit

This commit is contained in:
Kevin Adametz 2020-05-06 15:43:53 +02:00
parent d8b5206031
commit dc63fa9fb2
52 changed files with 2436 additions and 557 deletions

View file

@ -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();