The following warnings occurred: | ||||||||||||
Warning [2] Undefined variable $unreadreports - Line: 26 - File: global.php(961) : eval()'d code PHP 8.2.25 (Linux)
|
ORM? REST routing? - Printable Version +- UserSpice (https://userspice.com/forums) +-- Forum: General (https://userspice.com/forums/forumdisplay.php?fid=20) +--- Forum: New to UserSpice? (https://userspice.com/forums/forumdisplay.php?fid=22) +--- Thread: ORM? REST routing? (/showthread.php?tid=858) |
ORM? REST routing? - evang - 11-29-2017 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! ORM? REST routing? - mudmin - 11-29-2017 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? ORM? REST routing? - evang - 11-30-2017 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 ORM? REST routing? - mudmin - 11-30-2017 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. |