<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Surya Wiguna</title>
    <description>The latest articles on DEV Community by Surya Wiguna (@suryawiguna).</description>
    <link>https://dev.to/suryawiguna</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F426033%2Fdac9b391-eadc-4461-9703-231bb2f3f0e3.jpg</url>
      <title>DEV Community: Surya Wiguna</title>
      <link>https://dev.to/suryawiguna</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/suryawiguna"/>
    <language>en</language>
    <item>
      <title>Now I'm blogging on my on website!</title>
      <dc:creator>Surya Wiguna</dc:creator>
      <pubDate>Wed, 01 Feb 2023 05:15:20 +0000</pubDate>
      <link>https://dev.to/suryawiguna/now-im-blogging-on-my-on-website-ham</link>
      <guid>https://dev.to/suryawiguna/now-im-blogging-on-my-on-website-ham</guid>
      <description>&lt;p&gt;Hi everyone that read this post, previously I said that &lt;a href="https://dev.to/suryawiguna/i-m-moving-to-wordpress-4482"&gt;I move to Wordpress&lt;/a&gt; for share more topics other than programming stuff. But now, I decided to build my blog on my own website. So, you can read all my writings &lt;a href="https://suryawiguna.com/blog" rel="noopener noreferrer"&gt;here&lt;/a&gt;. Thank you!&lt;/p&gt;

</description>
      <category>cryptocurrency</category>
      <category>crypto</category>
      <category>offers</category>
      <category>web3</category>
    </item>
    <item>
      <title>I'm moving to wordpress, here's why</title>
      <dc:creator>Surya Wiguna</dc:creator>
      <pubDate>Fri, 04 Jun 2021 08:20:37 +0000</pubDate>
      <link>https://dev.to/suryawiguna/i-m-moving-to-wordpress-4482</link>
      <guid>https://dev.to/suryawiguna/i-m-moving-to-wordpress-4482</guid>
      <description>&lt;p&gt;For a while, I've write posts here. I share my work and programming stuff with you. But sometimes I feel wanna share other topics that not suitable to share here in dev.to. So I decided to move my blog to wordpress. Read more abot this movement on my post : &lt;a href="http://blog.suryawiguna.com/2021/05/26/why-i-move-my-blog-from-dev-to-to-wordpress/"&gt;http://blog.suryawiguna.com/2021/05/26/why-i-move-my-blog-from-dev-to-to-wordpress/&lt;/a&gt;&lt;/p&gt;

</description>
      <category>wordpress</category>
    </item>
    <item>
      <title>What it is like to work as a software quality assurance?</title>
      <dc:creator>Surya Wiguna</dc:creator>
      <pubDate>Fri, 23 Apr 2021 12:58:32 +0000</pubDate>
      <link>https://dev.to/suryawiguna/what-it-is-like-to-work-as-a-software-quality-assurance-37kk</link>
      <guid>https://dev.to/suryawiguna/what-it-is-like-to-work-as-a-software-quality-assurance-37kk</guid>
      <description>&lt;p&gt;I've been working as a software quality assurance in &lt;a href="https://igloocompany.co/"&gt;igloocompany&lt;/a&gt;, a smart lock company, for more than 1 year now. I was not really familiar of the title before but I interested in the ecosystem of the smart locks.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is software quality assurance?
&lt;/h2&gt;

&lt;p&gt;A software quality assurance or QA mostly make sure all the softwares that developed by the developers are working fine and the costumers as the end users not facing any bug. In igloocompany, they've build many software such as igloohome mobile app, iglooworks mobile app and dashboard, etc (coming soon project). &lt;/p&gt;

&lt;h2&gt;
  
  
  What is software QA doing?
&lt;/h2&gt;

&lt;p&gt;My flow when working as a software QA is if there's a new feature -&amp;gt; the developers will build it until it ready to test -&amp;gt; the QAs test it -&amp;gt; if found a bug, report it -&amp;gt; until there's no bugs left -&amp;gt; the features release. In short like that, but the interesting part is, when I'm testing the app for example, I also got my hand to test the various type of smart locks from a padlock until locks that installed on the door (mortise, deadbolt, etc). So, I can learn how it works, what the technology that they used to make anything posibble to happen, what's next in the future to improve everything (user experience, battery consumption, seamless integrity, etc).&lt;/p&gt;

&lt;p&gt;The skills that needed as a software QA are attention to detail, understand about tech, time management, curiosity. We learn how to manage task, how to find a hidden bugs that may missed by the developers when they build the app because their focus is to make the feature, our focus as QA is to find bugs until we find none and test a new feature before it release.&lt;/p&gt;

