Berater bestellungen kleine Änderungen
This commit is contained in:
parent
c4ed6b39db
commit
74923859d1
8 changed files with 64 additions and 49 deletions
|
|
@ -24,6 +24,8 @@ class OrderController extends Controller
|
|||
|
||||
public function __construct()
|
||||
{
|
||||
$this->middleware('superadmin');
|
||||
|
||||
$this->middleware('active.account');
|
||||
}
|
||||
|
||||
|
|
@ -270,9 +272,29 @@ class OrderController extends Controller
|
|||
|
||||
public function datatable(){
|
||||
|
||||
$show_at = 1;
|
||||
|
||||
// $user = User::find(\Auth::user()->id);
|
||||
$query = Product::select('products.*')->where('active', true)
|
||||
->where('show_at', '=', 1); //Kunden und Berater
|
||||
;
|
||||
|
||||
if(Request::get('shipping_is_for') === 'me'){
|
||||
$query = Product::select('products.*')->where('active', true)->where(function ($q) {
|
||||
$q->where('show_at', '=', 1)
|
||||
->orWhere('show_at', '=', 2)
|
||||
->orWhere('show_at', '=', 6);
|
||||
|
||||
});
|
||||
|
||||
}else{
|
||||
$query = Product::select('products.*')->where('active', true)->where(function ($q) {
|
||||
$q->where('show_at', '=', 0)
|
||||
->orWhere('show_at', '=', 1);
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
//Kunden und Berater
|
||||
//->orWhere('show_at', '=', 2); // Nur Berater
|
||||
//->orderBy('pos', 'DESC')
|
||||
//->orderBy('id', 'DESC');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue