Registierung Korrekturen
This commit is contained in:
parent
8e4bb0c2f6
commit
d8b5206031
70 changed files with 1192 additions and 569 deletions
|
|
@ -6,6 +6,7 @@ use App\Models\Product;
|
|||
use App\Models\ProductImage;
|
||||
use App\Repositories\ProductRepository;
|
||||
use Input;
|
||||
use Request;
|
||||
use Validator;
|
||||
|
||||
|
||||
|
|
@ -23,8 +24,18 @@ class ProductController extends Controller
|
|||
|
||||
public function index()
|
||||
{
|
||||
if(Request::get('show_active_products')){
|
||||
\Auth::user()->setSetting(['show_active_products' => Request::get('show_active_products')]);
|
||||
}
|
||||
if(\Auth::user()->getSetting('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();
|
||||
|
||||
}
|
||||
$data = [
|
||||
'values' => Product::orderBy('pos', 'DESC')->orderBy('id', 'DESC')->get(),
|
||||
'values' => $values
|
||||
];
|
||||
return view('admin.product.index', $data);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue