'Posts', 'route' => 'manager.posts.index', 'permission' => 'posts.view'], ['label' => 'Categories and tags', 'route' => 'manager.labels.index', 'permission' => 'posts.labels'], ]; } /** Where the media library looks for the use of a file: the texts of the posts. */ public function boot(): void { app(MediaUsage::class)->register(fn () => Post::query()->get(['body', 'excerpt', 'cover_image'])->flatMap(fn (Post $row) => array_values($row->only(['body', 'excerpt', 'cover_image'])))); } }