laravel-enso / enso

Laravel Vue SPA, Bulma themed. For demo login use `admin@laravel-enso.com` & `password` -
https://www.laravel-enso.com
MIT License
1.08k stars 277 forks source link

upgrades to v4 #316

Closed raftx24 closed 4 years ago

raftx24 commented 4 years ago

upgrades steps Backend:

  1. update dependencies to next major for example core ^5.0
  2. add SANCTUM_STATEFUL_DOMAINS to .env (like this)
  3. remove App from namespace of packages,(you can use this regex, LaravelEnso\\(.*)\\App\\ replace with LaravelEnso\\$1\\) 3.1. you need to replace laravel-enso/(.*)/src/App/ with laravel-enso/$1/src/ too
  4. you need to add AuthorizationCookie and EnsureFrontendRequestsAreStateful to middleware(like this)
  5. if you didn't bind Core/User to local user you need to add this too AppServiceProvider (like this )
  6. you need to replace web middleware with api in RouteServiceProvider.php and in your local routes (like this)
  7. you need to replace defaults.guard to api and api.driver with sanctum (like this)
  8. CompanyStatuses was replaced with Statuses
  9. you need to adds type to migration fields(like this)
  10. maybe you need to fix routes in imports and static files (like this) (you can use this for find laravel-enso/.*/src/database)
  11. publish santum config php artisan vendor:publish --tag=sanctum-config
  12. publish monitoring seeder php artisan vendor:publish --tag=control-panel-api-seeder
  13. add Broadcast::routes(['middleware' => ['auth:sanctum']]); to routes/api.php(like this)
  14. replace use LaravelEnso\Helpers\Classes\ with use LaravelEnso\Helpers\Services\
  15. companies doesn't have documents, comments, discussion anymore, if you still need them you need to install them and using DynamicMethod (like dynamic-methods, AppServiceProvider.php, composer.json)
  16. composer update

upgrades steps FrontEnd:

  1. upgrade dependencies to the next major version (for example "@enso-ui/ui": "^3.0") except (clipboard, confirmation, datepicker, directives, divider, dropdown-indicator, enums, erd, laravel-validation, money, progress-bar, progress-circle, route-mapper, strings, switch, tabs, textarea, themes, transitions, wysiwyg, uploader)
  2. remove App from namespace of packages,(you can use this regex, LaravelEnso\\(.*)\\App\\ replace with LaravelEnso\\$1\\)
  3. how-to, activity-log, tutorials were removed from the enso-ui/ui, therefore if you need to use them you need install too and also you need to setup them(you can look at .eslintrc.js, app.js, vue.config.js, router.js)
  4. companies doesn't have documetns, comments, discussion anymore, if you still need them you can use patch(like this)
  5. toastr was changed in this version, and you need to inject it wherever you need(like this )
  6. modal was changed and :show was removed, you need to use v-if instead of :show (like this and this)
  7. update version 4.0.0
  8. yarn, yarn upgrade