Comments (2)
Hi, thanks ! hope this package will meet your needs.
What you want is certainly create a package to use it like a module? At the moment, I'm writing the new documentation, I'll add a tutorial for the package creation: https://sebastienheyd.github.io/boilerplate/
Here's how I would do it:
-
create the new package "Product" in a packages folder (why don't use an another package to do that: https://github.com/Jeroen-G/laravel-packager - I just found it now, maybe it will be interesting to add a CLI command with my package directly).
-
create the migrations to create the permissions in the database in your freshly created package. You have an example in one of my other packages: https://github.com/sebastienheyd/boilerplate-email-editor/blob/master/src/migrations/2019_02_05_130934_emails_permissions.php
-
declare migrations in your package service provider : https://github.com/sebastienheyd/boilerplate-email-editor/blob/66c4f09eaf352f9bfe6d2df210c9e675a69176c5/src/ServiceProvider.php#L21
-
create the controllers and associated routes in your package, ex: https://github.com/sebastienheyd/boilerplate-email-editor/blob/master/src/routes/boilerplate-email-editor.php
-
declare routes in your in your package service provider : https://github.com/sebastienheyd/boilerplate-email-editor/blob/66c4f09eaf352f9bfe6d2df210c9e675a69176c5/src/ServiceProvider.php#L18
-
create the menu item by using the CLI command : https://sebastienheyd.github.io/boilerplate/howto/add-menu-items (don't forget to move generated class in your package)
-
check permissions on menu item : https://github.com/sebastienheyd/boilerplate-email-editor/blob/66c4f09eaf352f9bfe6d2df210c9e675a69176c5/src/Menu/BoilerplateEmailEditor.php#L12
-
check permissions on controllers : https://github.com/sebastienheyd/boilerplate-email-editor/blob/66c4f09eaf352f9bfe6d2df210c9e675a69176c5/src/Controllers/EmailController.php#L21
Permissions and roles are provided by Laratrust : https://laratrust.santigarcor.me/docs/6.x/
Hope this will help you...
from boilerplate.
To make it easier I just release a new package that will allows you to build packages (aka modules) for boilerplate with one artisan command.
https://github.com/sebastienheyd/boilerplate-packager
This will build a package where you can code directly you features. Don't hesitate to send me feedback.
from boilerplate.
Related Issues (20)
- How to send extra params to select2 ajax? HOT 1
- How to set min and max date using Carbon on datetimepicker? HOT 1
- Datatables doesn't display buttons
- Unknown column '_token' in 'field list' , Mass assignment issue HOT 1
- Not able to run tests HOT 5
- ID issue in Datatables class HOT 1
- [ENHANCEMENT] Repeatable component HOT 2
- how to use form component for modal form HOT 1
- [Question] - How to remove default menu items HOT 1
- Dark mode is not completely disabled HOT 1
- Error 500 Memory limit with a new user account and just backend access role HOT 7
- Suggestion to convert package into a Vue version HOT 1
- Textarea option not working in input component HOT 1
- Impersonate - too many redirects HOT 3
- How to update package ? HOT 1
- Permission always return false HOT 1
- Datatable row color HOT 1
- [Datatables] Hide columns based on ajax propery
- [Enhancement] Set max column render width on datatables HOT 2
- Remove keep-alive session
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from boilerplate.