&lt;p&gt;In almost 5 years I involve in the tech industry from when I was in college until now, I think the Quality Assurance position is a new one. The fast growing of the tech world maybe become one of the reason that position was born. Are you working as a software QA too? If so, lets tell your experience here.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>My learning experience with ExpressJS and Mongoose</title>
      <dc:creator>Surya Wiguna</dc:creator>
      <pubDate>Wed, 24 Mar 2021 05:02:21 +0000</pubDate>
      <link>https://dev.to/suryawiguna/my-learning-experience-with-expressjs-and-mongoose-337j</link>
      <guid>https://dev.to/suryawiguna/my-learning-experience-with-expressjs-and-mongoose-337j</guid>
      <description>&lt;h2&gt;
  
  
  The Opportunity
&lt;/h2&gt;

&lt;p&gt;Last year, I got an offer to join my friend in a company as backend developer. This position actually interesting yet challenging for me because they combine Laravel and JavaScript as the backend logic (ExpressJS and Mongoose). As I never develop production service using JavaScript, I challenge myself to accept the offer and commit to learn the framework.&lt;/p&gt;

&lt;h2&gt;
  
  
  Learning Process
&lt;/h2&gt;

&lt;p&gt;Best learning method in programming is by doing. By building app or website or service that actually used by real user, so we can learn what the real challenge is. While I learn JS framework for building service that used by web app and mobile app, it demand fast learning and commitment to stay updated with the latest best practice code to prevent the server from loading too slow.&lt;/p&gt;

&lt;p&gt;I learned ExpressJS and Mongoose from read the legacy code while trying to understand the logic, check the official documentation, and if I struggle to find what I need, go to Stack overflow of course. One thing I realized after using two different language in my career until now (PHP &amp;amp; JavaScript), is that the logics are fundamentally the same (loop, if else, try catch, etc) but indeed JS offer something like Promise() that make writing code is more fun.&lt;/p&gt;

&lt;h2&gt;
  
  
  Mongoose vs SQL
&lt;/h2&gt;

&lt;p&gt;I know mongoose because of this, and it's mind blowing to handle data. The simplicity of its query make it more fun to query the data. For example if you want to find data in the collection, you simply call :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;User&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;findOne&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;email&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;my@email.com&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;})&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;From that code you can save it to a variable or attach a &lt;code&gt;.then()&lt;/code&gt; like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;User&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;findOne&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;email&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;my@email.com&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;})&lt;/span&gt;
&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;then&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;user&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;user&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;})&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That's basically it to find user with email &lt;code&gt;my@email.com&lt;/code&gt;. I think I love mongodb and mongoose.&lt;/p&gt;

&lt;p&gt;Okay that's my experience learning new language and framework as a backend developer in a new company. Thanks for reading and how do you think of learning by doing in work? Let me know&lt;/p&gt;

</description>
      <category>mongodb</category>
      <category>javascript</category>
      <category>node</category>
    </item>
    <item>
      <title>HTTP Request Simply Explained</title>
      <dc:creator>Surya Wiguna</dc:creator>
      <pubDate>Thu, 18 Feb 2021 08:19:45 +0000</pubDate>
      <link>https://dev.to/suryawiguna/http-request-simply-explained-1949</link>
      <guid>https://dev.to/suryawiguna/http-request-simply-explained-1949</guid>
      <description>&lt;p&gt;Everybody using internet almost everyday for every purpose for getting, sending, updating, or deleting information. All of that actions used in HTTP, and here they are:&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;GET&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;GET&lt;/code&gt; method is used for getting information, such as your friend number, all products that ready stock, the shoes that are in black color, etc. This method usually known as Read/Retrieve in CRUD.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;POST&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;POST&lt;/code&gt; method is usually used for sending information. For example saving your new account information, posting image to instagram, tweeting, etc. &lt;code&gt;POST&lt;/code&gt; is represent Create in CRUD.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;PUT/PATCH&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;PUT&lt;/code&gt; and &lt;code&gt;PATCH&lt;/code&gt; are for Updating the informations that are already stored before. For example when you change your username, you photo, editing your caption, etc. The difference between them is, &lt;code&gt;PUT&lt;/code&gt; updates the entire resource while &lt;code&gt;PATCH&lt;/code&gt; applies a partial update to the resource.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;DELETE&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;You guest it, &lt;code&gt;DELETE&lt;/code&gt; just like its name is for delete the information, apart from what technique was use for deleting a resource whether its hard delete or soft delete.&lt;/p&gt;

