ANY IDEA How I can Create other bread for the same table with a different condation

tag-dev

Sep 9th, 2018 10:50 PM

** Hello AND Thanks Voyager Team **

  • I need to show data from the same table Order with a deferent condations
  • i created custom controller OrdersController for this bread and working fine with Order::where('active, 1') **I NEED TO MAKE AND NEW MENU TO SHOW DATA LIKE Order::where('active, 0) FOR THE SAME TABLE **

**WHAT I DID **

  1. made a new route('order/active', 'OrdersController@active');
  2. Created Menu For This route
  3. i created a new method in this custom controller showNotActiveOrders
  4. i copied index method content of a bread and put it in showNotActiveOrders

** i got this error **

Trying to get property 'model_name' of non-object

HOW CAN I DO THIS IDEA IN MY APP make a menu to show active orders and other menu to show not active orders

Thanks Again Voayger Team

milton-leaman

Jun 23rd, 2019 07:11 AM

This is one of the most important aspects connected to the mentioned point of view.