Comments (2)
I've been thinking about this because I need to modify the Page model.
I'm wondering if all of this is necessary. Why should the model, controller and request be created if I only want to modify the model (or nothing at all if it creates them by default)?
I would prefer a more general way to allow a user to extend any Backpack package and add only the files that are needed.
I'm not an expert in Laravel package development but I think this could be done by resolving the relevant classes using the IoC container although I'm not sure how to best integrate this into the CRUD package (specifically CrudPanel::setModel()
).
As for the routes: I think a good way (for this and other Backpack packages) would be to use the normal CRUD::resource()
method, so the process would be the same as when creating a custom CRUD interface. The problem with this is that the PageManager routes include the template name in the URL. IMHO this could be moved to a POST parameter. We could then still define the default template in a URL by adding ?template=TEMPLATE
.
All this would result in some more work when installing the package (adding the routes) and when you want to modify the classes but I think it would be better especially as a default for future Backpack packages.
from pagemanager.
It doesn't need all this, it just needs a config file that lets you set the model/ controller, and a more easily extended service provider.
from pagemanager.
Related Issues (20)
- Target class [PageController] does not exist. HOT 4
- Unable to install via Composer: code error leading to post-autoload-dump event error HOT 6
- Error : Declaration of ... Page::sluggable() must be compatible with Cviebrock\EloquentSluggable\Sluggable::sluggable(): array HOT 4
- [Bug] visibility: hidden ckeditor and Wysiwyg HOT 11
- reorder items inside the repeatable field HOT 1
- None of the views in the given array exist HOT 6
- the wisywig fieldtype doensn't exist in the backpack v5.0 HOT 2
- Own Controller or Model not used by PageManager HOT 3
- Doesn't work with no wysiwyg field HOT 3
- [Bug] select_page_template field cannot be used multiple times HOT 1
- Version control when editing a page HOT 2
- support for translation / multiple language HOT 5
- Nested pages? HOT 6
- Upload field not working with Backpack v6 using new uploader HOT 11
- Upload File Validation HOT 2
- Unknown database type bit requested, Doctrine\DBAL\Platforms\MySQL80Platform may not support it. HOT 6
- how to get fake column value HOT 1
- Errors while upgrading from 3.6 to 4.0 HOT 2
- PHP Fatal error: Trait 'App\PageTemplates' not found in HOT 2
- Not installing Laravel 5.8 HOT 2
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 pagemanager.