Download the PHP package capsulescodes/inertia-mailable without Composer
On this page you can find all versions of the php package capsulescodes/inertia-mailable. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download capsulescodes/inertia-mailable
More information about capsulescodes/inertia-mailable
Files in capsulescodes/inertia-mailable
Package inertia-mailable
Short Description Seamlessly craft dynamic and reusable email templates using Inertia
License MIT
Informations about the package inertia-mailable
Seamlessly craft dynamic and reusable email templates using Inertia.
Inertia Mailable empowers you to build beautiful, component-driven emails in Laravel, utilizing the power of InertiaJS. Create interactive and responsive email designs effortlessly by composing Vue components and embedding them into your mailables.
This article provides an in-depth exploration of the package.
[!NOTE] This package is currently designed for Laravel and Vue users and is still in development.
Installation
1. Install package and publish expected inertia mailable file
It publishes two files :
resources/js/mail.js
: base Inertia fileresources/js/mails/Welcome.vue
: example Vue Component.
2. Add filename into vite config's SSR array
3. Add SSR to build
script and build files
package.json
Usage
App\Mails\InertiaMailableInstalled.php
routes/web.php
> http://127.0.0.1:8000/render
You are now ready to send.
routes/web.php
- replace '[email protected]' with the desired email address in
routes/web.php
andApp\Mail\InertiaMailableInstalled.php
.
Supported Frameworks
- [x] Inertia mailable supports Laravel.
- [x] Inertia Mailable supports Vue.
- [x] Inertia Mailable supports Vue with Typescript.
- [x] Inertia Mailable supports Vue with Tailwindcss.
Options
- Add a custom css file
If you want to modify the current css file, publish the template and modify the path in the inertia-mailable
config file.
config.inertia-mailable.php
- Add a custom Tailwind config file
If you want to use a custom tailwind config, modify the path in the inertia-mailable
config file.
config.inertia-mailable.php
- Add a custom root blade view
If you want to modify the current blade file, publish the template and modify the path in the inertia-mailable
config file.
App\Mails\InertiaMailableInstalled.php
- Specify the actual path to node
If you encounter the following error : Error: proc_open(): posix_spawn() failed: No such file or directory
, you will need to specify the actual path to Node.js. There is a dedicated environment variable for this.
.env
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change. Please make sure to update tests as appropriate.