├── public
├── js
│ └── .gitkeep
├── css
│ └── .gitkeep
├── robots.txt
├── img
│ ├── og.png
│ ├── logo.png
│ ├── networks.jpg
│ ├── social-media.png
│ └── avatars
│ │ ├── avatar-3.svg
│ │ ├── avatar-17.svg
│ │ ├── avatar-20.svg
│ │ ├── avatar-19.svg
│ │ └── avatar-26.svg
├── favicon.ico
├── favicon.png
├── mix-manifest.json
├── images
│ ├── screenshots
│ │ ├── 1.png
│ │ ├── 2.png
│ │ ├── 3.png
│ │ ├── 4.png
│ │ ├── 5.png
│ │ ├── 6.png
│ │ ├── 7.png
│ │ ├── dashboard.png
│ │ └── sysadmin-features.png
│ ├── tecnologies
│ │ ├── inertia.svg
│ │ ├── stripe.svg
│ │ ├── laravel.svg
│ │ └── livewire.svg
│ └── companies
│ │ ├── linkedin.svg
│ │ ├── google.svg
│ │ └── amazon.svg
├── fonts
│ └── filament
│ │ └── filament
│ │ └── inter
│ │ ├── inter-greek-wght-normal-AXVTPQD5.woff2
│ │ ├── inter-greek-wght-normal-IRE366VL.woff2
│ │ ├── inter-greek-wght-normal-N43DBLU2.woff2
│ │ ├── inter-latin-wght-normal-NRMW37G5.woff2
│ │ ├── inter-latin-wght-normal-O25CN4JL.woff2
│ │ ├── inter-latin-wght-normal-OPIJAQLS.woff2
│ │ ├── inter-cyrillic-wght-normal-EWLSKVKN.woff2
│ │ ├── inter-cyrillic-wght-normal-JEOLYBOO.woff2
│ │ ├── inter-cyrillic-wght-normal-R5CMSONN.woff2
│ │ ├── inter-greek-ext-wght-normal-7GGTF7EK.woff2
│ │ ├── inter-greek-ext-wght-normal-EOVOK2B5.woff2
│ │ ├── inter-greek-ext-wght-normal-ZEVLMORV.woff2
│ │ ├── inter-latin-ext-wght-normal-5SRY4DMZ.woff2
│ │ ├── inter-latin-ext-wght-normal-GZCIV3NH.woff2
│ │ ├── inter-latin-ext-wght-normal-HA22NDSG.woff2
│ │ ├── inter-cyrillic-ext-wght-normal-ASVAGXXE.woff2
│ │ ├── inter-cyrillic-ext-wght-normal-IYF56FF6.woff2
│ │ ├── inter-cyrillic-ext-wght-normal-XKHXBTUO.woff2
│ │ ├── inter-vietnamese-wght-normal-CE5GGD3W.woff2
│ │ ├── inter-vietnamese-wght-normal-TWG5UU7E.woff2
│ │ └── index.css
├── index.php
├── .htaccess
└── web.config
├── resources
├── js
│ └── app.js
├── views
│ ├── layouts
│ │ ├── .gitkeep
│ │ └── app.blade.php
│ ├── livewire
│ │ └── .gitkeep
│ └── components
│ │ └── .gitkeep
├── css
│ ├── filament
│ │ ├── admin
│ │ │ └── theme.css
│ │ └── sysadmin
│ │ │ └── theme.css
│ └── app.css
└── markdown
│ ├── policy.md
│ └── terms.md
├── database
├── .gitignore
├── settings
│ ├── 2023_06_12_165809_create_sitemap_settings.php
│ ├── 2023_06_12_165809_createre_c_a_p_t_c_h_a_settings.php
│ ├── 2023_06_18_084228_create_whatsapp_chat_settings.php
│ ├── 2023_06_12_165809_create_terms_settings.php
│ ├── 2023_05_07_081639_create_app_features.php
│ └── 2023_05_07_081639_create_app_settings.php
├── migrations
│ ├── 2025_01_24_015035_create_banner_table.php
│ ├── 2023_05_07_064131_create_stats_tables.php
│ ├── 2023_06_08_193530_update_firewall_ips_table.php
│ ├── 2023_06_10_050524_add_banned_at_column_to_users_table.php
│ ├── 2023_06_09_011357_add_deleted_at_to_users_table.php
│ ├── 2023_10_11_042116_add_themes_settings_to_users_table.php
│ ├── 2023_10_22_045259_add_phone_column_to_users_table.php
│ ├── 2023_06_08_043708_add_settings_user.php
│ ├── 2023_09_24_173451_add_avatar_url_column_to_users_table.php
│ ├── 2023_10_22_160311_add_username_column_to_users_table.php
│ ├── 2021_12_31_052353_create_settings_table.php
│ ├── 2019_09_15_000010_create_tenants_table.php
│ ├── 2023_06_11_045947_add_event_column_to_activity_log_table.php
│ ├── 2023_06_11_045948_add_batch_uuid_column_to_activity_log_table.php
│ ├── 2023_05_07_063935_create_notifications_table.php
│ ├── 2024_10_06_133024_create_companies_table.php
│ ├── 2023_06_09_035017_create_filament-webhook_server_table.php
│ ├── 2022_03_05_031633_create_tag_tables.php
│ ├── 2024_10_06_203306_create_company_invitations_table.php
│ ├── 2019_07_15_000000_create_firewall_ips_table.php
│ ├── 2019_09_15_000020_create_domains_table.php
│ ├── 2024_10_06_133025_create_company_user_table.php
│ ├── 2023_06_09_035018_2023_01_19_144816_create_filament_webhook_server_histories_table.php
│ ├── 2023_06_10_050523_create_bans_table.php
│ ├── 0001_01_01_000001_create_cache_table.php
│ ├── 2019_12_14_000001_create_personal_access_tokens_table.php
│ ├── 2023_06_11_045946_create_activity_log_table.php
│ ├── 2024_10_06_140359_create_filament_exceptions_table.php
│ ├── 2024_02_22_175500_add_schedule_history_settings_to_schedules_table.php
│ ├── 2019_07_15_000000_create_firewall_logs_table.php
│ ├── 2024_09_14_175713_create_media_table.php
│ ├── 2023_06_09_041831_create_filament-jobs-monitor_table.php
│ ├── 2023_05_06_234044_add_two_factor_columns_to_table.php
│ ├── 2023_09_24_173625_create_breezy_tables.php
│ ├── 2023_02_26_175242_create_schedule_histories_table.php
│ ├── 2024_10_06_203311_create_connected_accounts_table.php
│ ├── 2024_09_21_203047_create_advanced_fields_table.php
│ ├── 0001_01_01_000000_create_users_table.php
│ ├── 0001_01_01_000002_create_jobs_table.php
│ ├── 2023_02_26_172600_create_schedule_table.php
│ └── 2023_12_20_173900_change_status_type_in_schedule_table.php
├── seeders
│ └── DatabaseSeeder.php
└── factories
│ ├── CompanyFactory.php
│ └── UserFactory.php
├── bootstrap
├── cache
│ └── .gitignore
├── providers.php
└── app.php
├── storage
├── logs
│ └── .gitignore
├── app
│ ├── public
│ │ └── .gitignore
│ └── .gitignore
├── debugbar
│ └── .gitignore
└── framework
│ ├── testing
│ └── .gitignore
│ ├── views
│ └── .gitignore
│ ├── cache
│ ├── data
│ │ └── .gitignore
│ └── .gitignore
│ ├── sessions
│ └── .gitignore
│ └── .gitignore
├── pint.json
├── lang
├── vendor
│ └── banner
│ │ └── pt_BR
│ │ ├── banner.php
│ │ └── manager.php
├── pt_BR
│ ├── pagination.php
│ ├── auth.php
│ └── passwords.php
├── en
│ ├── pagination.php
│ ├── auth.php
│ └── passwords.php
└── en.json
├── postcss.config.js
├── tests
├── Unit
│ └── ExampleTest.php
├── Feature
│ └── ExampleTest.php
├── TestCase.php
├── CreatesApplication.php
└── Pest.php
├── app
├── Http
│ └── Controllers
│ │ └── Controller.php
├── Actions
│ └── FilamentCompanies
│ │ ├── DeleteCompany.php
│ │ ├── HandleInvalidState.php
│ │ ├── SetUserPassword.php
│ │ ├── ResolveSocialiteUser.php
│ │ ├── UpdateCompanyName.php
│ │ ├── UpdateUserPassword.php
│ │ ├── CreateCompany.php
│ │ ├── CreateConnectedAccount.php
│ │ ├── UpdateConnectedAccount.php
│ │ ├── DeleteUser.php
│ │ ├── CreateNewUser.php
│ │ ├── RemoveCompanyEmployee.php
│ │ ├── UpdateUserProfileInformation.php
│ │ ├── CreateUserFromProvider.php
│ │ └── AddCompanyEmployee.php
├── Models
│ ├── Employeeship.php
│ ├── CompanyInvitation.php
│ └── ConnectedAccount.php
├── Policies
│ ├── WebhookPolicy.php
│ ├── ConnectedAccountPolicy.php
│ ├── UserPolicy.php
│ ├── IpPolicy.php
│ ├── RolePolicy.php
│ ├── SchedulePolicy.php
│ ├── CompanyPolicy.php
│ ├── ShortURLPolicy.php
│ ├── ExceptionPolicy.php
│ └── QueueMonitorPolicy.php
└── Providers
│ └── AppServiceProvider.php
├── phpstan.neon
├── .prettierrc
├── .vscode
├── extensions.json
└── settings.json
├── .gitattributes
├── routes
├── console.php
├── web.php
├── channels.php
├── api.php
└── tenant.php
├── .editorconfig
├── config
├── filament-saas.php
├── filament-firewall.php
├── filament-cookie-consent.php
├── filament-jobs-monitor.php
├── filament-clear-cache.php
├── filament-webhook-server.php
├── cors.php
├── filament-impersonate.php
├── themes.php
├── view.php
├── filament.php
├── ban.php
├── hashing.php
├── filament-exceptions.php
├── services.php
└── seotools.php
├── artisan
├── .gitignore
├── package.json
├── server.php
├── vite.config.js
├── LICENSE.md
├── phpunit.xml
├── devcontainer.json
├── .env.example
├── docker-compose.yml
├── composer.json
└── CONTRIBUTING.md
/public/js/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/public/css/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/js/app.js:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/database/.gitignore:
--------------------------------------------------------------------------------
1 | *.sqlite*
2 |
--------------------------------------------------------------------------------
/resources/views/layouts/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/views/livewire/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/views/components/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/bootstrap/cache/.gitignore:
--------------------------------------------------------------------------------
1 | *
2 | !.gitignore
3 |
--------------------------------------------------------------------------------
/storage/logs/.gitignore:
--------------------------------------------------------------------------------
1 | *
2 | !.gitignore
3 |
--------------------------------------------------------------------------------
/pint.json:
--------------------------------------------------------------------------------
1 | {
2 | "preset": "laravel"
3 | }
4 |
--------------------------------------------------------------------------------
/storage/app/public/.gitignore:
--------------------------------------------------------------------------------
1 | *
2 | !.gitignore
3 |
--------------------------------------------------------------------------------
/storage/debugbar/.gitignore:
--------------------------------------------------------------------------------
1 | *
2 | !.gitignore
3 |
--------------------------------------------------------------------------------
/storage/app/.gitignore:
--------------------------------------------------------------------------------
1 | *
2 | !public/
3 | !.gitignore
4 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/storage/framework/cache/.gitignore:
--------------------------------------------------------------------------------
1 | *
2 | !data/
3 | !.gitignore
4 |
--------------------------------------------------------------------------------
/public/robots.txt:
--------------------------------------------------------------------------------
1 | User-agent: *
2 | Disallow: /admin/
3 | Disallow: /sysadmin/
4 |
--------------------------------------------------------------------------------
/public/img/og.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/a2insights/filament-saas-template/HEAD/public/img/og.png
--------------------------------------------------------------------------------
/lang/vendor/banner/pt_BR/banner.php:
--------------------------------------------------------------------------------
1 | toBeTrue();
5 | });
6 |
--------------------------------------------------------------------------------
/public/img/social-media.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/a2insights/filament-saas-template/HEAD/public/img/social-media.png
--------------------------------------------------------------------------------
/tests/Feature/ExampleTest.php:
--------------------------------------------------------------------------------
1 | toBeTrue();
5 | });
6 |
--------------------------------------------------------------------------------
/public/images/screenshots/1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/a2insights/filament-saas-template/HEAD/public/images/screenshots/1.png
--------------------------------------------------------------------------------
/public/images/screenshots/2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/a2insights/filament-saas-template/HEAD/public/images/screenshots/2.png
--------------------------------------------------------------------------------
/public/images/screenshots/3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/a2insights/filament-saas-template/HEAD/public/images/screenshots/3.png
--------------------------------------------------------------------------------
/public/images/screenshots/4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/a2insights/filament-saas-template/HEAD/public/images/screenshots/4.png
--------------------------------------------------------------------------------
/public/images/screenshots/5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/a2insights/filament-saas-template/HEAD/public/images/screenshots/5.png
--------------------------------------------------------------------------------
/public/images/screenshots/6.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/a2insights/filament-saas-template/HEAD/public/images/screenshots/6.png
--------------------------------------------------------------------------------
/public/images/screenshots/7.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/a2insights/filament-saas-template/HEAD/public/images/screenshots/7.png
--------------------------------------------------------------------------------
/app/Http/Controllers/Controller.php:
--------------------------------------------------------------------------------
1 | 'Próximo »',
7 | 'previous' => '« Anterior',
8 | ];
9 |
--------------------------------------------------------------------------------
/.prettierrc:
--------------------------------------------------------------------------------
1 | {
2 | "singleQuote": true,
3 | "plugins": [
4 | "prettier-plugin-organize-imports",
5 | "prettier-plugin-tailwindcss"
6 | ]
7 | }
8 |
--------------------------------------------------------------------------------
/lang/en/pagination.php:
--------------------------------------------------------------------------------
1 | 'Next »',
7 | 'previous' => '« Previous',
8 | ];
9 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/.vscode/extensions.json:
--------------------------------------------------------------------------------
1 | {
2 | "recommendations": [
3 | "esbenp.prettier-vscode",
4 | "open-southeners.laravel-pint"
5 | ],
6 | "unwantedRecommendations": []
7 | }
8 |
--------------------------------------------------------------------------------
/public/fonts/filament/filament/inter/inter-greek-wght-normal-AXVTPQD5.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/a2insights/filament-saas-template/HEAD/public/fonts/filament/filament/inter/inter-greek-wght-normal-AXVTPQD5.woff2
--------------------------------------------------------------------------------
/public/fonts/filament/filament/inter/inter-greek-wght-normal-IRE366VL.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/a2insights/filament-saas-template/HEAD/public/fonts/filament/filament/inter/inter-greek-wght-normal-IRE366VL.woff2
--------------------------------------------------------------------------------
/public/fonts/filament/filament/inter/inter-greek-wght-normal-N43DBLU2.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/a2insights/filament-saas-template/HEAD/public/fonts/filament/filament/inter/inter-greek-wght-normal-N43DBLU2.woff2
--------------------------------------------------------------------------------
/public/fonts/filament/filament/inter/inter-latin-wght-normal-NRMW37G5.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/a2insights/filament-saas-template/HEAD/public/fonts/filament/filament/inter/inter-latin-wght-normal-NRMW37G5.woff2
--------------------------------------------------------------------------------
/public/fonts/filament/filament/inter/inter-latin-wght-normal-O25CN4JL.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/a2insights/filament-saas-template/HEAD/public/fonts/filament/filament/inter/inter-latin-wght-normal-O25CN4JL.woff2
--------------------------------------------------------------------------------
/public/fonts/filament/filament/inter/inter-latin-wght-normal-OPIJAQLS.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/a2insights/filament-saas-template/HEAD/public/fonts/filament/filament/inter/inter-latin-wght-normal-OPIJAQLS.woff2
--------------------------------------------------------------------------------
/public/fonts/filament/filament/inter/inter-cyrillic-wght-normal-EWLSKVKN.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/a2insights/filament-saas-template/HEAD/public/fonts/filament/filament/inter/inter-cyrillic-wght-normal-EWLSKVKN.woff2
--------------------------------------------------------------------------------
/public/fonts/filament/filament/inter/inter-cyrillic-wght-normal-JEOLYBOO.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/a2insights/filament-saas-template/HEAD/public/fonts/filament/filament/inter/inter-cyrillic-wght-normal-JEOLYBOO.woff2
--------------------------------------------------------------------------------
/public/fonts/filament/filament/inter/inter-cyrillic-wght-normal-R5CMSONN.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/a2insights/filament-saas-template/HEAD/public/fonts/filament/filament/inter/inter-cyrillic-wght-normal-R5CMSONN.woff2
--------------------------------------------------------------------------------
/public/fonts/filament/filament/inter/inter-greek-ext-wght-normal-7GGTF7EK.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/a2insights/filament-saas-template/HEAD/public/fonts/filament/filament/inter/inter-greek-ext-wght-normal-7GGTF7EK.woff2
--------------------------------------------------------------------------------
/public/fonts/filament/filament/inter/inter-greek-ext-wght-normal-EOVOK2B5.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/a2insights/filament-saas-template/HEAD/public/fonts/filament/filament/inter/inter-greek-ext-wght-normal-EOVOK2B5.woff2
--------------------------------------------------------------------------------
/public/fonts/filament/filament/inter/inter-greek-ext-wght-normal-ZEVLMORV.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/a2insights/filament-saas-template/HEAD/public/fonts/filament/filament/inter/inter-greek-ext-wght-normal-ZEVLMORV.woff2
--------------------------------------------------------------------------------
/public/fonts/filament/filament/inter/inter-latin-ext-wght-normal-5SRY4DMZ.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/a2insights/filament-saas-template/HEAD/public/fonts/filament/filament/inter/inter-latin-ext-wght-normal-5SRY4DMZ.woff2
--------------------------------------------------------------------------------
/public/fonts/filament/filament/inter/inter-latin-ext-wght-normal-GZCIV3NH.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/a2insights/filament-saas-template/HEAD/public/fonts/filament/filament/inter/inter-latin-ext-wght-normal-GZCIV3NH.woff2
--------------------------------------------------------------------------------
/public/fonts/filament/filament/inter/inter-latin-ext-wght-normal-HA22NDSG.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/a2insights/filament-saas-template/HEAD/public/fonts/filament/filament/inter/inter-latin-ext-wght-normal-HA22NDSG.woff2
--------------------------------------------------------------------------------
/public/fonts/filament/filament/inter/inter-cyrillic-ext-wght-normal-ASVAGXXE.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/a2insights/filament-saas-template/HEAD/public/fonts/filament/filament/inter/inter-cyrillic-ext-wght-normal-ASVAGXXE.woff2
--------------------------------------------------------------------------------
/public/fonts/filament/filament/inter/inter-cyrillic-ext-wght-normal-IYF56FF6.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/a2insights/filament-saas-template/HEAD/public/fonts/filament/filament/inter/inter-cyrillic-ext-wght-normal-IYF56FF6.woff2
--------------------------------------------------------------------------------
/public/fonts/filament/filament/inter/inter-cyrillic-ext-wght-normal-XKHXBTUO.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/a2insights/filament-saas-template/HEAD/public/fonts/filament/filament/inter/inter-cyrillic-ext-wght-normal-XKHXBTUO.woff2
--------------------------------------------------------------------------------
/public/fonts/filament/filament/inter/inter-vietnamese-wght-normal-CE5GGD3W.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/a2insights/filament-saas-template/HEAD/public/fonts/filament/filament/inter/inter-vietnamese-wght-normal-CE5GGD3W.woff2
--------------------------------------------------------------------------------
/public/fonts/filament/filament/inter/inter-vietnamese-wght-normal-TWG5UU7E.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/a2insights/filament-saas-template/HEAD/public/fonts/filament/filament/inter/inter-vietnamese-wght-normal-TWG5UU7E.woff2
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
1 | * text=auto eol=lf
2 |
3 | *.blade.php diff=html
4 | *.css diff=css
5 | *.html diff=html
6 | *.md diff=markdown
7 | *.php diff=php
8 |
9 | /.github export-ignore
10 | CHANGELOG.md export-ignore
11 | .styleci.yml export-ignore
12 |
--------------------------------------------------------------------------------
/routes/console.php:
--------------------------------------------------------------------------------
1 | comment(Inspiring::quote());
8 | })->purpose('Display an inspiring quote');
9 |
--------------------------------------------------------------------------------
/bootstrap/providers.php:
--------------------------------------------------------------------------------
1 | 'These credentials do not match our records.',
7 | 'password' => 'The provided password is incorrect.',
8 | 'throttle' => 'Too many login attempts. Please try again in :seconds seconds.',
9 | ];
10 |
--------------------------------------------------------------------------------
/tests/TestCase.php:
--------------------------------------------------------------------------------
1 | migrator->add('sitemap_settings.pages', []);
10 | }
11 | };
12 |
--------------------------------------------------------------------------------
/.editorconfig:
--------------------------------------------------------------------------------
1 | root = true
2 |
3 | [*]
4 | charset = utf-8
5 | end_of_line = lf
6 | indent_size = 4
7 | indent_style = space
8 | insert_final_newline = true
9 | trim_trailing_whitespace = true
10 |
11 | [*.md]
12 | trim_trailing_whitespace = false
13 |
14 | [*.{yml,yaml}]
15 | indent_size = 2
16 |
17 | [docker-compose.yml]
18 | indent_size = 4
19 |
--------------------------------------------------------------------------------
/config/filament-saas.php:
--------------------------------------------------------------------------------
1 | [
5 | 'model' => App\Models\User::class,
6 | 'resource' => A2Insights\FilamentSaas\User\Filament\UserResource::class,
7 | 'tenant_scope' => false,
8 | ],
9 |
10 | 'companies' => [
11 | 'model' => App\Models\Company::class,
12 | ],
13 | ];
14 |
--------------------------------------------------------------------------------
/lang/pt_BR/auth.php:
--------------------------------------------------------------------------------
1 | 'As credenciais indicadas não coincidem com as registradas no sistema.',
7 | 'password' => 'A senha está errada.',
8 | 'throttle' => 'O número limite de tentativas de login foi atingido. Por favor, tente novamente dentro de :seconds segundos.',
9 | ];
10 |
--------------------------------------------------------------------------------
/lang/en/passwords.php:
--------------------------------------------------------------------------------
1 | 'Your password has been reset.',
7 | 'sent' => 'We have emailed your password reset link.',
8 | 'throttled' => 'Please wait before retrying.',
9 | 'token' => 'This password reset token is invalid.',
10 | 'user' => 'We can\'t find a user with that email address.',
11 | ];
12 |
--------------------------------------------------------------------------------
/artisan:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env php
2 | handleCommand(new ArgvInput);
14 |
15 | exit($status);
16 |
--------------------------------------------------------------------------------
/lang/pt_BR/passwords.php:
--------------------------------------------------------------------------------
1 | 'A senha foi redefinida!',
7 | 'sent' => 'O lembrete de senha foi enviado!',
8 | 'throttled' => 'Por favor, aguarde antes de tentar novamente.',
9 | 'token' => 'Este código de recuperação de senha é inválido.',
10 | 'user' => 'Não existe nenhum usuário com o e-mail indicado.',
11 | ];
12 |
--------------------------------------------------------------------------------
/app/Actions/FilamentCompanies/DeleteCompany.php:
--------------------------------------------------------------------------------
1 | purge();
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/config/filament-firewall.php:
--------------------------------------------------------------------------------
1 | [
8 | 'ip' => Ip::class,
9 | ],
10 | 'resources' => [
11 | FirewallIpResource::class,
12 | ],
13 | 'skip_whitelist_range' => [
14 | '127.0.0.1',
15 | '172.16.0.0/12',
16 | ],
17 | ];
18 |
--------------------------------------------------------------------------------
/resources/css/filament/sysadmin/theme.css:
--------------------------------------------------------------------------------
1 | @import '../../../../vendor/filament/filament/resources/css/theme.css';
2 |
3 | @source '../../../../vendor/kenepa/banner/resources/**/*.blade.php';
4 | @source '../../../../vendor/a2insights/filament-saas/resources/**/*.blade.php';
5 | @source '../../../../app/Filament/**/*';
6 | @source '../../../../resources/views/filament/**/*';
7 | @source '../../../../vendor/andrewdwallo/filament-companies/resources/views';
8 |
9 |
--------------------------------------------------------------------------------
/routes/web.php:
--------------------------------------------------------------------------------
1 | 'end',
6 |
7 | 'consent_button' => [
8 | 'size' => 'sm',
9 | 'color' => 'warning',
10 | ],
11 |
12 | 'privacy_policy_button' => [
13 | 'enabled' => true,
14 | 'href' => '/privacy-policy',
15 | 'size' => 'sm',
16 | 'color' => 'gray',
17 | 'target' => '_blank',
18 | ],
19 | ];
20 |
--------------------------------------------------------------------------------
/app/Models/Employeeship.php:
--------------------------------------------------------------------------------
1 | migrator->add('recaptcha_settings.project_id', false);
10 | $this->migrator->add('recaptcha_settings.site_key', null);
11 | $this->migrator->add('recaptcha_settings.secret_key', null);
12 | }
13 | };
14 |
--------------------------------------------------------------------------------
/database/settings/2023_06_18_084228_create_whatsapp_chat_settings.php:
--------------------------------------------------------------------------------
1 | migrator->add('whatsapp_chat_settings.attendants', []);
10 | $this->migrator->add('whatsapp_chat_settings.header', null);
11 | $this->migrator->add('whatsapp_chat_settings.footer', null);
12 | }
13 | };
14 |
--------------------------------------------------------------------------------
/tests/CreatesApplication.php:
--------------------------------------------------------------------------------
1 | make(Kernel::class)->bootstrap();
18 |
19 | return $app;
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/database/migrations/2025_01_24_015035_create_banner_table.php:
--------------------------------------------------------------------------------
1 | id();
13 | $table->json('data');
14 | $table->timestamps();
15 | });
16 | }
17 | };
18 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | /.phpunit.cache
2 | /node_modules
3 | /public/build
4 | /public/js
5 | /public/css
6 | /public/vendor
7 | /public/hot
8 | /public/storage
9 | /public/sitemap.xml
10 | /public/robots.txt
11 | /storage/*.key
12 | /vendor
13 | .env
14 | .env.backup
15 | .env.production
16 | .phpactor.json
17 | .phpunit.result.cache
18 | Homestead.json
19 | Homestead.yaml
20 | auth.json
21 | npm-debug.log
22 | yarn-error.log
23 | /.fleet
24 | /.idea
25 | /.vscode
26 | .blueprint
27 | /bootstrap/ssr/*
28 | /storage/company_*
29 | /filament-saas
30 | /filament-stripe
31 |
--------------------------------------------------------------------------------
/config/filament-jobs-monitor.php:
--------------------------------------------------------------------------------
1 | [
5 | 'enabled' => true,
6 | 'label' => 'Job',
7 | 'plural_label' => 'Jobs',
8 | 'navigation_group' => 'Settings',
9 | 'navigation_icon' => 'heroicon-o-cpu-chip',
10 | 'navigation_sort' => null,
11 | 'navigation_count_badge' => false,
12 | 'resource' => Croustibat\FilamentJobsMonitor\Resources\QueueMonitorResource::class,
13 | ],
14 | 'pruning' => [
15 | 'enabled' => true,
16 | 'retention_days' => 7,
17 | ],
18 | ];
19 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "private": true,
3 | "type": "module",
4 | "scripts": {
5 | "build": "vite build",
6 | "dev": "vite"
7 | },
8 | "devDependencies": {
9 | "@alpinejs/focus": "^3.10.3",
10 | "@tailwindcss/vite": "^4.1.11",
11 | "alpinejs": "^3.10.3",
12 | "autoprefixer": "^10.4.14",
13 | "laravel-vite-plugin": "^1.0.0",
14 | "postcss": "^8.4.28",
15 | "postcss-nesting": "^12.0.1",
16 | "tailwindcss": "^4.1.11",
17 | "tippy.js": "^6.3.7",
18 | "vite": "^5.0.0"
19 | }
20 | }
--------------------------------------------------------------------------------
/config/filament-clear-cache.php:
--------------------------------------------------------------------------------
1 | [
6 | 'optimize:clear',
7 | 'optimize',
8 | ],
9 |
10 | // Session name for the indicator count
11 | 'changes_count' => 'session_key',
12 |
13 | // Livewire component for clear cache button in header.
14 | 'livewireComponentClass' => CmsMulti\FilamentClearCache\Http\Livewire\ClearCache::class,
15 |
16 | // Permissions check
17 | 'permissions' => false,
18 |
19 | // Role check
20 | 'role' => 'super_admin',
21 | ];
22 |
--------------------------------------------------------------------------------
/config/filament-webhook-server.php:
--------------------------------------------------------------------------------
1 | [
10 | // \App\Models\User::class,
11 | ],
12 | /*
13 | */
14 | 'polling' => '10s',
15 | 'webhook' => [
16 | 'keep_history' => true,
17 | ],
18 | 'pages' => [
19 | \A2Insights\FilamentSaas\Webhook\Filament\Pages\Webhooks::class,
20 | \A2Insights\FilamentSaas\Webhook\Filament\Pages\WebhookHistory::class,
21 | ],
22 | ];
23 |
--------------------------------------------------------------------------------
/database/migrations/2023_05_07_064131_create_stats_tables.php:
--------------------------------------------------------------------------------
1 | id();
13 |
14 | $table->string('name');
15 | $table->string('type');
16 | $table->bigInteger('value');
17 |
18 | $table->timestamps();
19 | });
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/database/seeders/DatabaseSeeder.php:
--------------------------------------------------------------------------------
1 | create();
17 |
18 | // \App\Models\User::factory()->create([
19 | // 'name' => 'Test User',
20 | // 'email' => 'test@example.com',
21 | // ]);
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/server.php:
--------------------------------------------------------------------------------
1 |
7 | */
8 | $uri = urldecode(
9 | parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH)
10 | );
11 |
12 | // This file allows us to emulate Apache's "mod_rewrite" functionality from the
13 | // built-in PHP web server. This provides a convenient way to test a Laravel
14 | // application without having installed a "real" web server software here.
15 | if ($uri !== '/' && file_exists(__DIR__.'/public'.$uri)) {
16 | return false;
17 | }
18 |
19 | require_once __DIR__.'/public/index.php';
20 |
--------------------------------------------------------------------------------
/public/index.php:
--------------------------------------------------------------------------------
1 | handleRequest(Request::capture());
21 |
--------------------------------------------------------------------------------
/routes/channels.php:
--------------------------------------------------------------------------------
1 | id === (int) $id;
18 | });
19 |
--------------------------------------------------------------------------------
/routes/api.php:
--------------------------------------------------------------------------------
1 | get('/user', function (Request $request) {
18 | return $request->user();
19 | });
20 |
--------------------------------------------------------------------------------
/app/Actions/FilamentCompanies/HandleInvalidState.php:
--------------------------------------------------------------------------------
1 | integer('prefix_size')->nullable()->after('ip');
13 | });
14 | }
15 |
16 | public function down(): void
17 | {
18 | Schema::table('firewall_ips', function (Blueprint $table) {
19 | $table->dropColumn('prefix_size');
20 | });
21 | }
22 | };
23 |
--------------------------------------------------------------------------------
/database/migrations/2023_06_10_050524_add_banned_at_column_to_users_table.php:
--------------------------------------------------------------------------------
1 | timestamp('banned_at')->after('updated_at')->nullable();
13 | });
14 | }
15 |
16 | public function down(): void
17 | {
18 | Schema::table('users', function (Blueprint $table) {
19 | $table->dropColumn('banned_at');
20 | });
21 | }
22 | };
23 |
--------------------------------------------------------------------------------
/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/Models/CompanyInvitation.php:
--------------------------------------------------------------------------------
1 |
15 | */
16 | protected $fillable = [
17 | 'email',
18 | 'role',
19 | ];
20 |
21 | /**
22 | * Get the company that the invitation belongs to.
23 | */
24 | public function company(): BelongsTo
25 | {
26 | return $this->belongsTo(FilamentCompanies::companyModel());
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/vite.config.js:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vite'
2 | import laravel, { refreshPaths } from 'laravel-vite-plugin'
3 | import tailwindcss from '@tailwindcss/vite'
4 |
5 | export default defineConfig({
6 | plugins: [
7 | laravel({
8 | input: ['resources/css/filament/sysadmin/theme.css'],
9 | refresh: [
10 | ...refreshPaths,
11 | 'app/Filament/**',
12 | 'app/Forms/Components/**',
13 | 'app/Livewire/**',
14 | 'app/Infolists/Components/**',
15 | 'app/Providers/Filament/**',
16 | 'app/Tables/Columns/**',
17 | ],
18 | }),
19 | tailwindcss(),
20 | ],
21 | })
22 |
--------------------------------------------------------------------------------
/database/settings/2023_06_12_165809_create_terms_settings.php:
--------------------------------------------------------------------------------
1 | migrator->add('terms_settings.service', $this->termsOfService());
10 | $this->migrator->add('terms_settings.privacy_policy', $this->privacyPolicy());
11 | }
12 |
13 | private function termsOfService(): string
14 | {
15 | return file_get_contents(resource_path('markdown/terms.md'));
16 | }
17 |
18 | private function privacyPolicy(): string
19 | {
20 | return file_get_contents(resource_path('markdown/policy.md'));
21 | }
22 | };
23 |
--------------------------------------------------------------------------------
/database/migrations/2023_06_09_011357_add_deleted_at_to_users_table.php:
--------------------------------------------------------------------------------
1 | softDeletes()->after('updated_at');
16 | });
17 | }
18 |
19 | /**
20 | * Reverse the migrations.
21 | */
22 | public function down(): void
23 | {
24 | Schema::table('users', function (Blueprint $table) {
25 | $table->dropSoftDeletes();
26 | });
27 | }
28 | };
29 |
--------------------------------------------------------------------------------
/database/migrations/2023_10_11_042116_add_themes_settings_to_users_table.php:
--------------------------------------------------------------------------------
1 | string('theme')->nullable()->default('default')->after('settings');
13 | $table->string('theme_color')->nullable()->after('theme');
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 |
--------------------------------------------------------------------------------
/database/migrations/2023_10_22_045259_add_phone_column_to_users_table.php:
--------------------------------------------------------------------------------
1 | string('phone')->nullable()->after('email');
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('phone');
26 | });
27 | }
28 | };
29 |
--------------------------------------------------------------------------------
/app/Actions/FilamentCompanies/SetUserPassword.php:
--------------------------------------------------------------------------------
1 | ['required', 'string', 'min:8', 'confirmed'],
19 | ])->validateWithBag('setPassword');
20 |
21 | $user->forceFill([
22 | 'password' => Hash::make($input['password']),
23 | ])->save();
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/database/migrations/2023_06_08_043708_add_settings_user.php:
--------------------------------------------------------------------------------
1 | json('settings')->nullable()->after('remember_token');
16 | });
17 | }
18 |
19 | /**
20 | * Reverse the migrations.
21 | */
22 | public function down(): void
23 | {
24 | Schema::table('users', function (Blueprint $table): void {
25 | $table->dropColumn('settings');
26 | });
27 | }
28 | };
29 |
--------------------------------------------------------------------------------
/database/migrations/2023_09_24_173451_add_avatar_url_column_to_users_table.php:
--------------------------------------------------------------------------------
1 | string('avatar_url')->nullable()->after('email');
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 |
--------------------------------------------------------------------------------
/database/migrations/2023_10_22_160311_add_username_column_to_users_table.php:
--------------------------------------------------------------------------------
1 | string('username')->nullable()->unique()->after('name');
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('username');
26 | });
27 | }
28 | };
29 |
--------------------------------------------------------------------------------
/app/Actions/FilamentCompanies/ResolveSocialiteUser.php:
--------------------------------------------------------------------------------
1 | user();
18 |
19 | if (Feature::GenerateMissingEmails->isEnabled()) {
20 | $user->email = $user->getEmail() ?? ("{$user->id}@{$provider}".config('app.domain'));
21 | }
22 |
23 | return $user;
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/database/settings/2023_05_07_081639_create_app_features.php:
--------------------------------------------------------------------------------
1 | migrator->add('features.dark_mode', true);
10 | $this->migrator->add('features.auth_registration', true);
11 | $this->migrator->add('features.auth_login', true);
12 | $this->migrator->add('features.auth_2fa', false);
13 | $this->migrator->add('features.whatsapp_chat', false);
14 | $this->migrator->add('features.recaptcha', false);
15 | $this->migrator->add('features.user_phone', false);
16 | $this->migrator->add('features.username', false);
17 | $this->migrator->add('features.switch_language', true);
18 | }
19 | };
20 |
--------------------------------------------------------------------------------
/database/migrations/2021_12_31_052353_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 | public function down()
26 | {
27 | Schema::dropIfExists('settings');
28 | }
29 | };
30 |
--------------------------------------------------------------------------------
/database/factories/CompanyFactory.php:
--------------------------------------------------------------------------------
1 |
22 | */
23 | public function definition(): array
24 | {
25 | return [
26 | 'name' => $this->faker->unique()->company(),
27 | 'user_id' => User::factory(),
28 | 'personal_company' => true,
29 | 'data' => ['info' => 'Some data'],
30 | ];
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/database/migrations/2019_09_15_000010_create_tenants_table.php:
--------------------------------------------------------------------------------
1 | string('id')->primary();
18 |
19 | // your custom columns may go here
20 |
21 | $table->timestamps();
22 | $table->json('data')->nullable();
23 | });
24 | }
25 |
26 | /**
27 | * Reverse the migrations.
28 | */
29 | public function down(): void
30 | {
31 | Schema::dropIfExists('tenants');
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/database/migrations/2023_06_11_045947_add_event_column_to_activity_log_table.php:
--------------------------------------------------------------------------------
1 | table(config('activitylog.table_name'), function (Blueprint $table) {
13 | // $table->string('event')->nullable()->after('subject_type');
14 | // });
15 | }
16 |
17 | public function down()
18 | {
19 | Schema::connection(config('activitylog.database_connection'))->table(config('activitylog.table_name'), function (Blueprint $table) {
20 | $table->dropColumn('event');
21 | });
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/resources/views/layouts/app.blade.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 | {{ config('app.name') }}
11 |
12 |
17 |
18 | @filamentStyles
19 | @vite('resources/css/app.css')
20 |
21 |
22 |
23 | {{ $slot }}
24 |
25 | @livewire('notifications')
26 |
27 | @filamentScripts
28 | @vite('resources/js/app.js')
29 |
30 |
31 |
--------------------------------------------------------------------------------
/database/migrations/2023_06_11_045948_add_batch_uuid_column_to_activity_log_table.php:
--------------------------------------------------------------------------------
1 | table(config('activitylog.table_name'), function (Blueprint $table) {
13 | // $table->uuid('batch_uuid')->nullable()->after('properties');
14 | // });
15 | }
16 |
17 | public function down()
18 | {
19 | Schema::connection(config('activitylog.database_connection'))->table(config('activitylog.table_name'), function (Blueprint $table) {
20 | $table->dropColumn('batch_uuid');
21 | });
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/database/migrations/2023_05_07_063935_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 |
--------------------------------------------------------------------------------
/.vscode/settings.json:
--------------------------------------------------------------------------------
1 | {
2 | /* Formatters */
3 | "[php]": {
4 | "editor.defaultFormatter": "open-southeners.laravel-pint"
5 | },
6 | "[javascript]": {
7 | "editor.defaultFormatter": "esbenp.prettier-vscode"
8 | },
9 | "[typescript]": {
10 | "editor.defaultFormatter": "esbenp.prettier-vscode"
11 | },
12 | "[json]": {
13 | "editor.defaultFormatter": "vscode.json-language-features"
14 | },
15 | "[jsonc]": {
16 | "editor.defaultFormatter": "esbenp.prettier-vscode"
17 | },
18 | "[vue]": {
19 | "editor.defaultFormatter": "Vue.volar"
20 | },
21 |
22 | /* Editor */
23 | "editor.formatOnSave": true,
24 |
25 | /* Laravel Pint */
26 | "laravel-pint.enable": true,
27 | "laravel-pint.executablePath": "./vendor/bin/pint",
28 | "laravel-pint.configPath": "pint.json",
29 | "laravel-pint.enableDebugLogs": true,
30 | }
31 |
--------------------------------------------------------------------------------
/database/migrations/2024_10_06_133024_create_companies_table.php:
--------------------------------------------------------------------------------
1 | id();
16 | $table->foreignId('user_id')->constrained()->cascadeOnDelete();
17 | $table->string('name');
18 | $table->boolean('personal_company');
19 | $table->json('data')->nullable();
20 | $table->timestamps();
21 | });
22 | }
23 |
24 | /**
25 | * Reverse the migrations.
26 | */
27 | public function down(): void
28 | {
29 | Schema::dropIfExists('companies');
30 | }
31 | };
32 |
--------------------------------------------------------------------------------
/database/migrations/2023_06_09_035017_create_filament-webhook_server_table.php:
--------------------------------------------------------------------------------
1 | id();
13 | $table->string('name');
14 | $table->longText('description');
15 | $table->string('url');
16 | $table->string('method');
17 | $table->string('model');
18 | $table->json('header')->nullable();
19 | $table->string('data_option');
20 | $table->boolean('verifySsl');
21 | $table->string('status')->nullable();
22 | $table->json('events')->nullable();
23 | $table->timestamps();
24 | });
25 | }
26 | };
27 |
--------------------------------------------------------------------------------
/database/migrations/2022_03_05_031633_create_tag_tables.php:
--------------------------------------------------------------------------------
1 | id();
13 |
14 | $table->json('name');
15 | $table->json('slug');
16 | $table->string('type')->nullable();
17 | $table->integer('order_column')->nullable();
18 |
19 | $table->timestamps();
20 | });
21 |
22 | Schema::create('taggables', function (Blueprint $table) {
23 | $table->foreignId('tag_id')->constrained()->cascadeOnDelete();
24 |
25 | $table->morphs('taggable');
26 |
27 | $table->unique(['tag_id', 'taggable_id', 'taggable_type']);
28 | });
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/database/migrations/2024_10_06_203306_create_company_invitations_table.php:
--------------------------------------------------------------------------------
1 | id();
16 | $table->foreignId('company_id')->constrained()->cascadeOnDelete();
17 | $table->string('email');
18 | $table->string('role')->nullable();
19 | $table->timestamps();
20 |
21 | $table->unique(['company_id', 'email']);
22 | });
23 | }
24 |
25 | /**
26 | * Reverse the migrations.
27 | */
28 | public function down(): void
29 | {
30 | Schema::dropIfExists('company_invitations');
31 | }
32 | };
33 |
--------------------------------------------------------------------------------
/routes/tenant.php:
--------------------------------------------------------------------------------
1 | group(function () {
26 | Route::get('/', function () {
27 | return 'This is your multi-tenant application. The id of the current tenant is '.tenant('id');
28 | });
29 | });
30 |
--------------------------------------------------------------------------------
/database/migrations/2019_07_15_000000_create_firewall_ips_table.php:
--------------------------------------------------------------------------------
1 | increments('id');
17 | $table->string('ip');
18 | $table->integer('log_id')->nullable();
19 | $table->boolean('blocked')->default(1);
20 | $table->timestamps();
21 | $table->softDeletes();
22 |
23 | $table->index('ip');
24 | });
25 | }
26 |
27 | /**
28 | * Reverse the migrations.
29 | *
30 | * @return void
31 | */
32 | public function down()
33 | {
34 | Schema::drop('firewall_ips');
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/database/migrations/2019_09_15_000020_create_domains_table.php:
--------------------------------------------------------------------------------
1 | increments('id');
18 | $table->string('domain', 255)->unique();
19 | $table->string('tenant_id');
20 |
21 | $table->timestamps();
22 | $table->foreign('tenant_id')->references('id')->on('tenants')->onUpdate('cascade')->onDelete('cascade');
23 | });
24 | }
25 |
26 | /**
27 | * Reverse the migrations.
28 | */
29 | public function down(): void
30 | {
31 | Schema::dropIfExists('domains');
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/database/migrations/2024_10_06_133025_create_company_user_table.php:
--------------------------------------------------------------------------------
1 | id();
16 | $table->foreignId('company_id')->constrained()->cascadeOnDelete();
17 | $table->foreignId('user_id')->constrained()->cascadeOnDelete();
18 | $table->string('role')->nullable();
19 | $table->timestamps();
20 |
21 | $table->unique(['company_id', 'user_id']);
22 | });
23 | }
24 |
25 | /**
26 | * Reverse the migrations.
27 | */
28 | public function down(): void
29 | {
30 | Schema::dropIfExists('company_user');
31 | }
32 | };
33 |
--------------------------------------------------------------------------------
/config/cors.php:
--------------------------------------------------------------------------------
1 | ['api/*', 'sanctum/csrf-cookie'],
19 |
20 | 'allowed_methods' => ['*'],
21 |
22 | 'allowed_origins' => ['*'],
23 |
24 | 'allowed_origins_patterns' => [],
25 |
26 | 'allowed_headers' => ['*'],
27 |
28 | 'exposed_headers' => [],
29 |
30 | 'max_age' => 0,
31 |
32 | 'supports_credentials' => false,
33 |
34 | ];
35 |
--------------------------------------------------------------------------------
/database/migrations/2023_06_09_035018_2023_01_19_144816_create_filament_webhook_server_histories_table.php:
--------------------------------------------------------------------------------
1 | id();
13 | $table->foreignId('webhook_client')->nullable();
14 | $table->uuid('uuid');
15 | $table->string('status_code')->nullable();
16 | $table->text('errorMessage')->nullable();
17 | $table->string('errorType')->nullable();
18 | $table->integer('attempt')->nullable();
19 | $table->timestamps();
20 | });
21 | }
22 |
23 | public function down()
24 | {
25 | Schema::dropIfExists('filament_webhook_server_histories');
26 | }
27 | };
28 |
--------------------------------------------------------------------------------
/app/Policies/WebhookPolicy.php:
--------------------------------------------------------------------------------
1 | increments('id');
14 | $table->morphs('bannable');
15 | $table->nullableMorphs('created_by');
16 | $table->text('comment')->nullable();
17 | $table->timestamp('expired_at')->nullable();
18 | $table->softDeletes();
19 | $table->timestamps();
20 |
21 | $table->index('expired_at');
22 | });
23 | }
24 | }
25 |
26 | public function down(): void
27 | {
28 | if (Schema::hasTable('bans')) {
29 | Schema::dropIfExists('bans');
30 | }
31 | }
32 | };
33 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/database/migrations/2019_12_14_000001_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 |
--------------------------------------------------------------------------------
/app/Actions/FilamentCompanies/UpdateCompanyName.php:
--------------------------------------------------------------------------------
1 | $input
18 | *
19 | * @throws AuthorizationException
20 | */
21 | public function update(User $user, Company $company, array $input): void
22 | {
23 | Gate::forUser($user)->authorize('update', $company);
24 |
25 | Validator::make($input, [
26 | 'name' => ['required', 'string', 'max:255'],
27 | ])->validateWithBag('updateCompanyName');
28 |
29 | $company->forceFill([
30 | 'name' => $input['name'],
31 | ])->save();
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/config/filament-impersonate.php:
--------------------------------------------------------------------------------
1 | env('FILAMENT_IMPERSONATE_GUARD', 'web'),
8 |
9 | // After impersonating this is where we'll redirect you to.
10 | 'redirect_to' => env('FILAMENT_IMPERSONATE_REDIRECT', '/admin'),
11 |
12 | // We wire up a route for the "leave" button. You can change the middleware stack here if needed.
13 | 'leave_middlewares' => [
14 | env('FILAMENT_IMPERSONATE_LEAVE_MIDDLEWARE', 'web'),
15 | ],
16 |
17 | 'banner' => [
18 | // Currently supports 'dark' and 'light'.
19 | 'style' => env('FILAMENT_IMPERSONATE_BANNER_STYLE', 'dark'),
20 |
21 | // Turn this off if you want `absolute` positioning, so the banner scrolls out of view
22 | 'fixed' => env('FILAMENT_IMPERSONATE_BANNER_FIXED', true),
23 |
24 | // Currently supports 'top' and 'bottom'.
25 | 'position' => env('FILAMENT_IMPERSONATE_BANNER_POSITION', 'top'),
26 | ],
27 | ];
28 |
--------------------------------------------------------------------------------
/app/Actions/FilamentCompanies/UpdateUserPassword.php:
--------------------------------------------------------------------------------
1 | $input
16 | */
17 | public function update(User $user, array $input): void
18 | {
19 | Validator::make($input, [
20 | 'current_password' => ['required', 'string', 'current_password:web'],
21 | 'password' => ['required', 'string', 'min:8', 'confirmed'],
22 | ], [
23 | 'current_password.current_password' => __('filament-companies::default.errors.password_does_not_match'),
24 | ])->validateWithBag('updatePassword');
25 |
26 | $user->forceFill([
27 | 'password' => Hash::make($input['password']),
28 | ])->save();
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/resources/css/app.css:
--------------------------------------------------------------------------------
1 | @import 'tailwindcss';
2 | @import '../../vendor/filament/support/resources/css/index.css';
3 | @import '../../vendor/filament/actions/resources/css/index.css';
4 | @import '../../vendor/filament/forms/resources/css/index.css';
5 | @import '../../vendor/filament/infolists/resources/css/index.css';
6 | @import '../../vendor/filament/notifications/resources/css/index.css';
7 | @import '../../vendor/filament/schemas/resources/css/index.css';
8 | @import '../../vendor/filament/tables/resources/css/index.css';
9 | @import '../../vendor/filament/widgets/resources/css/index.css';
10 |
11 | @source '../../vendor/laravel/framework/src/Illuminate/Pagination/resources/views/*.blade.php';
12 | @source '../../storage/framework/views/*.php';
13 | @source '../**/*.blade.php';
14 | @source '../**/*.js';
15 | @source '../**/*.vue';
16 |
17 | @theme {
18 | --font-sans:
19 | 'Instrument Sans', ui-sans-serif, system-ui, sans-serif,
20 | 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol',
21 | 'Noto Color Emoji';
22 | }
23 |
24 | @variant dark (&:where(.dark, .dark *));
25 |
--------------------------------------------------------------------------------
/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 | $middleware->web(append: [
16 | \Illuminate\Http\Middleware\AddLinkHeadersForPreloadedAssets::class,
17 | \A2Insights\FilamentSaas\Settings\Http\Middleware\Locale::class,
18 | ]);
19 |
20 | // TODO: needs to reinstall hasnayeen/themes
21 | // $middleware->append(\Hasnayeen\Themes\Http\Middleware\SetTheme::class);
22 | // $middleware->append(\SolutionForest\FilamentFirewall\Middleware\WhitelistRangeMiddleware::class);
23 | })
24 | ->withExceptions(function (Exceptions $exceptions) {
25 | //
26 | })->create();
27 |
--------------------------------------------------------------------------------
/LICENSE.md:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) A2Insights
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/database/migrations/2023_06_11_045946_create_activity_log_table.php:
--------------------------------------------------------------------------------
1 | create(config('activitylog.table_name'), function (Blueprint $table) {
13 | // $table->bigIncrements('id');
14 | // $table->string('log_name')->nullable();
15 | // $table->text('description');
16 | // $table->nullableMorphs('subject', 'subject');
17 | // $table->nullableMorphs('causer', 'causer');
18 | // $table->json('properties')->nullable();
19 | // $table->timestamps();
20 | // $table->index('log_name');
21 | // });
22 | }
23 |
24 | public function down()
25 | {
26 | Schema::connection(config('activitylog.database_connection'))->dropIfExists(config('activitylog.table_name'));
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/database/migrations/2024_10_06_140359_create_filament_exceptions_table.php:
--------------------------------------------------------------------------------
1 | id();
13 | $table->string('type', 255);
14 | $table->string('code');
15 | $table->longText('message', 255);
16 | $table->string('file', 255);
17 | $table->integer('line');
18 | $table->text('trace');
19 | $table->string('method');
20 | $table->string('path', 255);
21 | $table->text('query');
22 | $table->text('body');
23 | $table->text('cookies');
24 | $table->text('headers');
25 | $table->string('ip');
26 | $table->timestamps();
27 | });
28 | }
29 |
30 | public function down()
31 | {
32 | Schema::drop('filament_exceptions_table');
33 | }
34 | };
35 |
--------------------------------------------------------------------------------
/database/migrations/2024_02_22_175500_add_schedule_history_settings_to_schedules_table.php:
--------------------------------------------------------------------------------
1 | boolean('limit_history_count')->default(false);
19 | $table->integer('max_history_count')->default(10);
20 | });
21 | }
22 |
23 | /**
24 | * Reverse the migrations.
25 | *
26 | * @return void
27 | */
28 | public function down()
29 | {
30 | Schema::table(Config::get('filament-database-schedule.table.schedules', 'schedules'), function (Blueprint $table) {
31 | $table->dropColumn(['limit_history_count','max_history_count']);
32 | });
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/database/migrations/2019_07_15_000000_create_firewall_logs_table.php:
--------------------------------------------------------------------------------
1 | increments('id');
17 | $table->string('ip');
18 | $table->string('level')->default('medium');
19 | $table->string('middleware');
20 | $table->integer('user_id')->nullable();
21 | $table->text('url')->nullable();
22 | $table->string('referrer')->nullable();
23 | $table->text('request')->nullable();
24 | $table->timestamps();
25 | $table->softDeletes();
26 |
27 | $table->index('ip');
28 | });
29 | }
30 |
31 | /**
32 | * Reverse the migrations.
33 | *
34 | * @return void
35 | */
36 | public function down()
37 | {
38 | Schema::drop('firewall_logs');
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/config/themes.php:
--------------------------------------------------------------------------------
1 | 'global',
19 |
20 | /*
21 | |--------------------------------------------------------------------------
22 | | Theme Icon
23 | |--------------------------------------------------------------------------
24 | */
25 |
26 | 'icon' => 'heroicon-o-swatch',
27 |
28 | /*
29 | |--------------------------------------------------------------------------
30 | | Default Theme
31 | |--------------------------------------------------------------------------
32 | */
33 |
34 | 'default' => [
35 | 'theme' => 'default',
36 | 'theme_color' => Color::Amber,
37 | ],
38 | ];
39 |
--------------------------------------------------------------------------------
/config/view.php:
--------------------------------------------------------------------------------
1 | [
17 | resource_path('views'),
18 | ],
19 |
20 | /*
21 | |--------------------------------------------------------------------------
22 | | Compiled View Path
23 | |--------------------------------------------------------------------------
24 | |
25 | | This option determines where all the compiled Blade templates will be
26 | | stored for your application. Typically, this is within the storage
27 | | directory. However, as usual, you are free to change this value.
28 | |
29 | */
30 |
31 | 'compiled' => env(
32 | 'VIEW_COMPILED_PATH',
33 | realpath(storage_path('framework/views'))
34 | ),
35 |
36 | ];
37 |
--------------------------------------------------------------------------------
/database/migrations/2024_09_14_175713_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/Models/ConnectedAccount.php:
--------------------------------------------------------------------------------
1 |
19 | */
20 | protected $fillable = [
21 | 'provider',
22 | 'provider_id',
23 | 'name',
24 | 'nickname',
25 | 'email',
26 | 'avatar_path',
27 | 'token',
28 | 'refresh_token',
29 | 'expires_at',
30 | ];
31 |
32 | /**
33 | * The event map for the model.
34 | *
35 | * @var array
36 | */
37 | protected $dispatchesEvents = [
38 | 'created' => ConnectedAccountCreated::class,
39 | 'updated' => ConnectedAccountUpdated::class,
40 | 'deleted' => ConnectedAccountDeleted::class,
41 | ];
42 | }
43 |
--------------------------------------------------------------------------------
/database/migrations/2023_06_09_041831_create_filament-jobs-monitor_table.php:
--------------------------------------------------------------------------------
1 | id();
16 | $table->string('job_id')->index();
17 | $table->string('name')->nullable();
18 | $table->string('queue')->nullable();
19 | $table->timestamp('started_at')->nullable()->index();
20 | $table->timestamp('finished_at')->nullable();
21 | $table->boolean('failed')->default(false)->index();
22 | $table->integer('attempt')->default(0);
23 | $table->integer('progress')->nullable();
24 | $table->text('exception_message')->nullable();
25 | $table->timestamps();
26 | });
27 | }
28 |
29 | /**
30 | * Reverse the migrations.
31 | */
32 | public function down(): void
33 | {
34 | Schema::dropIfExists('queue_monitors');
35 | }
36 | };
37 |
--------------------------------------------------------------------------------
/database/migrations/2023_05_06_234044_add_two_factor_columns_to_table.php:
--------------------------------------------------------------------------------
1 | text('two_factor_secret')
15 | ->after('password')
16 | ->nullable();
17 |
18 | $table->text('two_factor_recovery_codes')
19 | ->after('two_factor_secret')
20 | ->nullable();
21 |
22 | $table->timestamp('two_factor_confirmed_at')
23 | ->after('two_factor_recovery_codes')
24 | ->nullable();
25 | });
26 |
27 | }
28 |
29 | public function down()
30 | {
31 | Schema::table(filament('filament-breezy')->getTwoFactorUsersTableName(), function (
32 | Blueprint $table
33 | ) {
34 | $table->dropColumn([
35 | 'two_factor_secret',
36 | 'two_factor_recovery_codes',
37 | 'two_factor_confirmed_at',
38 | ]);
39 | });
40 |
41 | }
42 | };
43 |
--------------------------------------------------------------------------------
/config/filament.php:
--------------------------------------------------------------------------------
1 | [
18 |
19 | // 'echo' => [
20 | // 'broadcaster' => 'pusher',
21 | // 'key' => env('VITE_PUSHER_APP_KEY'),
22 | // 'cluster' => env('VITE_PUSHER_APP_CLUSTER'),
23 | // 'forceTLS' => true,
24 | // ],
25 |
26 | ],
27 |
28 | /*
29 | |--------------------------------------------------------------------------
30 | | Default Filesystem Disk
31 | |--------------------------------------------------------------------------
32 | |
33 | | This is the storage disk Filament will use to put media. You may use any
34 | | of the disks defined in the `config/filesystems.php`.
35 | |
36 | */
37 |
38 | 'default_filesystem_disk' => env('FILAMENT_FILESYSTEM_DISK', 'public'),
39 |
40 | ];
41 |
--------------------------------------------------------------------------------
/database/settings/2023_05_07_081639_create_app_settings.php:
--------------------------------------------------------------------------------
1 | migrator->add('settings.name', config('app.name'));
10 | $this->migrator->add('settings.description', 'Laravel is a web application framework with expressive, elegant syntax.');
11 | $this->migrator->add('settings.keywords', ['laravel', 'php']);
12 |
13 | $this->migrator->add('settings.head', '');
14 |
15 | $this->migrator->add('settings.logo', null);
16 | $this->migrator->add('settings.og', null);
17 | $this->migrator->add('settings.logo_size', null);
18 | $this->migrator->add('settings.favicon', null);
19 |
20 | $this->migrator->add('settings.terms', true);
21 |
22 | $this->migrator->add('settings.sitemap', false);
23 |
24 | $this->migrator->add('settings.restrict_ips', []);
25 | $this->migrator->add('settings.restrict_users', []);
26 |
27 | $this->migrator->add('settings.timezone', 'America/New_York');
28 | $this->migrator->add('settings.locales', ['en', 'pt_BR', 'es']);
29 | $this->migrator->add('settings.locale', 'en');
30 | }
31 | };
32 |
--------------------------------------------------------------------------------
/database/migrations/2023_09_24_173625_create_breezy_tables.php:
--------------------------------------------------------------------------------
1 | id();
15 | $table->string('authenticatable_type');
16 | $table->unsignedBigInteger('authenticatable_id');
17 | $table->string('panel_id')->nullable();
18 | $table->string('guard')->nullable();
19 | $table->string('ip_address', 45)->nullable();
20 | $table->text('user_agent')->nullable();
21 | $table->timestamp('expires_at')->nullable();
22 | $table->text('two_factor_secret')
23 | ->nullable();
24 | $table->text('two_factor_recovery_codes')
25 | ->nullable();
26 | $table->timestamp('two_factor_confirmed_at')
27 | ->nullable();
28 | $table->timestamps();
29 | });
30 |
31 | }
32 |
33 | public function down()
34 | {
35 | Schema::dropIfExists('breezy_sessions');
36 | }
37 | };
38 |
--------------------------------------------------------------------------------
/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 |
34 |
--------------------------------------------------------------------------------
/public/web.config:
--------------------------------------------------------------------------------
1 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/app/Actions/FilamentCompanies/CreateCompany.php:
--------------------------------------------------------------------------------
1 | $input
20 | *
21 | * @throws AuthorizationException
22 | */
23 | public function create(User $user, array $input): Company
24 | {
25 | Gate::forUser($user)->authorize('create', FilamentCompanies::newCompanyModel());
26 |
27 | Validator::make($input, [
28 | 'name' => ['required', 'string', 'max:255'],
29 | ])->validateWithBag('createCompany');
30 |
31 | AddingCompany::dispatch($user);
32 |
33 | $user->switchCompany($company = $user->ownedCompanies()->create([
34 | 'name' => $input['name'],
35 | 'personal_company' => false,
36 | ]));
37 |
38 | return $company;
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/devcontainer.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Laravel Codespace",
3 | "dockerComposeFile": [
4 | "docker-compose.yml"
5 | ],
6 | "service": "laravel.test",
7 | "workspaceFolder": "/var/www/html",
8 | "features": {
9 | "ghcr.io/devcontainers/features/docker-in-docker:2": {
10 | "version": "latest",
11 | "mobsf_dind_version": "latest",
12 | "mobsf_dind_name": "docker:dind"
13 | }
14 | },
15 | "customizations": {
16 | "vscode": {
17 | "extensions": [
18 | "bmewburn.vscode-intelephense-client",
19 | "ikappas.phpcs"
20 | ]
21 | }
22 | },
23 | "portsAttributes": {
24 | "80": {
25 | "label": "Laravel Application",
26 | "onAutoForward": "notify"
27 | },
28 | "3306": {
29 | "label": "MySQL",
30 | "onAutoForward": "ignore"
31 | },
32 | "8025": {
33 | "label": "MailHog UI",
34 | "onAutoForward": "notify"
35 | },
36 | "8081": {
37 | "label": "phpMyAdmin",
38 | "onAutoForward": "notify"
39 | }
40 | },
41 | "postCreateCommand": "composer install && php artisan fillament-saas:install && php artisan key:generate && php artisan storage:link"
42 | }
43 |
--------------------------------------------------------------------------------
/database/migrations/2023_02_26_175242_create_schedule_histories_table.php:
--------------------------------------------------------------------------------
1 | id();
19 | $table->unsignedBigInteger('schedule_id');
20 | $table->string('command');
21 | $table->text('params')->nullable();
22 | $table->text('output');
23 | $table->text('options')->nullable();
24 | $table->timestamps();
25 | $table->foreign('schedule_id')->references('id')->on(Config::get('filament-database-schedule.table.schedules', 'schedules'));
26 | });
27 | }
28 |
29 | /**
30 | * Reverse the migrations.
31 | *
32 | * @return void
33 | */
34 | public function down()
35 | {
36 | Schema::dropIfExists(Config::get('filament-database-schedule.table.schedule_histories', 'schedule_histories'));
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/public/images/tecnologies/inertia.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/app/Policies/ConnectedAccountPolicy.php:
--------------------------------------------------------------------------------
1 | ownsConnectedAccount($connectedAccount);
27 | }
28 |
29 | /**
30 | * Determine whether the user can create models.
31 | */
32 | public function create(User $user): bool
33 | {
34 | return true;
35 | }
36 |
37 | /**
38 | * Determine whether the user can update the model.
39 | */
40 | public function update(User $user, ConnectedAccount $connectedAccount): bool
41 | {
42 | return $user->ownsConnectedAccount($connectedAccount);
43 | }
44 |
45 | /**
46 | * Determine whether the user can delete the model.
47 | */
48 | public function delete(User $user, ConnectedAccount $connectedAccount): bool
49 | {
50 | return $user->ownsConnectedAccount($connectedAccount);
51 | }
52 | }
53 |
--------------------------------------------------------------------------------
/config/ban.php:
--------------------------------------------------------------------------------
1 |
7 | *
8 | * For the full copyright and license information, please view the LICENSE
9 | * file that was distributed with this source code.
10 | */
11 |
12 | declare(strict_types=1);
13 |
14 | return [
15 |
16 | /*
17 | |--------------------------------------------------------------------------
18 | | Ban Database Migrations
19 | |--------------------------------------------------------------------------
20 | |
21 | | Determine if default package migrations should be registered.
22 | | Set value to `false` when using customized migrations.
23 | |
24 | */
25 |
26 | 'load_default_migrations' => true,
27 |
28 | /*
29 | |---------------------------------------------------------------------------
30 | | URL to redirect banned user to
31 | |---------------------------------------------------------------------------
32 | |
33 | | Provide a url, this is where a banned user will be redirected to
34 | | by the middleware.
35 | |
36 | | For example:
37 | |
38 | | 'redirect_url' => route('banned.user'),
39 | |
40 | | or
41 | |
42 | | 'redirect_url' => '/user/banned',
43 | |
44 | | Leaving the value as null will result in a redirect "back".
45 | |
46 | */
47 |
48 | 'redirect_url' => 'banned/user',
49 | ];
50 |
--------------------------------------------------------------------------------
/app/Actions/FilamentCompanies/CreateConnectedAccount.php:
--------------------------------------------------------------------------------
1 | $user->getAuthIdentifier(),
20 | 'provider' => strtolower($provider),
21 | 'provider_id' => $providerUser->getId(),
22 | 'name' => $providerUser->getName(),
23 | 'nickname' => $providerUser->getNickname(),
24 | 'email' => $providerUser->getEmail(),
25 | 'avatar_path' => $providerUser->getAvatar(),
26 | 'token' => $providerUser->token,
27 | 'secret' => $providerUser->tokenSecret ?? null,
28 | 'refresh_token' => $providerUser->refreshToken ?? null,
29 | 'expires_at' => property_exists($providerUser, 'expiresIn') ? now()->addSeconds($providerUser->expiresIn) : null,
30 | ]);
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/lang/vendor/banner/pt_BR/manager.php:
--------------------------------------------------------------------------------
1 | 'Gerenciador de Banners',
6 | 'subheading' => 'Gerencie seus banners',
7 | 'navigation_label' => 'Gerenciador de Banners',
8 | 'create' => 'Criar',
9 | 'save' => 'Salvar',
10 | 'inactive' => 'Inativo',
11 | 'banner_list_empty_state_title' => 'Ainda não há banners',
12 | 'banner_list_empty_state_description' => 'Assim que você criar o primeiro banner, ele aparecerá aqui.',
13 | 'banner_edit_empty_state_title' => 'Nenhum banner selecionado',
14 | 'banner_edit_empty_state_description' => 'Selecione ou crie um banner para começar.',
15 | 'enable_all_banners' => 'Ativar todos os banners',
16 | 'disable_all_banners' => 'Desativar todos os banners',
17 | 'successfully_deleted_banner' => 'Banner excluído com sucesso',
18 | 'successfully_updated_banner' => 'Banner atualizado com sucesso',
19 | 'successfully_created_banner' => 'Banner criado com sucesso',
20 | 'disabled_all_banners' => 'Todos os banners foram desativados',
21 | 'enabled_all_banners' => 'Todos os banners foram ativados',
22 | 'failed_to_load_banner' => 'Falha ao carregar banner',
23 | 'banner_name' => 'Nome',
24 | 'banner_content' => 'Conteúdo',
25 | 'banner_render_location' => 'Local de exibição',
26 | 'status_due' => 'Pendente',
27 | 'status_visible' => 'Visível',
28 | 'status_fulfilled' => 'Concluído',
29 | 'active_since' => 'Ativo desde',
30 | ];
31 |
--------------------------------------------------------------------------------
/database/migrations/2024_10_06_203311_create_connected_accounts_table.php:
--------------------------------------------------------------------------------
1 | id();
16 | $table->foreignId('user_id');
17 | $table->string('provider');
18 | $table->string('provider_id');
19 | $table->string('name')->nullable();
20 | $table->string('nickname')->nullable();
21 | $table->string('email')->nullable();
22 | $table->string('telephone')->nullable();
23 | $table->text('avatar_path')->nullable();
24 | $table->string('token', 1000);
25 | $table->string('secret')->nullable(); // OAuth1
26 | $table->string('refresh_token', 1000)->nullable(); // OAuth2
27 | $table->dateTime('expires_at')->nullable(); // OAuth2
28 | $table->timestamps();
29 |
30 | $table->index(['user_id', 'id']);
31 | $table->index(['provider', 'provider_id']);
32 | });
33 | }
34 |
35 | /**
36 | * Reverse the migrations.
37 | */
38 | public function down(): void
39 | {
40 | Schema::dropIfExists('connected_accounts');
41 | }
42 | };
43 |
--------------------------------------------------------------------------------
/app/Actions/FilamentCompanies/UpdateConnectedAccount.php:
--------------------------------------------------------------------------------
1 | authorize('update', $connectedAccount);
21 |
22 | $connectedAccount->forceFill([
23 | 'provider' => strtolower($provider),
24 | 'provider_id' => $providerUser->getId(),
25 | 'name' => $providerUser->getName(),
26 | 'nickname' => $providerUser->getNickname(),
27 | 'email' => $providerUser->getEmail(),
28 | 'avatar_path' => $providerUser->getAvatar(),
29 | 'token' => $providerUser->token,
30 | 'secret' => $providerUser->tokenSecret ?? null,
31 | 'refresh_token' => $providerUser->refreshToken ?? null,
32 | 'expires_at' => property_exists($providerUser, 'expiresIn') ? now()->addSeconds($providerUser->expiresIn) : null,
33 | ])->save();
34 |
35 | return $connectedAccount;
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/app/Actions/FilamentCompanies/DeleteUser.php:
--------------------------------------------------------------------------------
1 | deletesCompanies = $deletesCompanies;
24 | }
25 |
26 | /**
27 | * Delete the given user.
28 | */
29 | public function delete(User $user): void
30 | {
31 | DB::transaction(function () use ($user) {
32 | $this->deleteCompanies($user);
33 | $user->deleteProfilePhoto();
34 | $user->connectedAccounts->each(static fn ($account) => $account->delete());
35 | $user->tokens->each(static fn ($token) => $token->delete());
36 | $user->delete();
37 | });
38 | }
39 |
40 | /**
41 | * Delete the companies and company associations attached to the user.
42 | */
43 | protected function deleteCompanies(User $user): void
44 | {
45 | $user->companies()->detach();
46 |
47 | $user->ownedCompanies->each(function (Company $company) {
48 | $this->deletesCompanies->delete($company);
49 | });
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/public/images/tecnologies/stripe.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/tests/Pest.php:
--------------------------------------------------------------------------------
1 | in('Unit');
15 | uses(Tests\TestCase::class)->in('Feature');
16 |
17 | /*
18 | |--------------------------------------------------------------------------
19 | | Expectations
20 | |--------------------------------------------------------------------------
21 | |
22 | | When you're writing tests, you often need to check that values meet certain conditions. The
23 | | "expect()" function gives you access to a set of "expectations" methods that you can use
24 | | to assert different things. Of course, you may extend the Expectation API at any time.
25 | |
26 | */
27 |
28 | expect()->extend('toBeOne', function () {
29 | return $this->toBe(1);
30 | });
31 |
32 | /*
33 | |--------------------------------------------------------------------------
34 | | Functions
35 | |--------------------------------------------------------------------------
36 | |
37 | | While Pest is very powerful out-of-the-box, you may have some testing code specific to your
38 | | project that you don't want to repeat in every file. Here you can also expose helpers as
39 | | global functions to help you to reduce the number of lines of code in your test files.
40 | |
41 | */
42 |
43 | function something()
44 | {
45 | // ..
46 | }
47 |
--------------------------------------------------------------------------------
/database/migrations/2024_09_21_203047_create_advanced_fields_table.php:
--------------------------------------------------------------------------------
1 | id();
15 |
16 | $table->string('title');
17 | $table->string('name')->unique();
18 | $table->boolean('active')->default(true);
19 | $table->integer('sort')->default(0);
20 |
21 | $table->timestamps();
22 | });
23 |
24 | Schema::create($tableNames['fields'], function (Blueprint $table) {
25 | $table->id();
26 |
27 | $table->string('name');
28 | $table->string('label');
29 | $table->string('type');
30 | $table->integer('group_id')->default(0);
31 | $table->integer('sort')->default(0);
32 |
33 | $table->text('instructions')->nullable();
34 | $table->boolean('mandatory')->default(false);
35 | $table->string('state_path')->nullable();
36 | $table->json('config')->nullable();
37 |
38 | $table->unique(['name', 'group_id']);
39 |
40 | $table->timestamps();
41 | });
42 | }
43 |
44 | public function down()
45 | {
46 | $tableNames = config('filament-field-group.table_names');
47 |
48 | Schema::dropIfExists($tableNames['fields']);
49 | Schema::dropIfExists($tableNames['field_groups']);
50 | }
51 | };
52 |
--------------------------------------------------------------------------------
/app/Policies/UserPolicy.php:
--------------------------------------------------------------------------------
1 | can('ViewAny:User');
15 | }
16 |
17 | public function view(AuthUser $authUser): bool
18 | {
19 | return $authUser->can('View:User');
20 | }
21 |
22 | public function create(AuthUser $authUser): bool
23 | {
24 | return $authUser->can('Create:User');
25 | }
26 |
27 | public function update(AuthUser $authUser): bool
28 | {
29 | return $authUser->can('Update:User');
30 | }
31 |
32 | public function delete(AuthUser $authUser): bool
33 | {
34 | return $authUser->can('Delete:User');
35 | }
36 |
37 | public function restore(AuthUser $authUser): bool
38 | {
39 | return $authUser->can('Restore:User');
40 | }
41 |
42 | public function forceDelete(AuthUser $authUser): bool
43 | {
44 | return $authUser->can('ForceDelete:User');
45 | }
46 |
47 | public function forceDeleteAny(AuthUser $authUser): bool
48 | {
49 | return $authUser->can('ForceDeleteAny:User');
50 | }
51 |
52 | public function restoreAny(AuthUser $authUser): bool
53 | {
54 | return $authUser->can('RestoreAny:User');
55 | }
56 |
57 | public function replicate(AuthUser $authUser): bool
58 | {
59 | return $authUser->can('Replicate:User');
60 | }
61 |
62 | public function reorder(AuthUser $authUser): bool
63 | {
64 | return $authUser->can('Reorder:User');
65 | }
66 | }
67 |
--------------------------------------------------------------------------------
/config/hashing.php:
--------------------------------------------------------------------------------
1 | 'bcrypt',
19 |
20 | /*
21 | |--------------------------------------------------------------------------
22 | | Bcrypt Options
23 | |--------------------------------------------------------------------------
24 | |
25 | | Here you may specify the configuration options that should be used when
26 | | passwords are hashed using the Bcrypt algorithm. This will allow you
27 | | to control the amount of time it takes to hash the given password.
28 | |
29 | */
30 |
31 | 'bcrypt' => [
32 | 'rounds' => env('BCRYPT_ROUNDS', 10),
33 | ],
34 |
35 | /*
36 | |--------------------------------------------------------------------------
37 | | Argon Options
38 | |--------------------------------------------------------------------------
39 | |
40 | | Here you may specify the configuration options that should be used when
41 | | passwords are hashed using the Argon algorithm. These will allow you
42 | | to control the amount of time it takes to hash the given password.
43 | |
44 | */
45 |
46 | 'argon' => [
47 | 'memory' => 65536,
48 | 'threads' => 1,
49 | 'time' => 4,
50 | ],
51 |
52 | ];
53 |
--------------------------------------------------------------------------------
/app/Actions/FilamentCompanies/CreateNewUser.php:
--------------------------------------------------------------------------------
1 | $input
19 | */
20 | public function create(array $input): User
21 | {
22 | Validator::make($input, [
23 | 'name' => ['required', 'string', 'max:255'],
24 | 'email' => ['required', 'string', 'email', 'max:255', 'unique:users'],
25 | 'password' => ['required', 'string', 'min:8', 'confirmed'],
26 | 'terms' => FilamentCompanies::hasTermsAndPrivacyPolicyFeature() ? ['accepted', 'required'] : '',
27 | ])->validate();
28 |
29 | return DB::transaction(function () use ($input) {
30 | return tap(User::create([
31 | 'name' => $input['name'],
32 | 'email' => $input['email'],
33 | 'password' => Hash::make($input['password']),
34 | ]), function (User $user) {
35 | $this->createCompany($user);
36 | });
37 | });
38 | }
39 |
40 | /**
41 | * Create a personal company for the user.
42 | */
43 | protected function createCompany(User $user): void
44 | {
45 | $user->ownedCompanies()->save(Company::forceCreate([
46 | 'user_id' => $user->id,
47 | 'name' => explode(' ', $user->name, 2)[0]."'s Company",
48 | 'personal_company' => true,
49 | ]));
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/app/Policies/IpPolicy.php:
--------------------------------------------------------------------------------
1 | can('ViewAny:Ip');
18 | }
19 |
20 | public function view(AuthUser $authUser, Ip $ip): bool
21 | {
22 | return $authUser->can('View:Ip');
23 | }
24 |
25 | public function create(AuthUser $authUser): bool
26 | {
27 | return $authUser->can('Create:Ip');
28 | }
29 |
30 | public function update(AuthUser $authUser, Ip $ip): bool
31 | {
32 | return $authUser->can('Update:Ip');
33 | }
34 |
35 | public function delete(AuthUser $authUser, Ip $ip): bool
36 | {
37 | return $authUser->can('Delete:Ip');
38 | }
39 |
40 | public function restore(AuthUser $authUser, Ip $ip): bool
41 | {
42 | return $authUser->can('Restore:Ip');
43 | }
44 |
45 | public function forceDelete(AuthUser $authUser, Ip $ip): bool
46 | {
47 | return $authUser->can('ForceDelete:Ip');
48 | }
49 |
50 | public function forceDeleteAny(AuthUser $authUser): bool
51 | {
52 | return $authUser->can('ForceDeleteAny:Ip');
53 | }
54 |
55 | public function restoreAny(AuthUser $authUser): bool
56 | {
57 | return $authUser->can('RestoreAny:Ip');
58 | }
59 |
60 | public function replicate(AuthUser $authUser, Ip $ip): bool
61 | {
62 | return $authUser->can('Replicate:Ip');
63 | }
64 |
65 | public function reorder(AuthUser $authUser): bool
66 | {
67 | return $authUser->can('Reorder:Ip');
68 | }
69 | }
70 |
--------------------------------------------------------------------------------
/app/Policies/RolePolicy.php:
--------------------------------------------------------------------------------
1 | can('ViewAny:Role');
18 | }
19 |
20 | public function view(AuthUser $authUser, Role $role): bool
21 | {
22 | return $authUser->can('View:Role');
23 | }
24 |
25 | public function create(AuthUser $authUser): bool
26 | {
27 | return $authUser->can('Create:Role');
28 | }
29 |
30 | public function update(AuthUser $authUser, Role $role): bool
31 | {
32 | return $authUser->can('Update:Role');
33 | }
34 |
35 | public function delete(AuthUser $authUser, Role $role): bool
36 | {
37 | return $authUser->can('Delete:Role');
38 | }
39 |
40 | public function restore(AuthUser $authUser, Role $role): bool
41 | {
42 | return $authUser->can('Restore:Role');
43 | }
44 |
45 | public function forceDelete(AuthUser $authUser, Role $role): bool
46 | {
47 | return $authUser->can('ForceDelete:Role');
48 | }
49 |
50 | public function forceDeleteAny(AuthUser $authUser): bool
51 | {
52 | return $authUser->can('ForceDeleteAny:Role');
53 | }
54 |
55 | public function restoreAny(AuthUser $authUser): bool
56 | {
57 | return $authUser->can('RestoreAny:Role');
58 | }
59 |
60 | public function replicate(AuthUser $authUser, Role $role): bool
61 | {
62 | return $authUser->can('Replicate:Role');
63 | }
64 |
65 | public function reorder(AuthUser $authUser): bool
66 | {
67 | return $authUser->can('Reorder:Role');
68 | }
69 | }
70 |
--------------------------------------------------------------------------------
/config/filament-exceptions.php:
--------------------------------------------------------------------------------
1 | Exception::class,
8 |
9 | 'slug' => 'exceptions',
10 |
11 | /** Show or hide in navigation/sidebar */
12 | 'navigation_enabled' => true,
13 |
14 | /** Sort order, if shown. No effect, if navigation_enabled it set to false. */
15 | 'navigation_sort' => -1,
16 |
17 | /** Whether to show a navigation badge. No effect, if navigation_enabled it set to false. */
18 | 'navigation_badge' => true,
19 |
20 | /** Whether to scope exceptions to tenant */
21 | 'is_scoped_to_tenant' => false,
22 |
23 | /** Icons to use for navigation (if enabled) and pills */
24 | 'icons' => [
25 | 'navigation' => 'heroicon-o-cpu-chip',
26 | 'exception' => 'heroicon-o-cpu-chip',
27 | 'headers' => 'heroicon-o-arrows-right-left',
28 | 'cookies' => 'heroicon-o-circle-stack',
29 | 'body' => 'heroicon-s-code-bracket',
30 | 'queries' => 'heroicon-s-circle-stack',
31 | ],
32 |
33 | 'is_globally_searchable' => false,
34 |
35 | /**-------------------------------------------------
36 | * Change the default active tab
37 | *
38 | * Exception => 1 (Default)
39 | * Headers => 2
40 | * Cookies => 3
41 | * Body => 4
42 | * Queries => 5
43 | */
44 | 'active_tab' => 5,
45 |
46 | /**-------------------------------------------------
47 | * Here you can define when the exceptions should be pruned
48 | * The default is 7 days (a week)
49 | * The format for providing period should follow carbon's format. i.e.
50 | * 1 day => 'subDay()',
51 | * 3 days => 'subDays(3)',
52 | * 7 days => 'subWeek()',
53 | * 1 month => 'subMonth()',
54 | * 2 months => 'subMonths(2)',
55 | *
56 | */
57 |
58 | 'period' => now()->subWeek(),
59 | ];
60 |
--------------------------------------------------------------------------------
/public/images/tecnologies/laravel.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/app/Providers/AppServiceProvider.php:
--------------------------------------------------------------------------------
1 | User::class,
32 | 'company' => Company::class,
33 | ]);
34 | }
35 |
36 | /**
37 | * Bootstrap any application services.
38 | */
39 | public function boot(): void
40 | {
41 | // Filament Company
42 | Gate::policy(Company::class, CompanyPolicy::class);
43 | Gate::policy(ConnectedAccount::class, ConnectedAccountPolicy::class);
44 |
45 | // Filament Shield
46 | Gate::policy(Role::class, RolePolicy::class);
47 |
48 | // Filament Saas
49 | Gate::policy(User::class, UserPolicy::class);
50 |
51 | // Filament Database Schedule
52 | Gate::policy(FilamentWebhookServer::class, WebhookPolicy::class);
53 |
54 | // Filament Firewall
55 | Gate::policy(Ip::class, IpPolicy::class);
56 |
57 | // Filament Database Schedule
58 | Gate::policy(Schedule::class, SchedulePolicy::class);
59 | }
60 | }
61 |
--------------------------------------------------------------------------------
/public/fonts/filament/filament/inter/index.css:
--------------------------------------------------------------------------------
1 | @font-face{font-family:Inter Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url("./inter-cyrillic-ext-wght-normal-ASVAGXXE.woff2") format("woff2-variations");unicode-range:U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:Inter Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url("./inter-cyrillic-wght-normal-EWLSKVKN.woff2") format("woff2-variations");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:Inter Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url("./inter-greek-ext-wght-normal-7GGTF7EK.woff2") format("woff2-variations");unicode-range:U+1F00-1FFF}@font-face{font-family:Inter Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url("./inter-greek-wght-normal-N43DBLU2.woff2") format("woff2-variations");unicode-range:U+0370-0377,U+037A-037F,U+0384-038A,U+038C,U+038E-03A1,U+03A3-03FF}@font-face{font-family:Inter Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url("./inter-vietnamese-wght-normal-CE5GGD3W.woff2") format("woff2-variations");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB}@font-face{font-family:Inter Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url("./inter-latin-ext-wght-normal-HA22NDSG.woff2") format("woff2-variations");unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Inter Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url("./inter-latin-wght-normal-NRMW37G5.woff2") format("woff2-variations");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
2 |
--------------------------------------------------------------------------------
/app/Policies/SchedulePolicy.php:
--------------------------------------------------------------------------------
1 | can('ViewAny:Schedule');
18 | }
19 |
20 | public function view(AuthUser $authUser, Schedule $schedule): bool
21 | {
22 | return $authUser->can('View:Schedule');
23 | }
24 |
25 | public function create(AuthUser $authUser): bool
26 | {
27 | return $authUser->can('Create:Schedule');
28 | }
29 |
30 | public function update(AuthUser $authUser, Schedule $schedule): bool
31 | {
32 | return $authUser->can('Update:Schedule');
33 | }
34 |
35 | public function delete(AuthUser $authUser, Schedule $schedule): bool
36 | {
37 | return $authUser->can('Delete:Schedule');
38 | }
39 |
40 | public function restore(AuthUser $authUser, Schedule $schedule): bool
41 | {
42 | return $authUser->can('Restore:Schedule');
43 | }
44 |
45 | public function forceDelete(AuthUser $authUser, Schedule $schedule): bool
46 | {
47 | return $authUser->can('ForceDelete:Schedule');
48 | }
49 |
50 | public function forceDeleteAny(AuthUser $authUser): bool
51 | {
52 | return $authUser->can('ForceDeleteAny:Schedule');
53 | }
54 |
55 | public function restoreAny(AuthUser $authUser): bool
56 | {
57 | return $authUser->can('RestoreAny:Schedule');
58 | }
59 |
60 | public function replicate(AuthUser $authUser, Schedule $schedule): bool
61 | {
62 | return $authUser->can('Replicate:Schedule');
63 | }
64 |
65 | public function reorder(AuthUser $authUser): bool
66 | {
67 | return $authUser->can('Reorder:Schedule');
68 | }
69 | }
70 |
--------------------------------------------------------------------------------
/resources/markdown/policy.md:
--------------------------------------------------------------------------------
1 | # Privacy Policy
2 |
3 | Edit this file to define the privacy policy for your application.
4 |
5 | ## Introduction
6 |
7 | Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce ullamcorper non libero nec volutpat. Nullam et nibh ac nisl dictum blandit. Sed id sagittis urna. Suspendisse potenti. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Phasellus sit amet quam vitae odio sollicitudin volutpat in vel orci. Donec nec dolor vitae dolor feugiat condimentum.
8 |
9 | ## Information Collection and Use
10 |
11 | Mauris non tempus ante, a mollis tellus. Sed vel nulla lorem. Nulla facilisi. Praesent pellentesque, orci nec mollis fermentum, dolor felis venenatis magna, vel scelerisque nisl tellus ac ante. Aliquam erat volutpat. Nulla facilisi. Sed libero purus, gravida in eleifend at, iaculis et est. Mauris pharetra nibh eu libero vehicula, vitae consequat velit blandit.
12 |
13 | ## Log Data
14 |
15 | Cras placerat, velit et lacinia molestie, mi libero laoreet risus, eu cursus ante eros id nisl. Nunc vitae libero lacus. Pellentesque vel sapien sed lorem suscipit commodo. Phasellus eget nisi quis lectus faucibus vehicula. Mauris mollis nunc quis nisi vehicula, sit amet hendrerit velit dapibus. Donec sit amet nulla sed arcu lobortis elementum.
16 |
17 | ## Cookies
18 |
19 | Quisque egestas, arcu et convallis placerat, velit orci dapibus leo, eget vulputate eros nisl vitae risus. Vivamus vel tincidunt libero, sit amet sodales enim. Nulla sagittis, sapien at volutpat fermentum, ipsum arcu pretium quam, eget placerat enim sapien in nibh. Sed ac finibus sapien, at sollicitudin dolor.
20 |
21 | ## Service Providers
22 |
23 | Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt.
24 |
--------------------------------------------------------------------------------
/app/Policies/CompanyPolicy.php:
--------------------------------------------------------------------------------
1 | belongsToCompany($company);
27 | }
28 |
29 | /**
30 | * Determine whether the user can create models.
31 | */
32 | public function create(User $user): bool
33 | {
34 | return true;
35 | }
36 |
37 | /**
38 | * Determine whether the user can update the model.
39 | */
40 | public function update(User $user, Company $company): bool
41 | {
42 | return $user->ownsCompany($company);
43 | }
44 |
45 | /**
46 | * Determine whether the user can add company employees.
47 | */
48 | public function addCompanyEmployee(User $user, Company $company): bool
49 | {
50 | return $user->ownsCompany($company);
51 | }
52 |
53 | /**
54 | * Determine whether the user can update company employee permissions.
55 | */
56 | public function updateCompanyEmployee(User $user, Company $company): bool
57 | {
58 | return $user->ownsCompany($company);
59 | }
60 |
61 | /**
62 | * Determine whether the user can remove company employees.
63 | */
64 | public function removeCompanyEmployee(User $user, Company $company): bool
65 | {
66 | return $user->ownsCompany($company);
67 | }
68 |
69 | /**
70 | * Determine whether the user can delete the model.
71 | */
72 | public function delete(User $user, Company $company): bool
73 | {
74 | return $user->ownsCompany($company);
75 | }
76 | }
77 |
--------------------------------------------------------------------------------
/resources/markdown/terms.md:
--------------------------------------------------------------------------------
1 | # Terms of Service
2 |
3 | Edit this file to define the terms of service for your application.
4 |
5 | ## Introduction
6 |
7 | Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce ullamcorper non libero nec volutpat. Nullam et nibh ac nisl dictum blandit. Sed id sagittis urna. Suspendisse potenti. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Phasellus sit amet quam vitae odio sollicitudin volutpat in vel orci. Donec nec dolor vitae dolor feugiat condimentum.
8 |
9 | ## Usage Terms
10 |
11 | Mauris non tempus ante, a mollis tellus. Sed vel nulla lorem. Nulla facilisi. Praesent pellentesque, orci nec mollis fermentum, dolor felis venenatis magna, vel scelerisque nisl tellus ac ante. Aliquam erat volutpat. Nulla facilisi. Sed libero purus, gravida in eleifend at, iaculis et est. Mauris pharetra nibh eu libero vehicula, vitae consequat velit blandit.
12 |
13 | ## User Conduct
14 |
15 | Cras placerat, velit et lacinia molestie, mi libero laoreet risus, eu cursus ante eros id nisl. Nunc vitae libero lacus. Pellentesque vel sapien sed lorem suscipit commodo. Phasellus eget nisi quis lectus faucibus vehicula. Mauris mollis nunc quis nisi vehicula, sit amet hendrerit velit dapibus. Donec sit amet nulla sed arcu lobortis elementum.
16 |
17 | ## Content Ownership
18 |
19 | Quisque egestas, arcu et convallis placerat, velit orci dapibus leo, eget vulputate eros nisl vitae risus. Vivamus vel tincidunt libero, sit amet sodales enim. Nulla sagittis, sapien at volutpat fermentum, ipsum arcu pretium quam, eget placerat enim sapien in nibh. Sed ac finibus sapien, at sollicitudin dolor.
20 |
21 | ## Limitations of Liability
22 |
23 | Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt.
24 |
--------------------------------------------------------------------------------
/app/Actions/FilamentCompanies/RemoveCompanyEmployee.php:
--------------------------------------------------------------------------------
1 | authorize($user, $company, $companyEmployee);
23 |
24 | $this->ensureUserDoesNotOwnCompany($companyEmployee, $company);
25 |
26 | $company->removeUser($companyEmployee);
27 |
28 | CompanyEmployeeRemoved::dispatch($company, $companyEmployee);
29 | }
30 |
31 | /**
32 | * Authorize that the user can remove the company employee.
33 | *
34 | * @throws AuthorizationException
35 | */
36 | protected function authorize(User $user, Company $company, User $companyEmployee): void
37 | {
38 | if (
39 | ! Gate::forUser($user)->check('removeCompanyEmployee', $company) &&
40 | $user->id !== $companyEmployee->id
41 | ) {
42 | throw new AuthorizationException;
43 | }
44 | }
45 |
46 | /**
47 | * Ensure that the currently authenticated user does not own the company.
48 | */
49 | protected function ensureUserDoesNotOwnCompany(User $companyEmployee, Company $company): void
50 | {
51 | if ($companyEmployee->id === $company->owner->id) {
52 | throw ValidationException::withMessages([
53 | 'company' => [__('filament-companies::default.errors.cannot_leave_company')],
54 | ])->errorBag('removeCompanyEmployee');
55 | }
56 | }
57 | }
58 |
--------------------------------------------------------------------------------
/database/migrations/0001_01_01_000000_create_users_table.php:
--------------------------------------------------------------------------------
1 | id();
17 | $table->string('name');
18 | $table->string('email')->unique();
19 | $table->timestamp('email_verified_at')->nullable();
20 | $table->string('password')->nullable(
21 | FilamentCompanies::hasSocialiteFeatures()
22 | );
23 | $table->rememberToken();
24 | $table->foreignId('current_company_id')->nullable();
25 | $table->foreignId('current_connected_account_id')->nullable();
26 | $table->string('profile_photo_path', 2048)->nullable();
27 | $table->timestamps();
28 | });
29 |
30 | Schema::create('password_reset_tokens', function (Blueprint $table) {
31 | $table->string('email')->primary();
32 | $table->string('token');
33 | $table->timestamp('created_at')->nullable();
34 | });
35 |
36 | Schema::create('sessions', function (Blueprint $table) {
37 | $table->string('id')->primary();
38 | $table->foreignId('user_id')->nullable()->index();
39 | $table->string('ip_address', 45)->nullable();
40 | $table->text('user_agent')->nullable();
41 | $table->longText('payload');
42 | $table->integer('last_activity')->index();
43 | });
44 | }
45 |
46 | /**
47 | * Reverse the migrations.
48 | */
49 | public function down(): void
50 | {
51 | Schema::dropIfExists('users');
52 | Schema::dropIfExists('password_reset_tokens');
53 | Schema::dropIfExists('sessions');
54 | }
55 | };
56 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/public/images/companies/linkedin.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/database/migrations/2023_02_26_172600_create_schedule_table.php:
--------------------------------------------------------------------------------
1 | id();
19 | $table->string('command');
20 | $table->string('command_custom')->nullable()->default(null);
21 |
22 | $table->text('params')->nullable();
23 | $table->string('expression');
24 | $table->string('environments')->nullable();
25 | $table->text('options')->nullable();
26 | $table->text('options_with_value')->nullable();
27 | $table->string('log_filename')->nullable();
28 |
29 | $table->boolean('even_in_maintenance_mode')->default(false);
30 | $table->boolean('without_overlapping')->default(false);
31 | $table->boolean('on_one_server')->default(false);
32 |
33 | $table->string('webhook_before')->nullable();
34 | $table->string('webhook_after')->nullable();
35 | $table->string('email_output')->nullable();
36 | $table->boolean('sendmail_error')->default(false);
37 | $table->boolean('log_success')->default(true);
38 | $table->boolean('log_error')->default(true);
39 | $table->boolean('status')->default(true);
40 | $table->boolean('run_in_background')->default(false);
41 | $table->boolean('sendmail_success')->default(false);
42 |
43 | $table->timestamps();
44 | $table->softDeletes();
45 | });
46 | }
47 |
48 | /**
49 | * Reverse the migrations.
50 | *
51 | * @return void
52 | */
53 | public function down()
54 | {
55 | Schema::dropIfExists(Config::get('filament-database-schedule.table.schedules', 'schedules'));
56 | }
57 | }
58 |
--------------------------------------------------------------------------------
/database/factories/UserFactory.php:
--------------------------------------------------------------------------------
1 |
14 | */
15 | class UserFactory extends Factory
16 | {
17 | /**
18 | * The current password being used by the factory.
19 | */
20 | protected static ?string $password;
21 |
22 | /**
23 | * Define the model's default state.
24 | *
25 | * @return array
26 | */
27 | public function definition(): array
28 | {
29 | return [
30 | 'name' => fake()->name(),
31 | 'email' => fake()->unique()->safeEmail(),
32 | 'email_verified_at' => now(),
33 | 'password' => static::$password ??= Hash::make('password'),
34 | 'remember_token' => Str::random(10),
35 | 'profile_photo_path' => null,
36 | 'current_company_id' => null,
37 | ];
38 | }
39 |
40 | /**
41 | * Indicate that the model's email address should be unverified.
42 | */
43 | public function unverified(): static
44 | {
45 | return $this->state(fn (array $attributes) => [
46 | 'email_verified_at' => null,
47 | ]);
48 | }
49 |
50 | /**
51 | * Indicate that the user should have a personal company.
52 | */
53 | public function withPersonalCompany(?callable $callback = null): static
54 | {
55 | if (! FilamentCompanies::hasCompanyFeatures()) {
56 | return $this->state([]);
57 | }
58 |
59 | return $this->has(
60 | Company::factory()
61 | ->state(fn (array $attributes, User $user) => [
62 | 'name' => $user->name.'\'s Company',
63 | 'user_id' => $user->id,
64 | 'personal_company' => true,
65 | ])
66 | ->when(is_callable($callback), $callback),
67 | 'ownedCompanies'
68 | );
69 | }
70 | }
71 |
--------------------------------------------------------------------------------
/app/Actions/FilamentCompanies/UpdateUserProfileInformation.php:
--------------------------------------------------------------------------------
1 | $input
17 | */
18 | public function update(User $user, array $input): void
19 | {
20 | Validator::make($input, [
21 | 'name' => ['required', 'string', 'max:255'],
22 | 'email' => ['required', 'email', 'max:255', Rule::unique('users')->ignore($user->id)],
23 | 'photo' => ['nullable', 'mimes:jpg,jpeg,png', 'max:1024'],
24 | ])->validateWithBag('updateProfileInformation');
25 |
26 | if (isset($input['photo'])) {
27 | $user->updateProfilePhoto($input['photo']);
28 | }
29 |
30 | if (
31 | $input['email'] !== $user->email &&
32 | $this->userMustVerifyEmail()
33 | ) {
34 | $this->updateVerifiedUser($user, $input);
35 | } else {
36 | $user->forceFill([
37 | 'name' => $input['name'],
38 | 'email' => $input['email'],
39 | ])->save();
40 | }
41 | }
42 |
43 | /**
44 | * Determine if the user must verify their email address.
45 | */
46 | protected function userMustVerifyEmail(): bool
47 | {
48 | return in_array(MustVerifyEmail::class, class_implements(User::class));
49 | }
50 |
51 | /**
52 | * Update the given verified user's profile information.
53 | *
54 | * @param array $input
55 | */
56 | protected function updateVerifiedUser(User $user, array $input): void
57 | {
58 | $user->forceFill([
59 | 'name' => $input['name'],
60 | 'email' => $input['email'],
61 | 'email_verified_at' => null,
62 | ])->save();
63 |
64 | $user->sendEmailVerificationNotification();
65 | }
66 | }
67 |
--------------------------------------------------------------------------------
/.env.example:
--------------------------------------------------------------------------------
1 | APP_NAME=Laravel
2 | APP_ENV=local
3 | APP_KEY=
4 | APP_DEBUG=true
5 | APP_TIMEZONE=UTC
6 | APP_URL=http://localhost
7 |
8 | APP_LOCALE=en
9 | APP_FALLBACK_LOCALE=en
10 | APP_FAKER_LOCALE=en_US
11 |
12 | APP_MAINTENANCE_DRIVER=file
13 | # APP_MAINTENANCE_STORE=database
14 |
15 | PHP_CLI_SERVER_WORKERS=4
16 |
17 | BCRYPT_ROUNDS=12
18 |
19 | LOG_CHANNEL=stack
20 | LOG_STACK=single
21 | LOG_DEPRECATIONS_CHANNEL=null
22 | LOG_LEVEL=debug
23 |
24 | DB_CONNECTION=mysql
25 | DB_HOST=mysql
26 | DB_PORT=3306
27 | DB_DATABASE=laravel
28 | DB_USERNAME=root
29 | DB_PASSWORD=
30 |
31 | SESSION_DRIVER=database
32 | SESSION_LIFETIME=120
33 | SESSION_ENCRYPT=false
34 | SESSION_PATH=/
35 | SESSION_DOMAIN=null
36 |
37 | BROADCAST_CONNECTION=log
38 | FILESYSTEM_DISK=local
39 | QUEUE_CONNECTION=database
40 |
41 | CACHE_STORE=database
42 | # CACHE_PREFIX=
43 |
44 | MEMCACHED_HOST=127.0.0.1
45 |
46 | REDIS_CLIENT=phpredis
47 | REDIS_HOST=127.0.0.1
48 | REDIS_PASSWORD=null
49 | REDIS_PORT=6379
50 |
51 | MAIL_MAILER=log
52 | MAIL_SCHEME=null
53 | MAIL_HOST=127.0.0.1
54 | MAIL_PORT=2525
55 | MAIL_USERNAME=null
56 | MAIL_PASSWORD=null
57 | MAIL_ENCRYPTION=null
58 | MAIL_FROM_ADDRESS="hello@example.com"
59 | MAIL_FROM_NAME="${APP_NAME}"
60 |
61 | AWS_ACCESS_KEY_ID=
62 | AWS_SECRET_ACCESS_KEY=
63 | AWS_DEFAULT_REGION=us-east-1
64 | AWS_BUCKET=
65 | AWS_USE_PATH_STYLE_ENDPOINT=false
66 |
67 | VITE_APP_NAME="${APP_NAME}"
68 |
69 | PUSHER_APP_ID=
70 | PUSHER_APP_KEY=
71 | PUSHER_APP_SECRET=
72 | PUSHER_HOST=
73 | PUSHER_PORT=443
74 | PUSHER_SCHEME=https
75 | PUSHER_APP_CLUSTER=mt1
76 |
77 | FILAMENT_FILESYSTEM_DISK=public
78 |
79 | FIREWALL_ENABLED=false
80 |
81 | APITEMPLATEIO_KEY=
82 |
83 | OPENAI_API_KEY=
84 | OPENAI_REQUEST_TIMEOUT=20
85 | OPENAI_ORGANIZATION=
86 |
87 | API2PDF_KEY=
88 |
89 | GITHUB_CLIENT_ID=
90 | GITHUB_CLIENT_SECRET=
91 | GITHUB_REDIRECT_URI=
92 |
93 | FACEBOOK_CLIENT_ID=
94 | FACEBOOK_CLIENT_SECRET=
95 | FACEBOOK_REDIRECT_URI=
96 |
97 | GOOGLE_CLIENT_ID=
98 | GOOGLE_CLIENT_SECRET=
99 | GOOGLE_REDIRECT_URI=
100 |
101 | STRIPE_KEY=
102 | STRIPE_SECRET=
103 | STRIPE_WEBHOOK_SECRET=
104 |
105 | BREVO_NEWSLETTER_URL=
106 |
107 | SHORT_URL_DEFAULT_URL=
108 |
109 | SCRAPING_BOT_USERNAME=
110 | SCRAPING_BOT_API_KEY=
111 |
--------------------------------------------------------------------------------
/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 |
38 | 'apitemplateio' => [
39 | 'key' => env('APITEMPLATEIO_KEY'),
40 | ],
41 |
42 | 'api2pdf' => [
43 | 'key' => env('API2PDF_KEY'),
44 | ],
45 |
46 | 'github' => [
47 | 'client_id' => env('GITHUB_CLIENT_ID'),
48 | 'client_secret' => env('GITHUB_CLIENT_SECRET'),
49 | 'redirect' => env('GITHUB_REDIRECT_URI'),
50 | ],
51 |
52 | 'facebook' => [
53 | 'client_id' => env('FACEBOOK_CLIENT_ID'),
54 | 'client_secret' => env('FACEBOOK_CLIENT_SECRET'),
55 | 'redirect' => env('FACEBOOK_REDIRECT_URI'),
56 | ],
57 |
58 | 'google' => [
59 | 'client_id' => env('GOOGLE_CLIENT_ID'),
60 | 'client_secret' => env('GOOGLE_CLIENT_SECRET'),
61 | 'redirect' => env('GOOGLE_REDIRECT_URI'),
62 | ],
63 |
64 | 'stripe' => [
65 | 'model' => App\Models\User::class,
66 | 'key' => env('STRIPE_KEY'),
67 | 'secret' => env('STRIPE_SECRET'),
68 | 'webhook_secret' => env('STRIPE_WEBHOOK_SECRET'),
69 | ],
70 |
71 | 'brevo' => [
72 | 'newsletter_url' => env('BREVO_NEWSLETTER_URL'),
73 | ],
74 | ];
75 |
--------------------------------------------------------------------------------
/public/img/avatars/avatar-3.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
54 |
--------------------------------------------------------------------------------
/public/images/companies/google.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/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 | environment:
14 | WWWUSER: '${WWWUSER}'
15 | LARAVEL_SAIL: 1
16 | XDEBUG_MODE: '${SAIL_XDEBUG_MODE:-off}'
17 | XDEBUG_CONFIG: '${SAIL_XDEBUG_CONFIG:-client_host=host.docker.internal}'
18 | volumes:
19 | - '.:/var/www/html'
20 | networks:
21 | - sail
22 | depends_on:
23 | - mysql
24 | mysql:
25 | image: 'mysql/mysql-server:8.0'
26 | ports:
27 | - '${FORWARD_DB_PORT:-3306}:3306'
28 | environment:
29 | MYSQL_ROOT_PASSWORD: '${DB_PASSWORD}'
30 | MYSQL_ROOT_HOST: '%'
31 | MYSQL_DATABASE: '${DB_DATABASE}'
32 | MYSQL_USER: '${DB_USERNAME}'
33 | MYSQL_PASSWORD: '${DB_PASSWORD}'
34 | MYSQL_ALLOW_EMPTY_PASSWORD: 1
35 | volumes:
36 | - 'sail-mysql:/var/lib/mysql'
37 | networks:
38 | - sail
39 | healthcheck:
40 | test: ['CMD', 'mysqladmin', 'ping', '-p${DB_PASSWORD}']
41 | retries: 3
42 | timeout: 5s
43 | phpmyadmin:
44 | image: 'phpmyadmin:latest'
45 | ports:
46 | - 8081:80
47 | environment:
48 | MYSQL_ROOT_PASSWORD: '${DB_PASSWORD}'
49 | links:
50 | - 'mysql:db'
51 | depends_on:
52 | - mysql
53 | networks:
54 | - sail
55 | mailhog:
56 | image: 'mailhog/mailhog:latest'
57 | ports:
58 | - 1025:1025
59 | - 8025:8025
60 | networks:
61 | - sail
62 | redis:
63 | image: 'redis:alpine'
64 | ports:
65 | - '${FORWARD_REDIS_PORT:-6379}:6379'
66 | volumes:
67 | - 'sailredis:/data'
68 | networks:
69 | - sail
70 | healthcheck:
71 | test: ['CMD', 'redis-cli', 'ping']
72 | retries: 3
73 | timeout: 5s
74 | networks:
75 | sail:
76 | driver: bridge
77 | volumes:
78 | sail-mysql:
79 | driver: local
80 | sailredis:
81 | driver: local
82 |
--------------------------------------------------------------------------------
/app/Actions/FilamentCompanies/CreateUserFromProvider.php:
--------------------------------------------------------------------------------
1 | createsConnectedAccounts = $createsConnectedAccounts;
27 | }
28 |
29 | /**
30 | * Create a new user from a social provider user.
31 | */
32 | public function create(string $provider, ProviderUserContract $providerUser): User
33 | {
34 | return DB::transaction(function () use ($providerUser, $provider) {
35 | return tap(User::create([
36 | 'name' => $providerUser->getName(),
37 | 'email' => $providerUser->getEmail(),
38 | ]), function (User $user) use ($providerUser, $provider) {
39 | $user->markEmailAsVerified();
40 |
41 | if ($this->shouldSetProfilePhoto($providerUser)) {
42 | $user->setProfilePhotoFromUrl($providerUser->getAvatar());
43 | }
44 |
45 | $user->switchConnectedAccount(
46 | $this->createsConnectedAccounts->create($user, $provider, $providerUser)
47 | );
48 |
49 | $this->createCompany($user);
50 | });
51 | });
52 | }
53 |
54 | private function shouldSetProfilePhoto(ProviderUserContract $providerUser): bool
55 | {
56 | return Feature::ProviderAvatars->isEnabled() &&
57 | FilamentCompanies::managesProfilePhotos() &&
58 | $providerUser->getAvatar();
59 | }
60 |
61 | /**
62 | * Create a personal company for the user.
63 | */
64 | protected function createCompany(User $user): void
65 | {
66 | $user->ownedCompanies()->save(Company::forceCreate([
67 | 'user_id' => $user->id,
68 | 'name' => explode(' ', $user->name, 2)[0]."'s Company",
69 | 'personal_company' => true,
70 | ]));
71 | }
72 | }
73 |
--------------------------------------------------------------------------------
/config/seotools.php:
--------------------------------------------------------------------------------
1 | [
9 | /*
10 | * The default configurations to be used by the meta generator.
11 | */
12 | 'defaults' => [
13 | 'title' => "It's Over 9000!", // set false to total remove
14 | 'titleBefore' => false, // Put defaults.title before page title, like 'It's Over 9000! - Dashboard'
15 | 'description' => 'For those who helped create the Genki Dama', // set false to total remove
16 | 'separator' => ' - ',
17 | 'keywords' => [],
18 | 'canonical' => false, // Set to null or 'full' to use Url::full(), set to 'current' to use Url::current(), set false to total remove
19 | 'robots' => false, // Set to 'all', 'none' or any combination of index/noindex and follow/nofollow
20 | ],
21 | /*
22 | * Webmaster tags are always added.
23 | */
24 | 'webmaster_tags' => [
25 | 'google' => null,
26 | 'bing' => null,
27 | 'alexa' => null,
28 | 'pinterest' => null,
29 | 'yandex' => null,
30 | 'norton' => null,
31 | ],
32 |
33 | 'add_notranslate_class' => false,
34 | ],
35 | 'opengraph' => [
36 | /*
37 | * The default configurations to be used by the opengraph generator.
38 | */
39 | 'defaults' => [
40 | 'title' => 'Over 9000 Thousand!', // set false to total remove
41 | 'description' => 'For those who helped create the Genki Dama', // set false to total remove
42 | 'url' => false, // Set null for using Url::current(), set false to total remove
43 | 'type' => false,
44 | 'site_name' => false,
45 | 'images' => [],
46 | ],
47 | ],
48 | 'twitter' => [
49 | /*
50 | * The default values to be used by the twitter cards generator.
51 | */
52 | 'defaults' => [
53 | // 'card' => 'summary',
54 | // 'site' => '@LuizVinicius73',
55 | ],
56 | ],
57 | 'json-ld' => [
58 | /*
59 | * The default configurations to be used by the json-ld generator.
60 | */
61 | 'defaults' => [
62 | 'title' => 'Over 9000 Thousand!', // set false to total remove
63 | 'description' => 'For those who helped create the Genki Dama', // set false to total remove
64 | 'url' => false, // Set to null or 'full' to use Url::full(), set to 'current' to use Url::current(), set false to total remove
65 | 'type' => 'WebPage',
66 | 'images' => [],
67 | ],
68 | ],
69 | ];
70 |
--------------------------------------------------------------------------------
/public/images/companies/amazon.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/composer.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "a2insights/filament-saas-template",
3 | "type": "project",
4 | "description": "The web network.",
5 | "keywords": [
6 | "system"
7 | ],
8 | "license": "MIT",
9 | "require": {
10 | "php": "^8.2",
11 | "a2insights/filament-saas": "dev-main",
12 | "barryvdh/laravel-debugbar": "^3.13",
13 | "inertiajs/inertia-laravel": "^2.0",
14 | "laravel/framework": "^12.25",
15 | "laravel/tinker": "^2.10.1",
16 | "lorisleiva/laravel-actions": "^2.8",
17 | "tightenco/ziggy": "^2.3"
18 | },
19 | "require-dev": {
20 | "doctrine/dbal": "^3.6",
21 | "fakerphp/faker": "^1.23",
22 | "filament/upgrade": "^4.0",
23 | "jasonmccreary/laravel-test-assertions": "^2.4",
24 | "larastan/larastan": "^3.7",
25 | "laravel-lang/lang": "^15.25",
26 | "laravel-shift/blueprint": "^2.10",
27 | "laravel/pint": "^1.24",
28 | "laravel/sail": "^1.41",
29 | "mockery/mockery": "^1.6",
30 | "nunomaduro/collision": "^8.6",
31 | "pestphp/pest": "^4.0",
32 | "pestphp/pest-plugin-laravel": "^4.0",
33 | "spatie/laravel-ignition": "^2.9"
34 | },
35 | "autoload": {
36 | "psr-4": {
37 | "App\\": "app/",
38 | "Database\\Factories\\": "database/factories/",
39 | "Database\\Seeders\\": "database/seeders/"
40 | }
41 | },
42 | "autoload-dev": {
43 | "psr-4": {
44 | "Tests\\": "tests/"
45 | }
46 | },
47 | "scripts": {
48 | "post-autoload-dump": [
49 | "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
50 | "@php artisan package:discover --ansi",
51 | "@php artisan filament:upgrade"
52 | ],
53 | "post-update-cmd": [
54 | "@php artisan vendor:publish --tag=laravel-assets --ansi --force"
55 | ],
56 | "post-root-package-install": [
57 | "@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
58 | ],
59 | "post-create-project-cmd": [
60 | "@php artisan key:generate --ansi",
61 | "@php -r \"file_exists('database/database.sqlite') || touch('database/database.sqlite');\"",
62 | "@php artisan migrate --graceful --ansi"
63 | ]
64 | },
65 | "extra": {
66 | "laravel": {
67 | "dont-discover": []
68 | }
69 | },
70 | "config": {
71 | "optimize-autoloader": true,
72 | "preferred-install": "dist",
73 | "sort-packages": true,
74 | "allow-plugins": {
75 | "pestphp/pest-plugin": true,
76 | "php-http/discovery": true
77 | }
78 | },
79 | "minimum-stability": "stable",
80 | "prefer-stable": true
81 | }
--------------------------------------------------------------------------------
/public/img/avatars/avatar-17.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
57 |
--------------------------------------------------------------------------------
/public/img/avatars/avatar-20.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
59 |
--------------------------------------------------------------------------------
/public/images/tecnologies/livewire.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/public/img/avatars/avatar-19.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
--------------------------------------------------------------------------------
/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | # Contributing
2 |
3 | Contributions are **welcome** and will be fully **credited**.
4 |
5 | Please read and understand the contribution guide before creating an issue or pull request.
6 |
7 | ## Etiquette
8 |
9 | This project is open source, and as such, the maintainers give their free time to build and maintain the source code
10 | held within. They make the code freely available in the hope that it will be of use to other developers. It would be
11 | extremely unfair for them to suffer abuse or anger for their hard work.
12 |
13 | Please be considerate towards maintainers when raising issues or presenting pull requests. Let's show the
14 | world that developers are civilized and selfless people.
15 |
16 | It's the duty of the maintainer to ensure that all submissions to the project are of sufficient
17 | quality to benefit the project. Many developers have different skillsets, strengths, and weaknesses. Respect the maintainer's decision, and do not be upset or abusive if your submission is not used.
18 |
19 | ## Viability
20 |
21 | When requesting or submitting new features, first consider whether it might be useful to others. Open
22 | source projects are used by many developers, who may have entirely different needs to your own. Think about
23 | whether or not your feature is likely to be used by other users of the project.
24 |
25 | ## Procedure
26 |
27 | Before filing an issue:
28 |
29 | - Attempt to replicate the problem, to ensure that it wasn't a coincidental incident.
30 | - Check to make sure your feature suggestion isn't already present within the project.
31 | - Check the pull requests tab to ensure that the bug doesn't have a fix in progress.
32 | - Check the pull requests tab to ensure that the feature isn't already in progress.
33 |
34 | Before submitting a pull request:
35 |
36 | - Check the codebase to ensure that your feature doesn't already exist.
37 | - Check the pull requests to ensure that another person hasn't already submitted the feature or fix.
38 |
39 | ## Requirements
40 |
41 | If the project maintainer has any additional requirements, you will find them listed here.
42 |
43 | - **[PSR-2 Coding Standard](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md)**
44 |
45 | - **Add tests!** - Your patch won't be accepted if it doesn't have tests.
46 |
47 | - **Document any change in behaviour** - Make sure the `README.md` and any other relevant documentation are kept up-to-date.
48 |
49 | - **Consider our release cycle** - We try to follow [SemVer v2.0.0](https://semver.org/). Randomly breaking public APIs is not an option.
50 |
51 | - **One pull request per feature** - If you want to do more than one thing, send multiple pull requests.
52 |
53 | - **Send coherent history** - Make sure each individual commit in your pull request is meaningful. If you had to make multiple intermediate commits while developing, please [squash them](https://www.git-scm.com/book/en/v2/Git-Tools-Rewriting-History#Changing-Multiple-Commit-Messages) before submitting.
54 |
55 | **Happy coding**!
56 |
--------------------------------------------------------------------------------
/app/Policies/ShortURLPolicy.php:
--------------------------------------------------------------------------------
1 | can('view_any_short::url');
19 | }
20 |
21 | /**
22 | * Determine whether the user can view the model.
23 | */
24 | public function view(User $user, ShortURL $shortURL): bool
25 | {
26 | return $user->can('view_short::url');
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_short::url');
35 | }
36 |
37 | /**
38 | * Determine whether the user can update the model.
39 | */
40 | public function update(User $user, ShortURL $shortURL): bool
41 | {
42 | return $user->can('update_short::url');
43 | }
44 |
45 | /**
46 | * Determine whether the user can delete the model.
47 | */
48 | public function delete(User $user, ShortURL $shortURL): bool
49 | {
50 | return $user->can('delete_short::url');
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_short::url');
59 | }
60 |
61 | /**
62 | * Determine whether the user can permanently delete.
63 | */
64 | public function forceDelete(User $user, ShortURL $shortURL): bool
65 | {
66 | return $user->can('force_delete_short::url');
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_short::url');
75 | }
76 |
77 | /**
78 | * Determine whether the user can restore.
79 | */
80 | public function restore(User $user, ShortURL $shortURL): bool
81 | {
82 | return $user->can('restore_short::url');
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_short::url');
91 | }
92 |
93 | /**
94 | * Determine whether the user can replicate.
95 | */
96 | public function replicate(User $user, ShortURL $shortURL): bool
97 | {
98 | return $user->can('replicate_short::url');
99 | }
100 |
101 | /**
102 | * Determine whether the user can reorder.
103 | */
104 | public function reorder(User $user): bool
105 | {
106 | return $user->can('reorder_short::url');
107 | }
108 | }
109 |
--------------------------------------------------------------------------------
/app/Actions/FilamentCompanies/AddCompanyEmployee.php:
--------------------------------------------------------------------------------
1 | authorize('addCompanyEmployee', $company);
28 |
29 | $this->validate($company, $email, $role);
30 |
31 | $newCompanyEmployee = FilamentCompanies::findUserByEmailOrFail($email);
32 |
33 | AddingCompanyEmployee::dispatch($company, $newCompanyEmployee);
34 |
35 | $company->users()->attach(
36 | $newCompanyEmployee,
37 | ['role' => $role]
38 | );
39 |
40 | CompanyEmployeeAdded::dispatch($company, $newCompanyEmployee);
41 | }
42 |
43 | /**
44 | * Validate the add employee operation.
45 | */
46 | protected function validate(Company $company, string $email, ?string $role): void
47 | {
48 | Validator::make([
49 | 'email' => $email,
50 | 'role' => $role,
51 | ], $this->rules(), [
52 | 'email.exists' => __('filament-companies::default.errors.email_not_found'),
53 | ])->after(
54 | $this->ensureUserIsNotAlreadyOnCompany($company, $email)
55 | )->validateWithBag('addCompanyEmployee');
56 | }
57 |
58 | /**
59 | * Get the validation rules for adding a company employee.
60 | *
61 | * @return array
62 | */
63 | protected function rules(): array
64 | {
65 | return array_filter([
66 | 'email' => ['required', 'email', 'exists:users'],
67 | 'role' => FilamentCompanies::hasRoles()
68 | ? ['required', 'string', new Role]
69 | : null,
70 | ]);
71 | }
72 |
73 | /**
74 | * Ensure that the user is not already on the company.
75 | */
76 | protected function ensureUserIsNotAlreadyOnCompany(Company $company, string $email): Closure
77 | {
78 | return static function ($validator) use ($company, $email) {
79 | $validator->errors()->addIf(
80 | $company->hasUserWithEmail($email),
81 | 'email',
82 | __('filament-companies::default.errors.user_belongs_to_company')
83 | );
84 | };
85 | }
86 | }
87 |
--------------------------------------------------------------------------------
/app/Policies/ExceptionPolicy.php:
--------------------------------------------------------------------------------
1 | can('view_any_exception');
19 | }
20 |
21 | /**
22 | * Determine whether the user can view the model.
23 | */
24 | public function view(User $user, Exception $exception): bool
25 | {
26 | return $user->can('view_exception');
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_exception');
35 | }
36 |
37 | /**
38 | * Determine whether the user can update the model.
39 | */
40 | public function update(User $user, Exception $exception): bool
41 | {
42 | return $user->can('update_exception');
43 | }
44 |
45 | /**
46 | * Determine whether the user can delete the model.
47 | */
48 | public function delete(User $user, Exception $exception): bool
49 | {
50 | return $user->can('delete_exception');
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_exception');
59 | }
60 |
61 | /**
62 | * Determine whether the user can permanently delete.
63 | */
64 | public function forceDelete(User $user, Exception $exception): bool
65 | {
66 | return $user->can('force_delete_exception');
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_exception');
75 | }
76 |
77 | /**
78 | * Determine whether the user can restore.
79 | */
80 | public function restore(User $user, Exception $exception): bool
81 | {
82 | return $user->can('restore_exception');
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_exception');
91 | }
92 |
93 | /**
94 | * Determine whether the user can replicate.
95 | */
96 | public function replicate(User $user, Exception $exception): bool
97 | {
98 | return $user->can('replicate_exception');
99 | }
100 |
101 | /**
102 | * Determine whether the user can reorder.
103 | */
104 | public function reorder(User $user): bool
105 | {
106 | return $user->can('reorder_exception');
107 | }
108 | }
109 |
--------------------------------------------------------------------------------
/lang/en.json:
--------------------------------------------------------------------------------
1 | {
2 | "(and :count more error)": "(and :count more error)",
3 | "(and :count more errors)": "(and :count more error)|(and :count more errors)|(and :count more errors)",
4 | "A decryption key is required.": "A decryption key is required.",
5 | "All rights reserved.": "All rights reserved.",
6 | "Encrypted environment file already exists.": "Encrypted environment file already exists.",
7 | "Encrypted environment file not found.": "Encrypted environment file not found.",
8 | "Environment file already exists.": "Environment file already exists.",
9 | "Environment file not found.": "Environment file not found.",
10 | "errors": "errors",
11 | "Forbidden": "Forbidden",
12 | "Go to page :page": "Go to page :page",
13 | "Hello!": "Hello!",
14 | "If you did not create an account, no further action is required.": "If you did not create an account, no further action is required.",
15 | "If you did not request a password reset, no further action is required.": "If you did not request a password reset, no further action is required.",
16 | "If you're having trouble clicking the \":actionText\" button, copy and paste the URL below\ninto your web browser:": "If you're having trouble clicking the \":actionText\" button, copy and paste the URL below\ninto your web browser:",
17 | "Invalid filename.": "Invalid filename.",
18 | "Invalid JSON was returned from the route.": "Invalid JSON was returned from the route.",
19 | "length": "length",
20 | "Location": "Location",
21 | "Login": "Login",
22 | "Logout": "Logout",
23 | "Not Found": "Not Found",
24 | "of": "of",
25 | "Page Expired": "Page Expired",
26 | "Pagination Navigation": "Pagination Navigation",
27 | "Payment Required": "Payment Required",
28 | "Please click the button below to verify your email address.": "Please click the button below to verify your email address.",
29 | "Regards,": "Regards,",
30 | "Register": "Register",
31 | "Reset Password": "Reset Password",
32 | "Reset Password Notification": "Reset Password Notification",
33 | "results": "results",
34 | "Server Error": "Server Error",
35 | "Service Unavailable": "Service Unavailable",
36 | "Showing": "Showing",
37 | "The given data was invalid.": "The given data was invalid.",
38 | "The response is not a streamed response.": "The response is not a streamed response.",
39 | "The response is not a view.": "The response is not a view.",
40 | "This action is unauthorized.": "This action is unauthorized.",
41 | "This password reset link will expire in :count minutes.": "This password reset link will expire in :count minutes.",
42 | "to": "to",
43 | "Toggle navigation": "Toggle navigation",
44 | "Too Many Requests": "Too Many Requests",
45 | "Unauthorized": "Unauthorized",
46 | "Verify Email Address": "Verify Email Address",
47 | "Whoops!": "Whoops!",
48 | "You are receiving this email because we received a password reset request for your account.": "You are receiving this email because we received a password reset request for your account."
49 | }
--------------------------------------------------------------------------------
/database/migrations/2023_12_20_173900_change_status_type_in_schedule_table.php:
--------------------------------------------------------------------------------
1 | enum('new_status', Status::toArray())->nullable()->after('status');
21 | });
22 |
23 | DB::table(Config::get('filament-database-schedule.table.schedules', 'schedules'))->where('status', 0)->update(['new_status' => Status::Inactive]);
24 | DB::table(Config::get('filament-database-schedule.table.schedules', 'schedules'))->where('status', 1)->update(['new_status' => Status::Active]);
25 | DB::table(Config::get('filament-database-schedule.table.schedules', 'schedules'))->where('status', 3)->update(['new_status' => Status::Trashed]);
26 |
27 | Schema::table(Config::get('filament-database-schedule.table.schedules', 'schedules'), function (Blueprint $table) {
28 | $table->dropColumn('status');
29 | });
30 | Schema::table(Config::get('filament-database-schedule.table.schedules', 'schedules'), function (Blueprint $table) {
31 | $table->renameColumn('new_status', 'status');
32 | });
33 | Schema::table(Config::get('filament-database-schedule.table.schedules', 'schedules'), function (Blueprint $table) {
34 | $table->enum('status', Status::toArray())->default(Status::Active)->change();
35 | });
36 | }
37 |
38 | /**
39 | * Reverse the migrations.
40 | *
41 | * @return void
42 | */
43 | public function down()
44 | {
45 | Schema::table(Config::get('filament-database-schedule.table.schedules', 'schedules'), function (Blueprint $table) {
46 | $table->boolean('old_status')->default(true)->after('status');
47 | });
48 |
49 | DB::table(Config::get('filament-database-schedule.table.schedules', 'schedules'))->where('status', 'inactive')->update(['old_status' => 0]);
50 | DB::table(Config::get('filament-database-schedule.table.schedules', 'schedules'))->where('status', 'active')->update(['old_status' => 1]);
51 | DB::table(Config::get('filament-database-schedule.table.schedules', 'schedules'))->where('status', 'trashed')->update(['old_status' => 3]);
52 |
53 | Schema::table(Config::get('filament-database-schedule.table.schedules', 'schedules'), function (Blueprint $table) {
54 | $table->dropColumn('status');
55 | });
56 | Schema::table(Config::get('filament-database-schedule.table.schedules', 'schedules'), function (Blueprint $table) {
57 | $table->renameColumn('old_status', 'status');
58 | });
59 | }
60 | }
61 |
--------------------------------------------------------------------------------
/public/img/avatars/avatar-26.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
--------------------------------------------------------------------------------
/app/Policies/QueueMonitorPolicy.php:
--------------------------------------------------------------------------------
1 | can('view_any_queue::monitor');
19 | }
20 |
21 | /**
22 | * Determine whether the user can view the model.
23 | */
24 | public function view(User $user, QueueMonitor $queueMonitor): bool
25 | {
26 | return $user->can('view_queue::monitor');
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_queue::monitor');
35 | }
36 |
37 | /**
38 | * Determine whether the user can update the model.
39 | */
40 | public function update(User $user, QueueMonitor $queueMonitor): bool
41 | {
42 | return $user->can('update_queue::monitor');
43 | }
44 |
45 | /**
46 | * Determine whether the user can delete the model.
47 | */
48 | public function delete(User $user, QueueMonitor $queueMonitor): bool
49 | {
50 | return $user->can('delete_queue::monitor');
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_queue::monitor');
59 | }
60 |
61 | /**
62 | * Determine whether the user can permanently delete.
63 | */
64 | public function forceDelete(User $user, QueueMonitor $queueMonitor): bool
65 | {
66 | return $user->can('force_delete_queue::monitor');
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_queue::monitor');
75 | }
76 |
77 | /**
78 | * Determine whether the user can restore.
79 | */
80 | public function restore(User $user, QueueMonitor $queueMonitor): bool
81 | {
82 | return $user->can('restore_queue::monitor');
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_queue::monitor');
91 | }
92 |
93 | /**
94 | * Determine whether the user can replicate.
95 | */
96 | public function replicate(User $user, QueueMonitor $queueMonitor): bool
97 | {
98 | return $user->can('replicate_queue::monitor');
99 | }
100 |
101 | /**
102 | * Determine whether the user can reorder.
103 | */
104 | public function reorder(User $user): bool
105 | {
106 | return $user->can('reorder_queue::monitor');
107 | }
108 | }
109 |
--------------------------------------------------------------------------------