&lt;p&gt;That's all, hope you will understand more about how internet protocols worked. Thanks for reading!&lt;/p&gt;

</description>
      <category>architecture</category>
      <category>cloud</category>
      <category>webdev</category>
      <category>googlecloud</category>
    </item>
    <item>
      <title>My way to handle money format input in Laravel</title>
      <dc:creator>Surya Wiguna</dc:creator>
      <pubDate>Sun, 15 Nov 2020 09:01:06 +0000</pubDate>
      <link>https://dev.to/suryawiguna/my-way-to-handle-money-format-input-in-laravel-1e03</link>
      <guid>https://dev.to/suryawiguna/my-way-to-handle-money-format-input-in-laravel-1e03</guid>
      <description>&lt;p&gt;Common usage of website is to handle data about finance, which is the most data is money and it has a format. In Indonesia for example the format is like Rp1.500.000,00. The problem is with default HTML input, it can't show format like that by default. So how to handle it? At least here's my may to do that in Laravel based website.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Database side&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;It has to handle in three side, the first in inside the database where you want to store the data. On sql there is &lt;em&gt;decimal&lt;/em&gt; type that you can use to store number with commas. So in the migration you can simply use&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="nv"&gt;$table&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;decimal&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'amount'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;8&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;8 is the total digits and 2 is decimal digits. Refer to the &lt;a href="https://laravel.com/docs/8.x/migrations#available-column-types"&gt;official documentation&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;HTML side&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;So after we set database column to proper type, next we need to set the html input to prevent unwanted data that user accidentally input. In html there is&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;input&lt;/span&gt; &lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;"number"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;to handle number input. You can use attribute &lt;code&gt;step&lt;/code&gt; to define decimal digit right on the input. There're other additional attributes that you can use to, find more &lt;a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/number"&gt;here&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Laravel Blade side&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Lastly, when you want to show the data to the user. Data format from database usually will look like this &lt;code&gt;1500000.00&lt;/code&gt; and you want to show it like this &lt;code&gt;1.500.000,00&lt;/code&gt;. To do this you can use php &lt;code&gt;number_format()&lt;/code&gt; function inside the blade.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="nb"&gt;number_format&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$data&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;','&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'.'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The first parameter is your number, next is how many decimal digit you want to show, the third is decimal separator, and the last is thousand separator. Read more in &lt;a href="https://www.php.net/manual/en/function.number-format.php"&gt;PHP manual&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Those are my way to handle money data, thanks for reading this and if you want to say something leave it in discussion.&lt;/p&gt;

</description>
      <category>laravel</category>
      <category>html</category>
      <category>webdev</category>
    </item>
    <item>
      <title>You can do these on Figma to work faster</title>
      <dc:creator>Surya Wiguna</dc:creator>
      <pubDate>Sun, 20 Sep 2020 13:11:36 +0000</pubDate>
      <link>https://dev.to/suryawiguna/you-can-do-these-on-figma-to-work-faster-a1p</link>
      <guid>https://dev.to/suryawiguna/you-can-do-these-on-figma-to-work-faster-a1p</guid>
      <description>&lt;p&gt;Figma became popular these days to design a web/mobile user interface. That's because Figma gives you more modern and reliable approach when come to performance, cloud storage, and collaboration. Now I wanna share with you how you can improve your designing process to work faster with Figma.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Create a component&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--vpXWz2Cv--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://source.unsplash.com/Ylk5n_nd9dA" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--vpXWz2Cv--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://source.unsplash.com/Ylk5n_nd9dA" alt="Design Component"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Let say you need to make 50 buttons that has special style (color, border, corner, etc) on your design, and you make it all manually. That will slow your designing process just to make a bunch of similar looking button! What if you can make one button, style it, save it with its style, and you can reuse that? That's called component. In figma, you can easily make a component by right click one the object:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--rzEXpEHw--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/eiz54sy5b1s4rj4p5bvg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--rzEXpEHw--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/eiz54sy5b1s4rj4p5bvg.png" alt="Creating component in figma"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;and then you can find your components in the &lt;strong&gt;&lt;em&gt;Assets&lt;/em&gt;&lt;/strong&gt; on the left sidebar. To use your component you can simply drag and drop from the sidebar to your canvas. One thing that useful about component is if you want to change all the buttons you just need to change the master component.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Adjust objects using smart selection&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--_jTFFaV_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/uarmnykrvrsgf7q3gmgo.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--_jTFFaV_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/uarmnykrvrsgf7q3gmgo.gif" alt="Smart Selection on Figma"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Smart selection is a thing. It helps you to adjust spacing and arrangement objects faster. Especially when you using a grid view on your design. Select all objects, and you can see pink mark, next you can just drag one object to another to rearrange them and click and slide on the space between objects to adjust their spacing. For more info you can refer to their blog post &lt;a href="https://www.figma.com/blog/introducing-smart-selection/"&gt;here&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Save your colors&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--BSL3cNAz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://source.unsplash.com/xNWCiKN8ln0" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--BSL3cNAz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://source.unsplash.com/xNWCiKN8ln0" alt="Colors"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Choosing color is another challenge when designing an user interface. Usually on design we'll need to define colors for primary color, secondary color, color for headline text, etc. On figma you can save your color styles, here's how:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--UY4SsSU4--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/fk5vnuwyn16aqmfs3a9c.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--UY4SsSU4--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/fk5vnuwyn16aqmfs3a9c.png" alt="Add color styles"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Click your object first&lt;/li&gt;
