File tree 3 files changed +26
-0
lines changed
3 files changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -146,6 +146,7 @@ public function compile()
146
146
'fallback ' => $ route ->isFallback ,
147
147
'defaults ' => $ route ->defaults ,
148
148
'wheres ' => $ route ->wheres ,
149
+ 'bindingFields ' => $ route ->bindingFields (),
149
150
];
150
151
}
151
152
Original file line number Diff line number Diff line change @@ -70,6 +70,7 @@ public function add(Route $route)
70
70
'fallback ' => $ route ->isFallback ,
71
71
'defaults ' => $ route ->defaults ,
72
72
'wheres ' => $ route ->wheres ,
73
+ 'bindingFields ' => $ route ->bindingFields (),
73
74
];
74
75
75
76
$ this ->compiled = [];
@@ -244,6 +245,7 @@ protected function newRoute(array $attributes)
244
245
->setFallback ($ attributes ['fallback ' ])
245
246
->setDefaults ($ attributes ['defaults ' ])
246
247
->setWheres ($ attributes ['wheres ' ])
248
+ ->setBindingFields ($ attributes ['bindingFields ' ])
247
249
->setRouter ($ this ->router )
248
250
->setContainer ($ this ->container );
249
251
}
Original file line number Diff line number Diff line change @@ -488,6 +488,29 @@ public function bindingFieldFor($parameter)
488
488
return $ this ->bindingFields [$ parameter ] ?? null ;
489
489
}
490
490
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
+
491
514
/**
492
515
* Get the parent parameter of the given parameter.
493
516
*
You can’t perform that action at this time.
0 commit comments