{"action":"created","issue":{"url":"https://api.github.com/repos/Laravel-Backpack/Base/issues/131","repository_url":"https://api.github.com/repos/Laravel-Backpack/Base","labels_url":"https://api.github.com/repos/Laravel-Backpack/Base/issues/131/labels{/name}","comments_url":"https://api.github.com/repos/Laravel-Backpack/Base/issues/131/comments","events_url":"https://api.github.com/repos/Laravel-Backpack/Base/issues/131/events","html_url":"https://github.com/Laravel-Backpack/Base/issues/131","id":220459655,"number":131,"title":"Consistent extend-package command","user":{"login":"tabacitu","id":1032474,"avatar_url":"https://avatars0.githubusercontent.com/u/1032474?v=4","gravatar_id":"","url":"https://api.github.com/users/tabacitu","html_url":"https://github.com/tabacitu","followers_url":"https://api.github.com/users/tabacitu/followers","following_url":"https://api.github.com/users/tabacitu/following{/other_user}","gists_url":"https://api.github.com/users/tabacitu/gists{/gist_id}","starred_url":"https://api.github.com/users/tabacitu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tabacitu/subscriptions","organizations_url":"https://api.github.com/users/tabacitu/orgs","repos_url":"https://api.github.com/users/tabacitu/repos","events_url":"https://api.github.com/users/tabacitu/events{/privacy}","received_events_url":"https://api.github.com/users/tabacitu/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2017-04-09T09:29:13Z","updated_at":"2017-09-11T16:02:31Z","closed_at":"2017-09-11T12:03:26Z","author_association":"OWNER","body":"I think the next big improvement in the Backpack packages will be to make it easier to extend them, and let the developer modify all classes to his liking. Right now that's a little difficult, and we don't have documentation for each package on how to do that. This proposal aims to bring a consistent way to extend all Backpack packages.\r\n\r\nPackages involved (and what will be extended):\r\n- Base (DashboardController, Auth controllers, admin middleware, ResetPasswordNotification)\r\n- CRUD (CrudController, CrudRequest, CrudPanel)\r\n- LogManager (LogController)\r\n- PageManager (PageCrudController, PageRequest, Models\\Page)\r\n- PermissionManager (controllers, requests, models)\r\n- NewsCrud (controllers, requests, models)\r\n- MenuCrud (controller, request, model)\r\n\r\nCommands:\r\n- php artisan backpack:extend-base\r\n- php artisan backpack:extend-crud\r\n- php artisan backpack:extend-logmanager\r\n- php artisan backpack:extend-pagemanager\r\n- php artisan backpack:extend-permissionmanager\r\n- php artisan backpack:extend-newscrud\r\n- php artisan backpack:extend-menucrud\r\n\r\nEach command would:\r\n- publish blank controllers in ```app/Http/Controllers/Admin/``` that extend the ones in the package;\r\n- publish blank models in ```app/Models/``` that extend the ones in the package;\r\n- publish blank requests in ```app/Requests/``` that extend the ones in the package;\r\n- publish blank middleware in ```app/Middleware/``` that extend the ones in the package;\r\n- publish blank php classes in ```app/Library/``` that extend the other classes in the packages (CrudPanel for example);\r\n- create a routes file inside ```routes/backpack``` with the routes pointing to the new controllers;\r\n- echo in the command line any more steps that the developer needs to do to finish extending the package (no need to look over the documentation to find out);\r\n\r\nFile naming:\r\n- the extended files will have the exact same name as the ones they extend; the only difference will be the namespace (one is inside ```App/Http```, one is inside ```Backpack/PageManager/app/Http/etc```).\r\n\r\nResult:\r\nBasically running an extend command will publish all the blank classes you need to extend a package, and the routes file to make the application use those new files. For most packages, this single command is all you need to do.\r\n\r\nPossible problems:\r\n- pagemanager has its classes defined in the config file; in order to make extending easier, those config options will go away;\r\n\r\nDid I miss anything? Do you guys see any problems I haven't in implementing this? Thanks, cheers!\r\n"},"comment":{"url":"https://api.github.com/repos/Laravel-Backpack/Base/issues/comments/328576313","html_url":"https://github.com/Laravel-Backpack/Base/issues/131#issuecomment-328576313","issue_url":"https://api.github.com/repos/Laravel-Backpack/Base/issues/131","id":328576313,"user":{"login":"eduardoarandah","id":4065733,"avatar_url":"https://avatars3.githubusercontent.com/u/4065733?v=4","gravatar_id":"","url":"https://api.github.com/users/eduardoarandah","html_url":"https://github.com/eduardoarandah","followers_url":"https://api.github.com/users/eduardoarandah/followers","following_url":"https://api.github.com/users/eduardoarandah/following{/other_user}","gists_url":"https://api.github.com/users/eduardoarandah/gists{/gist_id}","starred_url":"https://api.github.com/users/eduardoarandah/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eduardoarandah/subscriptions","organizations_url":"https://api.github.com/users/eduardoarandah/orgs","repos_url":"https://api.github.com/users/eduardoarandah/repos","events_url":"https://api.github.com/users/eduardoarandah/events{/privacy}","received_events_url":"https://api.github.com/users/eduardoarandah/received_events","type":"User","site_admin":false},"created_at":"2017-09-11T16:02:31Z","updated_at":"2017-09-11T16:02:31Z","author_association":"NONE","body":"(Sorry if this comment reopens the issue) \r\n\r\nMy thoughts: \r\n\r\nI've made a LOT of wordpress sites before. \r\nDealing with users with zero experience I found some things:\r\n\r\nWordpress base functionality covers 90% of all requirements for a user interface in the backend. \r\n\r\nComparing it with backpack, there's only a couple of things missing: \r\nA **super-easy** media manager capable of \"attaching\" its images to other entities, with auto-resize-crop\r\n\r\n![clipboard01](https://user-images.githubusercontent.com/4065733/30282690-a3c4bcb6-96db-11e7-9e25-cd6f0dbae9ba.png)\r\n\r\nThis could be covered with this package, haven't tried it but seems good\r\n\r\nhttps://murze.be/2017/08/getting-started-laravel-medialibrary-video-tutorial/\r\n\r\nA dashboard with draggable items.\r\n\r\n![fff](https://user-images.githubusercontent.com/4065733/30282861-1d5a25ca-96dc-11e7-9676-6dc623140781.png)\r\n\r\nAnd finally, a \"centralized\" way of updating settings for the plugins installed. \r\n\r\nIn this example, the \"Akismet\" plugin automatically created a settings->akismet screen. \r\n\r\n![rrr](https://user-images.githubusercontent.com/4065733/30283080-b9c408e0-96dc-11e7-8700-ca953c7ec0a0.png)\r\n\r\nThe settings screen is nothing more than buttons and fields\r\n![sett](https://user-images.githubusercontent.com/4065733/30283666-494943ee-96de-11e7-8cb0-88cc1cf506d6.png)\r\n\r\n\r\nThis is crucial because: \r\n1) You can't ask the user to edit .env files or config/myplugin.php files \r\n2) You can't ask the user to pay a programmer every time they want to change some setting\r\n3) You can't put eveything in Backpack/Settings, it gets confusing\r\n4) You want end users being able to change its google analytics code, but deny other settings\r\n\r\nThere must be a plug-and-play way of letting the developer \"register\" its settings in \r\nbackpack-settings (to create a settings page)\r\nbackpack-base (to create a menu item to access that settings page)\r\n\r\nMaybe namespacing settings? \r\nconfig('settings.myplugin.analytics-code')\r\n\r\nAnyway, this is just my thoughts coming from a lot of years doing wordpress \r\n\r\nAnother random thought: \r\n\r\nI once tried OctoberCMS but didn't like it because it adds complexity instead of removing it, the worst of all sins for the [KISS god](https://en.wikipedia.org/wiki/KISS_principle)\r\n\r\nBackpack removes complexity when it's not needed.\r\nSaves you from creating a bunch of routes, views and requests. You only code them when needed.\r\n\r\nhave a good day!\r\n"}}
{"actor":{"display_login":"eduardoarandah"}}