├── public ├── favicon.ico ├── vendor │ └── themes │ │ └── .gitkeep ├── robots.txt ├── index.php ├── js │ └── filament │ │ └── forms │ │ └── components │ │ ├── textarea.js │ │ ├── tags-input.js │ │ └── key-value.js └── .htaccess ├── app ├── Services │ └── ApiService.php ├── Http │ ├── Controllers │ │ ├── Auth │ │ │ ├── LoginController.php │ │ │ └── RegisterController.php │ │ ├── Controller.php │ │ ├── BookController.php │ │ ├── PostController.php │ │ ├── ContactController.php │ │ └── Api │ │ │ └── AuthController.php │ ├── Resources │ │ └── LoginResource.php │ └── Requests │ │ ├── StoreBookRequest.php │ │ ├── StorePostRequest.php │ │ ├── StoreContactRequest.php │ │ ├── UpdateBookRequest.php │ │ ├── UpdatePostRequest.php │ │ ├── UpdateContactRequest.php │ │ └── LoginRequest.php ├── Filament │ ├── Resources │ │ ├── RoleResource │ │ │ └── Pages │ │ │ │ ├── ViewRole.php │ │ │ │ ├── ListRoles.php │ │ │ │ ├── CreateRole.php │ │ │ │ └── EditRole.php │ │ ├── BookResource │ │ │ ├── Pages │ │ │ │ ├── ListBooks.php │ │ │ │ ├── ViewBook.php │ │ │ │ ├── CreateBook.php │ │ │ │ └── EditBook.php │ │ │ └── Api │ │ │ │ ├── BookApiService.php │ │ │ │ └── Handlers │ │ │ │ ├── CreateHandler.php │ │ │ │ ├── DeleteHandler.php │ │ │ │ ├── DetailHandler.php │ │ │ │ ├── UpdateHandler.php │ │ │ │ └── PaginationHandler.php │ │ └── UserResource │ │ │ └── Pages │ │ │ ├── ViewUser.php │ │ │ ├── CreateUser.php │ │ │ ├── EditUser.php │ │ │ └── ListUsers.php │ ├── Exports │ │ ├── ContactExporter.php │ │ ├── BookExporter.php │ │ └── UserExporter.php │ ├── Pages │ │ ├── ManageSetting.php │ │ └── Login.php │ └── Imports │ │ ├── UserImporter.php │ │ └── BookImporter.php ├── Models │ ├── Contact.php │ ├── Post.php │ ├── Book.php │ └── User.php ├── Settings │ └── KaidoSetting.php ├── Providers │ └── AppServiceProvider.php └── Policies │ ├── BookPolicy.php │ └── PostPolicy.php ├── database ├── .gitignore ├── seeders │ ├── ContactSeeder.php │ ├── BookSeeder.php │ ├── PostSeeder.php │ └── DatabaseSeeder.php ├── factories │ ├── ContactFactory.php │ ├── PostFactory.php │ ├── BookFactory.php │ └── UserFactory.php ├── settings │ └── 2025_01_08_152510_create_kaido_settings.php └── migrations │ ├── 2022_12_14_083707_create_settings_table.php │ ├── 2025_01_12_091355_create_contacts_table.php │ ├── 2025_01_31_020024_add_themes_settings_to_users_table.php │ ├── 2025_01_04_125650_create_posts_table.php │ ├── 2025_01_02_225927_add_avatar_url_column_to_users_table.php │ ├── 2025_01_01_120813_create_books_table.php │ ├── 2025_01_08_233142_create_socialite_users_table.php │ ├── 2025_01_12_031359_create_failed_import_rows_table.php │ ├── 2025_01_12_031340_create_notifications_table.php │ ├── 2025_01_09_225908_update_user_table_make_password_column_nullable.php │ ├── 0001_01_01_000001_create_cache_table.php │ ├── 2025_01_03_114929_create_personal_access_tokens_table.php │ ├── 2024_12_04_041953_create_breezy_sessions_table.php │ ├── 2025_01_12_031357_create_imports_table.php │ ├── 2025_01_12_031358_create_exports_table.php │ ├── 2024_12_04_025120_create_media_table.php │ ├── 0001_01_01_000000_create_users_table.php │ └── 0001_01_01_000002_create_jobs_table.php ├── bootstrap ├── cache │ └── .gitignore ├── providers.php └── app.php ├── resources ├── js │ ├── app.js │ └── bootstrap.js ├── views │ ├── vendor │ │ ├── filament-socialite │ │ │ ├── .gitkeep │ │ │ └── components │ │ │ │ └── buttons.blade.php │ │ └── filament-breezy │ │ │ ├── filament │ │ │ └── pages │ │ │ │ ├── two-factor.blade.php │ │ │ │ └── my-profile.blade.php │ │ │ ├── components │ │ │ ├── clipboard-link.blade.php │ │ │ └── grid-section.blade.php │ │ │ └── livewire │ │ │ ├── update-password.blade.php │ │ │ ├── personal-info.blade.php │ │ │ └── sanctum-tokens.blade.php │ └── filament │ │ └── pages │ │ └── login.blade.php └── css │ └── app.css ├── storage ├── logs │ └── .gitignore ├── app │ ├── private │ │ └── .gitignore │ ├── public │ │ └── .gitignore │ └── .gitignore ├── debugbar │ └── .gitignore └── framework │ ├── testing │ └── .gitignore │ ├── views │ └── .gitignore │ ├── cache │ ├── data │ │ └── .gitignore │ └── .gitignore │ ├── sessions │ └── .gitignore │ └── .gitignore ├── draft.yaml ├── .DS_Store ├── stubs ├── filament │ ├── ColumnView.stub │ ├── TableView.stub │ ├── PageView.stub │ ├── LayoutComponentView.stub │ ├── ThemeCss.stub │ ├── ThemePostcssConfig.stub │ ├── Field.stub │ ├── Column.stub │ ├── Cluster.stub │ ├── FormView.stub │ ├── FieldView.stub │ ├── Page.stub │ ├── LayoutComponent.stub │ ├── CustomResourcePage.stub │ ├── ThemeTailwindConfig.stub │ ├── ResourceListPage.stub │ ├── ResourceViewPage.stub │ ├── ResourceManagePage.stub │ ├── ResourcePage.stub │ ├── ResourceEditPage.stub │ ├── Form.stub │ ├── Exporter.stub │ ├── EditForm.stub │ ├── CreateForm.stub │ ├── Table.stub │ ├── Importer.stub │ ├── RelationManager.stub │ ├── Resource.stub │ └── ResourceManageRelatedRecordsPage.stub ├── enum.stub ├── pest.unit.stub ├── trait.stub ├── observer.plain.stub ├── enum.backed.stub ├── pest.stub ├── model.pivot.stub ├── controller.plain.stub ├── class.stub ├── policy.plain.stub ├── test.unit.stub ├── seeder.stub ├── controller.invokable.stub ├── class.invokable.stub ├── model.stub ├── provider.stub ├── scope.stub ├── job.stub ├── resource.stub ├── test.stub ├── listener.stub ├── migration.stub ├── resource-collection.stub ├── rule.stub ├── middleware.stub ├── job.queued.stub ├── listener.typed.stub ├── cast.inbound.stub ├── factory.stub ├── listener.queued.stub ├── view-component.stub ├── listener.typed.queued.stub ├── console.stub ├── migration.create.stub ├── request.stub ├── migration.update.stub ├── cast.stub ├── controller.singleton.api.stub ├── event.stub ├── controller.api.stub ├── observer.stub ├── controller.nested.singleton.api.stub ├── controller.model.api.stub ├── controller.singleton.stub ├── mail.stub ├── markdown-notification.stub ├── markdown-mail.stub ├── controller.stub ├── controller.nested.api.stub ├── notification.stub ├── controller.model.stub ├── controller.nested.singleton.stub ├── policy.stub └── controller.nested.stub ├── tests ├── Unit │ └── ExampleTest.php ├── Feature │ └── ExampleTest.php ├── TestCase.php └── Pest.php ├── postcss.config.js ├── routes ├── web.php ├── console.php └── api.php ├── .gitattributes ├── .blueprint ├── .editorconfig ├── lang └── vendor │ ├── filament-socialite │ └── en │ │ └── auth.php │ └── filament-shield │ ├── zh_CN │ └── filament-shield.php │ ├── zh_TW │ └── filament-shield.php │ ├── ko │ └── filament-shield.php │ ├── ja │ └── filament-shield.php │ ├── ar │ └── filament-shield.php │ ├── fa │ └── filament-shield.php │ ├── id │ └── filament-shield.php │ ├── pt_BR │ └── filament-shield.php │ ├── vi │ └── filament-shield.php │ └── sq │ └── filament-shield.php ├── artisan ├── .gitignore ├── package.json ├── vite.config.js ├── Trik cepat CRUD Filament.md ├── config ├── api-service.php ├── filament-socialite.php ├── themes.php ├── services.php ├── filament-shield.php ├── filesystems.php └── scramble.php ├── tailwind.config.js ├── phpunit.xml ├── .env.example └── docker-compose.yml /public/favicon.ico: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/Services/ApiService.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /database/.gitignore: -------------------------------------------------------------------------------- 1 | *.sqlite* 2 | -------------------------------------------------------------------------------- /public/vendor/themes/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/Http/Controllers/Auth/LoginController.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/Http/Controllers/Auth/RegisterController.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /bootstrap/cache/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /resources/js/app.js: -------------------------------------------------------------------------------- 1 | import './bootstrap'; 2 | -------------------------------------------------------------------------------- /storage/logs/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /public/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | Disallow: 3 | -------------------------------------------------------------------------------- /resources/views/vendor/filament-socialite/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /storage/app/private/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/app/public/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/debugbar/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/testing/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/views/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/cache/data/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/sessions/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /draft.yaml: -------------------------------------------------------------------------------- 1 | models: 2 | # ... 3 | 4 | controllers: 5 | # ... 6 | -------------------------------------------------------------------------------- /storage/framework/cache/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !data/ 3 | !.gitignore 4 | -------------------------------------------------------------------------------- /.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siubie/kaido-kit/HEAD/.DS_Store -------------------------------------------------------------------------------- /storage/app/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !private/ 3 | !public/ 4 | !.gitignore 5 | -------------------------------------------------------------------------------- /stubs/filament/ColumnView.stub: -------------------------------------------------------------------------------- 1 |
2 | {{ $getState() }} 3 |
4 | -------------------------------------------------------------------------------- /stubs/filament/TableView.stub: -------------------------------------------------------------------------------- 1 |
2 | {{ $this->table }} 3 |
4 | -------------------------------------------------------------------------------- /resources/css/app.css: -------------------------------------------------------------------------------- 1 | @tailwind base; 2 | @tailwind components; 3 | @tailwind utilities; 4 | -------------------------------------------------------------------------------- /stubs/filament/PageView.stub: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /stubs/enum.stub: -------------------------------------------------------------------------------- 1 | toBeTrue(); 5 | }); 6 | -------------------------------------------------------------------------------- /stubs/trait.stub: -------------------------------------------------------------------------------- 1 | 2 | {{ $getChildComponentContainer() }} 3 | 4 | -------------------------------------------------------------------------------- /stubs/observer.plain.stub: -------------------------------------------------------------------------------- 1 | toBeTrue(); 5 | }); 6 | -------------------------------------------------------------------------------- /stubs/enum.backed.stub: -------------------------------------------------------------------------------- 1 | get('/'); 5 | 6 | $response->assertStatus(200); 7 | }); 8 | -------------------------------------------------------------------------------- /routes/web.php: -------------------------------------------------------------------------------- 1 | get('/'); 5 | 6 | $response->assertStatus(200); 7 | }); 8 | -------------------------------------------------------------------------------- /storage/framework/.gitignore: -------------------------------------------------------------------------------- 1 | compiled.php 2 | config.php 3 | down 4 | events.scanned.php 5 | maintenance.php 6 | routes.php 7 | routes.scanned.php 8 | schedule-* 9 | services.json 10 | -------------------------------------------------------------------------------- /stubs/model.pivot.stub: -------------------------------------------------------------------------------- 1 | comment(Inspiring::quote()); 8 | })->purpose('Display an inspiring quote')->hourly(); 9 | -------------------------------------------------------------------------------- /stubs/filament/FormView.stub: -------------------------------------------------------------------------------- 1 |
2 |
3 | {{ $this->form }} 4 | 5 | 8 |
9 | 10 | 11 |
12 | -------------------------------------------------------------------------------- /stubs/policy.plain.stub: -------------------------------------------------------------------------------- 1 | 5 |
6 | 7 |
8 | 9 | -------------------------------------------------------------------------------- /stubs/test.unit.stub: -------------------------------------------------------------------------------- 1 | assertTrue(true); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /stubs/filament/Page.stub: -------------------------------------------------------------------------------- 1 | user(); 9 | })->middleware('auth:sanctum'); 10 | 11 | 12 | // Route::post('/login', [AuthController::class, 'login']); 13 | -------------------------------------------------------------------------------- /stubs/seeder.stub: -------------------------------------------------------------------------------- 1 | 'Or log in via', 5 | 6 | 'login-failed' => 'Login failed, please try again.', 7 | 8 | 'user-not-allowed' => 'Your email is not part of a domain that is allowed.', 9 | 10 | 'registration-not-enabled' => 'Registration of a new user is not allowed.', 11 | ]; 12 | -------------------------------------------------------------------------------- /stubs/filament/CustomResourcePage.stub: -------------------------------------------------------------------------------- 1 | handleCommand(new ArgvInput); 14 | 15 | exit($status); 16 | -------------------------------------------------------------------------------- /resources/views/vendor/filament-breezy/filament/pages/two-factor.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | {{ $this->form }} 4 | 5 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /stubs/model.stub: -------------------------------------------------------------------------------- 1 | 2 |
3 | @foreach ($this->getRegisteredMyProfileComponents() as $component) 4 | @unless(is_null($component)) 5 | @livewire($component) 6 | @endunless 7 | @endforeach 8 |
9 | 10 | -------------------------------------------------------------------------------- /database/seeders/ContactSeeder.php: -------------------------------------------------------------------------------- 1 | create(); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /database/seeders/BookSeeder.php: -------------------------------------------------------------------------------- 1 | create(); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /stubs/provider.stub: -------------------------------------------------------------------------------- 1 | create(); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "private": true, 3 | "type": "module", 4 | "scripts": { 5 | "build": "vite build", 6 | "dev": "vite" 7 | }, 8 | "devDependencies": { 9 | "autoprefixer": "^10.4.20", 10 | "axios": "^1.7.4", 11 | "concurrently": "^9.0.1", 12 | "laravel-vite-plugin": "^1.0", 13 | "postcss": "^8.4.47", 14 | "tailwindcss": "^3.4.13", 15 | "vite": "^5.0" 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /resources/views/vendor/filament-breezy/components/clipboard-link.blade.php: -------------------------------------------------------------------------------- 1 | @props([ 2 | 'data' 3 | ]) 4 | 7 | @svg('heroicon-s-clipboard-document', 'w-4 mr-2') 8 | {{ __('filament-breezy::default.clipboard.link') }} 9 | 10 | -------------------------------------------------------------------------------- /stubs/job.stub: -------------------------------------------------------------------------------- 1 | 14 | */ 15 | public function toArray(Request $request): array 16 | { 17 | return parent::toArray($request); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /stubs/test.stub: -------------------------------------------------------------------------------- 1 | get('/'); 17 | 18 | $response->assertStatus(200); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /stubs/filament/ResourceListPage.stub: -------------------------------------------------------------------------------- 1 | 14 | */ 15 | public function toArray(Request $request): array 16 | { 17 | return parent::toArray($request); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /stubs/rule.stub: -------------------------------------------------------------------------------- 1 | */ 11 | use HasFactory; 12 | 13 | // add fillable 14 | protected $fillable = ['name']; 15 | // add guaded 16 | protected $guarded = ['id']; 17 | // add hidden 18 | protected $hidden = ['created_at', 'updated_at']; 19 | } 20 | -------------------------------------------------------------------------------- /app/Filament/Resources/RoleResource/Pages/ListRoles.php: -------------------------------------------------------------------------------- 1 | $attributes 14 | */ 15 | public function set(Model $model, string $key, mixed $value, array $attributes): mixed 16 | { 17 | return $value; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /stubs/factory.stub: -------------------------------------------------------------------------------- 1 | 9 | */ 10 | class {{ factory }}Factory extends Factory 11 | { 12 | /** 13 | * Define the model's default state. 14 | * 15 | * @return array 16 | */ 17 | public function definition(): array 18 | { 19 | return [ 20 | // 21 | ]; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /public/index.php: -------------------------------------------------------------------------------- 1 | handleRequest(Request::capture()); 18 | -------------------------------------------------------------------------------- /stubs/filament/ResourcePage.stub: -------------------------------------------------------------------------------- 1 | getResource()::getUrl('index'); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /stubs/listener.queued.stub: -------------------------------------------------------------------------------- 1 | */ 11 | use HasFactory; 12 | 13 | // add fillable 14 | protected $fillable = [ 15 | 'title', 16 | 'content', 17 | ]; 18 | // add guaded 19 | protected $guarded = ['id']; 20 | // add hidden 21 | protected $hidden = ['created_at', 'updated_at']; 22 | } 23 | -------------------------------------------------------------------------------- /stubs/view-component.stub: -------------------------------------------------------------------------------- 1 | getResource()::getUrl('index'); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /app/Filament/Resources/UserResource/Pages/ViewUser.php: -------------------------------------------------------------------------------- 1 | getResource()::getUrl('index'); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /database/factories/ContactFactory.php: -------------------------------------------------------------------------------- 1 | 9 | */ 10 | class ContactFactory extends Factory 11 | { 12 | /** 13 | * Define the model's default state. 14 | * 15 | * @return array 16 | */ 17 | public function definition(): array 18 | { 19 | return [ 20 | // 21 | 'name' => $this->faker->name, 22 | ]; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /stubs/listener.typed.queued.stub: -------------------------------------------------------------------------------- 1 | getResource()::getUrl('index'); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /app/Filament/Resources/UserResource/Pages/CreateUser.php: -------------------------------------------------------------------------------- 1 | getResource()::getUrl('index'); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /config/api-service.php: -------------------------------------------------------------------------------- 1 | [ 5 | 'token' => [ 6 | 'cluster' => null, 7 | 'group' => 'User', 8 | 'sort' => -1, 9 | 'icon' => 'heroicon-o-key', 10 | ], 11 | ], 12 | 'models' => [ 13 | 'token' => [ 14 | 'enable_policy' => true, 15 | ], 16 | ], 17 | 'route' => [ 18 | 'panel_prefix' => false, 19 | 'use_resource_middlewares' => false, 20 | ], 21 | 'tenancy' => [ 22 | 'enabled' => false, 23 | 'awareness' => false, 24 | ], 25 | ]; 26 | -------------------------------------------------------------------------------- /stubs/filament/ResourceEditPage.stub: -------------------------------------------------------------------------------- 1 | getResource()::getUrl('index'); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /resources/views/vendor/filament-breezy/components/grid-section.blade.php: -------------------------------------------------------------------------------- 1 | @props(['title','description']) 2 | 3 | 4 | 5 |

{{$title}}

6 | 7 |

8 | {{$description}} 9 |

10 |
11 | 12 | 13 | {{ $slot }} 14 | 15 | 16 |
17 | -------------------------------------------------------------------------------- /stubs/console.stub: -------------------------------------------------------------------------------- 1 | 9 | */ 10 | class PostFactory extends Factory 11 | { 12 | /** 13 | * Define the model's default state. 14 | * 15 | * @return array 16 | */ 17 | public function definition(): array 18 | { 19 | return [ 20 | // 21 | 'title' => $this->faker->sentence, 22 | 'content' => $this->faker->paragraph, 23 | ]; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /bootstrap/app.php: -------------------------------------------------------------------------------- 1 | withRouting( 9 | web: __DIR__.'/../routes/web.php', 10 | api: __DIR__.'/../routes/api.php', 11 | commands: __DIR__.'/../routes/console.php', 12 | health: '/up', 13 | ) 14 | ->withMiddleware(function (Middleware $middleware) { 15 | // 16 | }) 17 | ->withExceptions(function (Exceptions $exceptions) { 18 | // 19 | })->create(); 20 | -------------------------------------------------------------------------------- /tailwind.config.js: -------------------------------------------------------------------------------- 1 | import defaultTheme from 'tailwindcss/defaultTheme'; 2 | 3 | /** @type {import('tailwindcss').Config} */ 4 | export default { 5 | content: [ 6 | './vendor/laravel/framework/src/Illuminate/Pagination/resources/views/*.blade.php', 7 | './storage/framework/views/*.php', 8 | './resources/**/*.blade.php', 9 | './resources/**/*.js', 10 | './resources/**/*.vue', 11 | ], 12 | theme: { 13 | extend: { 14 | fontFamily: { 15 | sans: ['Figtree', ...defaultTheme.fontFamily.sans], 16 | }, 17 | }, 18 | }, 19 | plugins: [], 20 | }; 21 | -------------------------------------------------------------------------------- /app/Filament/Resources/BookResource/Pages/EditBook.php: -------------------------------------------------------------------------------- 1 | getResource()::getUrl('index'); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /public/js/filament/forms/components/textarea.js: -------------------------------------------------------------------------------- 1 | function r({initialHeight:t,shouldAutosize:i,state:s}){return{state:s,wrapperEl:null,init:function(){this.wrapperEl=this.$el.parentNode,this.setInitialHeight(),i?this.$watch("state",()=>{this.resize()}):this.setUpResizeObserver()},setInitialHeight:function(){this.$el.scrollHeight<=0||(this.wrapperEl.style.height=t+"rem")},resize:function(){if(this.setInitialHeight(),this.$el.scrollHeight<=0)return;let e=this.$el.scrollHeight+"px";this.wrapperEl.style.height!==e&&(this.wrapperEl.style.height=e)},setUpResizeObserver:function(){new ResizeObserver(()=>{this.wrapperEl.style.height=this.$el.style.height}).observe(this.$el)}}}export{r as default}; 2 | -------------------------------------------------------------------------------- /stubs/migration.create.stub: -------------------------------------------------------------------------------- 1 | id(); 16 | $table->timestamps(); 17 | }); 18 | } 19 | 20 | /** 21 | * Reverse the migrations. 22 | */ 23 | public function down(): void 24 | { 25 | Schema::dropIfExists('{{ table }}'); 26 | } 27 | }; 28 | -------------------------------------------------------------------------------- /database/settings/2025_01_08_152510_create_kaido_settings.php: -------------------------------------------------------------------------------- 1 | migrator->add('KaidoSetting.site_name', 'Spatie'); 10 | $this->migrator->add('KaidoSetting.site_active', true); 11 | $this->migrator->add('KaidoSetting.registration_enabled', true); 12 | $this->migrator->add('KaidoSetting.login_enabled', true); 13 | $this->migrator->add('KaidoSetting.password_reset_enabled', true); 14 | $this->migrator->add('KaidoSetting.sso_enabled', true); 15 | } 16 | }; 17 | -------------------------------------------------------------------------------- /stubs/request.stub: -------------------------------------------------------------------------------- 1 | |string> 21 | */ 22 | public function rules(): array 23 | { 24 | return [ 25 | // 26 | ]; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /stubs/migration.update.stub: -------------------------------------------------------------------------------- 1 | $this['user']->email, 20 | 'name' => $this['user']->name, 21 | 'token' => $this['token'], 22 | ]; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /database/factories/BookFactory.php: -------------------------------------------------------------------------------- 1 | 9 | */ 10 | class BookFactory extends Factory 11 | { 12 | /** 13 | * Define the model's default state. 14 | * 15 | * @return array 16 | */ 17 | public function definition(): array 18 | { 19 | return [ 20 | // 21 | 'title' => $this->faker->sentence(3), 22 | 'author' => $this->faker->name, 23 | 'description' => $this->faker->paragraph(3), 24 | ]; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /public/.htaccess: -------------------------------------------------------------------------------- 1 | 2 | 3 | Options -MultiViews -Indexes 4 | 5 | 6 | RewriteEngine On 7 | 8 | # Handle Authorization Header 9 | RewriteCond %{HTTP:Authorization} . 10 | RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] 11 | 12 | # Redirect Trailing Slashes If Not A Folder... 13 | RewriteCond %{REQUEST_FILENAME} !-d 14 | RewriteCond %{REQUEST_URI} (.+)/$ 15 | RewriteRule ^ %1 [L,R=301] 16 | 17 | # Send Requests To Front Controller... 18 | RewriteCond %{REQUEST_FILENAME} !-d 19 | RewriteCond %{REQUEST_FILENAME} !-f 20 | RewriteRule ^ index.php [L] 21 | 22 | -------------------------------------------------------------------------------- /app/Http/Requests/StoreBookRequest.php: -------------------------------------------------------------------------------- 1 | |string> 21 | */ 22 | public function rules(): array 23 | { 24 | return [ 25 | // 26 | ]; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /app/Http/Requests/StorePostRequest.php: -------------------------------------------------------------------------------- 1 | |string> 21 | */ 22 | public function rules(): array 23 | { 24 | return [ 25 | // 26 | ]; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /app/Http/Requests/StoreContactRequest.php: -------------------------------------------------------------------------------- 1 | |string> 21 | */ 22 | public function rules(): array 23 | { 24 | return [ 25 | // 26 | ]; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /app/Http/Requests/UpdateBookRequest.php: -------------------------------------------------------------------------------- 1 | |string> 21 | */ 22 | public function rules(): array 23 | { 24 | return [ 25 | // 26 | ]; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /app/Http/Requests/UpdatePostRequest.php: -------------------------------------------------------------------------------- 1 | |string> 21 | */ 22 | public function rules(): array 23 | { 24 | return [ 25 | // 26 | ]; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /app/Http/Requests/UpdateContactRequest.php: -------------------------------------------------------------------------------- 1 | |string> 21 | */ 22 | public function rules(): array 23 | { 24 | return [ 25 | // 26 | ]; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /database/migrations/2022_12_14_083707_create_settings_table.php: -------------------------------------------------------------------------------- 1 | id(); 13 | 14 | $table->string('group'); 15 | $table->string('name'); 16 | $table->boolean('locked')->default(false); 17 | $table->json('payload'); 18 | 19 | $table->timestamps(); 20 | 21 | $table->unique(['group', 'name']); 22 | }); 23 | } 24 | }; 25 | -------------------------------------------------------------------------------- /app/Filament/Resources/BookResource/Api/BookApiService.php: -------------------------------------------------------------------------------- 1 | 23 | */ 24 | public function rules() 25 | { 26 | return [ 27 | // 28 | 'email' => 'required|email', 29 | 'password' => 'required' 30 | ]; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /database/migrations/2025_01_12_091355_create_contacts_table.php: -------------------------------------------------------------------------------- 1 | id(); 16 | $table->string('name'); 17 | $table->timestamps(); 18 | }); 19 | } 20 | 21 | /** 22 | * Reverse the migrations. 23 | */ 24 | public function down(): void 25 | { 26 | Schema::dropIfExists('contacts'); 27 | } 28 | }; 29 | -------------------------------------------------------------------------------- /database/migrations/2025_01_31_020024_add_themes_settings_to_users_table.php: -------------------------------------------------------------------------------- 1 | string('theme')->nullable()->default('default'); 13 | $table->string('theme_color')->nullable(); 14 | }); 15 | } 16 | 17 | public function down() 18 | { 19 | Schema::table('users', function (Blueprint $table) { 20 | $table->dropColumn(['theme', 'theme_color']); 21 | }); 22 | } 23 | }; 24 | -------------------------------------------------------------------------------- /resources/views/vendor/filament-breezy/livewire/update-password.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 | {{ $this->form }} 6 | 7 |
8 | 9 | {{ __('filament-breezy::default.profile.password.submit.label') }} 10 | 11 |
12 |
13 |
14 |
15 | -------------------------------------------------------------------------------- /resources/views/vendor/filament-breezy/livewire/personal-info.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 | {{ $this->form }} 6 | 7 |
8 | 9 | {{ __('filament-breezy::default.profile.personal_info.submit.label') }} 10 | 11 |
12 |
13 |
14 |
15 | -------------------------------------------------------------------------------- /database/migrations/2025_01_04_125650_create_posts_table.php: -------------------------------------------------------------------------------- 1 | id(); 16 | $table->string('title'); 17 | $table->text('content'); 18 | $table->timestamps(); 19 | }); 20 | } 21 | 22 | /** 23 | * Reverse the migrations. 24 | */ 25 | public function down(): void 26 | { 27 | Schema::dropIfExists('posts'); 28 | } 29 | }; 30 | -------------------------------------------------------------------------------- /config/filament-socialite.php: -------------------------------------------------------------------------------- 1 | [ 15 | \Illuminate\Cookie\Middleware\EncryptCookies::class, 16 | \Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class, 17 | \Illuminate\Session\Middleware\StartSession::class, 18 | \Illuminate\Session\Middleware\AuthenticateSession::class, 19 | \Illuminate\View\Middleware\ShareErrorsFromSession::class, 20 | ], 21 | ]; 22 | -------------------------------------------------------------------------------- /stubs/cast.stub: -------------------------------------------------------------------------------- 1 | $attributes 14 | */ 15 | public function get(Model $model, string $key, mixed $value, array $attributes): mixed 16 | { 17 | return $value; 18 | } 19 | 20 | /** 21 | * Prepare the given value for storage. 22 | * 23 | * @param array $attributes 24 | */ 25 | public function set(Model $model, string $key, mixed $value, array $attributes): mixed 26 | { 27 | return $value; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /database/migrations/2025_01_02_225927_add_avatar_url_column_to_users_table.php: -------------------------------------------------------------------------------- 1 | string('avatar_url')->nullable(); 16 | }); 17 | } 18 | 19 | /** 20 | * Reverse the migrations. 21 | */ 22 | public function down(): void 23 | { 24 | Schema::table('users', function (Blueprint $table) { 25 | $table->dropColumn('avatar_url'); 26 | }); 27 | } 28 | }; 29 | -------------------------------------------------------------------------------- /app/Filament/Resources/UserResource/Pages/EditUser.php: -------------------------------------------------------------------------------- 1 | record($this->getRecord()) 18 | // <-- 19 | ]; 20 | } 21 | 22 | //customize redirect after create 23 | public function getRedirectUrl(): string 24 | { 25 | return $this->getResource()::getUrl('index'); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /database/seeders/DatabaseSeeder.php: -------------------------------------------------------------------------------- 1 | create(); 17 | 18 | User::factory()->create([ 19 | 'name' => 'admin', 20 | 'email' => 'admin@admin.com', 21 | ]); 22 | 23 | 24 | //call BookSeeder 25 | $this->call( 26 | [ 27 | BookSeeder::class, 28 | PostSeeder::class, 29 | ContactSeeder::class, 30 | ] 31 | ); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /database/migrations/2025_01_01_120813_create_books_table.php: -------------------------------------------------------------------------------- 1 | id(); 16 | $table->string('title'); 17 | $table->string('author'); 18 | $table->text('description'); 19 | $table->timestamps(); 20 | }); 21 | } 22 | 23 | /** 24 | * Reverse the migrations. 25 | */ 26 | public function down(): void 27 | { 28 | Schema::dropIfExists('books'); 29 | } 30 | }; 31 | -------------------------------------------------------------------------------- /database/migrations/2025_01_08_233142_create_socialite_users_table.php: -------------------------------------------------------------------------------- 1 | id(); 12 | 13 | $table->foreignId('user_id'); 14 | $table->string('provider'); 15 | $table->string('provider_id'); 16 | 17 | $table->timestamps(); 18 | 19 | $table->unique([ 20 | 'provider', 21 | 'provider_id', 22 | ]); 23 | }); 24 | } 25 | 26 | public function down() 27 | { 28 | Schema::dropIfExists('socialite_users'); 29 | } 30 | }; 31 | -------------------------------------------------------------------------------- /public/js/filament/forms/components/tags-input.js: -------------------------------------------------------------------------------- 1 | function i({state:a,splitKeys:n}){return{newTag:"",state:a,createTag:function(){if(this.newTag=this.newTag.trim(),this.newTag!==""){if(this.state.includes(this.newTag)){this.newTag="";return}this.state.push(this.newTag),this.newTag=""}},deleteTag:function(t){this.state=this.state.filter(e=>e!==t)},reorderTags:function(t){let e=this.state.splice(t.oldIndex,1)[0];this.state.splice(t.newIndex,0,e),this.state=[...this.state]},input:{"x-on:blur":"createTag()","x-model":"newTag","x-on:keydown"(t){["Enter",...n].includes(t.key)&&(t.preventDefault(),t.stopPropagation(),this.createTag())},"x-on:paste"(){this.$nextTick(()=>{if(n.length===0){this.createTag();return}let t=n.map(e=>e.replace(/[/\-\\^$*+?.()|[\]{}]/g,"\\$&")).join("|");this.newTag.split(new RegExp(t,"g")).forEach(e=>{this.newTag=e,this.createTag()})})}}}}export{i as default}; 2 | -------------------------------------------------------------------------------- /stubs/controller.singleton.api.stub: -------------------------------------------------------------------------------- 1 | id(); 16 | $table->json('data'); 17 | $table->foreignId('import_id')->constrained()->cascadeOnDelete(); 18 | $table->text('validation_error')->nullable(); 19 | $table->timestamps(); 20 | }); 21 | } 22 | 23 | /** 24 | * Reverse the migrations. 25 | */ 26 | public function down(): void 27 | { 28 | Schema::dropIfExists('failed_import_rows'); 29 | } 30 | }; 31 | -------------------------------------------------------------------------------- /database/migrations/2025_01_12_031340_create_notifications_table.php: -------------------------------------------------------------------------------- 1 | uuid('id')->primary(); 16 | $table->string('type'); 17 | $table->morphs('notifiable'); 18 | $table->json('data'); 19 | $table->timestamp('read_at')->nullable(); 20 | $table->timestamps(); 21 | }); 22 | } 23 | 24 | /** 25 | * Reverse the migrations. 26 | */ 27 | public function down(): void 28 | { 29 | Schema::dropIfExists('notifications'); 30 | } 31 | }; 32 | -------------------------------------------------------------------------------- /app/Filament/Resources/BookResource/Api/Handlers/CreateHandler.php: -------------------------------------------------------------------------------- 1 | fill($request->all()); 26 | 27 | $model->save(); 28 | 29 | return static::sendSuccessResponse($model, "Successfully Create Resource"); 30 | } 31 | } -------------------------------------------------------------------------------- /database/migrations/2025_01_09_225908_update_user_table_make_password_column_nullable.php: -------------------------------------------------------------------------------- 1 | string('password')->nullable(true)->change(); 18 | }); 19 | } 20 | 21 | /** 22 | * Reverse the migrations. 23 | */ 24 | public function down(): void 25 | { 26 | Schema::table('users', function (Blueprint $table) { 27 | //opposite of up 28 | $table->string('password')->nullable(false)->change(); 29 | }); 30 | } 31 | }; 32 | -------------------------------------------------------------------------------- /stubs/filament/Form.stub: -------------------------------------------------------------------------------- 1 | form->fill(); 21 | } 22 | 23 | public function form(Form $form): Form 24 | { 25 | return $form 26 | ->schema([ 27 | // 28 | ]) 29 | ->statePath('data'); 30 | } 31 | 32 | public function submit(): void 33 | { 34 | $data = $this->form->getState(); 35 | 36 | // 37 | } 38 | 39 | public function render(): View 40 | { 41 | return view('{{ view }}'); 42 | } 43 | } -------------------------------------------------------------------------------- /resources/views/filament/pages/login.blade.php: -------------------------------------------------------------------------------- 1 | 2 | @if (filament()->hasRegistration()) 3 | 4 | {{ __('filament-panels::pages/auth/login.actions.register.before') }} 5 | 6 | {{ $this->registerAction }} 7 | 8 | @endif 9 | 10 | {{ \Filament\Support\Facades\FilamentView::renderHook(\Filament\View\PanelsRenderHook::AUTH_LOGIN_FORM_BEFORE, scopes: $this->getRenderHookScopes()) }} 11 | 12 | 13 | {{ $this->form }} 14 | 15 | 16 | 17 | 18 | {{ \Filament\Support\Facades\FilamentView::renderHook(\Filament\View\PanelsRenderHook::AUTH_LOGIN_FORM_AFTER, scopes: $this->getRenderHookScopes()) }} 19 | 20 | -------------------------------------------------------------------------------- /stubs/event.stub: -------------------------------------------------------------------------------- 1 | 29 | */ 30 | public function broadcastOn(): array 31 | { 32 | return [ 33 | new PrivateChannel('channel-name'), 34 | ]; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /app/Filament/Resources/BookResource/Api/Handlers/DeleteHandler.php: -------------------------------------------------------------------------------- 1 | route('id'); 24 | 25 | $model = static::getModel()::find($id); 26 | 27 | if (!$model) return static::sendNotFoundResponse(); 28 | 29 | $model->delete(); 30 | 31 | return static::sendSuccessResponse($model, "Successfully Delete Resource"); 32 | } 33 | } -------------------------------------------------------------------------------- /public/js/filament/forms/components/key-value.js: -------------------------------------------------------------------------------- 1 | function r({state:o}){return{state:o,rows:[],shouldUpdateRows:!0,init:function(){this.updateRows(),this.rows.length<=0?this.rows.push({key:"",value:""}):this.updateState(),this.$watch("state",(t,e)=>{let s=i=>i===null?0:Array.isArray(i)?i.length:typeof i!="object"?0:Object.keys(i).length;s(t)===0&&s(e)===0||this.updateRows()})},addRow:function(){this.rows.push({key:"",value:""}),this.updateState()},deleteRow:function(t){this.rows.splice(t,1),this.rows.length<=0&&this.addRow(),this.updateState()},reorderRows:function(t){let e=Alpine.raw(this.rows);this.rows=[];let s=e.splice(t.oldIndex,1)[0];e.splice(t.newIndex,0,s),this.$nextTick(()=>{this.rows=e,this.updateState()})},updateRows:function(){if(!this.shouldUpdateRows){this.shouldUpdateRows=!0;return}let t=[];for(let[e,s]of Object.entries(this.state??{}))t.push({key:e,value:s});this.rows=t},updateState:function(){let t={};this.rows.forEach(e=>{e.key===""||e.key===null||(t[e.key]=e.value)}),this.shouldUpdateRows=!1,this.state=t}}}export{r as default}; 2 | -------------------------------------------------------------------------------- /stubs/controller.api.stub: -------------------------------------------------------------------------------- 1 | route('id'); 20 | 21 | $query = static::getEloquentQuery(); 22 | 23 | $query = QueryBuilder::for( 24 | $query->where(static::getKeyName(), $id) 25 | ) 26 | ->first(); 27 | 28 | if (!$query) return static::sendNotFoundResponse(); 29 | 30 | $transformer = static::getApiTransformer(); 31 | 32 | return new $transformer($query); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /app/Models/Book.php: -------------------------------------------------------------------------------- 1 | */ 15 | use HasFactory, InteractsWithMedia; 16 | 17 | // add fillable 18 | protected $fillable = [ 19 | 'title', 20 | 'author', 21 | 'description', 22 | ]; 23 | // add guaded 24 | protected $guarded = ['id']; 25 | // add hidden 26 | protected $hidden = ['created_at', 'updated_at']; 27 | 28 | public function registerMediaConversions(?Media $media = null): void 29 | { 30 | $this 31 | ->addMediaConversion('preview') 32 | ->fit(Fit::Contain, 300, 300) 33 | ->nonQueued(); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /stubs/filament/Exporter.stub: -------------------------------------------------------------------------------- 1 | successful_rows) . ' ' . str('row')->plural($export->successful_rows) . ' exported.'; 24 | 25 | if ($failedRowsCount = $export->getFailedRowsCount()) { 26 | $body .= ' ' . number_format($failedRowsCount) . ' ' . str('row')->plural($failedRowsCount) . ' failed to export.'; 27 | } 28 | 29 | return $body; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /database/migrations/0001_01_01_000001_create_cache_table.php: -------------------------------------------------------------------------------- 1 | string('key')->primary(); 16 | $table->mediumText('value'); 17 | $table->integer('expiration'); 18 | }); 19 | 20 | Schema::create('cache_locks', function (Blueprint $table) { 21 | $table->string('key')->primary(); 22 | $table->string('owner'); 23 | $table->integer('expiration'); 24 | }); 25 | } 26 | 27 | /** 28 | * Reverse the migrations. 29 | */ 30 | public function down(): void 31 | { 32 | Schema::dropIfExists('cache'); 33 | Schema::dropIfExists('cache_locks'); 34 | } 35 | }; 36 | -------------------------------------------------------------------------------- /app/Filament/Resources/BookResource/Api/Handlers/UpdateHandler.php: -------------------------------------------------------------------------------- 1 | route('id'); 24 | 25 | $model = static::getModel()::find($id); 26 | 27 | if (!$model) return static::sendNotFoundResponse(); 28 | 29 | $model->fill($request->all()); 30 | 31 | $model->save(); 32 | 33 | return static::sendSuccessResponse($model, "Successfully Update Resource"); 34 | } 35 | } -------------------------------------------------------------------------------- /database/migrations/2025_01_03_114929_create_personal_access_tokens_table.php: -------------------------------------------------------------------------------- 1 | id(); 16 | $table->morphs('tokenable'); 17 | $table->string('name'); 18 | $table->string('token', 64)->unique(); 19 | $table->text('abilities')->nullable(); 20 | $table->timestamp('last_used_at')->nullable(); 21 | $table->timestamp('expires_at')->nullable(); 22 | $table->timestamps(); 23 | }); 24 | } 25 | 26 | /** 27 | * Reverse the migrations. 28 | */ 29 | public function down(): void 30 | { 31 | Schema::dropIfExists('personal_access_tokens'); 32 | } 33 | }; 34 | -------------------------------------------------------------------------------- /stubs/observer.stub: -------------------------------------------------------------------------------- 1 | allowedFields($this->getAllowedFields() ?? []) 21 | ->allowedSorts($this->getAllowedSorts() ?? []) 22 | ->allowedFilters($this->getAllowedFilters() ?? []) 23 | ->allowedIncludes($this->getAllowedIncludes() ?? []) 24 | ->paginate(request()->query('per_page')) 25 | ->appends(request()->query()); 26 | 27 | return static::getApiTransformer()::collection($query); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /stubs/controller.nested.singleton.api.stub: -------------------------------------------------------------------------------- 1 | 'global', 17 | 18 | /* 19 | |-------------------------------------------------------------------------- 20 | | Theme Icon 21 | |-------------------------------------------------------------------------- 22 | */ 23 | 24 | 'icon' => 'heroicon-o-swatch', 25 | 26 | /* 27 | |-------------------------------------------------------------------------- 28 | | Default Theme 29 | |-------------------------------------------------------------------------- 30 | */ 31 | 32 | 'default' => [ 33 | 'theme' => 'default', 34 | 'theme_color' => 'blue', 35 | ], 36 | ]; 37 | -------------------------------------------------------------------------------- /database/migrations/2024_12_04_041953_create_breezy_sessions_table.php: -------------------------------------------------------------------------------- 1 | id(); 13 | $table->morphs('authenticatable'); 14 | $table->string('panel_id')->nullable(); 15 | $table->string('guard')->nullable(); 16 | $table->string('ip_address', 45)->nullable(); 17 | $table->text('user_agent')->nullable(); 18 | $table->timestamp('expires_at')->nullable(); 19 | $table->text('two_factor_secret')->nullable(); 20 | $table->text('two_factor_recovery_codes')->nullable(); 21 | $table->timestamp('two_factor_confirmed_at')->nullable(); 22 | $table->timestamps(); 23 | }); 24 | 25 | } 26 | 27 | public function down() 28 | { 29 | Schema::dropIfExists('breezy_sessions'); 30 | } 31 | }; 32 | -------------------------------------------------------------------------------- /stubs/controller.model.api.stub: -------------------------------------------------------------------------------- 1 | form->fill($this->record->attributesToArray()); 24 | } 25 | 26 | public function form(Form $form): Form 27 | { 28 | return $form 29 | ->schema([ 30 | {{ schema }} 31 | ]) 32 | ->statePath('data') 33 | ->model($this->record); 34 | } 35 | 36 | public function save(): void 37 | { 38 | $data = $this->form->getState(); 39 | 40 | $this->record->update($data); 41 | } 42 | 43 | public function render(): View 44 | { 45 | return view('{{ view }}'); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /stubs/filament/CreateForm.stub: -------------------------------------------------------------------------------- 1 | form->fill(); 22 | } 23 | 24 | public function form(Form $form): Form 25 | { 26 | return $form 27 | ->schema([ 28 | {{ schema }} 29 | ]) 30 | ->statePath('data') 31 | ->model({{ modelClass }}::class); 32 | } 33 | 34 | public function create(): void 35 | { 36 | $data = $this->form->getState(); 37 | 38 | $record = {{ modelClass }}::create($data); 39 | 40 | $this->form->model($record)->saveRelationships(); 41 | } 42 | 43 | public function render(): View 44 | { 45 | return view('{{ view }}'); 46 | } 47 | } -------------------------------------------------------------------------------- /database/migrations/2025_01_12_031357_create_imports_table.php: -------------------------------------------------------------------------------- 1 | id(); 16 | $table->timestamp('completed_at')->nullable(); 17 | $table->string('file_name'); 18 | $table->string('file_path'); 19 | $table->string('importer'); 20 | $table->unsignedInteger('processed_rows')->default(0); 21 | $table->unsignedInteger('total_rows'); 22 | $table->unsignedInteger('successful_rows')->default(0); 23 | $table->foreignId('user_id')->constrained()->cascadeOnDelete(); 24 | $table->timestamps(); 25 | }); 26 | } 27 | 28 | /** 29 | * Reverse the migrations. 30 | */ 31 | public function down(): void 32 | { 33 | Schema::dropIfExists('imports'); 34 | } 35 | }; 36 | -------------------------------------------------------------------------------- /stubs/controller.singleton.stub: -------------------------------------------------------------------------------- 1 | id(); 16 | $table->timestamp('completed_at')->nullable(); 17 | $table->string('file_disk'); 18 | $table->string('file_name')->nullable(); 19 | $table->string('exporter'); 20 | $table->unsignedInteger('processed_rows')->default(0); 21 | $table->unsignedInteger('total_rows'); 22 | $table->unsignedInteger('successful_rows')->default(0); 23 | $table->foreignId('user_id')->constrained()->cascadeOnDelete(); 24 | $table->timestamps(); 25 | }); 26 | } 27 | 28 | /** 29 | * Reverse the migrations. 30 | */ 31 | public function down(): void 32 | { 33 | Schema::dropIfExists('exports'); 34 | } 35 | }; 36 | -------------------------------------------------------------------------------- /app/Providers/AppServiceProvider.php: -------------------------------------------------------------------------------- 1 | Blade::render("@vite('resources/js/app.js')")); 22 | } 23 | 24 | /** 25 | * Bootstrap any application services. 26 | */ 27 | public function boot(): void 28 | { 29 | // 30 | Gate::define('viewApiDocs', function (User $user) { 31 | return true; 32 | }); 33 | // Gate::policy() 34 | Event::listen(function (\SocialiteProviders\Manager\SocialiteWasCalled $event) { 35 | $event->extendSocialite('discord', \SocialiteProviders\Google\Provider::class); 36 | }); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /app/Filament/Resources/UserResource/Pages/ListUsers.php: -------------------------------------------------------------------------------- 1 | exports([ 23 | ExcelExport::make() 24 | ->fromTable() 25 | ->withFilename(fn($resource) => $resource::getModelLabel() . '-' . date('Y-m-d')) 26 | ->withWriterType(\Maatwebsite\Excel\Excel::XLSX) 27 | ->withColumns([ 28 | Column::make('updated_at'), 29 | ]) 30 | ]), 31 | ]; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /database/migrations/2024_12_04_025120_create_media_table.php: -------------------------------------------------------------------------------- 1 | id(); 13 | 14 | $table->morphs('model'); 15 | $table->uuid()->nullable()->unique(); 16 | $table->string('collection_name'); 17 | $table->string('name'); 18 | $table->string('file_name'); 19 | $table->string('mime_type')->nullable(); 20 | $table->string('disk'); 21 | $table->string('conversions_disk')->nullable(); 22 | $table->unsignedBigInteger('size'); 23 | $table->json('manipulations'); 24 | $table->json('custom_properties'); 25 | $table->json('generated_conversions'); 26 | $table->json('responsive_images'); 27 | $table->unsignedInteger('order_column')->nullable()->index(); 28 | 29 | $table->nullableTimestamps(); 30 | }); 31 | } 32 | }; 33 | -------------------------------------------------------------------------------- /app/Filament/Exports/ContactExporter.php: -------------------------------------------------------------------------------- 1 | label('ID'), 19 | ExportColumn::make('name'), 20 | ExportColumn::make('created_at'), 21 | ExportColumn::make('updated_at'), 22 | ]; 23 | } 24 | 25 | public static function getCompletedNotificationBody(Export $export): string 26 | { 27 | $body = 'Your contact export has completed and ' . number_format($export->successful_rows) . ' ' . str('row')->plural($export->successful_rows) . ' exported.'; 28 | 29 | if ($failedRowsCount = $export->getFailedRowsCount()) { 30 | $body .= ' ' . number_format($failedRowsCount) . ' ' . str('row')->plural($failedRowsCount) . ' failed to export.'; 31 | } 32 | 33 | return $body; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /phpunit.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | tests/Unit 10 | 11 | 12 | tests/Feature 13 | 14 | 15 | 16 | 17 | app 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /stubs/filament/Table.stub: -------------------------------------------------------------------------------- 1 | query({{ modelClass }}::query()) 25 | ->columns([ 26 | {{ columns }} 27 | ]) 28 | ->filters([ 29 | // 30 | ]) 31 | ->actions([ 32 | // 33 | ]) 34 | ->bulkActions([ 35 | Tables\Actions\BulkActionGroup::make([ 36 | // 37 | ]), 38 | ]); 39 | } 40 | 41 | public function render(): View 42 | { 43 | return view('{{ view }}'); 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /stubs/mail.stub: -------------------------------------------------------------------------------- 1 | 48 | */ 49 | public function attachments(): array 50 | { 51 | return []; 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /stubs/markdown-notification.stub: -------------------------------------------------------------------------------- 1 | 26 | */ 27 | public function via(object $notifiable): array 28 | { 29 | return ['mail']; 30 | } 31 | 32 | /** 33 | * Get the mail representation of the notification. 34 | */ 35 | public function toMail(object $notifiable): MailMessage 36 | { 37 | return (new MailMessage)->markdown('{{ view }}'); 38 | } 39 | 40 | /** 41 | * Get the array representation of the notification. 42 | * 43 | * @return array 44 | */ 45 | public function toArray(object $notifiable): array 46 | { 47 | return [ 48 | // 49 | ]; 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /stubs/markdown-mail.stub: -------------------------------------------------------------------------------- 1 | 48 | */ 49 | public function attachments(): array 50 | { 51 | return []; 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /database/factories/UserFactory.php: -------------------------------------------------------------------------------- 1 | 11 | */ 12 | class UserFactory extends Factory 13 | { 14 | /** 15 | * The current password being used by the factory. 16 | */ 17 | protected static ?string $password; 18 | 19 | /** 20 | * Define the model's default state. 21 | * 22 | * @return array 23 | */ 24 | public function definition(): array 25 | { 26 | return [ 27 | 'name' => fake()->name(), 28 | 'email' => fake()->unique()->safeEmail(), 29 | 'email_verified_at' => now(), 30 | 'password' => static::$password ??= Hash::make('password'), 31 | 'remember_token' => Str::random(10), 32 | ]; 33 | } 34 | 35 | /** 36 | * Indicate that the model's email address should be unverified. 37 | */ 38 | public function unverified(): static 39 | { 40 | return $this->state(fn (array $attributes) => [ 41 | 'email_verified_at' => null, 42 | ]); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /app/Filament/Exports/BookExporter.php: -------------------------------------------------------------------------------- 1 | label('ID'), 19 | ExportColumn::make('title'), 20 | ExportColumn::make('author'), 21 | ExportColumn::make('description'), 22 | ExportColumn::make('created_at'), 23 | ExportColumn::make('updated_at'), 24 | ]; 25 | } 26 | 27 | public static function getCompletedNotificationBody(Export $export): string 28 | { 29 | $body = 'Your book export has completed and ' . number_format($export->successful_rows) . ' ' . str('row')->plural($export->successful_rows) . ' exported.'; 30 | 31 | if ($failedRowsCount = $export->getFailedRowsCount()) { 32 | $body .= ' ' . number_format($failedRowsCount) . ' ' . str('row')->plural($failedRowsCount) . ' failed to export.'; 33 | } 34 | 35 | return $body; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /stubs/controller.stub: -------------------------------------------------------------------------------- 1 | label('ID'), 19 | ExportColumn::make('name'), 20 | ExportColumn::make('email'), 21 | // ExportColumn::make('email_verified_at'), 22 | // ExportColumn::make('created_at'), 23 | // ExportColumn::make('updated_at'), 24 | ExportColumn::make('avatar_url'), 25 | ]; 26 | } 27 | 28 | public static function getCompletedNotificationBody(Export $export): string 29 | { 30 | $body = 'Your user export has completed and ' . number_format($export->successful_rows) . ' ' . str('row')->plural($export->successful_rows) . ' exported.'; 31 | 32 | if ($failedRowsCount = $export->getFailedRowsCount()) { 33 | $body .= ' ' . number_format($failedRowsCount) . ' ' . str('row')->plural($failedRowsCount) . ' failed to export.'; 34 | } 35 | 36 | return $body; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /stubs/controller.nested.api.stub: -------------------------------------------------------------------------------- 1 | 2 | @if($plainTextToken) 3 |
4 |

