Skip to content

Commit fdf40b4

Browse files
committed
Update README
1 parent fe4dd35 commit fdf40b4

File tree

2 files changed

+92
-17
lines changed

2 files changed

+92
-17
lines changed

README.md

Lines changed: 57 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,14 @@ A comprehensive file and document management system for Filament applications, f
55
## Features
66

77
- **📁 File & Folder Management** - Upload files, create folders, and organize content
8-
- **🔗 External Links** - Add and manage external links with descriptions
8+
- **🔗 External Links** - Add and manage external links with descriptions (including video embeds)
99
- **👥 Advanced Permissions** - Google Drive-style ownership with Creator, Owner, Editor, and Viewer roles
1010
- **🔄 Automatic Inheritance** - Permissions automatically inherit from parent folders
11-
- **🔍 Multiple Views** - Public Library, My Documents, Shared with Me, Created by Me, and Search All
11+
- **🔍 Multiple Views** - Public Library, My Documents, Shared with Me, Created by Me, Favorites, and Search All
12+
- **🏷️ Tags & Favorites** - Organize items with tags and mark favorites for quick access
1213
- **⚙️ Configurable Admin Access** - Flexible admin role configuration
1314
- **🎨 Filament Integration** - Native Filament UI components and navigation
15+
- **🏢 Multi-Tenancy Support** - Optional team/organization scoping for all library content
1416

1517
## Installation
1618

@@ -89,16 +91,17 @@ public function boot()
8991

9092
### 3. Navigation
9193

92-
The plugin automatically adds navigation items:
94+
The plugin automatically adds navigation items under "Resource Library":
9395
- **Library** - Main library view
9496
- **Search All** - Search across all accessible content
9597
- **My Documents** - Personal documents and folders
9698
- **Shared with Me** - Items shared by other users
9799
- **Created by Me** - Items you created
100+
- **Favorites** - Items you've marked as favorites
98101

99102
## Permissions System
100103

101-
The plugin features a sophisticated permissions system inspired by Google Drive. See [Permissions Documentation](docs/permissions.md) for complete details.
104+
The plugin features a sophisticated permissions system inspired by Google Drive.
102105

103106
### Quick Overview
104107

@@ -144,27 +147,64 @@ For complete setup instructions, troubleshooting, and advanced configuration, se
144147

145148
## Configuration
146149

147-
### Admin Role Configuration
150+
The config file (`config/filament-library.php`) includes the following options:
151+
152+
### User Model
148153

149154
```php
150-
// config/filament-library.php
151-
return [
152-
'admin_role' => 'Admin', // Default admin role
153-
'admin_callback' => null, // Custom callback function
154-
];
155+
'user_model' => env('FILAMENT_LIBRARY_USER_MODEL', 'App\\Models\\User'),
155156
```
156157

157-
### Environment Variables
158+
Specify the user model for the application.
159+
160+
### Video Link Support (Optional)
158161

159-
```env
160-
LIBRARY_ADMIN_ROLE=super-admin
162+
The library supports video links from various platforms. To customize supported domains, add this to your config:
163+
164+
```php
165+
'video' => [
166+
'supported_domains' => [
167+
'youtube.com',
168+
'youtu.be',
169+
'vimeo.com',
170+
'wistia.com',
171+
],
172+
],
161173
```
162174

163-
## Documentation
175+
### Secure File URLs (Optional)
176+
177+
Configure how long temporary download URLs remain valid:
178+
179+
```php
180+
'url' => [
181+
'temporary_expiration_minutes' => 60, // Default: 60 minutes
182+
],
183+
```
184+
185+
### Admin Access Configuration (Optional)
186+
187+
To configure which users can access admin features, add this to your config:
188+
189+
```php
190+
'admin_role' => 'Admin', // Role name to check
191+
'admin_callback' => null, // Custom callback function
192+
```
193+
194+
Or set it programmatically in your `AppServiceProvider`:
195+
196+
```php
197+
use Tapp\FilamentLibrary\FilamentLibraryPlugin;
198+
199+
public function boot()
200+
{
201+
FilamentLibraryPlugin::setLibraryAdminCallback(function ($user) {
202+
return $user->hasRole('super-admin');
203+
});
204+
}
205+
```
164206

165-
- [Permissions System](docs/permissions.md) - Complete permissions guide
166-
- [Customization Guide](docs/customization.md) - Customizing admin access
167-
- [API Reference](docs/api.md) - Developer documentation
207+
**Note:** By default, users have an `isLibraryAdmin()` method that returns `false`. You can override this in your User model for custom logic.
168208

169209
## Testing
170210

config/filament-library.php

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,41 @@
1313
*/
1414
'user_model' => env('FILAMENT_LIBRARY_USER_MODEL', 'App\\Models\\User'),
1515

16+
/*
17+
|--------------------------------------------------------------------------
18+
| Video Link Support
19+
|--------------------------------------------------------------------------
20+
|
21+
| Configure which video platforms are supported for link embeds.
22+
| When a library item is a link to one of these domains, it will be
23+
| treated as a video link and displayed accordingly.
24+
|
25+
*/
26+
'video' => [
27+
'supported_domains' => [
28+
'youtube.com',
29+
'youtu.be',
30+
'vimeo.com',
31+
'wistia.com',
32+
],
33+
],
34+
35+
/*
36+
|--------------------------------------------------------------------------
37+
| URL Configuration
38+
|--------------------------------------------------------------------------
39+
|
40+
| Configure how library item URLs are generated and secured.
41+
|
42+
*/
43+
'url' => [
44+
/*
45+
| Number of minutes that temporary URLs remain valid.
46+
| Used when generating secure download links for files.
47+
*/
48+
'temporary_expiration_minutes' => 60,
49+
],
50+
1651
/*
1752
|--------------------------------------------------------------------------
1853
| Multi-Tenancy Configuration

0 commit comments

Comments
 (0)