&lt;li&gt;On the right sidebar at &lt;strong&gt;&lt;em&gt;Fill&lt;/em&gt;&lt;/strong&gt; section, change the color as your desire&lt;/li&gt;
&lt;li&gt;Click the four dots&lt;/li&gt;
&lt;li&gt;Click plus sign&lt;/li&gt;
&lt;li&gt;It will bring up &lt;strong&gt;&lt;em&gt;"Create new color style"&lt;/em&gt;&lt;/strong&gt; modal and you can name your style&lt;/li&gt;
&lt;li&gt;Click create style&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--2INttZEm--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/jopjidiyc7eyzby49wyt.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--2INttZEm--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/jopjidiyc7eyzby49wyt.png" alt="Selecting color"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Your new color style is saved, you can use it by choosing &lt;strong&gt;&lt;em&gt;Local Colors&lt;/em&gt;&lt;/strong&gt; on below the color picker.&lt;/p&gt;

&lt;p&gt;There are some things you can do to work faster with Figma. If you know other tips just drop it on comments, thank you for reading :)&lt;/p&gt;

</description>
      <category>design</category>
      <category>ux</category>
      <category>uiweekly</category>
    </item>
    <item>
      <title>DataTables tips using Laravel</title>
      <dc:creator>Surya Wiguna</dc:creator>
      <pubDate>Sun, 06 Sep 2020 05:13:44 +0000</pubDate>
      <link>https://dev.to/suryawiguna/datatables-tips-using-laravel-59ai</link>
      <guid>https://dev.to/suryawiguna/datatables-tips-using-laravel-59ai</guid>
      <description>&lt;p&gt;Datatable is a useful plugin for displaying data to table in more advance way. It provide search, filter, pagination, and sorting from the beginning you use it. But you usually don't need all of the feature, or want to display button in the table, etc. Now I wanna share some tips in using datatable with Laravel.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;&lt;em&gt;Add button inside datatable&lt;/em&gt;&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;When displaying data in a row, usually in the last column we want to add button for user to take action with the data e.g. button edit, and delete. But datatable not natively render html tag, so we need to use &lt;code&gt;addColumn()&lt;/code&gt; and &lt;code&gt;rawColumns()&lt;/code&gt; like this in controller:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="nv"&gt;$data&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;DataTables&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;of&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$data&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;addColumn&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'action'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;function&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$row&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
   &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="s2"&gt;"&amp;lt;a href='/user/edit/1' class='btn btn-sm btn-success'&amp;gt;Edit&amp;lt;/a&amp;gt;&amp;lt;a href='/user/destroy/1' class='btn btn-sm btn-danger btn-delete'&amp;gt;&amp;lt;/i&amp;gt;Hapus&amp;lt;/a&amp;gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;})&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;rawColumns&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;&lt;span class="s1"&gt;'action'&lt;/span&gt;&lt;span class="p"&gt;]);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  &lt;strong&gt;&lt;em&gt;Load table on click&lt;/em&gt;&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;This case is usually when you have multiple datatable in one page and you organize it in tab view, you want to load data only when related tab is click. You can reload the table by using &lt;code&gt;reload()&lt;/code&gt; function to do that.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;$&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;#clickable_id&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;click&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;function&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;$&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;#table&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;DataTable&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nx"&gt;ajax&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;reload&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  &lt;strong&gt;&lt;em&gt;Disable Sorting and searching individual column&lt;/em&gt;&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Datatable provide many feature to make a more useful table like searching, pagination, sorting, etc. But when you don't want particular column searchable or sortable, you can disable it.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;columns&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
   &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;data&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;name&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;searchable&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;orderable&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="p"&gt;]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That are some tips to use datatable with Laravel. Thank you for reading, if you have any more tips or question please drop it on discussion section.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>laravel</category>
      <category>php</category>
    </item>
    <item>
      <title>CSS position fixed vs sticky</title>
      <dc:creator>Surya Wiguna</dc:creator>
      <pubDate>Sat, 29 Aug 2020 12:46:56 +0000</pubDate>
      <link>https://dev.to/suryawiguna/css-position-fixed-vs-sticky-5232</link>
      <guid>https://dev.to/suryawiguna/css-position-fixed-vs-sticky-5232</guid>
      <description>&lt;p&gt;CSS &lt;code&gt;position: fixed&lt;/code&gt; helped me a lot when I want to make an element inside a web to stay when user scrolling the page. But in some cases, maybe I want that element still scroll along like others but can stay in place when I want it to stay. That's &lt;code&gt;position: sticky&lt;/code&gt; will helpful.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;&lt;em&gt;What's the difference?&lt;/em&gt;&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;The &lt;code&gt;position: fixed&lt;/code&gt; mean &lt;em&gt;fixed to the viewport&lt;/em&gt;. We tell it where to position itself (top, bottom, right, or left) and it will stay there when user scrolling.&lt;/p&gt;

