Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Backend
redberry/mailbox-for-laravel
cursor
mail
testing
email
development
laravel
inbox
redberry
mailbox-for-laravel

Rules for working on PHP code in src/

Install
php artisan boost:add-skill redberry/mailbox-for-laravel

Save this content to: .cursor/rules/backend.md

# Backend Rules

- All files must have `declare(strict_types=1)` at the top
- Use readonly properties where the value is set once in the constructor
- Services must depend on the `MessageStore` contract, never on `DatabaseMessageStore` or `FileStorage` directly
- Controllers are invokable (`__invoke`) for single-action, or use standard resource methods
- Constructor injection only — no `app()` or `resolve()` calls inside methods
- `CaptureService` is the single entry point for all storage operations — don't bypass it
- `MailboxServiceProvider` is the ONLY place that reads `config()` and creates bindings
- Transport depends on `CaptureService` + `AttachmentStore`, not on `MessageStore` directly
- DTOs are plain PHP classes using constructor property promotion (no Spatie Laravel Data); `fromArray()` factories rehydrate stored payloads
- Models use configurable connection via `config('mailbox.store.database.connection')`
- Return types and parameter types are mandatory on all public methods
- Throw domain exceptions for invalid states — no silent failures
- No `env()` calls — use `config()` (env is only read in `config/mailbox.php`)

Backend Rules

  • All files must have declare(strict_types=1) at the top
  • Use readonly properties where the value is set once in the constructor
  • Services must depend on the MessageStore contract, never on DatabaseMessageStore or FileStorage directly
  • Controllers are invokable (__invoke) for single-action, or use standard resource methods
  • Constructor injection only — no app() or resolve() calls inside methods
  • CaptureService is the single entry point for all storage operations — don't bypass it
  • MailboxServiceProvider is the ONLY place that reads config() and creates bindings
  • Transport depends on CaptureService + AttachmentStore, not on MessageStore directly
  • DTOs are plain PHP classes using constructor property promotion (no Spatie Laravel Data); fromArray() factories rehydrate stored payloads
  • Models use configurable connection via config('mailbox.store.database.connection')
  • Return types and parameter types are mandatory on all public methods
  • Throw domain exceptions for invalid states — no silent failures
  • No env() calls — use config() (env is only read in config/mailbox.php)
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
tequilarapido/trackit
gregsphotography/site-builder-filament
cabaoctavio/laravel-query-log
gregsphotography/site-builder-components
io-digital/clickatell
snowsoft/laravel-admin
oxygen/auth
relicsoftware/barakah-payment-gateway
tobya/work-with-composer
equipc/laravel-email-validator
equipc/laravel-email-database-log
adedsec/nova-translated-labels
wazza/laravel-db-encryption
hokny/laravel-generator
vonsogt/backup
jengo/queues
jeremykenedy/laravel-observability
coleus/frame
thtg88/journalism
filagora/filagora-ai-forums