File tree Expand file tree Collapse file tree 3 files changed +6
-3
lines changed Expand file tree Collapse file tree 3 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -146,6 +146,7 @@ public function compile()
146
146
'bindingFields ' => $ route ->bindingFields (),
147
147
'lockSeconds ' => $ route ->locksFor (),
148
148
'waitSeconds ' => $ route ->waitsFor (),
149
+ 'withTrashed ' => $ route ->allowsTrashedBindings (),
149
150
];
150
151
}
151
152
Original file line number Diff line number Diff line change @@ -302,7 +302,8 @@ protected function newRoute(array $attributes)
302
302
->setDefaults ($ attributes ['defaults ' ])
303
303
->setWheres ($ attributes ['wheres ' ])
304
304
->setBindingFields ($ attributes ['bindingFields ' ])
305
- ->block ($ attributes ['lockSeconds ' ] ?? null , $ attributes ['waitSeconds ' ] ?? null );
305
+ ->block ($ attributes ['lockSeconds ' ] ?? null , $ attributes ['waitSeconds ' ] ?? null )
306
+ ->withTrashed ($ attributes ['withTrashed ' ] ?? false );
306
307
}
307
308
308
309
/**
Original file line number Diff line number Diff line change @@ -569,11 +569,12 @@ public function parentOfParameter($parameter)
569
569
/**
570
570
* Allow "trashed" models to be retrieved when resolving implicit model bindings for this route.
571
571
*
572
+ * @param bool $withTrashed
572
573
* @return $this
573
574
*/
574
- public function withTrashed ()
575
+ public function withTrashed ($ withTrashed = true )
575
576
{
576
- $ this ->withTrashedBindings = true ;
577
+ $ this ->withTrashedBindings = $ withTrashed ;
577
578
578
579
return $ this ;
579
580
}
You can’t perform that action at this time.
0 commit comments