33namespace Statamic \Http \Controllers \CP \Fields ;
44
55use Illuminate \Http \Request ;
6+ use Statamic \CP \Breadcrumbs \Breadcrumb ;
7+ use Statamic \CP \Breadcrumbs \Breadcrumbs ;
68use Statamic \Exceptions \NotFoundHttpException ;
79use Statamic \Facades \Blueprint ;
810use Statamic \Http \Controllers \CP \CpController ;
@@ -24,6 +26,26 @@ public function edit($namespace, $handle)
2426 throw new NotFoundHttpException ;
2527 }
2628
29+ Breadcrumbs::push (new Breadcrumb (
30+ text: $ blueprint ->renderableNamespace (),
31+ ));
32+
33+ Breadcrumbs::push (new Breadcrumb (
34+ text: $ blueprint ->title (),
35+ icon: 'blueprints ' ,
36+ url: $ blueprint ->editAdditionalBlueprintUrl (),
37+ links: Blueprint::in ($ blueprint ->namespace ())
38+ ->reject (fn ($ b ) => $ b ->handle () === $ blueprint ->handle ())
39+ ->map (function ($ b ) {
40+ return [
41+ 'text ' => $ b ->title (),
42+ 'icon ' => 'blueprints ' ,
43+ 'url ' => $ b ->editAdditionalBlueprintUrl (),
44+ ];
45+ })
46+ ->all (),
47+ ));
48+
2749 return view ('statamic::blueprints.edit ' , [
2850 'blueprint ' => $ blueprint ,
2951 'blueprintVueObject ' => $ this ->toVueObject ($ blueprint ),
0 commit comments