&lt;p&gt;Meanwhile, when using &lt;code&gt;position: sticky&lt;/code&gt; it won't affect until we define offset, like &lt;code&gt;top: 10px&lt;/code&gt;. So the element will scroll like others until it reaches the offset and then stay on its position. And it stay within its parent, once the parent scroll off the page it leaves with it.&lt;/p&gt;

&lt;p&gt;To see it in action, you can check on my &lt;a href="https://codepen.io/suryawiguna/pen/wvGeqxy"&gt;codepen&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;&lt;em&gt;Which should I use?&lt;/em&gt;&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;It depends, when you want that element simply doesnt move in your website then use &lt;code&gt;fixed&lt;/code&gt;. But be careful with &lt;code&gt;position: fixed&lt;/code&gt;, it can potentially cover other element.&lt;/p&gt;

&lt;p&gt;When you want that element scrolling into view and then stop at certain point, use &lt;code&gt;sticky&lt;/code&gt;. Keep in mind, &lt;em&gt;when its parent scrolls off page, it gone with its parent&lt;/em&gt;.&lt;/p&gt;

</description>
      <category>css</category>
      <category>html</category>
    </item>
    <item>
      <title>Using Netlify to host a static website</title>
      <dc:creator>Surya Wiguna</dc:creator>
      <pubDate>Sun, 09 Aug 2020 12:37:51 +0000</pubDate>
      <link>https://dev.to/suryawiguna/using-netlify-to-host-a-static-website-o2m</link>
      <guid>https://dev.to/suryawiguna/using-netlify-to-host-a-static-website-o2m</guid>
      <description>&lt;p&gt;When you created a static website, whether it's a project with client or just for portfolio, you usually want to make it online. One of modern hosting especially for a static website is Netlify. Netlify is nice to hosting from a very simple web, or generated website using &lt;a href="https://www.gatsbyjs.org/"&gt;Gatsby&lt;/a&gt; or &lt;a href="https://gridsome.org/"&gt;Gridsome&lt;/a&gt;, and it's free to get started. There are very simple steps to host your website to Netlify.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--3jTIe1Mv--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/u3bl2qcsf6nce26njkg3.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--3jTIe1Mv--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/u3bl2qcsf6nce26njkg3.jpg" alt="Netlify Logo"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  1. Sign Up
&lt;/h4&gt;

&lt;p&gt;You can sign up with your GitHub, GitLab, or Bitbucket account to easily connect your repository later.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--S8Fo-t6k--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/2x22bl1el32pmo1z4npy.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--S8Fo-t6k--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/2x22bl1el32pmo1z4npy.jpg" alt="Signing Up"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  2. Select Git provider
&lt;/h4&gt;

&lt;p&gt;After you sign up, you can start to deploy your website. First select the git provider where you put your website project. Select one and authorized Netlify to access your repository list. I personally use GitLab.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--_aTzV3MT--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/1g5py6b5g83fwp45gdqa.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--_aTzV3MT--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/1g5py6b5g83fwp45gdqa.jpg" alt="Select Git Provider"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  3. Select Repository
&lt;/h4&gt;

