| @@ 9-44 (lines=36) @@ | ||
| 6 | /** |
|
| 7 | * Carts Back-end Controller. |
|
| 8 | */ |
|
| 9 | class Carts extends Controller |
|
| 10 | { |
|
| 11 | public $bodyClass = 'compact-container'; |
|
| 12 | ||
| 13 | public $formConfig = 'config_form.yaml'; |
|
| 14 | ||
| 15 | public $implement = [ |
|
| 16 | 'Backend.Behaviors.FormController', |
|
| 17 | 'Backend.Behaviors.ListController', |
|
| 18 | 'Owl.Behaviors.ListDelete.Behavior', |
|
| 19 | ]; |
|
| 20 | ||
| 21 | public $listConfig = 'config_list.yaml'; |
|
| 22 | ||
| 23 | public $registerPermissions = [ |
|
| 24 | 'bedard.shop.carts.manage', |
|
| 25 | ]; |
|
| 26 | ||
| 27 | public function __construct() |
|
| 28 | { |
|
| 29 | parent::__construct(); |
|
| 30 | ||
| 31 | BackendMenu::setContext('Bedard.Shop', 'shop', 'carts'); |
|
| 32 | } |
|
| 33 | ||
| 34 | /** |
|
| 35 | * Extend the list query. |
|
| 36 | * |
|
| 37 | * @param \Illuminate\Database\Query\Builder $query |
|
| 38 | * @return \Illuminate\Database\Query\Builder |
|
| 39 | */ |
|
| 40 | public function listExtendQuery($query) |
|
| 41 | { |
|
| 42 | $query->with('statuses'); |
|
| 43 | } |
|
| 44 | } |
|
| 45 | ||
| @@ 9-31 (lines=23) @@ | ||
| 6 | /** |
|
| 7 | * Statuses Back-end Controller. |
|
| 8 | */ |
|
| 9 | class Statuses extends BackendController |
|
| 10 | { |
|
| 11 | public $formConfig = 'config_form.yaml'; |
|
| 12 | ||
| 13 | public $implement = [ |
|
| 14 | 'Backend.Behaviors.FormController', |
|
| 15 | 'Backend.Behaviors.ListController', |
|
| 16 | 'Owl.Behaviors.ListDelete.Behavior', |
|
| 17 | ]; |
|
| 18 | ||
| 19 | public $listConfig = 'config_list.yaml'; |
|
| 20 | ||
| 21 | public $registerPermissions = [ |
|
| 22 | 'bedard.shop.statuses.manage', |
|
| 23 | ]; |
|
| 24 | ||
| 25 | public function __construct() |
|
| 26 | { |
|
| 27 | parent::__construct(); |
|
| 28 | ||
| 29 | BackendMenu::setContext('Bedard.Shop', 'shop', 'statuses'); |
|
| 30 | } |
|
| 31 | } |
|
| 32 | ||