Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/l4nos/tenancy-sendgrid
A package designed to work with Sendgrid Email Authentication and Tenancy for Laravel
https://github.com/l4nos/tenancy-sendgrid
Last synced: 7 days ago
JSON representation
A package designed to work with Sendgrid Email Authentication and Tenancy for Laravel
- Host: GitHub
- URL: https://github.com/l4nos/tenancy-sendgrid
- Owner: l4nos
- License: mit
- Created: 2022-11-27T02:55:38.000Z (almost 2 years ago)
- Default Branch: master
- Last Pushed: 2022-11-27T02:56:41.000Z (almost 2 years ago)
- Last Synced: 2024-04-14T03:18:01.428Z (7 months ago)
- Language: PHP
- Size: 4.88 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Tenancy Sendgrid Senders## Intro
This package is designed to add api routes into your application to allow you to add Email / Domain authentication for your tenants with sendgrid.
## Setup
Install with:
```
composer require lanos/laravel-sendgrid-tenancy
```
Then run migrations```
php artisan migrate
```A table called email_authentication should be created.
After that add the concern into the Tenant model.
```
class Tenant extends BaseTenant implements TenantWithDatabase
{
use SendsEmail;
...
}
```This will add the required relationships and functions to the tenant() / Tenant:: interface.
Lastly, add the routes wherever suits your application by calling the static method:
```
SgTen::routes();
```We do not automatically load the routes as we recognise that every tenancy application uses different routing and middleware options, and rather than making you configure your service provider we simply allow you to drop the routes where is most convenient, you can surround these routes with whatever prefix and middleware you desire.
## License
Please refer to [LICENSE.md](https://github.com/Lanos/tenancy-sendgrid/blob/main/LICENSE) for this project's license.