{{ __('filament-breezy::default.profile.sanctum.create.message') }}

5 | 6 |
7 |
8 | 9 |
10 | {{ __('filament-breezy::default.profile.sanctum.copied.label') }} 11 | 12 |
13 | 14 |
15 | 16 | @endif 17 |
18 | {{ $this->table }} 19 |
20 | 21 | 22 | -------------------------------------------------------------------------------- /stubs/filament/Importer.stub: -------------------------------------------------------------------------------- 1 | data['column_name']` 25 | // 'email' => $this->data['email'], 26 | // ]); 27 | 28 | return new {{ modelClass }}(); 29 | } 30 | 31 | public static function getCompletedNotificationBody(Import $import): string 32 | { 33 | $body = 'Your {{ modelLabel }} import has completed and ' . number_format($import->successful_rows) . ' ' . str('row')->plural($import->successful_rows) . ' imported.'; 34 | 35 | if ($failedRowsCount = $import->getFailedRowsCount()) { 36 | $body .= ' ' . number_format($failedRowsCount) . ' ' . str('row')->plural($failedRowsCount) . ' failed to import.'; 37 | } 38 | 39 | return $body; 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /config/services.php: -------------------------------------------------------------------------------- 1 | [ 18 | 'token' => env('POSTMARK_TOKEN'), 19 | ], 20 | 21 | 'ses' => [ 22 | 'key' => env('AWS_ACCESS_KEY_ID'), 23 | 'secret' => env('AWS_SECRET_ACCESS_KEY'), 24 | 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'), 25 | ], 26 | 27 | 'resend' => [ 28 | 'key' => env('RESEND_KEY'), 29 | ], 30 | 31 | 'slack' => [ 32 | 'notifications' => [ 33 | 'bot_user_oauth_token' => env('SLACK_BOT_USER_OAUTH_TOKEN'), 34 | 'channel' => env('SLACK_BOT_USER_DEFAULT_CHANNEL'), 35 | ], 36 | ], 37 | 'google' => [ 38 | 'client_id' => env('GOOGLE_CLIENT_ID'), 39 | 'client_secret' => env('GOOGLE_CLIENT_SECRET'), 40 | 'redirect' => env('GOOGLE_REDIRECT_URI') 41 | ], 42 | 43 | ]; 44 | -------------------------------------------------------------------------------- /app/Http/Controllers/BookController.php: -------------------------------------------------------------------------------- 1 | 26 | */ 27 | public function via(object $notifiable): array 28 | { 29 | return ['mail']; 30 | } 31 | 32 | /** 33 | * Get the mail representation of the notification. 34 | */ 35 | public function toMail(object $notifiable): MailMessage 36 | { 37 | return (new MailMessage) 38 | ->line('The introduction to the notification.') 39 | ->action('Notification Action', url('/')) 40 | ->line('Thank you for using our application!'); 41 | } 42 | 43 | /** 44 | * Get the array representation of the notification. 45 | * 46 | * @return array 47 | */ 48 | public function toArray(object $notifiable): array 49 | { 50 | return [ 51 | // 52 | ]; 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /app/Http/Controllers/ContactController.php: -------------------------------------------------------------------------------- 1 | schema([ 21 | Forms\Components\TextInput::make('{{ recordTitleAttribute }}') 22 | ->required() 23 | ->maxLength(255), 24 | ]); 25 | } 26 | 27 | public function table(Table $table): Table 28 | { 29 | return $table 30 | ->recordTitleAttribute('{{ recordTitleAttribute }}') 31 | ->columns([ 32 | Tables\Columns\TextColumn::make('{{ recordTitleAttribute }}'), 33 | ]) 34 | ->filters([ 35 | {{ tableFilters }} 36 | ]) 37 | ->headerActions([ 38 | {{ tableHeaderActions }} 39 | ]) 40 | ->actions([ 41 | {{ tableActions }} 42 | ]) 43 | ->bulkActions([ 44 | Tables\Actions\BulkActionGroup::make([ 45 | {{ tableBulkActions }} 46 | ]), 47 | ]){{ modifyQueryUsing }}; 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /stubs/controller.nested.singleton.stub: -------------------------------------------------------------------------------- 1 | schema([ 27 | Section::make('Site Information')->columns(1)->schema([ 28 | TextInput::make('site_name') 29 | ->label('Site Name') 30 | ->required(), 31 | Toggle::make('site_active') 32 | ->label('Site Active'), 33 | Toggle::make('registration_enabled') 34 | ->label('Registration Enabled'), 35 | Toggle::make('password_reset_enabled') 36 | ->label('Password Reset Enabled'), 37 | Toggle::make('sso_enabled') 38 | ->label('SSO Enabled'), 39 | ]), 40 | ]); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /stubs/filament/Resource.stub: -------------------------------------------------------------------------------- 1 | schema([ 26 | {{ formSchema }} 27 | ]); 28 | } 29 | 30 | public static function table(Table $table): Table 31 | { 32 | return $table 33 | ->columns([ 34 | {{ tableColumns }} 35 | ]) 36 | ->filters([ 37 | {{ tableFilters }} 38 | ]) 39 | ->actions([ 40 | {{ tableActions }} 41 | Tables\Actions\DeleteAction::make(), 42 | 43 | ]) 44 | ->bulkActions([ 45 | Tables\Actions\BulkActionGroup::make([ 46 | {{ tableBulkActions }} 47 | ]), 48 | ]); 49 | } 50 | {{ relations }} 51 | public static function getPages(): array 52 | { 53 | return [ 54 | {{ pages }} 55 | ]; 56 | }{{ eloquentQuery }} 57 | } 58 | -------------------------------------------------------------------------------- /resources/views/vendor/filament-socialite/components/buttons.blade.php: -------------------------------------------------------------------------------- 1 |
2 | @if ($messageBag->isNotEmpty()) 3 | @foreach($messageBag->all() as $value) 4 |

{{ __($value) }}

5 | @endforeach 6 | @endif 7 | 8 | @if (count($visibleProviders)) 9 | @if($showDivider) 10 |
11 |
12 |

13 | {{ __('filament-socialite::auth.login-via') }} 14 |

15 |
16 | @endif 17 | 18 |
19 | @foreach($visibleProviders as $key => $provider) 20 | 28 | {{ $provider->getLabel() }} 29 | 30 | @endforeach 31 |
32 | @else 33 | 34 | @endif 35 |
36 | -------------------------------------------------------------------------------- /.env.example: -------------------------------------------------------------------------------- 1 | APP_NAME="Kaido-Kit" 2 | APP_ENV=local 3 | APP_KEY= 4 | APP_DEBUG=true 5 | APP_TIMEZONE=UTC 6 | # APP_URL=https://localhost:8000 7 | APP_URL=http://localhost:8000 # For development if image cannot display 8 | 9 | APP_LOCALE=en 10 | APP_FALLBACK_LOCALE=en 11 | APP_FAKER_LOCALE=en_US 12 | 13 | APP_MAINTENANCE_DRIVER=file 14 | # APP_MAINTENANCE_STORE=database 15 | 16 | PHP_CLI_SERVER_WORKERS=4 17 | 18 | BCRYPT_ROUNDS=12 19 | 20 | LOG_CHANNEL=stack 21 | LOG_STACK=single 22 | LOG_DEPRECATIONS_CHANNEL=null 23 | LOG_LEVEL=debug 24 | 25 | DB_CONNECTION=mysql 26 | DB_HOST=127.0.0.1 27 | DB_PORT=3306 28 | DB_DATABASE=kaido_kit 29 | DB_USERNAME=root 30 | DB_PASSWORD= 31 | 32 | SESSION_DRIVER=database 33 | SESSION_LIFETIME=120 34 | SESSION_ENCRYPT=false 35 | SESSION_PATH=/ 36 | SESSION_DOMAIN=null 37 | 38 | BROADCAST_CONNECTION=log 39 | FILESYSTEM_DISK=local 40 | QUEUE_CONNECTION=database 41 | 42 | CACHE_STORE=database 43 | CACHE_PREFIX= 44 | 45 | MEMCACHED_HOST=127.0.0.1 46 | 47 | REDIS_CLIENT=phpredis 48 | REDIS_HOST=127.0.0.1 49 | REDIS_PASSWORD=null 50 | REDIS_PORT=6379 51 | 52 | AWS_ACCESS_KEY_ID= 53 | AWS_SECRET_ACCESS_KEY= 54 | AWS_DEFAULT_REGION=us-east-1 55 | AWS_BUCKET= 56 | AWS_USE_PATH_STYLE_ENDPOINT=false 57 | 58 | VITE_APP_NAME="${APP_NAME}" 59 | 60 | #google auth 61 | GOOGLE_CLIENT_ID= 62 | GOOGLE_CLIENT_SECRET= 63 | GOOGLE_REDIRECT_URI=http://localhost:8000/admin/oauth/callback/google 64 | 65 | #resend 66 | MAIL_MAILER=resend 67 | MAIL_HOST=127.0.0.1 68 | MAIL_PORT=2525 69 | MAIL_USERNAME=null 70 | MAIL_PASSWORD=null 71 | MAIL_ENCRYPTION=null 72 | RESEND_API_KEY= 73 | MAIL_FROM_ADDRESS="admin@domain.com" 74 | MAIL_FROM_NAME="${APP_NAME}" 75 | 76 | -------------------------------------------------------------------------------- /app/Filament/Imports/UserImporter.php: -------------------------------------------------------------------------------- 1 | requiredMapping() 19 | ->rules(['required', 'max:255']), 20 | ImportColumn::make('email') 21 | ->requiredMapping() 22 | ->rules(['required', 'email', 'max:255']), 23 | ImportColumn::make('password') 24 | ->rules(['max:255']), 25 | ]; 26 | } 27 | 28 | public function resolveRecord(): ?User 29 | { 30 | // return User::firstOrNew([ 31 | // // Update existing records, matching them by `$this->data['column_name']` 32 | // 'email' => $this->data['email'], 33 | // ]); 34 | 35 | return new User(); 36 | } 37 | 38 | public static function getCompletedNotificationBody(Import $import): string 39 | { 40 | $body = 'Your user import has completed and ' . number_format($import->successful_rows) . ' ' . str('row')->plural($import->successful_rows) . ' imported.'; 41 | 42 | if ($failedRowsCount = $import->getFailedRowsCount()) { 43 | $body .= ' ' . number_format($failedRowsCount) . ' ' . str('row')->plural($failedRowsCount) . ' failed to import.'; 44 | } 45 | 46 | return $body; 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /app/Filament/Imports/BookImporter.php: -------------------------------------------------------------------------------- 1 | requiredMapping() 19 | ->rules(['required', 'max:255']), 20 | ImportColumn::make('author') 21 | ->requiredMapping() 22 | ->rules(['required', 'max:255']), 23 | ImportColumn::make('description') 24 | ->requiredMapping() 25 | ->rules(['required']), 26 | ]; 27 | } 28 | 29 | public function resolveRecord(): ?Book 30 | { 31 | // return Book::firstOrNew([ 32 | // // Update existing records, matching them by `$this->data['column_name']` 33 | // 'email' => $this->data['email'], 34 | // ]); 35 | 36 | return new Book(); 37 | } 38 | 39 | public static function getCompletedNotificationBody(Import $import): string 40 | { 41 | $body = 'Your book import has completed and ' . number_format($import->successful_rows) . ' ' . str('row')->plural($import->successful_rows) . ' imported.'; 42 | 43 | if ($failedRowsCount = $import->getFailedRowsCount()) { 44 | $body .= ' ' . number_format($failedRowsCount) . ' ' . str('row')->plural($failedRowsCount) . ' failed to import.'; 45 | } 46 | 47 | return $body; 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /database/migrations/0001_01_01_000000_create_users_table.php: -------------------------------------------------------------------------------- 1 | id(); 16 | $table->string('name'); 17 | $table->string('email')->unique(); 18 | $table->timestamp('email_verified_at')->nullable(); 19 | $table->string('password'); 20 | $table->rememberToken(); 21 | $table->timestamps(); 22 | }); 23 | 24 | Schema::create('password_reset_tokens', function (Blueprint $table) { 25 | $table->string('email')->primary(); 26 | $table->string('token'); 27 | $table->timestamp('created_at')->nullable(); 28 | }); 29 | 30 | Schema::create('sessions', function (Blueprint $table) { 31 | $table->string('id')->primary(); 32 | $table->foreignId('user_id')->nullable()->index(); 33 | $table->string('ip_address', 45)->nullable(); 34 | $table->text('user_agent')->nullable(); 35 | $table->longText('payload'); 36 | $table->integer('last_activity')->index(); 37 | }); 38 | } 39 | 40 | /** 41 | * Reverse the migrations. 42 | */ 43 | public function down(): void 44 | { 45 | Schema::dropIfExists('users'); 46 | Schema::dropIfExists('password_reset_tokens'); 47 | Schema::dropIfExists('sessions'); 48 | } 49 | }; 50 | -------------------------------------------------------------------------------- /stubs/policy.stub: -------------------------------------------------------------------------------- 1 | permissions = collect($data) 20 | ->filter(function ($permission, $key) { 21 | return ! in_array($key, ['name', 'guard_name', 'select_all', Utils::getTenantModelForeignKey()]); 22 | }) 23 | ->values() 24 | ->flatten() 25 | ->unique(); 26 | 27 | if (Arr::has($data, Utils::getTenantModelForeignKey())) { 28 | return Arr::only($data, ['name', 'guard_name', Utils::getTenantModelForeignKey()]); 29 | } 30 | 31 | return Arr::only($data, ['name', 'guard_name']); 32 | } 33 | 34 | protected function afterCreate(): void 35 | { 36 | $permissionModels = collect(); 37 | $this->permissions->each(function ($permission) use ($permissionModels) { 38 | $permissionModels->push(Utils::getPermissionModel()::firstOrCreate([ 39 | /** @phpstan-ignore-next-line */ 40 | 'name' => $permission, 41 | 'guard_name' => $this->data['guard_name'], 42 | ])); 43 | }); 44 | 45 | $this->record->syncPermissions($permissionModels); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /tests/Pest.php: -------------------------------------------------------------------------------- 1 | extend(Tests\TestCase::class) 15 | // ->use(Illuminate\Foundation\Testing\RefreshDatabase::class) 16 | ->in('Feature'); 17 | 18 | /* 19 | |-------------------------------------------------------------------------- 20 | | Expectations 21 | |-------------------------------------------------------------------------- 22 | | 23 | | When you're writing tests, you often need to check that values meet certain conditions. The 24 | | "expect()" function gives you access to a set of "expectations" methods that you can use 25 | | to assert different things. Of course, you may extend the Expectation API at any time. 26 | | 27 | */ 28 | 29 | expect()->extend('toBeOne', function () { 30 | return $this->toBe(1); 31 | }); 32 | 33 | /* 34 | |-------------------------------------------------------------------------- 35 | | Functions 36 | |-------------------------------------------------------------------------- 37 | | 38 | | While Pest is very powerful out-of-the-box, you may have some testing code specific to your 39 | | project that you don't want to repeat in every file. Here you can also expose helpers as 40 | | global functions to help you to reduce the number of lines of code in your test files. 41 | | 42 | */ 43 | 44 | function something() 45 | { 46 | // .. 47 | } 48 | -------------------------------------------------------------------------------- /stubs/controller.nested.stub: -------------------------------------------------------------------------------- 1 | schema([ 32 | Forms\Components\TextInput::make('{{ recordTitleAttribute }}') 33 | ->required() 34 | ->maxLength(255), 35 | ]); 36 | } 37 | 38 | public function table(Table $table): Table 39 | { 40 | return $table 41 | ->recordTitleAttribute('{{ recordTitleAttribute }}') 42 | ->columns([ 43 | Tables\Columns\TextColumn::make('{{ recordTitleAttribute }}'), 44 | ]) 45 | ->filters([ 46 | {{ tableFilters }} 47 | ]) 48 | ->headerActions([ 49 | {{ tableHeaderActions }} 50 | ]) 51 | ->actions([ 52 | {{ tableActions }} 53 | ]) 54 | ->bulkActions([ 55 | Tables\Actions\BulkActionGroup::make([ 56 | {{ tableBulkActions }} 57 | ]), 58 | ]){{ modifyQueryUsing }}; 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /app/Filament/Resources/RoleResource/Pages/EditRole.php: -------------------------------------------------------------------------------- 1 | permissions = collect($data) 28 | ->filter(function ($permission, $key) { 29 | return ! in_array($key, ['name', 'guard_name', 'select_all', Utils::getTenantModelForeignKey()]); 30 | }) 31 | ->values() 32 | ->flatten() 33 | ->unique(); 34 | 35 | if (Arr::has($data, Utils::getTenantModelForeignKey())) { 36 | return Arr::only($data, ['name', 'guard_name', Utils::getTenantModelForeignKey()]); 37 | } 38 | 39 | return Arr::only($data, ['name', 'guard_name']); 40 | } 41 | 42 | protected function afterSave(): void 43 | { 44 | $permissionModels = collect(); 45 | $this->permissions->each(function ($permission) use ($permissionModels) { 46 | $permissionModels->push(Utils::getPermissionModel()::firstOrCreate([ 47 | 'name' => $permission, 48 | 'guard_name' => $this->data['guard_name'], 49 | ])); 50 | }); 51 | 52 | $this->record->syncPermissions($permissionModels); 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /database/migrations/0001_01_01_000002_create_jobs_table.php: -------------------------------------------------------------------------------- 1 | id(); 16 | $table->string('queue')->index(); 17 | $table->longText('payload'); 18 | $table->unsignedTinyInteger('attempts'); 19 | $table->unsignedInteger('reserved_at')->nullable(); 20 | $table->unsignedInteger('available_at'); 21 | $table->unsignedInteger('created_at'); 22 | }); 23 | 24 | Schema::create('job_batches', function (Blueprint $table) { 25 | $table->string('id')->primary(); 26 | $table->string('name'); 27 | $table->integer('total_jobs'); 28 | $table->integer('pending_jobs'); 29 | $table->integer('failed_jobs'); 30 | $table->longText('failed_job_ids'); 31 | $table->mediumText('options')->nullable(); 32 | $table->integer('cancelled_at')->nullable(); 33 | $table->integer('created_at'); 34 | $table->integer('finished_at')->nullable(); 35 | }); 36 | 37 | Schema::create('failed_jobs', function (Blueprint $table) { 38 | $table->id(); 39 | $table->string('uuid')->unique(); 40 | $table->text('connection'); 41 | $table->text('queue'); 42 | $table->longText('payload'); 43 | $table->longText('exception'); 44 | $table->timestamp('failed_at')->useCurrent(); 45 | }); 46 | } 47 | 48 | /** 49 | * Reverse the migrations. 50 | */ 51 | public function down(): void 52 | { 53 | Schema::dropIfExists('jobs'); 54 | Schema::dropIfExists('job_batches'); 55 | Schema::dropIfExists('failed_jobs'); 56 | } 57 | }; 58 | -------------------------------------------------------------------------------- /config/filament-shield.php: -------------------------------------------------------------------------------- 1 | [ 5 | 'should_register_navigation' => true, 6 | 'slug' => 'shield/roles', 7 | 'navigation_sort' => -1, 8 | 'navigation_badge' => true, 9 | 'navigation_group' => true, 10 | 'is_globally_searchable' => false, 11 | 'show_model_path' => true, 12 | 'is_scoped_to_tenant' => true, 13 | 'cluster' => null, 14 | ], 15 | 16 | 'tenant_model' => null, 17 | 18 | 'auth_provider_model' => [ 19 | 'fqcn' => 'App\\Models\\User', 20 | ], 21 | 22 | 'super_admin' => [ 23 | 'enabled' => true, 24 | 'name' => 'super_admin', 25 | 'define_via_gate' => false, 26 | 'intercept_gate' => 'before', // after 27 | ], 28 | 29 | 'panel_user' => [ 30 | 'enabled' => true, 31 | 'name' => 'panel_user', 32 | ], 33 | 34 | 'permission_prefixes' => [ 35 | 'resource' => [ 36 | 'view', 37 | 'view_any', 38 | 'create', 39 | 'update', 40 | 'restore', 41 | 'restore_any', 42 | 'replicate', 43 | 'reorder', 44 | 'delete', 45 | 'delete_any', 46 | 'force_delete', 47 | 'force_delete_any', 48 | ], 49 | 50 | 'page' => 'page', 51 | 'widget' => 'widget', 52 | ], 53 | 54 | 'entities' => [ 55 | 'pages' => true, 56 | 'widgets' => true, 57 | 'resources' => true, 58 | 'custom_permissions' => false, 59 | ], 60 | 61 | 'generator' => [ 62 | 'option' => 'policies_and_permissions', 63 | 'policy_directory' => 'Policies', 64 | 'policy_namespace' => 'Policies', 65 | ], 66 | 67 | 'exclude' => [ 68 | 'enabled' => true, 69 | 70 | 'pages' => [ 71 | 'Dashboard', 72 | ], 73 | 74 | 'widgets' => [ 75 | 'AccountWidget', 'FilamentInfoWidget', 76 | ], 77 | 78 | 'resources' => [], 79 | ], 80 | 81 | 'discovery' => [ 82 | 'discover_all_resources' => false, 83 | 'discover_all_widgets' => false, 84 | 'discover_all_pages' => false, 85 | ], 86 | 87 | 'register_role_policy' => [ 88 | 'enabled' => true, 89 | ], 90 | 91 | ]; 92 | -------------------------------------------------------------------------------- /docker-compose.yml: -------------------------------------------------------------------------------- 1 | services: 2 | laravel.test: 3 | build: 4 | context: './vendor/laravel/sail/runtimes/8.4' 5 | dockerfile: Dockerfile 6 | args: 7 | WWWGROUP: '${WWWGROUP}' 8 | image: 'sail-8.4/app' 9 | extra_hosts: 10 | - 'host.docker.internal:host-gateway' 11 | ports: 12 | - '${APP_PORT:-80}:80' 13 | - '${VITE_PORT:-5173}:${VITE_PORT:-5173}' 14 | environment: 15 | WWWUSER: '${WWWUSER}' 16 | LARAVEL_SAIL: 1 17 | XDEBUG_MODE: '${SAIL_XDEBUG_MODE:-off}' 18 | XDEBUG_CONFIG: '${SAIL_XDEBUG_CONFIG:-client_host=host.docker.internal}' 19 | IGNITION_LOCAL_SITES_PATH: '${PWD}' 20 | volumes: 21 | - '.:/var/www/html' 22 | networks: 23 | - sail 24 | depends_on: 25 | - mysql 26 | - redis 27 | mysql: 28 | image: 'mysql/mysql-server:8.0' 29 | ports: 30 | - '${FORWARD_DB_PORT:-3306}:3306' 31 | environment: 32 | MYSQL_ROOT_PASSWORD: '${DB_PASSWORD}' 33 | MYSQL_ROOT_HOST: '%' 34 | MYSQL_DATABASE: '${DB_DATABASE}' 35 | MYSQL_USER: '${DB_USERNAME}' 36 | MYSQL_PASSWORD: '${DB_PASSWORD}' 37 | MYSQL_ALLOW_EMPTY_PASSWORD: 1 38 | volumes: 39 | - 'sail-mysql:/var/lib/mysql' 40 | - './vendor/laravel/sail/database/mysql/create-testing-database.sh:/docker-entrypoint-initdb.d/10-create-testing-database.sh' 41 | networks: 42 | - sail 43 | healthcheck: 44 | test: 45 | - CMD 46 | - mysqladmin 47 | - ping 48 | - '-p${DB_PASSWORD}' 49 | retries: 3 50 | timeout: 5s 51 | redis: 52 | image: 'redis:alpine' 53 | ports: 54 | - '${FORWARD_REDIS_PORT:-6379}:6379' 55 | volumes: 56 | - 'sail-redis:/data' 57 | networks: 58 | - sail 59 | healthcheck: 60 | test: 61 | - CMD 62 | - redis-cli 63 | - ping 64 | retries: 3 65 | timeout: 5s 66 | networks: 67 | sail: 68 | driver: bridge 69 | volumes: 70 | sail-mysql: 71 | driver: local 72 | sail-redis: 73 | driver: local 74 | -------------------------------------------------------------------------------- /app/Models/User.php: -------------------------------------------------------------------------------- 1 | */ 22 | use HasFactory, Notifiable, HasRoles, TwoFactorAuthenticatable, HasApiTokens; 23 | 24 | /** 25 | * The attributes that are mass assignable. 26 | * 27 | * @var array 28 | */ 29 | protected $fillable = [ 30 | 'name', 31 | 'email', 32 | 'password', 33 | 'avatar_url', 34 | ]; 35 | 36 | /** 37 | * The attributes that should be hidden for serialization. 38 | * 39 | * @var array 40 | */ 41 | protected $hidden = [ 42 | 'password', 43 | 'remember_token', 44 | ]; 45 | 46 | /** 47 | * Get the attributes that should be cast. 48 | * 49 | * @return array 50 | */ 51 | protected function casts(): array 52 | { 53 | return [ 54 | 'email_verified_at' => 'datetime', 55 | 'password' => 'hashed', 56 | ]; 57 | } 58 | 59 | // public function getFilamentAvatarUrl(): ?string 60 | // { 61 | // return asset($this->avatar_url); 62 | // } 63 | 64 | protected static function booted() 65 | { 66 | parent::booted(); 67 | 68 | // Add a delete listener 69 | static::deleted(function ($user) { 70 | // Check if the user has an associated SocialiteUser and delete it 71 | if ($user->socialiteUser) { 72 | $user->socialiteUser->delete(); 73 | } 74 | }); 75 | } 76 | 77 | public function getFilamentAvatarUrl(): ?string 78 | { 79 | return $this->avatar_url ? Storage::url($this->avatar_url) : null; 80 | } 81 | 82 | public function canAccessPanel(Panel $panel): bool 83 | { 84 | return true; 85 | } 86 | } 87 | -------------------------------------------------------------------------------- /app/Http/Controllers/Api/AuthController.php: -------------------------------------------------------------------------------- 1 | only('email', 'password'))) { 19 | //jika berhasil buat token 20 | $user = User::where('email', $request->email)->first(); 21 | //token lama dihapus 22 | $user->tokens()->delete(); 23 | //token baru di create 24 | $abilities = $user->getAllPermissions()->pluck('name')->toArray(); 25 | // Filter abilities containing ':' and cut any string after '_' 26 | $abilities = array_map(function ($ability) { 27 | return explode('_', $ability)[0]; 28 | }, array_filter($abilities, function ($ability) { 29 | return strpos($ability, ':') !== false; 30 | })); 31 | //create token with abilities 32 | $token = $user->createToken('token', $abilities)->plainTextToken; 33 | 34 | return new LoginResource([ 35 | 'token' => $token, 36 | 'user' => $user 37 | ]); 38 | } else { 39 | //jika gagal kirim response error 40 | return response()->json([ 41 | 'message' => 'Invalid Credentials' 42 | ], 401); 43 | } 44 | } 45 | 46 | //register 47 | // public function register(RegisterRequest $request) 48 | // { 49 | // //save user to user table 50 | // $user = User::create([ 51 | // 'name' => $request->name, 52 | // 'email' => $request->email, 53 | // 'password' => Hash::make($request->password) 54 | // ]); 55 | 56 | // $token = $user->createToken('token')->plainTextToken; 57 | // //return token 58 | // return new LoginResource([ 59 | // 'token' => $token, 60 | // 'user' => $user 61 | // ]); 62 | // } 63 | 64 | //logout 65 | public function logout(Request $request) 66 | { 67 | //hapus semua tuken by user 68 | $request->user()->tokens()->delete(); 69 | //response no content 70 | return response()->noContent(); 71 | } // 72 | } 73 | -------------------------------------------------------------------------------- /lang/vendor/filament-shield/zh_CN/filament-shield.php: -------------------------------------------------------------------------------- 1 | '角色名', 11 | 'column.guard_name' => '守卫', 12 | 'column.roles' => '角色', 13 | 'column.permissions' => '权限', 14 | 'column.updated_at' => '更新时间', 15 | 16 | /* 17 | |-------------------------------------------------------------------------- 18 | | Form Fields 19 | |-------------------------------------------------------------------------- 20 | */ 21 | 22 | 'field.name' => '角色名', 23 | 'field.guard_name' => '守卫', 24 | 'field.permissions' => '权限', 25 | 'field.select_all.name' => '全选', 26 | 'field.select_all.message' => '启用当前为该角色 启用的 所有权限', 27 | 28 | /* 29 | |-------------------------------------------------------------------------- 30 | | Navigation & Resource 31 | |-------------------------------------------------------------------------- 32 | */ 33 | 34 | 'nav.group' => 'Filament Shield', 35 | 'nav.role.label' => '角色', 36 | 'nav.role.icon' => 'heroicon-o-shield-check', 37 | 'resource.label.role' => '角色', 38 | 'resource.label.roles' => '角色', 39 | 40 | /* 41 | |-------------------------------------------------------------------------- 42 | | Section & Tabs 43 | |-------------------------------------------------------------------------- 44 | */ 45 | 46 | 'section' => '实体', 47 | 'resources' => '资源', 48 | 'widgets' => '小组件', 49 | 'pages' => '页面', 50 | 'custom' => '自定义', 51 | 52 | /* 53 | |-------------------------------------------------------------------------- 54 | | Messages 55 | |-------------------------------------------------------------------------- 56 | */ 57 | 58 | 'forbidden' => '无权访问', 59 | 60 | /* 61 | |-------------------------------------------------------------------------- 62 | | Resource Permissions' Labels 63 | |-------------------------------------------------------------------------- 64 | */ 65 | 66 | 'resource_permission_prefixes_labels' => [ 67 | 'view' => '详情', 68 | 'view_any' => '列表', 69 | 'create' => '创建', 70 | 'update' => '编辑', 71 | 'delete' => '删除', 72 | 'delete_any' => '批量删除', 73 | 'force_delete' => '永久删除', 74 | 'force_delete_any' => '批量永久删除', 75 | 'restore' => '恢复', 76 | 'reorder' => '重新排序', 77 | 'restore_any' => '批量恢复', 78 | 'replicate' => '复制', 79 | ], 80 | ]; 81 | -------------------------------------------------------------------------------- /lang/vendor/filament-shield/zh_TW/filament-shield.php: -------------------------------------------------------------------------------- 1 | '角色名', 11 | 'column.guard_name' => '守衛', 12 | 'column.roles' => '角色', 13 | 'column.permissions' => '權限', 14 | 'column.updated_at' => '更新時間', 15 | 16 | /* 17 | |-------------------------------------------------------------------------- 18 | | Form Fields 19 | |-------------------------------------------------------------------------- 20 | */ 21 | 22 | 'field.name' => '角色名', 23 | 'field.guard_name' => '守衛', 24 | 'field.permissions' => '權限', 25 | 'field.select_all.name' => '全選', 26 | 'field.select_all.message' => '啟用當前為該角色 啟用的 所有權限', 27 | 28 | /* 29 | |-------------------------------------------------------------------------- 30 | | Navigation & Resource 31 | |-------------------------------------------------------------------------- 32 | */ 33 | 34 | 'nav.group' => 'Filament Shield', 35 | 'nav.role.label' => '角色', 36 | 'nav.role.icon' => 'heroicon-o-shield-check', 37 | 'resource.label.role' => '角色', 38 | 'resource.label.roles' => '角色', 39 | 40 | /* 41 | |-------------------------------------------------------------------------- 42 | | Section & Tabs 43 | |-------------------------------------------------------------------------- 44 | */ 45 | 46 | 'section' => '實體', 47 | 'resources' => '資源', 48 | 'widgets' => '小工具', 49 | 'pages' => '頁面', 50 | 'custom' => '自訂', 51 | 52 | /* 53 | |-------------------------------------------------------------------------- 54 | | Messages 55 | |-------------------------------------------------------------------------- 56 | */ 57 | 58 | 'forbidden' => '無權訪問', 59 | 60 | /* 61 | |-------------------------------------------------------------------------- 62 | | Resource Permissions' Labels 63 | |-------------------------------------------------------------------------- 64 | */ 65 | 66 | 'resource_permission_prefixes_labels' => [ 67 | 'view' => '檢視', 68 | 'view_any' => '列表', 69 | 'create' => '建立', 70 | 'update' => '編輯', 71 | 'delete' => '刪除', 72 | 'delete_any' => '批量刪除', 73 | 'force_delete' => '永久刪除', 74 | 'force_delete_any' => '批量永久刪除', 75 | 'restore' => '還原', 76 | 'reorder' => '重新排序', 77 | 'restore_any' => '批量還原', 78 | 'replicate' => '複製', 79 | ], 80 | ]; 81 | -------------------------------------------------------------------------------- /config/filesystems.php: -------------------------------------------------------------------------------- 1 | env('FILESYSTEM_DISK', 'local'), 17 | 18 | /* 19 | |-------------------------------------------------------------------------- 20 | | Filesystem Disks 21 | |-------------------------------------------------------------------------- 22 | | 23 | | Below you may configure as many filesystem disks as necessary, and you 24 | | may even configure multiple disks for the same driver. Examples for 25 | | most supported storage drivers are configured here for reference. 26 | | 27 | | Supported drivers: "local", "ftp", "sftp", "s3" 28 | | 29 | */ 30 | 31 | 'disks' => [ 32 | 33 | 'local' => [ 34 | 'driver' => 'local', 35 | 'root' => storage_path('app/private'), 36 | 'serve' => true, 37 | 'throw' => false, 38 | ], 39 | 40 | 'public' => [ 41 | 'driver' => 'local', 42 | 'root' => storage_path('app/public'), 43 | 'url' => env('APP_URL') . '/storage', 44 | 'visibility' => 'public', 45 | 'throw' => false, 46 | ], 47 | 48 | 's3' => [ 49 | 'driver' => 's3', 50 | 'key' => env('AWS_ACCESS_KEY_ID'), 51 | 'secret' => env('AWS_SECRET_ACCESS_KEY'), 52 | 'region' => env('AWS_DEFAULT_REGION'), 53 | 'bucket' => env('AWS_BUCKET'), 54 | 'url' => env('AWS_URL'), 55 | 'endpoint' => env('AWS_ENDPOINT'), 56 | 'use_path_style_endpoint' => env('AWS_USE_PATH_STYLE_ENDPOINT', false), 57 | 'throw' => false, 58 | ], 59 | 60 | ], 61 | 62 | /* 63 | |-------------------------------------------------------------------------- 64 | | Symbolic Links 65 | |-------------------------------------------------------------------------- 66 | | 67 | | Here you may configure the symbolic links that will be created when the 68 | | `storage:link` Artisan command is executed. The array keys should be 69 | | the locations of the links and the values should be their targets. 70 | | 71 | */ 72 | 73 | 'links' => [ 74 | public_path('storage') => storage_path('app/public'), 75 | ], 76 | 77 | ]; 78 | -------------------------------------------------------------------------------- /lang/vendor/filament-shield/ko/filament-shield.php: -------------------------------------------------------------------------------- 1 | '이름', 11 | 'column.guard_name' => '가드 이름', 12 | 'column.roles' => '역할', 13 | 'column.permissions' => '권한', 14 | 'column.updated_at' => '최근 업데이트', 15 | 16 | /* 17 | |-------------------------------------------------------------------------- 18 | | Form Fields 19 | |-------------------------------------------------------------------------- 20 | */ 21 | 22 | 'field.name' => '이름', 23 | 'field.guard_name' => '가드 이름', 24 | 'field.permissions' => '권한', 25 | 'field.select_all.name' => '전체 선택', 26 | 'field.select_all.message' => '현재 이 역할에 대해 활성화된 모든 권한을 활성화', 27 | 28 | /* 29 | |-------------------------------------------------------------------------- 30 | | Navigation & Resource 31 | |-------------------------------------------------------------------------- 32 | */ 33 | 34 | 'nav.group' => 'Filament Shield', 35 | 'nav.role.label' => '역할', 36 | 'nav.role.icon' => 'heroicon-o-shield-check', 37 | 'resource.label.role' => '역할', 38 | 'resource.label.roles' => '역할들', 39 | 40 | /* 41 | |-------------------------------------------------------------------------- 42 | | Section & Tabs 43 | |-------------------------------------------------------------------------- 44 | */ 45 | 46 | 'section' => '섹션', 47 | 'resources' => '리소스', 48 | 'widgets' => '위젯', 49 | 'pages' => '페이지', 50 | 'custom' => '사용자 정의 권한', 51 | 52 | /* 53 | |-------------------------------------------------------------------------- 54 | | Messages 55 | |-------------------------------------------------------------------------- 56 | */ 57 | 58 | 'forbidden' => '접근 권한이 없습니다', 59 | 60 | /* 61 | |-------------------------------------------------------------------------- 62 | | Resource Permissions' Labels 63 | |-------------------------------------------------------------------------- 64 | */ 65 | 66 | 'resource_permission_prefixes_labels' => [ 67 | 'view' => '보기', 68 | 'view_any' => '모두 보기', 69 | 'create' => '생성', 70 | 'update' => '업데이트', 71 | 'delete' => '삭제', 72 | 'delete_any' => '모두 삭제', 73 | 'force_delete' => '강제 삭제', 74 | 'force_delete_any' => '모두 강제 삭제', 75 | 'restore' => '복구', 76 | 'reorder' => '재정렬', 77 | 'restore_any' => '모두 복구', 78 | 'replicate' => '복제', 79 | ], 80 | ]; 81 | -------------------------------------------------------------------------------- /lang/vendor/filament-shield/ja/filament-shield.php: -------------------------------------------------------------------------------- 1 | '名前', 11 | 'column.guard_name' => 'ガード名', 12 | 'column.roles' => 'ロール', 13 | 'column.permissions' => 'パーミッション', 14 | 'column.updated_at' => '更新日時', 15 | 16 | /* 17 | |-------------------------------------------------------------------------- 18 | | Form Fields 19 | |-------------------------------------------------------------------------- 20 | */ 21 | 22 | 'field.name' => '名前', 23 | 'field.guard_name' => 'ガード名', 24 | 'field.permissions' => 'パーミッション', 25 | 'field.select_all.name' => 'すべて選択', 26 | 'field.select_all.message' => 'このロールに対して現在有効となっているすべての権限を有効にします。', 27 | 28 | /* 29 | |-------------------------------------------------------------------------- 30 | | Navigation & Resource 31 | |-------------------------------------------------------------------------- 32 | */ 33 | 34 | 'nav.group' => 'Filament Shield', 35 | 'nav.role.label' => 'ロール', 36 | 'nav.role.icon' => 'heroicon-o-shield-check', 37 | 'resource.label.role' => 'ロール', 38 | 'resource.label.roles' => 'ロール', 39 | 40 | /* 41 | |-------------------------------------------------------------------------- 42 | | Section & Tabs 43 | |-------------------------------------------------------------------------- 44 | */ 45 | 46 | 'section' => 'エンティティ', 47 | 'resources' => 'リソース', 48 | 'widgets' => 'ウィジェット', 49 | 'pages' => 'ページ', 50 | 'custom' => 'カスタムパーミッション', 51 | 52 | /* 53 | |-------------------------------------------------------------------------- 54 | | Messages 55 | |-------------------------------------------------------------------------- 56 | */ 57 | 58 | 'forbidden' => 'アクセスするパーミッションがありません。', 59 | 60 | /* 61 | |-------------------------------------------------------------------------- 62 | | Resource Permissions' Labels 63 | |-------------------------------------------------------------------------- 64 | */ 65 | 66 | 'resource_permission_prefixes_labels' => [ 67 | 'view' => '表示', 68 | 'view_any' => 'どれでも表示', 69 | 'create' => '作成', 70 | 'update' => '更新', 71 | 'delete' => '削除', 72 | 'delete_any' => 'どれでも削除', 73 | 'force_delete' => '強制削除', 74 | 'force_delete_any' => 'どれでも強制削除', 75 | 'restore' => 'リストア', 76 | 'reorder' => '並べ直し', 77 | 'restore_any' => 'どれでもリストア', 78 | 'replicate' => 'レプリカ', 79 | ], 80 | ]; 81 | -------------------------------------------------------------------------------- /config/scramble.php: -------------------------------------------------------------------------------- 1 | 'api', 11 | 12 | /* 13 | * Your API domain. By default, app domain is used. This is also a part of the default API routes 14 | * matcher, so when implementing your own, make sure you use this config if needed. 15 | */ 16 | 'api_domain' => null, 17 | 18 | /* 19 | * The path where your OpenAPI specification will be exported. 20 | */ 21 | 'export_path' => 'api.json', 22 | 23 | 'info' => [ 24 | /* 25 | * API version. 26 | */ 27 | 'version' => env('API_VERSION', '0.0.1'), 28 | 29 | /* 30 | * Description rendered on the home page of the API documentation (`/docs/api`). 31 | */ 32 | 'description' => '', 33 | ], 34 | 35 | /* 36 | * Customize Stoplight Elements UI 37 | */ 38 | 'ui' => [ 39 | /* 40 | * Define the title of the documentation's website. App name is used when this config is `null`. 41 | */ 42 | 'title' => null, 43 | 44 | /* 45 | * Define the theme of the documentation. Available options are `light` and `dark`. 46 | */ 47 | 'theme' => 'light', 48 | 49 | /* 50 | * Hide the `Try It` feature. Enabled by default. 51 | */ 52 | 'hide_try_it' => false, 53 | 54 | /* 55 | * URL to an image that displays as a small square logo next to the title, above the table of contents. 56 | */ 57 | 'logo' => '', 58 | 59 | /* 60 | * Use to fetch the credential policy for the Try It feature. Options are: omit, include (default), and same-origin 61 | */ 62 | 'try_it_credentials_policy' => 'include', 63 | ], 64 | 65 | /* 66 | * The list of servers of the API. By default, when `null`, server URL will be created from 67 | * `scramble.api_path` and `scramble.api_domain` config variables. When providing an array, you 68 | * will need to specify the local server URL manually (if needed). 69 | * 70 | * Example of non-default config (final URLs are generated using Laravel `url` helper): 71 | * 72 | * ```php 73 | * 'servers' => [ 74 | * 'Live' => 'api', 75 | * 'Prod' => 'https://scramble.dedoc.co/api', 76 | * ], 77 | * ``` 78 | */ 79 | 'servers' => null, 80 | 81 | 'middleware' => [ 82 | 'web', 83 | // RestrictedDocsAccess::class, 84 | ], 85 | 86 | 'extensions' => [], 87 | ]; 88 | -------------------------------------------------------------------------------- /lang/vendor/filament-shield/ar/filament-shield.php: -------------------------------------------------------------------------------- 1 | 'العنوان', 11 | 'column.guard_name' => 'اسم الحارس', 12 | 'column.roles' => 'الأدوار', 13 | 'column.permissions' => 'الصلاحيات', 14 | 'column.updated_at' => 'تاريخ التحديث', 15 | 16 | /* 17 | |-------------------------------------------------------------------------- 18 | | Form Fields 19 | |-------------------------------------------------------------------------- 20 | */ 21 | 22 | 'field.name' => 'العنوان', 23 | 'field.guard_name' => 'اسم الحارس', 24 | 'field.permissions' => 'الصلاحيات', 25 | 'field.select_all.name' => 'تحديد الكل', 26 | 'field.select_all.message' => 'تفعيل كافة الصلاحيات لهذا الدور', 27 | 28 | /* 29 | |-------------------------------------------------------------------------- 30 | | Navigation & Resource 31 | |-------------------------------------------------------------------------- 32 | */ 33 | 34 | 'nav.group' => 'إدارة الوصول', 35 | 'nav.role.label' => 'الأدوار', 36 | 'nav.role.icon' => 'heroicon-o-shield-check', 37 | 'resource.label.role' => 'دور', 38 | 'resource.label.roles' => 'الأدوار', 39 | 40 | /* 41 | |-------------------------------------------------------------------------- 42 | | Section & Tabs 43 | |-------------------------------------------------------------------------- 44 | */ 45 | 46 | 'section' => 'الأقسام', 47 | 'resources' => 'المصادر', 48 | 'widgets' => 'الأجزاء', 49 | 'pages' => 'الصفحات', 50 | 'custom' => 'صلاحيات مخصصة', 51 | 52 | /* 53 | |-------------------------------------------------------------------------- 54 | | Messages 55 | |-------------------------------------------------------------------------- 56 | */ 57 | 58 | 'forbidden' => 'أنت غير مخول، لديك صلاحية للوصول', 59 | 60 | /* 61 | |-------------------------------------------------------------------------- 62 | | Resource Permissions' Labels 63 | |-------------------------------------------------------------------------- 64 | */ 65 | 66 | 'resource_permission_prefixes_labels' => [ 67 | 'view' => 'عرض', 68 | 'view_any' => 'عرض الكل', 69 | 'create' => 'إضافة', 70 | 'update' => 'تعديل', 71 | 'delete' => 'حذف', 72 | 'delete_any' => 'حذف الكل', 73 | 'force_delete' => 'إجبار الحذف', 74 | 'force_delete_any' => ' إجبار حذف أي', 75 | 'reorder' => 'إعادة ترتيب', 76 | 'restore' => 'استرجاع', 77 | 'restore_any' => 'استرجاع الكل', 78 | 'replicate' => 'استنساخ', 79 | ], 80 | ]; 81 | -------------------------------------------------------------------------------- /app/Filament/Pages/Login.php: -------------------------------------------------------------------------------- 1 | rateLimit(5); 23 | } catch (TooManyRequestsException $exception) { 24 | $this->getRateLimitedNotification($exception)?->send(); 25 | 26 | return null; 27 | } 28 | 29 | $data = $this->form->getState(); 30 | 31 | // Check if user exists and was created through social login 32 | $user = \App\Models\User::where('email', $data['email'])->first(); 33 | if ($user && is_null($user->password)) { 34 | throw ValidationException::withMessages([ 35 | 'data.email' => 'This account was created using social login. Please login with Google.', 36 | ]); 37 | } 38 | 39 | if (! Filament::auth()->attempt($this->getCredentialsFromFormData($data), $data['remember'] ?? false)) { 40 | $this->throwFailureValidationException(); 41 | } 42 | 43 | $user = Filament::auth()->user(); 44 | 45 | if ( 46 | ($user instanceof FilamentUser) && 47 | (! $user->canAccessPanel(Filament::getCurrentPanel())) 48 | ) { 49 | Filament::auth()->logout(); 50 | 51 | $this->throwFailureValidationException(); 52 | } 53 | 54 | session()->regenerate(); 55 | 56 | return app(LoginResponse::class); 57 | } 58 | 59 | public function mount(): void 60 | { 61 | parent::mount(); 62 | 63 | $this->form->fill([ 64 | 'email' => 'admin@admin.com', 65 | 'password' => 'password', 66 | 'remember' => true, 67 | ]); 68 | } 69 | /** 70 | * @return array 71 | */ 72 | protected function getForms(): array 73 | { 74 | return [ 75 | 'form' => $this->form( 76 | $this->makeForm() 77 | ->schema([ 78 | $this->getEmailFormComponent(), 79 | $this->getPasswordFormComponent(), 80 | $this->getRememberFormComponent(), 81 | ]) 82 | ->statePath('data'), 83 | ), 84 | ]; 85 | } 86 | } 87 | -------------------------------------------------------------------------------- /lang/vendor/filament-shield/fa/filament-shield.php: -------------------------------------------------------------------------------- 1 | 'نام', 11 | 'column.guard_name' => 'نام گارد', 12 | 'column.roles' => 'نقش‌ها', 13 | 'column.permissions' => 'دسترسی‌ها', 14 | 'column.updated_at' => 'به‌روزشده در', 15 | 16 | /* 17 | |-------------------------------------------------------------------------- 18 | | Form Fields 19 | |-------------------------------------------------------------------------- 20 | */ 21 | 22 | 'field.name' => 'نام', 23 | 'field.guard_name' => 'نام گارد', 24 | 'field.permissions' => 'دسترسی‌ها', 25 | 'field.select_all.name' => 'انتخاب همه', 26 | 'field.select_all.message' => 'تمام دسترسی‌های فعال فعلی را برای این نقش فعال کن.', 27 | 28 | /* 29 | |-------------------------------------------------------------------------- 30 | | Navigation & Resource 31 | |-------------------------------------------------------------------------- 32 | */ 33 | 34 | 'nav.group' => 'Filament Shield', 35 | 'nav.role.label' => 'نقش‌ها', 36 | 'nav.role.icon' => 'heroicon-o-shield-check', 37 | 'resource.label.role' => 'نقش', 38 | 'resource.label.roles' => 'نقش‌ها', 39 | 40 | /* 41 | |-------------------------------------------------------------------------- 42 | | Section & Tabs 43 | |-------------------------------------------------------------------------- 44 | */ 45 | 46 | 'section' => 'موجودیت‌ها', 47 | 'resources' => 'منابع', 48 | 'widgets' => 'ویجت‌ها', 49 | 'pages' => 'صفحات', 50 | 'custom' => 'دسترسی‌های سفارشی', 51 | 52 | /* 53 | |-------------------------------------------------------------------------- 54 | | Messages 55 | |-------------------------------------------------------------------------- 56 | */ 57 | 58 | 'forbidden' => 'شما اجازه دسترسی ندارید.', 59 | 60 | /* 61 | |-------------------------------------------------------------------------- 62 | | Resource Permissions' Labels 63 | |-------------------------------------------------------------------------- 64 | */ 65 | 66 | 'resource_permission_prefixes_labels' => [ 67 | 'view' => 'نمایش', 68 | 'view_any' => 'نمایش همه', 69 | 'create' => 'ایجاد', 70 | 'update' => 'ویرایش', 71 | 'delete' => 'حذف', 72 | 'delete_any' => 'حذف همه', 73 | 'force_delete' => 'حذف اجباری', 74 | 'force_delete_any' => 'حذف اجباری همه', 75 | 'restore' => 'بازیابی', 76 | 'replicate' => 'تکثیر', 77 | 'reorder' => 'مرتب‌سازی', 78 | 'restore_any' => 'بازیابی همه', 79 | ], 80 | ]; 81 | -------------------------------------------------------------------------------- /app/Policies/BookPolicy.php: -------------------------------------------------------------------------------- 1 | can('view_any_book'); 19 | } 20 | 21 | /** 22 | * Determine whether the user can view the model. 23 | */ 24 | public function view(User $user, Book $book): bool 25 | { 26 | return $user->can('view_book'); 27 | } 28 | 29 | /** 30 | * Determine whether the user can create models. 31 | */ 32 | public function create(User $user): bool 33 | { 34 | return $user->can('create_book'); 35 | } 36 | 37 | /** 38 | * Determine whether the user can update the model. 39 | */ 40 | public function update(User $user, Book $book): bool 41 | { 42 | return $user->can('update_book'); 43 | } 44 | 45 | /** 46 | * Determine whether the user can delete the model. 47 | */ 48 | public function delete(User $user, Book $book): bool 49 | { 50 | return $user->can('delete_book'); 51 | } 52 | 53 | /** 54 | * Determine whether the user can bulk delete. 55 | */ 56 | public function deleteAny(User $user): bool 57 | { 58 | return $user->can('delete_any_book'); 59 | } 60 | 61 | /** 62 | * Determine whether the user can permanently delete. 63 | */ 64 | public function forceDelete(User $user, Book $book): bool 65 | { 66 | return $user->can('force_delete_book'); 67 | } 68 | 69 | /** 70 | * Determine whether the user can permanently bulk delete. 71 | */ 72 | public function forceDeleteAny(User $user): bool 73 | { 74 | return $user->can('force_delete_any_book'); 75 | } 76 | 77 | /** 78 | * Determine whether the user can restore. 79 | */ 80 | public function restore(User $user, Book $book): bool 81 | { 82 | return $user->can('restore_book'); 83 | } 84 | 85 | /** 86 | * Determine whether the user can bulk restore. 87 | */ 88 | public function restoreAny(User $user): bool 89 | { 90 | return $user->can('restore_any_book'); 91 | } 92 | 93 | /** 94 | * Determine whether the user can replicate. 95 | */ 96 | public function replicate(User $user, Book $book): bool 97 | { 98 | return $user->can('replicate_book'); 99 | } 100 | 101 | /** 102 | * Determine whether the user can reorder. 103 | */ 104 | public function reorder(User $user): bool 105 | { 106 | return $user->can('reorder_book'); 107 | } 108 | } 109 | -------------------------------------------------------------------------------- /app/Policies/PostPolicy.php: -------------------------------------------------------------------------------- 1 | can('view_any_post'); 19 | } 20 | 21 | /** 22 | * Determine whether the user can view the model. 23 | */ 24 | public function view(User $user, Post $post): bool 25 | { 26 | return $user->can('view_post'); 27 | } 28 | 29 | /** 30 | * Determine whether the user can create models. 31 | */ 32 | public function create(User $user): bool 33 | { 34 | return $user->can('create_post'); 35 | } 36 | 37 | /** 38 | * Determine whether the user can update the model. 39 | */ 40 | public function update(User $user, Post $post): bool 41 | { 42 | return $user->can('update_post'); 43 | } 44 | 45 | /** 46 | * Determine whether the user can delete the model. 47 | */ 48 | public function delete(User $user, Post $post): bool 49 | { 50 | return $user->can('delete_post'); 51 | } 52 | 53 | /** 54 | * Determine whether the user can bulk delete. 55 | */ 56 | public function deleteAny(User $user): bool 57 | { 58 | return $user->can('delete_any_post'); 59 | } 60 | 61 | /** 62 | * Determine whether the user can permanently delete. 63 | */ 64 | public function forceDelete(User $user, Post $post): bool 65 | { 66 | return $user->can('force_delete_post'); 67 | } 68 | 69 | /** 70 | * Determine whether the user can permanently bulk delete. 71 | */ 72 | public function forceDeleteAny(User $user): bool 73 | { 74 | return $user->can('force_delete_any_post'); 75 | } 76 | 77 | /** 78 | * Determine whether the user can restore. 79 | */ 80 | public function restore(User $user, Post $post): bool 81 | { 82 | return $user->can('restore_post'); 83 | } 84 | 85 | /** 86 | * Determine whether the user can bulk restore. 87 | */ 88 | public function restoreAny(User $user): bool 89 | { 90 | return $user->can('restore_any_post'); 91 | } 92 | 93 | /** 94 | * Determine whether the user can replicate. 95 | */ 96 | public function replicate(User $user, Post $post): bool 97 | { 98 | return $user->can('replicate_post'); 99 | } 100 | 101 | /** 102 | * Determine whether the user can reorder. 103 | */ 104 | public function reorder(User $user): bool 105 | { 106 | return $user->can('reorder_post'); 107 | } 108 | } 109 | -------------------------------------------------------------------------------- /lang/vendor/filament-shield/id/filament-shield.php: -------------------------------------------------------------------------------- 1 | 'Nama', 11 | 'column.guard_name' => 'Nama Penjaga', 12 | 'column.roles' => 'Peran', 13 | 'column.permissions' => 'Izin', 14 | 'column.updated_at' => 'Dirubah', 15 | 16 | /* 17 | |-------------------------------------------------------------------------- 18 | | Form Fields 19 | |-------------------------------------------------------------------------- 20 | */ 21 | 22 | 'field.name' => 'Nama', 23 | 'field.guard_name' => 'Nama Penjaga', 24 | 'field.permissions' => 'Izin', 25 | 'field.select_all.name' => 'Pilih Semua', 26 | 'field.select_all.message' => 'Aktifkan semua izin yang Tersedia untuk Peran ini.', 27 | 28 | /* 29 | |-------------------------------------------------------------------------- 30 | | Navigation & Resource 31 | |-------------------------------------------------------------------------- 32 | */ 33 | 34 | 'nav.group' => 'Pelindung', 35 | 'nav.role.label' => 'Peran', 36 | 'nav.role.icon' => 'heroicon-o-shield-check', 37 | 'resource.label.role' => 'Peran', 38 | 'resource.label.roles' => 'Peran', 39 | 40 | /* 41 | |-------------------------------------------------------------------------- 42 | | Section & Tabs 43 | |-------------------------------------------------------------------------- 44 | */ 45 | 46 | 'section' => 'Entitas', 47 | 'resources' => 'Sumber Daya', 48 | 'widgets' => 'Widget', 49 | 'pages' => 'Halaman', 50 | 'custom' => 'Izin Kustom', 51 | 52 | /* 53 | |-------------------------------------------------------------------------- 54 | | Messages 55 | |-------------------------------------------------------------------------- 56 | */ 57 | 58 | 'forbidden' => 'Kamu tidak punya izin akses', 59 | 60 | /* 61 | |-------------------------------------------------------------------------- 62 | | Resource Permissions' Labels 63 | |-------------------------------------------------------------------------- 64 | */ 65 | 66 | 'resource_permission_prefixes_labels' => [ 67 | 'view' => 'Lihat', 68 | 'view_any' => 'Lihat Apa Saja', 69 | 'create' => 'Buat', 70 | 'update' => 'Perbarui', 71 | 'delete' => 'Hapus', 72 | 'delete_any' => 'Hapus Apa Saja', 73 | 'force_delete' => 'Paksa Hapus', 74 | 'force_delete_any' => 'Paksa Hapus Apa Saja', 75 | 'restore' => 'Pulihkan', 76 | 'replicate' => 'Replikasi', 77 | 'reorder' => 'Susun Ulang', 78 | 'restore_any' => 'Pulihkan Apa Saja', 79 | ], 80 | ]; 81 | -------------------------------------------------------------------------------- /lang/vendor/filament-shield/pt_BR/filament-shield.php: -------------------------------------------------------------------------------- 1 | 'Nome', 11 | 'column.guard_name' => 'Guard', 12 | 'column.roles' => 'Funções', 13 | 'column.permissions' => 'Permissões', 14 | 'column.updated_at' => 'Alterado em', 15 | 16 | /* 17 | |-------------------------------------------------------------------------- 18 | | Form Fields 19 | |-------------------------------------------------------------------------- 20 | */ 21 | 22 | 'field.name' => 'Nome', 23 | 'field.guard_name' => 'Guard', 24 | 'field.permissions' => 'Permissões', 25 | 'field.select_all.name' => 'Selecionar todos', 26 | 'field.select_all.message' => 'Habilitar todas as permissões para essa função', 27 | 28 | /* 29 | |-------------------------------------------------------------------------- 30 | | Navigation & Resource 31 | |-------------------------------------------------------------------------- 32 | */ 33 | 34 | 'nav.group' => 'Filament Shield', 35 | 'nav.role.label' => 'Funções', 36 | 'nav.role.icon' => 'heroicon-o-shield-check', 37 | 'resource.label.role' => 'Função', 38 | 'resource.label.roles' => 'Funções', 39 | 40 | /* 41 | |-------------------------------------------------------------------------- 42 | | Section & Tabs 43 | |-------------------------------------------------------------------------- 44 | */ 45 | 'section' => 'Entidades', 46 | 'resources' => 'Recursos', 47 | 'widgets' => 'Widgets', 48 | 'pages' => 'Páginas', 49 | 'custom' => 'Permissões customizadas', 50 | 51 | /* 52 | |-------------------------------------------------------------------------- 53 | | Messages 54 | |-------------------------------------------------------------------------- 55 | */ 56 | 57 | 'forbidden' => 'Você não tem permissão para acessar', 58 | 59 | /* 60 | |-------------------------------------------------------------------------- 61 | | Resource Permissions' Labels 62 | |-------------------------------------------------------------------------- 63 | */ 64 | 65 | // 'resource_permission_prefixes_labels' => [ 66 | // 'view' => 'View', 67 | // 'view_any' => 'View Any', 68 | // 'create' => 'Create', 69 | // 'update' => 'Update', 70 | // 'delete' => 'Delete', 71 | // 'delete_any' => 'Delete Any', 72 | // 'force_delete' => 'Force Delete', 73 | // 'force_delete_any' => 'Force Delete Any', 74 | // 'restore' => 'Restore', 75 | // 'reorder' => 'Reorder', 76 | // 'restore_any' => 'Restore Any', 77 | // 'replicate' => 'Replicate', 78 | // ], 79 | ]; 80 | -------------------------------------------------------------------------------- /lang/vendor/filament-shield/vi/filament-shield.php: -------------------------------------------------------------------------------- 1 | 'Tên', 11 | 'column.guard_name' => 'Tên guard', 12 | 'column.roles' => 'Vai trò', 13 | 'column.permissions' => 'Quyền', 14 | 'column.updated_at' => 'Cập nhật lúc', 15 | 16 | /* 17 | |-------------------------------------------------------------------------- 18 | | Form Fields 19 | |-------------------------------------------------------------------------- 20 | */ 21 | 22 | 'field.name' => 'Tên', 23 | 'field.guard_name' => 'Tên guard', 24 | 'field.permissions' => 'Quyền', 25 | 'field.select_all.name' => 'Chọn tất cả', 26 | 'field.select_all.message' => 'Bật tất cả Quyền hiện tại Đã bật cho vai trò này', 27 | 28 | /* 29 | |-------------------------------------------------------------------------- 30 | | Navigation & Resource 31 | |-------------------------------------------------------------------------- 32 | */ 33 | 34 | 'nav.group' => 'Filament Shield', 35 | 'nav.role.label' => 'Vai trò', 36 | 'nav.role.icon' => 'heroicon-o-shield-check', 37 | 'resource.label.role' => 'Vai trò', 38 | 'resource.label.roles' => 'Vai trò', 39 | 40 | /* 41 | |-------------------------------------------------------------------------- 42 | | Section & Tabs 43 | |-------------------------------------------------------------------------- 44 | */ 45 | 46 | 'section' => 'Thực thể', 47 | 'resources' => 'Tài nguyên', 48 | 'widgets' => 'Widget', 49 | 'pages' => 'Trang', 50 | 'custom' => 'Quyền tùy chỉnh', 51 | 52 | /* 53 | |-------------------------------------------------------------------------- 54 | | Messages 55 | |-------------------------------------------------------------------------- 56 | */ 57 | 58 | 'forbidden' => 'Bạn không có quyền để truy cập.', 59 | 60 | /* 61 | |-------------------------------------------------------------------------- 62 | | Resource Permissions' Labels 63 | |-------------------------------------------------------------------------- 64 | */ 65 | 66 | 'resource_permission_prefixes_labels' => [ 67 | 'view' => 'Xem', 68 | 'view_any' => 'Xem bất kỳ', 69 | 'create' => 'Tạo', 70 | 'update' => 'Cập nhật', 71 | 'delete' => 'Xóa', 72 | 'delete_any' => 'Xóa bất kỳ', 73 | 'force_delete' => 'Xóa vĩnh viễn', 74 | 'force_delete_any' => 'Xóa vĩnh viễn bất kỳ', 75 | 'restore' => 'Khôi phục', 76 | 'reorder' => 'Sắp xếp lại', 77 | 'restore_any' => 'Khôi phục bất kỳ', 78 | 'replicate' => 'Nhân bản', 79 | ], 80 | ]; 81 | -------------------------------------------------------------------------------- /lang/vendor/filament-shield/sq/filament-shield.php: -------------------------------------------------------------------------------- 1 | 'Emri', 11 | 'column.guard_name' => 'Emri i rojes', 12 | 'column.roles' => 'Rolet', 13 | 'column.permissions' => 'Lejet', 14 | 'column.updated_at' => 'Përditësuar në', 15 | 16 | /* 17 | |-------------------------------------------------------------------------- 18 | | Form Fields 19 | |-------------------------------------------------------------------------- 20 | */ 21 | 22 | 'field.name' => 'Emri', 23 | 'field.guard_name' => 'Emri i rojes', 24 | 'field.permissions' => 'Lejet', 25 | 'field.select_all.name' => 'Zgjidh të gjitha', 26 | 'field.select_all.message' => 'Aktivizo të gjitha lejet aktualisht Aktivizuar për këtë rol', 27 | 28 | /* 29 | |-------------------------------------------------------------------------- 30 | | Navigation & Resource 31 | |-------------------------------------------------------------------------- 32 | */ 33 | 34 | 'nav.group' => 'Filament Shield', 35 | 'nav.role.label' => 'Rolet', 36 | 'nav.role.icon' => 'heroicon-o-shield-check', 37 | 'resource.label.role' => 'Rol', 38 | 'resource.label.roles' => 'Rolet', 39 | 40 | /* 41 | |-------------------------------------------------------------------------- 42 | | Section & Tabs 43 | |-------------------------------------------------------------------------- 44 | */ 45 | 46 | 'section' => 'Seksioni', 47 | 'resources' => 'Burimet', 48 | 'widgets' => 'Widgets', 49 | 'pages' => 'Faqet', 50 | 'custom' => 'Lejet e personalizuara', 51 | 52 | /* 53 | |-------------------------------------------------------------------------- 54 | | Messages 55 | |-------------------------------------------------------------------------- 56 | */ 57 | 58 | 'forbidden' => 'Nuk ke leje për të hyrë', 59 | 60 | /* 61 | |-------------------------------------------------------------------------- 62 | | Resource Permissions' Labels 63 | |-------------------------------------------------------------------------- 64 | */ 65 | 66 | 'resource_permission_prefixes_labels' => [ 67 | 'view' => 'Shiko', 68 | 'view_any' => 'Shiko çdo', 69 | 'create' => 'Krijo', 70 | 'update' => 'Përditëso', 71 | 'delete' => 'Fshi', 72 | 'delete_any' => 'Fshi çdo', 73 | 'force_delete' => 'Fshije me forcë', 74 | 'force_delete_any' => 'Fshije me forcë çdo', 75 | 'restore' => 'Rikthe', 76 | 'reorder' => 'Rirendit', 77 | 'restore_any' => 'Rikthe çdo', 78 | 'replicate' => 'Ripërsërit', 79 | ], 80 | ]; 81 | --------------------------------------------------------------------------------