&lt;p&gt;Now after you authorized Netlify to your git provider, all your repository will showed up. Select which repository that you want to deploy.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--M9CB3QSd--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/619v3g1802ue3o4y9rgi.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--M9CB3QSd--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/619v3g1802ue3o4y9rgi.jpg" alt="Select Repository"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  4. Setting the build option
&lt;/h4&gt;

&lt;p&gt;You can choose which branch that will deployed to the hosting, so it's not always have to master branch.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--2d1DR7iF--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/nf5jq0orvwhcv5t6v0i1.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--2d1DR7iF--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/nf5jq0orvwhcv5t6v0i1.jpg" alt="Build Options"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you deploying a generated site with such as Gridsome, you need to add &lt;em&gt;gridsome build&lt;/em&gt; in &lt;strong&gt;Build Command&lt;/strong&gt;, and &lt;em&gt;dist&lt;/em&gt; in &lt;strong&gt;Publish directory&lt;/strong&gt; to automatically start building the website right after you push to the branch that you choose to deploy before.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--X9YljiwK--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/ztdhll574y4qvsoqdem7.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--X9YljiwK--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/ztdhll574y4qvsoqdem7.jpg" alt="Additional settings"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And that's it! Now your website is published and can access via internet with yourwebiste.netlify.app domain. You can use your custom domain by setting the DNS configuration. Read the &lt;a href="https://docs.netlify.com/domains-https/custom-domains/"&gt;official documentation&lt;/a&gt; to know more how to do that. From now, when ever you want to make a change to your website, just push your change to the branch that you choose and Netlify will build the change for you. Thank you for reading :)&lt;/p&gt;

</description>
    </item>
    <item>
      <title>My favorite Laravel's Blade Tricks</title>
      <dc:creator>Surya Wiguna</dc:creator>
      <pubDate>Sun, 02 Aug 2020 06:04:09 +0000</pubDate>
      <link>https://dev.to/suryawiguna/my-favorite-laravel-s-blade-tricks-2bgd</link>
      <guid>https://dev.to/suryawiguna/my-favorite-laravel-s-blade-tricks-2bgd</guid>
      <description>&lt;p&gt;Beside the ability to make inheritance template using &lt;strong&gt;@extends&lt;/strong&gt;, &lt;strong&gt;@section&lt;/strong&gt;, and &lt;strong&gt;@yield&lt;/strong&gt;, Laravel also let us to write html with any condition that we desire according to our application. Here are some of my favorite Laravel's blade trick to make the development process faster and easier.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;@if&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;This directive is useful when we're trying to display data in view on various condition. We can use as many as &lt;strong&gt;@elseif&lt;/strong&gt; that we need in Laravel's view, but keep in mind of your website performance.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;@if (count($data) === 1)
    &lt;span class="nt"&gt;&amp;lt;p&amp;gt;&lt;/span&gt;You only have one data&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
@elseif (count($data) &amp;gt; 1)
    &lt;span class="nt"&gt;&amp;lt;p&amp;gt;&lt;/span&gt;You have more than one data&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
@else
    &lt;span class="nt"&gt;&amp;lt;p&amp;gt;&lt;/span&gt;You don't have any data&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
@endif
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  &lt;strong&gt;@auth and @guest&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;We can use &lt;strong&gt;@auth&lt;/strong&gt; and @guest usually to check either the user is authenticated or not to display the appropriate button, for example to display button Login for unauthenticated user and button Logout for the authenticated user.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;@auth
    &lt;span class="nt"&gt;&amp;lt;button&amp;gt;&lt;/span&gt;Logout&lt;span class="nt"&gt;&amp;lt;/button&amp;gt;&lt;/span&gt;
@endauth

@guest
    &lt;span class="nt"&gt;&amp;lt;button&amp;gt;&lt;/span&gt;Login&lt;span class="nt"&gt;&amp;lt;/button&amp;gt;&lt;/span&gt;
