File tree Expand file tree Collapse file tree 3 files changed +26
-0
lines changed
Expand file tree Collapse file tree 3 files changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -146,6 +146,7 @@ public function compile()
146146 'fallback ' => $ route ->isFallback ,
147147 'defaults ' => $ route ->defaults ,
148148 'wheres ' => $ route ->wheres ,
149+ 'bindingFields ' => $ route ->bindingFields (),
149150 ];
150151 }
151152
Original file line number Diff line number Diff line change @@ -70,6 +70,7 @@ public function add(Route $route)
7070 'fallback ' => $ route ->isFallback ,
7171 'defaults ' => $ route ->defaults ,
7272 'wheres ' => $ route ->wheres ,
73+ 'bindingFields ' => $ route ->bindingFields (),
7374 ];
7475
7576 $ this ->compiled = [];
@@ -244,6 +245,7 @@ protected function newRoute(array $attributes)
244245 ->setFallback ($ attributes ['fallback ' ])
245246 ->setDefaults ($ attributes ['defaults ' ])
246247 ->setWheres ($ attributes ['wheres ' ])
248+ ->setBindingFields ($ attributes ['bindingFields ' ])
247249 ->setRouter ($ this ->router )
248250 ->setContainer ($ this ->container );
249251 }
Original file line number Diff line number Diff line change @@ -488,6 +488,29 @@ public function bindingFieldFor($parameter)
488488 return $ this ->bindingFields [$ parameter ] ?? null ;
489489 }
490490
491+ /**
492+ * Get the binding fields for the route.
493+ *
494+ * @return array
495+ */
496+ public function bindingFields ()
497+ {
498+ return $ this ->bindingFields ?? [];
499+ }
500+
501+ /**
502+ * Set the binding fields for the route.
503+ *
504+ * @param array $bindingFields
505+ * @return $this
506+ */
507+ public function setBindingFields (array $ bindingFields )
508+ {
509+ $ this ->bindingFields = $ bindingFields ;
510+
511+ return $ this ;
512+ }
513+
491514 /**
492515 * Get the parent parameter of the given parameter.
493516 *
You can’t perform that action at this time.
0 commit comments