Anyone has used Ionic & Laravel together?
I am wondering how / where to install ionic when starting... Should I cd into the public folder and install it there or a completely new folder? How should it be done?
Yes I have, only as an experiment though. Although it is looking likely that we will be developing a production app using ionic and laravel in the future.
We developed our api in laravel, and then hocked an ionic project into the api using angular resource or http. So they are essentially to separate projects, the ionic app just consumes the api.
Thanks for the feedback!
Glad to see I'm not alone :-)
I haven't worked yet with Laravel as an API. Can you still use the CRSF filters in your routes? What needs to be modified or paid attention to? (example sending forms, authentication etc...)
Anythings I need to pay attention to in particular?
No problem, yes you can still use CRSF filters although you have to do a little bit more work to get it to work. This answer on stackoverflow is a pretty good solution: http://stackoverflow.com/a/23760366
You are probably going to want an ssl certificate to make sure your api is secure. Just make good use of angular resource which makes consuming with apis super easy, and try and keep your json responses from laravel consistent.
Regarding CSRF tokens, if you're building out an API and a separate front end/mobile app you'll probably be better served using JWT, JSON Web Tokens for security assuming you're also using SSL for all communications. With JWT and SSL you do not also need sessions and CSRF tokens!
This is a great resource explaining the advantages of JWT vs sessions and cookies:
I'm trying to implement the same type of project with Ionic and Laravel as the API, but I can't figure out how to get the two to round trip as Ionic is on localhost:8100 and Laravel is on localhost:8000. I tried an interceptor that appends the correct url for outgoing API requests made using ngResource, but that just pops a cross-site scripting error. How are you/would you implement round trips using these two frameworks? I posted my code in StackOverflow if that helps - http://stackoverflow.com/questions/30767020/trying-to-connect-ionic-app-to-a-laravel-api.