@endguest
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  &lt;strong&gt;@for&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;If we want to do a simple loop in Laravel's blade, we can use &lt;strong&gt;@for&lt;/strong&gt; just like PHP's loop structures.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="o"&gt;@&lt;/span&gt;&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$i&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nv"&gt;$i&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;=&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nv"&gt;$i&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="nc"&gt;The&lt;/span&gt; &lt;span class="n"&gt;current&lt;/span&gt; &lt;span class="n"&gt;order&lt;/span&gt; &lt;span class="n"&gt;is&lt;/span&gt; &lt;span class="p"&gt;{{&lt;/span&gt;&lt;span class="nv"&gt;$i&lt;/span&gt;&lt;span class="p"&gt;}}&lt;/span&gt;
&lt;span class="o"&gt;@&lt;/span&gt;&lt;span class="k"&gt;endfor&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  &lt;strong&gt;@ foreach&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;When we display a list of data in the view, we can use @ foreach to loop through the variable to get each value.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;@foreach ($users as $user)
    &lt;span class="nt"&gt;&amp;lt;tr&amp;gt;&lt;/span&gt;
      &lt;span class="nt"&gt;&amp;lt;td&amp;gt;&lt;/span&gt;{{$user-&amp;gt;name}}&lt;span class="nt"&gt;&amp;lt;/td&amp;gt;&lt;/span&gt;
      &lt;span class="nt"&gt;&amp;lt;td&amp;gt;&lt;/span&gt;{{$user-&amp;gt;email}}&lt;span class="nt"&gt;&amp;lt;/td&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/tr&amp;gt;&lt;/span&gt;
@endforeach
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  &lt;strong&gt;@forelse&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;This directive is use to handle if the variable that we pass is empty to let the user know that there is no data to show.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;@forelse ($users as $user)
    &lt;span class="nt"&gt;&amp;lt;tr&amp;gt;&lt;/span&gt;
      &lt;span class="nt"&gt;&amp;lt;td&amp;gt;&lt;/span&gt;{{$user-&amp;gt;name}}&lt;span class="nt"&gt;&amp;lt;/td&amp;gt;&lt;/span&gt;
      &lt;span class="nt"&gt;&amp;lt;td&amp;gt;&lt;/span&gt;{{$user-&amp;gt;email}}&lt;span class="nt"&gt;&amp;lt;/td&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/tr&amp;gt;&lt;/span&gt;
@empty
    &lt;span class="nt"&gt;&amp;lt;tr&lt;/span&gt; &lt;span class="na"&gt;colspan=&lt;/span&gt;&lt;span class="s"&gt;"2"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="nt"&gt;&amp;lt;td&amp;gt;&lt;/span&gt;There is no user&lt;span class="nt"&gt;&amp;lt;/td&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/tr&amp;gt;&lt;/span&gt;
@endforelse
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  &lt;strong&gt;$loop&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;When we do a loop, variable $loop will be available inside the loop. This variable provide many useful information, my favorite one is &lt;strong&gt;$loop-&amp;gt;iteration&lt;/strong&gt; to generate serial row number in table.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;@foreach ($users as $user)
   &lt;span class="nt"&gt;&amp;lt;tr&amp;gt;&lt;/span&gt;
      &lt;span class="nt"&gt;&amp;lt;td&amp;gt;&lt;/span&gt;{{$loop-&amp;gt;iteration}}&lt;span class="nt"&gt;&amp;lt;/td&amp;gt;&lt;/span&gt;
      &lt;span class="nt"&gt;&amp;lt;td&amp;gt;&lt;/span&gt;{{$user-&amp;gt;name}}&lt;span class="nt"&gt;&amp;lt;/td&amp;gt;&lt;/span&gt;
   &lt;span class="nt"&gt;&amp;lt;/tr&amp;gt;&lt;/span&gt;
@endforeach
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For the list of available properties, you can check &lt;a href="https://laravel.com/docs/7.x/blade#the-loop-variable"&gt;Laravel's documentation&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;@csrf&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Anytime we use a form in Laravel, we need to include CSRF token field in the form for security purpose. We may use &lt;strong&gt;@csrf&lt;/strong&gt; directive to generate it.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;form&lt;/span&gt; &lt;span class="na"&gt;method=&lt;/span&gt;&lt;span class="s"&gt;"POST"&lt;/span&gt; &lt;span class="na"&gt;action=&lt;/span&gt;&lt;span class="s"&gt;"/user"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    @csrf

    ...
&lt;span class="nt"&gt;&amp;lt;/form&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  &lt;strong&gt;@method&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;In Laravel we can use &lt;strong&gt;PUT&lt;/strong&gt;, &lt;strong&gt;PATCH&lt;/strong&gt;, or &lt;strong&gt;DELETE&lt;/strong&gt; request. But html form not support that method, so we need to add hidden _method field. We can use &lt;strong&gt;@method&lt;/strong&gt; to create that.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;form&lt;/span&gt; &lt;span class="na"&gt;action=&lt;/span&gt;&lt;span class="s"&gt;"/user"&lt;/span&gt; &lt;span class="na"&gt;method=&lt;/span&gt;&lt;span class="s"&gt;"POST"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    @method('PUT')

    ...
