Media module, users hardening, README and token ledger
This commit is contained in:
1 parent
f86f5aea28
commit
9f2a21fa1f
22 files changed
+827
-24
No files matched your search
@@ -2,7 +2,9 @@
|
||||
|
||||
namespace IriksIT\Manager\Modules\Posts;
|
||||
|
||||
use IriksIT\Manager\Models\Post;
|
||||
use IriksIT\Manager\Modules\BaseModule;
|
||||
use IriksIT\Manager\Support\MediaUsage;
|
||||
use IriksIT\Manager\Support\Permission;
|
||||
|
||||
class PostsModule extends BaseModule
|
||||
@@ -38,4 +40,10 @@ class PostsModule extends BaseModule
|
||||
['label' => 'Posts', 'route' => 'manager.posts.index', 'permission' => 'posts.view'],
|
||||
];
|
||||
}
|
||||
|
||||
/** 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'])->flatMap(fn (Post $row) => array_values($row->only(['body', 'excerpt']))));
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user