I found this fix on Laravel News, if you haven’t been there… leave this site and go there now, and just wanted to record it in a way that was easy for me to access. I’ve Googled this thing 3 times this week.
Not a lot on creating and updating a hasOne record so here’s what ended up working for me. I have my Site model and a SiteCache. SiteCache should have a single record per Site.
SiteCache migration (the Site migration isn’t that important so I omitted it here)
The creating and updating of the cache record on the SiteCache page isn’t as fluent as I’d like but with a little helper method on the Site model all is good.
In trying to build a very small micro-service I decided to use client credential grant tokens. I didn’t need users or personal tokens. I just needed one of my other sites to be able to access data for this new micro-service. According to Taylor, “The client credentials grant is suitable for machine-to-machine authentication” which sounds just …
The Httpful package is fantastic. Searching around I couldn’t find out how to use Httpful\Request::post to send post data to a endpoint. Here’s what I figured out:
One the receiving end, you’ll be able to access your info from $_POST. If you found this, you were probably fruitlessly searching the web for the answer just like me. I hope this helps.
In using gulp to include files inline I ran into a bit of an error. gulp-include kept throwing the following error:
WARN: gulp-include – no files found matching [file_path_here]
These types of errors drive me crazy. The file was exactly where it was supposed to be. I checked it several times. What gives?! Turns out, gulp-include feels that finishing the include line with a semicolon is a deadly sin.
Changing all includes to remove the semicolon did the trick. Here’s the gulp file for reference.
If you found this article, hopefully it will help you. Happy typing.