The following warnings occurred:
Warning [2] Undefined variable $unreadreports - Line: 26 - File: global.php(961) : eval()'d code PHP 8.2.25 (Linux)
File Line Function
/global.php(961) : eval()'d code 26 errorHandler->error
/global.php 961 eval
/showthread.php 28 require_once





× This forum is read only. As of July 23, 2019, the UserSpice forums have been closed. To receive support, please join our Discord by clicking here. Thank you!

  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
ORM? REST routing?
#1
First off, hello from a potential new user, nice to see you.

I have not tried UserSpice yet, still reading about it. I have two initial questions:

1) Is there an ORM provided for the database access? Or, can I integrate an existing one? I was spoiled by Eloquent in the past.

2) How flexible is the routing for creating REST services?

More questions will come.

Thanks!
  Reply
#2
Both of those features are sort of DIY at the moment. I've been tinkering with some ways of creating an API, but because userspice is more of a kickstarter/framework, what you would actually want to do with that API is totally dependent on the project you build. There aren't many built in userspice db entries that you would want to access with an API. Does that make sense?
  Reply
#3
Thank you, it does make some sense. Does this mean we can use a framework of our choice?

The main thing about ORM integration is, say, when you want to use user authentication rules for the various database operations.

Thanks
  Reply
#4
Yeah. You can use the framework of your choice for a rest API. Or you can write one. There's an example in users/api/index.php that might be a good starting point. If that doesn't work, we might be able to help get something that works better for your needs.

I've personally never done anything with ORM. UserSpice uses a typical relational SQL database so I tend to think along those lines. That said, US has been more flexible than I ever could have imagined, so if you can interact with PDO, I'm pretty sure you can accomplish whatever you want. Again, let me know if I can help.
  Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)