<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[GetCandy - Medium]]></title>
        <description><![CDATA[SOMETHING SWEET IS COMING - Medium]]></description>
        <link>https://medium.com/getcandy?source=rss----1e0b150c5b4b---4</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>GetCandy - Medium</title>
            <link>https://medium.com/getcandy?source=rss----1e0b150c5b4b---4</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 01 Dec 2026 11:43:48 GMT</lastBuildDate>
        <atom:link href="https://medium.com/feed/getcandy" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Developer update week 07 2019]]></title>
            <link>https://medium.com/getcandy/developer-update-week-07-2019-90288728f305?source=rss----1e0b150c5b4b---4</link>
            <guid isPermaLink="false">https://medium.com/p/90288728f305</guid>
            <category><![CDATA[ecommerce-web-development]]></category>
            <category><![CDATA[developer-blog]]></category>
            <category><![CDATA[api]]></category>
            <category><![CDATA[web-development]]></category>
            <dc:creator><![CDATA[Shaun Rainer]]></dc:creator>
            <pubDate>Thu, 21 Feb 2019 17:35:38 GMT</pubDate>
            <atom:updated>2019-02-21T17:35:38.182Z</atom:updated>
            <content:encoded><![CDATA[<h4>Yes, the wait is over! Get Candy documentation is finally here and we hope it will help you in building your latest store.</h4><p>Here at GetCandy HQ, the team has been so busy developing new features, we almost forgot to let everyone know how GetCandy works!</p><p>We’ve started by documenting the endpoints to allow you to create baskets and place orders. We will, of course, be adding more soon and throughout the development.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*ktwZG5F-V_MEa1r2VyBEmQ.png" /></figure><p>The Documentation has been split up into two sections, the endpoint references and the more generic set up/hub docs.</p><p>If you haven’t already, check out our article on getting <a href="https://medium.com/getcandy/installing-getcandy-from-scratch-39302a988ffb">set up from scratch</a> we’ve also included the content from this article in the docs for easy reference</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*QTl4-BalrAaV44MapzUCTA.png" /></figure><p>So feel free to check out our new documentation.<br><a href="https://docs.getcandy.io/">GetCandy Docs</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=90288728f305" width="1" height="1" alt=""><hr><p><a href="https://medium.com/getcandy/developer-update-week-07-2019-90288728f305">Developer update week 07 2019</a> was originally published in <a href="https://medium.com/getcandy">GetCandy</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Developer update week 06 2019]]></title>
            <link>https://medium.com/getcandy/developer-update-week-06-2019-590918cd7386?source=rss----1e0b150c5b4b---4</link>
            <guid isPermaLink="false">https://medium.com/p/590918cd7386</guid>
            <category><![CDATA[laravel]]></category>
            <category><![CDATA[rest-api]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[ecommerce]]></category>
            <category><![CDATA[developer-blog]]></category>
            <dc:creator><![CDATA[Alec Ritson ]]></dc:creator>
            <pubDate>Wed, 06 Feb 2019 12:47:32 GMT</pubDate>
            <atom:updated>2019-02-06T12:47:32.108Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ykUW9C4kS2tVJfY0C9m8eA.jpeg" /></figure><h4>An insight into what sweet things we’ve been cooking up.</h4><p>So we understand we’ve been super quiet here at Candy HQ and it’s not for lack of progress, we’ve been hard-pressed to our keyboards adding stability changes and improvements to the API &amp; Hub and now we’re at a point where we can deliver a weekly developer update of what we’re up to and what’s new.</p><p>So without further ado…</p><h3>Upgrading to Laravel 5.7</h3><p>From version 0.2.0 we are now supporting Laravel 5.7</p><p>We want GetCandy to always be available on the most recent version of Laravel, it’s that simple. So we will actively take steps to ensure that you can upgrade GetCandy when you update your own applications, or you can install it with minimal fuss on the latest versions.</p><p>We will always tag a minimum <a href="https://semver.org/#spec-item-7"><strong>MINOR</strong></a> version when we do so.</p><h3>Cutting the load with internal requests</h3><p>A common set up when consuming an API in your app is to have a proxy between your frontend and the API. If you have your API on a separate instance to your frontend, this is great as you have distributed the load.</p><p>The problem comes when everything is on the same instance, you’re going to be making wasteful HTTP requests to your API, for example…</p><p>Say we have a <strong>basket</strong> page, on this page we hit the controller and we use the PHP client to fetch a few different things we need, such as:</p><ul><li>The current basket</li><li>Any recommended or related products</li><li>The current user (if there is one)</li><li>Estimated shipping</li></ul><p>And that’s just for the basket, you might even have a call to the API to fetch the categories, for example (although would likely be cached)</p><p>So for one user, there is a potential of 5 HTTP requests per visit to this one page. If you have 100 people looking at their basket, that’s <strong>500 </strong>requests, way too many for such little traffic. So how do internal requests solve this??</p><h4>Internal requests to the rescue</h4><p>Using internal requests we can route all the client calls internally through Laravel’s container, meaning no actual HTTP requests get called, it’s all handled…internally.</p><p>So now our <strong>5 </strong>requests become just <strong>1, </strong>one request to the proxy controller. So with 100 people you only need to make 100 HTTP requests. Soooo much better, your server will love you for it.</p><p>Okay cool, how do you utilise this? Well if you’re using the <a href="https://github.com/getcandy/candy-client-php">PHP client</a> then all you need to do is add this env variable:</p><pre>CANDY_INTERNAL_REQUESTS=true</pre><p>And that’s it, now all calls through the client will go through the container.</p><p>That about wraps up this weeks update, next week I’ll cover how we recently improved Elasticsearch to ensure zero downtime and zero conflict indexing, using aliases.</p><p>If you’re interested in any particular topics then feel free to leave and comment and I’ll see what I can do.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=590918cd7386" width="1" height="1" alt=""><hr><p><a href="https://medium.com/getcandy/developer-update-week-06-2019-590918cd7386">Developer update week 06 2019</a> was originally published in <a href="https://medium.com/getcandy">GetCandy</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Installing GetCandy from scratch]]></title>
            <link>https://medium.com/getcandy/installing-getcandy-from-scratch-39302a988ffb?source=rss----1e0b150c5b4b---4</link>
            <guid isPermaLink="false">https://medium.com/p/39302a988ffb</guid>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[ecommerce]]></category>
            <category><![CDATA[laravel]]></category>
            <category><![CDATA[php]]></category>
            <category><![CDATA[tutorial]]></category>
            <dc:creator><![CDATA[Alec Ritson ]]></dc:creator>
            <pubDate>Tue, 05 Feb 2019 10:44:27 GMT</pubDate>
            <atom:updated>2019-02-05T10:44:27.772Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*11wKM0JF0hvGns3JTwR5tA.png" /></figure><h4>This is a guide to get you up and running with GetCandy. I’m going to assume you know a thing or two about Laravel and setting up third-party packages.</h4><p><em>For this, I’ll be using Valet+ for my development machine, but you’re free to use whatever you want.</em></p><h3>Initial Steps</h3><p>So initially we want to install Laravel 5.7 and then pull in the API, we’ll worry about the Hub later.</p><pre>laravel new online-store</pre><p>Once that’s installed, we can then install the API.</p><pre>cd online-store &amp;&amp; composer require &quot;getcandy/candy-api&quot;:&quot;0.2.*&quot;</pre><p>Once done, publish the config.</p><pre>php artisan vendor:publish --tag=config</pre><p>Feel free to look through the <strong>getcandy.php </strong>config file, we will probably go into more detail about what’s in it in a later post.</p><blockquote>Remember to set up your database</blockquote><h3>Migrations and Traits</h3><p>Before we can use GetCandy we need to add the <strong>HasCandy</strong> trait to our user…</p><pre>&lt;?php</pre><pre>namespace App;</pre><pre>use GetCandy\Api\Core\Traits\HasCandy;<br>use Illuminate\Notifications\Notifiable;<br>use Illuminate\Contracts\Auth\MustVerifyEmail;<br>use Illuminate\Foundation\Auth\User as Authenticatable;</pre><pre>class User extends Authenticatable<br>{<br>    use Notifiable, HasCandy;</pre><pre>    /**<br>     * The attributes that are mass assignable.<br>     *<br>     * <a href="http://twitter.com/var">@var</a> array<br>     */<br>    protected $fillable = [<br>        &#39;name&#39;, &#39;email&#39;, &#39;password&#39;,<br>    ];</pre><pre>    /**<br>     * The attributes that should be hidden for arrays.<br>     *<br>     * <a href="http://twitter.com/var">@var</a> array<br>     */<br>    protected $hidden = [<br>        &#39;password&#39;, &#39;remember_token&#39;,<br>    ];<br>}</pre><p>Now we are ready to install, run the install command:</p><pre>php artisan candy:install</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/636/1*P0Dc_QU3NFF6oyeD1umcyA.gif" /></figure><h4>Authentication</h4><p>GetCandy uses Passport to deal with authentication, we just need to tell Laravel we want to use it for API authentication, so in <em>config/auth.php </em>the guards should look like this:</p><pre>&#39;guards&#39; =&gt; [</pre><pre>  &#39;web&#39; =&gt; [</pre><pre>    &#39;driver&#39; =&gt; &#39;session&#39;,</pre><pre>    &#39;provider&#39; =&gt; &#39;users&#39;,</pre><pre>  ],</pre><pre>  &#39;api&#39; =&gt; [</pre><pre>    &#39;driver&#39; =&gt; &#39;passport&#39;,</pre><pre>    &#39;provider&#39; =&gt; &#39;users&#39;,</pre><pre>  ],<br>],</pre><p>Hooray! we have successfully installed GetCandy!</p><p>If you just want to use the API we’re all done, otherwise, we can also install the Hub to manage our store.</p><h3>Installing the Hub</h3><p>The Candy Hub provides a UI for you to manage all aspects of your store, it’s where you can care for your products, see your orders and build your categories, it’s a great tool and easy to install.</p><p>To get started, let&#39;s pull in the package:</p><pre>composer require &quot;getcandy/candy-hub&quot;:&quot;0.2.0&quot;</pre><p>Once installed, we just need to publish the public resources, so we get some styling on the hub.</p><pre>php artisan vendor:publish --tag=public</pre><p>With that, just go to <em>/hub</em> and you should see the login screen.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VTIj1iiR1Um6fYhwltUXaQ.png" /><figcaption>GetCandy Login</figcaption></figure><p>Put the credentials you used when you went through the API installation and you should be able to log in. You will then be on the Dashboard page.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jJW-6rqbE_QCini2C4Bn_A.png" /><figcaption>The GetCandy Hub Dashboard</figcaption></figure><h3>Wrapping up</h3><p>So we’ve managed to get the API installed and the Hub up and running, we’ll leave it here for now, but we will look at products, categories etc in more detail in another post. For now just feel free to click around and get a feel for it.</p><p>For issues &amp; feedback: <a href="https://github.com/getcandy/candy-api/issues">https://github.com/getcandy/candy-api/issues</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=39302a988ffb" width="1" height="1" alt=""><hr><p><a href="https://medium.com/getcandy/installing-getcandy-from-scratch-39302a988ffb">Installing GetCandy from scratch</a> was originally published in <a href="https://medium.com/getcandy">GetCandy</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>