bear-sync icon indicating copy to clipboard operation
bear-sync copied to clipboard

Refactor: Create database connection without Laravel's app() helper

Open minthemiddle opened this issue 4 years ago • 1 comments

  • It would be great if you could bear_sync without Laravel
  • The only problem so far is app() (BearNote.php, l.54) which throws an undefined function()
  • One idea on the how can be found in this gist
  • (I will try to create a PR for this)

minthemiddle avatar Jan 06 '20 17:01 minthemiddle

Yeah, that should do, I'd like to resolve ConnectionFactory out of the container for Laravel apps, so maybe a conditional that checks if "app()" is defined and uses the strategy you referenced if it's not? Looks good to me though.

calebporzio avatar Jan 06 '20 18:01 calebporzio