Install tailor models with plugins

Hello,

I know it’s possible to install tailor models with a theme, using the seed system, but is it possible to do it when installing plugins ? If not, I think it could be a nice addition.

It would make some plugins easier to customize by just modifying the tailor blueprint to add or remove some fields added by the plugin, instead of writing another plugin that would extend the model you want to modify in order to add or remove some fields.

Best regards,

1 Like

Hey @PubliAlex

Yes, you can. The “app” directory behaves like a plugin, so creating a “blueprints” directory in the plugin is possible, just the same.

There is a small difference, for performance reasons, only the app directory is monitored for blueprint changes in debug mode. So when you make a change to a plugin’s blueprint, you should run php artisan tailor:migrate to pick up the changes.