Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

kjdion84's avatar

Best practices for other Laravel package resources?

I'm working on a package that uses a bunch of stub file templates for a custom CRUD generator command. So these are not views, but a collection of templates for models, controllers, etc.

Now, I know that my package views should publish to the resources/views/vendor/package folder:

    $this->publishes([__DIR__ . '/../resources/views' => resource_path('views/kjdion84/turtle')], 'views');

But what about resources that are not views? For example, I want to make a crud folder in the resources folder.

Should I put them in resources/vendor/package/crud, resources/crud/vendor/package, or just resources/crud?

What is the best practice in this case?

0 likes
1 reply
jlrdw's avatar

I am not a package expert, but an idea would be view some other known packages for laravel on Github and get some ideas.

Please or to participate in this conversation.