File tree Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Original file line number Diff line number Diff line change 11
11
use Code16 \OzuClient \View \Components \Content ;
12
12
use Code16 \OzuClient \View \Components \File ;
13
13
use Code16 \OzuClient \View \Components \Image ;
14
+ use Illuminate \Database \Eloquent \Relations \Relation ;
14
15
use Illuminate \Pagination \LengthAwarePaginator ;
15
16
use Illuminate \Pagination \Paginator ;
16
17
use Illuminate \Support \Facades \Blade ;
@@ -74,12 +75,13 @@ public function boot()
74
75
return request ()->route ()->parameter ('page ' );
75
76
});
76
77
77
- // Relation::enforceMorphMap(
78
- // collect(config('ozu-client.collections'))
79
- // ->mapWithKeys(fn ($className) => [
80
- // (new $className)->ozuCollectionKey() => $className
81
- // ])
82
- // ->toArray()
83
- // );
78
+ // Use Ozu's collectionKey as the morphMap key
79
+ Relation::enforceMorphMap (
80
+ collect (config ('ozu-client.collections ' ))
81
+ ->mapWithKeys (fn (string $ className ) => [
82
+ (new $ className )->ozuCollectionKey () => $ className
83
+ ])
84
+ ->toArray ()
85
+ );
84
86
}
85
87
}
You can’t perform that action at this time.
0 commit comments