*/ public function share(Request $request): array { $props = [ ...InertiaHelper::errorProps(parent::share($request)), 'auth' => [ 'policies' => [ 'notices' => [ 'viewAny' => Gate::allows('viewAny', Notice::class), 'viewTrash' => Gate::allows('viewTrash', Notice::class), 'create' => Gate::allows('create', Notice::class), ], 'invoicePackages' => [ 'viewAny' => Gate::allows('viewAny', InvoicePackage::class), 'viewTrash' => Gate::allows('viewTrash', InvoicePackage::class), 'create' => Gate::allows('create', InvoicePackage::class), ], ], ], 'noticeTypeEnum' => NoticeTypeEnum::toArray(), ]; return array_replace_recursive( $props, InertiaSharedRegistry::resolve($request), ); } }