&lt;span class="nt"&gt;&amp;lt;/form&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  &lt;strong&gt;@ error&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;We need to provide error handling in every request that user make, especially when submitting a form. We can use &lt;strong&gt;@ error&lt;/strong&gt; to make a place in our view to display error message to the user.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;@error('title')
    &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"alert alert-danger"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;{{ $message }}&lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
@enderror
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That are some of the trick that I like to use when developing using Laravel. What's your favorite tricks? Let me know in the comment section, and I planned to make more article about Laravel like this. Thank you for reading!&lt;/p&gt;

</description>
      <category>laravel</category>
      <category>php</category>
      <category>html</category>
    </item>
    <item>
      <title>Tools that I usually used as a Web Developer</title>
      <dc:creator>Surya Wiguna</dc:creator>
      <pubDate>Tue, 14 Jul 2020 05:34:04 +0000</pubDate>
      <link>https://dev.to/suryawiguna/tools-that-i-usually-used-as-a-web-developer-5h8b</link>
      <guid>https://dev.to/suryawiguna/tools-that-i-usually-used-as-a-web-developer-5h8b</guid>
      <description>&lt;p&gt;For almost 2 years I have doing web developing as a job from designing landing page until write API for laravel-based web application in windows machine. Now I like to share my everyday tools for web developing that I usually used.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Visual Studio Code&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;In my opinion, VS Code is the best text editor for developer. Before I use VS Code, I tried Sublime Text for long enough time, also Atom, and nothing bring experience like VS Code brought to me. It's free, easy to use and customize, has a lot of plugins, and not so heavy to run in middle-low specs machine.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--gQLqNHch--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://code.visualstudio.com/opengraphimg/opengraph-home.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--gQLqNHch--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://code.visualstudio.com/opengraphimg/opengraph-home.png" alt="Visual Studio Code"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Git&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Git is a must in software development today. Git allows you to handle the changes of your code easily. This makes collaboration even easier and faster, different developer can develop each feature separately on their own local machine and then merge to master to make the feature live and ready to use by the end user.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--FUOm9HdG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://res.cloudinary.com/practicaldev/image/fetch/s--AS0ya8UC--/c_imagga_scale%2Cf_auto%2Cfl_progressive%2Ch_420%2Cq_auto%2Cw_1000/https://dev-to-uploads.s3.amazonaws.com/i/rixan4h4z8y94eq89som.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--FUOm9HdG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://res.cloudinary.com/practicaldev/image/fetch/s--AS0ya8UC--/c_imagga_scale%2Cf_auto%2Cfl_progressive%2Ch_420%2Cq_auto%2Cw_1000/https://dev-to-uploads.s3.amazonaws.com/i/rixan4h4z8y94eq89som.png" alt="Git"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Chrome&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Chrome is most-used browser right now, and it's because Chrome is so good. Except from it's battery and memory draining. Debugging web application in Chrome is a joy and support from a lot of extension that available for developers make it the browser that I use everyday.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--hUDm9wEe--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.google.com/chrome/static/images/heroes/browser_ntp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--hUDm9wEe--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.google.com/chrome/static/images/heroes/browser_ntp.png" alt="Chrome"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Laragon&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;As said in their &lt;a href="https://laragon.org/docs/"&gt;website&lt;/a&gt;, Laragon is a portable, isolated, fast &amp;amp; powerful universal development environment for PHP, Node.js, Phyton, Java, Go, Ruby. I primarily develop a PHP web application and before I use Laragon, I use XAMPP for enough time. When I tried Laragon, it gives me more joy. I Like use Laragon because: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;lightweight&lt;/li&gt;
&lt;li&gt;pretty url (custom local domain, .test, .local, etc)&lt;/li&gt;
&lt;li&gt;portable&lt;/li&gt;
&lt;li&gt;easy to use&lt;/li&gt;
&lt;li&gt;quick app (one click to make Wordpress CMS, etc)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--2qX9G8UA--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/ch2CeqK.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--2qX9G8UA--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/ch2CeqK.png" alt="Laragon"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Command Line&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Every time I finish working on a feature, I pushed it to git via command line. I usually use Git Bash instead of native Windows Command Line.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s---jun8rQG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://gitforwindows.org/img/gw1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s---jun8rQG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://gitforwindows.org/img/gw1.png" alt="Git Bash"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;That's all some development tools that I use as a web developer. Let me now what yours or other tools that you recommend, thank you.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>vscode</category>
    </item>
  </channel>
</rss>
