{"id":31,"date":"2020-09-30T13:27:59","date_gmt":"2020-09-30T13:27:59","guid":{"rendered":"http:\/\/blog.prestigecode.com\/?p=31"},"modified":"2020-09-30T13:28:38","modified_gmt":"2020-09-30T13:28:38","slug":"fixing-api2-tweaking-api","status":"publish","type":"post","link":"https:\/\/blog.prestigecode.com\/index.php\/2020\/09\/30\/fixing-api2-tweaking-api\/","title":{"rendered":"Fixing API2\/ &#038; Tweaking API\/"},"content":{"rendered":"\n<p>API2<\/p>\n\n\n\n<p>I went ahead and finally got most of the API2 working. Adding a second Laravel application wasn&#8217;t exactly the easiest when I had to make the new Auth features work. It wasn&#8217;t a simple installation, there were a lot of random issues that I had to go through. Quite simply, frustrating. After I have ironed out many of the issues (I still have the weird subdirectory issue) the login and registration work.<\/p>\n\n\n\n<p>Livewire Issues<\/p>\n\n\n\n<p>I had some issues with Livewire, a scaffolding for designing &#8220;magical&#8221; web pages using Laravel. While I don&#8217;t know the entire full scope of Livewire, I know that it provides some awesome functionality for updating seemingly static components on a webpage. I hope to explore more that it has to offer when developing more Antilobby features. These issues I had were more so an issue with detecting the blades used to server Livewire. I had to tweak a few settings and make sure permissions were set and that the Laravel caches were cleared. Strange thing when I had only changed a few items. I also had some weird issue with a library for charts. I had gone ahead and adapted the Chart library differently without using the established Artisan command for adding new ones. So the system I had originally put in place&#8230; I don&#8217;t really use it. I use mainly the logic that was used in the library for those charts. Now after tinkering with some things, some of the charts in the main application broke. I&#8217;ll have to check that out next session.<\/p>\n\n\n\n<p>Other Livewire issues&#8230;<\/p>\n\n\n\n<p>Livewire comes with its own set of scripts that must be placed on every page where you intend on using it. This was fighting me for awhile. Livewire does have a config file that will allow me to change how source links are generated when you call it. I had to use the command <code>php artisan livewire:publish<\/code> so that the application would provide an actual set of files to change these settings with (changing the vendor files don&#8217;t work).<\/p>\n\n\n\n<p>API<\/p>\n\n\n\n<p>So after a few sessions of coming back and tinkering with things, I can finally authenticate users and have them register. And the bonus is that I can detect these sessions on the other Laravel application using the standard auth procedures. Next step&#8230; learn more about these procedures so I can get the user information using the Controllers.<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>API2 I went ahead and finally got most of the API2 working. Adding a second Laravel application wasn&#8217;t exactly the easiest when I had to make the new Auth features work. It wasn&#8217;t a simple installation, there were a lot of random issues that I had to go through. Quite simply, frustrating. After I have [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[13,14,11,15,12],"_links":{"self":[{"href":"https:\/\/blog.prestigecode.com\/index.php\/wp-json\/wp\/v2\/posts\/31"}],"collection":[{"href":"https:\/\/blog.prestigecode.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.prestigecode.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.prestigecode.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.prestigecode.com\/index.php\/wp-json\/wp\/v2\/comments?post=31"}],"version-history":[{"count":4,"href":"https:\/\/blog.prestigecode.com\/index.php\/wp-json\/wp\/v2\/posts\/31\/revisions"}],"predecessor-version":[{"id":35,"href":"https:\/\/blog.prestigecode.com\/index.php\/wp-json\/wp\/v2\/posts\/31\/revisions\/35"}],"wp:attachment":[{"href":"https:\/\/blog.prestigecode.com\/index.php\/wp-json\/wp\/v2\/media?parent=31"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.prestigecode.com\/index.php\/wp-json\/wp\/v2\/categories?post=31"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.prestigecode.com\/index.php\/wp-json\/wp\/v2\/tags?post=31"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}