<?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: Shobi</title>
    <description>The latest articles on DEV Community by Shobi (@ppshobi).</description>
    <link>https://dev.to/ppshobi</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%2F87440%2F99359a76-1021-49d6-8f0f-e52bf76ad879.jpg</url>
      <title>DEV Community: Shobi</title>
      <link>https://dev.to/ppshobi</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ppshobi"/>
    <language>en</language>
    <item>
      <title>An In Depth guide on deploying fastapi to AWS ec2</title>
      <dc:creator>Shobi</dc:creator>
      <pubDate>Thu, 02 Feb 2023 18:40:35 +0000</pubDate>
      <link>https://dev.to/ppshobi/an-in-depth-guide-on-deploying-fastapi-to-aws-ec2-3jn8</link>
      <guid>https://dev.to/ppshobi/an-in-depth-guide-on-deploying-fastapi-to-aws-ec2-3jn8</guid>
      <description>&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/E5IhKYT7ecU"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;In this video, I would like to show you in-depth details on how to deploy a python Fastapi app to an AWS EC2 with Nginx, supervisor and uvicorn.  Also I have added timeline marks to easily navigate through the video &lt;/p&gt;

&lt;p&gt;The configuration files and sample application can be found in the github repo: &lt;a href="https://github.com/ShobiExplains/fast"&gt;https://github.com/ShobiExplains/fast&lt;/a&gt;...&lt;/p&gt;

&lt;p&gt;The readme also contains some commands that you can use. &lt;a href="https://github.com/ShobiExplains/fast"&gt;https://github.com/ShobiExplains/fast&lt;/a&gt;...&lt;/p&gt;

&lt;p&gt;Follow me on twitter : &lt;a href="https://twitter.com/ppshobi"&gt;https://twitter.com/ppshobi&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Please post your comments, doubts and Please subscribe and share the video.&lt;/p&gt;

</description>
      <category>python</category>
      <category>fastapi</category>
      <category>deployment</category>
      <category>aws</category>
    </item>
    <item>
      <title>Database replication as a scalability tactic in Relational Databases</title>
      <dc:creator>Shobi</dc:creator>
      <pubDate>Mon, 16 Jan 2023 22:57:00 +0000</pubDate>
      <link>https://dev.to/ppshobi/database-replication-as-a-scalability-tactic-in-relational-databases-33cm</link>
      <guid>https://dev.to/ppshobi/database-replication-as-a-scalability-tactic-in-relational-databases-33cm</guid>
      <description>&lt;h2&gt;
  
  
  Intro to Database Replication on Relational Databases
&lt;/h2&gt;

&lt;p&gt;I would like to call Replication the twin brother of Duplication. Even though these words are interchangeable most of the time they can't be interchanged all the time. Let's look at an excerpt from &lt;a href="https://ell.stackexchange.com/a/165430"&gt;this Stack Exchange answer&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;If I'm a good painter, I can replicate the Mona Lisa, I cannot 'duplicate' it! So, to answer this question, check twice before interchanging these words.&lt;/p&gt;

&lt;p&gt;Likewise, when you lose your original driving license or any other document, you apply for a duplicate copy. There, 'replica' does not work!&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;When your App starts to have performance issues with an increase in the number of requests, database replication is one quick way to breathe a little bit of performance into your app. a Database replica is a duplicate copy of your database. But it's &lt;em&gt;replicated&lt;/em&gt; meaning the data is reproduced in the replica the same way it was initially created in the original database. &lt;/p&gt;

&lt;p&gt;In this write-up, I would like to focus more on the replication technique of Relational databases like MySql, Postgres, etc. Also called a &lt;em&gt;Read Replica&lt;/em&gt;, as the name suggests the replicas are read-only. Just because I can simply touch the idea of replication alone and don't have to write about Clusters, Leadership, Quorum, Election, etc... but could be a possibility in another post. &lt;/p&gt;

&lt;h2&gt;
  
  
  Application of Database Replication
&lt;/h2&gt;

&lt;p&gt;Database replicas are an excellent way of offloading a heavy number of requests from a database. A replica is another database instance/server of usually the same configuration (at least the storage capacity) let us look into a simple &lt;strong&gt;Single Master Single Slave&lt;/strong&gt; setup for a database and see how it functions&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--0hDN-tZd--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://shobi.dev/img/db-replication-simple.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--0hDN-tZd--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://shobi.dev/img/db-replication-simple.png" alt="single master single slave replica configuration" width="321" height="381"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The main database called &lt;code&gt;Master&lt;/code&gt; has a replica called &lt;code&gt;Replica 1&lt;/code&gt;, The user is interacting through the App with the database, and it issues quite a number of database queries. All the write queries are going to the Master database initially and whatever data is inserted/updated/deleted will be replicated to the &lt;code&gt;Replica 1&lt;/code&gt; database &lt;em&gt;Eventually&lt;/em&gt;. Later on, every read query is made to the Replica. This kind of configuration is one of the simplest and really helps to increase performance in a ready-heavy application by routing the read queries to another database and freeing up the Master database. &lt;/p&gt;

&lt;p&gt;This replication configuration could be extended further by adding more replicas and forming a group of replicas. see the following  figure&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--reEINRx9--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://shobi.dev/img/multiple-db-replication.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--reEINRx9--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://shobi.dev/img/multiple-db-replication.png" alt="single master multiple slave configuration" width="463" height="542"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In this case, the write that happened in the master database is replicated into multiple replicas. The read queries are made to any of the replicas and the replica will respond with whatever latest data it has. We can use replicas to achieve &lt;strong&gt;High Availability&lt;/strong&gt; and by deploying the replicas in multiple regions to avail &lt;strong&gt;Low Latency&lt;/strong&gt;. &lt;/p&gt;

&lt;p&gt;Usually, the replicas are used/consumed by the App by keeping different database connections to the Master and Replica(s). During a user request, the App chooses which connection to use, whether the Master connection is to do a write operation or a Replica connection to do a read operation. Another excellent choice would be to use replicas as the source of the Business Intelligence tool. You don't want heavy aggregations/operations being done to your master DB when you have users. &lt;/p&gt;

&lt;h2&gt;
  
  
  How replication is done
&lt;/h2&gt;

&lt;p&gt;The replication could be done in two ways &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Synchronous&lt;/li&gt;
&lt;li&gt;Asynchronous&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;In synchronous replication, the database finishes the transaction only when both the Master and Slave(s) have the data. While this ensures the data is available/consistent across master and slave databases. Obviously, synchronous replication greatly reduces the write performance, especially when the replicas are not in the same data centre/region eg: Multi-AZ replicas.&lt;/p&gt;

&lt;p&gt;While synchronous replication could be required in specific scenarios Asynchronous replication is my preferred way and it's the default for many cloud vendors including AWS. In asynchronous replication, the master completes the write and the changes are propagated to other replicas eventually. This is also a great weakness of replication and you can see that in the cons section. &lt;/p&gt;

&lt;p&gt;The exact details of replication depend on the specific databases. But generally, the master DB produces the events for the operations that happened and these events (logs or binary data) are copied and replicated in the replicas, another way is to look for the primary keys in the tables and incrementally copy them.&lt;/p&gt;

&lt;h3&gt;
  
  
  Support for replication
&lt;/h3&gt;

&lt;p&gt;Most relational databases have replication support. &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://dev.mysql.com/doc/refman/8.0/en/replication.html"&gt;Mysql&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.postgresql.org/docs/current/runtime-config-replication.html"&gt;Postgres&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://learn.microsoft.com/en-us/sql/relational-databases/replication/sql-server-replication?view=sql-server-ver16"&gt;Microsoft SQL Server&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://docs.oracle.com/cd/A84870_01/doc/server.816/a76959/repover.htm"&gt;Oracle&lt;/a&gt; etc... are to name a few. &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Major cloud providers also have managed replication solutions&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://aws.amazon.com/rds/features/read-replicas/"&gt;Aws RDS read replicas&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://cloud.google.com/sql/docs/mysql/replication"&gt;Google cloud SQL replication&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://learn.microsoft.com/en-us/azure/azure-sql/database/replication-to-sql-database?view=azuresql"&gt;Azure SQL replication&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Just a few clicks and you have a replication. &lt;/p&gt;

&lt;h2&gt;
  
  
  Pros of Database Replication
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Availability&lt;/strong&gt; - Even when the Master DB is failed, the replica can still serve the users in a read-only mode. &lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Disaster Recovery&lt;/strong&gt; - In a situation of master DB failure, the replica can be promoted to a master fairly quickly and keep resuming the service. Most of the vendors have this failover support (Sometimes not fully automatic). Replicas can also act as a fairly decent backup. &lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Performance&lt;/strong&gt; - Database replication in theory could make your application perform very well in typical use cases.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Simple&lt;/strong&gt; - Replication is not a super complex topic to understand and is fairly quick to implement. While manual replication setup is not that simple, with modern cloud providers it is a matter of a few clicks to have the replication setup. Also, you can read a bit more about &lt;a href="https://www.digitalocean.com/community/tutorials/how-to-set-up-replication-in-mysql"&gt;manual setup here&lt;/a&gt;. There are many 3rd party tools and providers that focus on replication technologies.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Cons of Database Replication
&lt;/h2&gt;

&lt;p&gt;Database replication can be a quick way to add some performance to your apps and will serve you to great lengths in terms of performance. But it is not a silver bullet that solves all the problems, hence let us look at some limitations of database replication. &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Consistency&lt;/strong&gt; - It is one of the biggest weaknesses of the replication. The chances of inconsistent data are very much of a problem. When the master has a write operation and for some reason, the operation is not propagated, the replica will respond with inconsistent data forever. To avoid this some kind of data integrity checks need to be deployed. And this is not really a trivial task. When an inconsistency is detected, fixing it would also not be trivial, especially in a big database with many foreign keys and stuff. Usually fixing inconsistency involves building a new replica and throwing the inconsistent replica away. &lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Latency&lt;/strong&gt; - When the user would not see his updated data in a mission-critical solution it would not take much time for him to look for another app. This is especially common in the case of multi-region replicas. For a user, his trivial activities are mission-critical and we want to show him his updates instantly. So it's important to monitor replication time and verify it's within acceptable limits. For example, I would use a master DB connection to manage his current order and probably will use a replica to pull the order history. &lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cost&lt;/strong&gt; - This is something obvious. The replicas are their own new instances. You will pay for CPU, RAM and Storage. Even though you can have a smaller replica instance in terms of CPU or RAM, still storage needs to be the same as the original database. &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Like I mentioned DB replication is not a solution for all your database problems, but it can be a wonderful addition to your toolbelt, and replication is supported by most of the mainstream database and cloud vendors. Let me know what you think about replication in Twitter &lt;a href="https://twitter.com/ppshobi"&gt;@ppshobi&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;originally written &lt;a href="https://shobi.dev/blog/2023-01-14-database-replication"&gt;https://shobi.dev/blog/2023-01-14-database-replication&lt;/a&gt;&lt;/p&gt;

</description>
      <category>database</category>
      <category>scalability</category>
      <category>aws</category>
      <category>cloud</category>
    </item>
    <item>
      <title>I have created a video series to help you deploy a Laravel application with PHP7 and Nginx</title>
      <dc:creator>Shobi</dc:creator>
      <pubDate>Fri, 27 Mar 2020 03:29:29 +0000</pubDate>
      <link>https://dev.to/ppshobi/i-have-created-a-video-series-to-help-you-deploy-laravel-with-php7-and-nginx-386e</link>
      <guid>https://dev.to/ppshobi/i-have-created-a-video-series-to-help-you-deploy-laravel-with-php7-and-nginx-386e</guid>
      <description>&lt;p&gt;Hello, after a long time I had enough time to edit my recorded screencasts on deploying a laravel application. The corona time helped me, a lot of time is saved on getting ready for office, commuting, etc... &lt;/p&gt;

&lt;p&gt;In this tutorial video series, I will show you how to deploy a laravel application with PHP7.4, if you are using any PHP7 version it should be fine as well. As of now, PHP7.4 is the latest version so I have used it as well.&lt;/p&gt;

&lt;p&gt;For the demo purpose, I have used a fresh installation of laravel without any database connectivity, but once you have deployed application this should be fairly simple for you to do, given how easy to set up a managed database these days. But still, I have plans to show you how to install and configure databases in another video. &lt;/p&gt;

&lt;p&gt;Below are the links to those videos, feel free to subscribe and post your doubts, comments and suggestions. also don't forget to subscribe if you find it useful.&lt;/p&gt;

&lt;h3&gt;
  
  
  Part 1 - Laravel Deployment in Depth - Provisioning Server and Installing Nginx
&lt;/h3&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/5dyegVllDto"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h3&gt;
  
  
  Part 1 Extra (for aws users): Provisioning server in AWS
&lt;/h3&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/vVM22k9iegc"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h3&gt;
  
  
  Part 2: Creating a custom user to secure the server
&lt;/h3&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/ceSulNURDUw"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h3&gt;
  
  
  Part 3: Installing PHP &amp;amp; Connect to a custom domain
&lt;/h3&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/vwe9vUTJD78"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h3&gt;
  
  
  Part 4: Deploying the application to the server
&lt;/h3&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/UH_hd0Feh9M"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h3&gt;
  
  
  Github repo of the demo application
&lt;/h3&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--vJ70wriM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://practicaldev-herokuapp-com.freetls.fastly.net/assets/github-logo-ba8488d21cd8ee1fee097b8410db9deaa41d0ca30b004c0c63de0a479114156f.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/ShobiExplains"&gt;
        ShobiExplains
      &lt;/a&gt; / &lt;a href="https://github.com/ShobiExplains/LaravelDeployment"&gt;
        LaravelDeployment
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      
    &lt;/h3&gt;
  &lt;/div&gt;
&lt;/div&gt;


</description>
      <category>php7</category>
      <category>deployment</category>
      <category>laravel</category>
      <category>nginx</category>
    </item>
    <item>
      <title>I wrote a PHP Client for sonic, the autosuggestion engine, and now its official PHP client. Ask Me Anything 🤩</title>
      <dc:creator>Shobi</dc:creator>
      <pubDate>Thu, 11 Apr 2019 18:23:58 +0000</pubDate>
      <link>https://dev.to/ppshobi/i-wrote-a-php-client-for-sonic-the-autosuggestion-engine-and-now-its-official-php-client-2nco</link>
      <guid>https://dev.to/ppshobi/i-wrote-a-php-client-for-sonic-the-autosuggestion-engine-and-now-its-official-php-client-2nco</guid>
      <description>&lt;p&gt;Hey guys, last week I got to see one article about a new search engine, similar to elastic search. but built specifically for autosuggestions. &lt;a href="https://github.com/valeriansaliou/sonic" rel="noopener noreferrer"&gt;Sonic&lt;/a&gt; - it is an index based auto-suggestion engine built on Rust lang by the team at &lt;a href="https://crisp.chat" rel="noopener noreferrer"&gt;crip.chat&lt;/a&gt; . a customer engagement platform.&lt;/p&gt;

&lt;p&gt;Then I went to their repository (Yep, its open source). And found out that it offers a TCP endpoint rather than an HTTP endpoint/. Meaning in order to use sonic search, you need to connect to the TCP socket and issue commands over the socket and read the output buffer. They are officially offering a javascript client for sonic but not for PHP. Then it struck me... This can be a good experience for me if I build a PHP client for it, especially because I haven't done any socket programming before. &lt;/p&gt;

&lt;p&gt;Then I spent a few days and nights cooking the PHP client and submitted a PR into the official repo,&lt;/p&gt;


&lt;div class="ltag_github-liquid-tag"&gt;
  &lt;h1&gt;
    &lt;a href="https://github.com/valeriansaliou/sonic/pull/118" rel="noopener noreferrer"&gt;
      &lt;img class="github-logo" alt="GitHub logo" src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev.to%2Fassets%2Fgithub-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg"&gt;
      &lt;span class="issue-title"&gt;
        Added one more php client - psonic by ppshobi
      &lt;/span&gt;
      &lt;span class="issue-number"&gt;#118&lt;/span&gt;
    &lt;/a&gt;
  &lt;/h1&gt;
  &lt;div class="github-thread"&gt;
    &lt;div class="timeline-comment-header"&gt;
      &lt;a href="https://github.com/ppshobi" rel="noopener noreferrer"&gt;
        &lt;img class="github-liquid-tag-img" src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Favatars2.githubusercontent.com%2Fu%2F8536607%3Fv%3D4" alt="ppshobi avatar"&gt;
      &lt;/a&gt;
      &lt;div class="timeline-comment-header-text"&gt;
        &lt;strong&gt;
          &lt;a href="https://github.com/ppshobi" rel="noopener noreferrer"&gt;ppshobi&lt;/a&gt;
        &lt;/strong&gt; posted on &lt;a href="https://github.com/valeriansaliou/sonic/pull/118" rel="noopener noreferrer"&gt;&lt;time&gt;Apr 06, 2019&lt;/time&gt;&lt;/a&gt;
      &lt;/div&gt;
    &lt;/div&gt;
    &lt;div class="ltag-github-body"&gt;
      &lt;p&gt;Hi, I have gone ahead and implemented a PHP client for sonic, including unit tests and a relatively complete &lt;a href="https://github.com/ppshobi/psonic/blob/master/Readme.md" rel="noopener noreferrer"&gt;readme&lt;/a&gt; and an &lt;a href="https://github.com/ppshobi/psonic/blob/master/api-docs.md" rel="noopener noreferrer"&gt;api documentation&lt;/a&gt; as well.&lt;/p&gt;

    &lt;/div&gt;
    &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/valeriansaliou/sonic/pull/118" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;Saying that kindly include my client as well in the readme. Then I tweeted about the same in twitter as well. &lt;/p&gt;

&lt;p&gt;&lt;iframe class="tweet-embed" id="tweet-1114835655450718208-884" src="https://platform.twitter.com/embed/Tweet.html?id=1114835655450718208"&gt;
&lt;/iframe&gt;

  // Detect dark theme
  var iframe = document.getElementById('tweet-1114835655450718208-884');
  if (document.body.className.includes('dark-theme')) {
    iframe.src = "https://platform.twitter.com/embed/Tweet.html?id=1114835655450718208&amp;amp;theme=dark"
  }



&lt;/p&gt;

&lt;p&gt;Ahaa... There it was. The CTO of crisp and the core contributor of Sonic, &lt;a href="https://twitter.com/valeriansaliou" rel="noopener noreferrer"&gt;Mr. Valerian Saliou&lt;/a&gt; replied to me saying that, he liked the way I wrote the code and he can promote my client as an officially supported sonic client for PHP if I come up with a relatively complete solution. &lt;/p&gt;

&lt;p&gt;Well then..., few more nights and voila. Now &lt;strong&gt;Psonic&lt;/strong&gt; is the official php client for sonic. Check it out, and give your valuable opinions in the comments as well as GitHub stars 😍. &lt;/p&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev.to%2Fassets%2Fgithub-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/ppshobi" rel="noopener noreferrer"&gt;
        ppshobi
      &lt;/a&gt; / &lt;a href="https://github.com/ppshobi/psonic" rel="noopener noreferrer"&gt;
        psonic
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      Sonic is a super fast auto suggestion engine built by the team at crisp.chat, a customer engagement platform. its built in Rust and they officially support a javascript client, but if you want to use sonic via php, this is the library that you can look for. Completely unit tested, and adheres to modern coding standards, and offers a clean api to interact with sonic.
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;
&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;Psonic - PHP client for sonic auto suggestion engine&lt;/h1&gt;
&lt;/div&gt;
&lt;p&gt;&lt;a href="https://codecov.io/github/ppshobi/psonic" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/da499b0453add721502af76445ee06cd114930d609d7372168943f969c642478/68747470733a2f2f636f6465636f762e696f2f6769746875622f707073686f62692f70736f6e69632f6272616e63682f6d61737465722f67726170682f62616467652e7376673f746f6b656e3d79367939505678446367" alt="codecov"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/ppshobi/psonic/actions/workflows/tests.yml" rel="noopener noreferrer"&gt;&lt;img src="https://github.com/ppshobi/psonic/actions/workflows/tests.yml/badge.svg" alt=".github/workflows/tests.yml"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Summary&lt;/h2&gt;
&lt;/div&gt;
&lt;p&gt;&lt;a href="https://github.com/valeriansaliou/sonic" rel="noopener noreferrer"&gt;Sonic&lt;/a&gt; is a super fast auto-suggestion engine built by the team at &lt;a href="https://github.com/ppshobi/psoniccrisp.chat" rel="noopener noreferrer"&gt;crisp.chat&lt;/a&gt;, a customer engagement platform. it is built in Rust and they officially support a javascript client, but if you want to use sonic via PHP, this is the library that you can look for
Completely unit tested, and adheres to modern coding standards, and offers a clean API to interact with sonic.&lt;/p&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Installation &amp;amp; Usage&lt;/h2&gt;

&lt;/div&gt;
&lt;p&gt;you need a running sonic instance (locally or in the cloud, the port 1491 should be accessible) php7+ and composer to make this library work. &lt;a href="https://github.com/valeriansaliou/sonic/blob/master/README.md" rel="noopener noreferrer"&gt;Read more on installing sonic&lt;/a&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;goto your project directory&lt;/li&gt;
&lt;li&gt;execute &lt;code&gt;composer require ppshobi/psonic&lt;/code&gt;
once the installation is completed you should be able to use the library as follows&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Api Documentaion&lt;/h2&gt;

&lt;/div&gt;
&lt;p&gt;&lt;a href="https://github.com/ppshobi/psonicapi-docs.md" rel="noopener noreferrer"&gt;Full API Documentaion&lt;/a&gt;&lt;/p&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Usage&lt;/h2&gt;

&lt;/div&gt;
&lt;p&gt;once you have psonic in place, you have access to the &lt;code&gt;Client&lt;/code&gt;…&lt;/p&gt;
&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/ppshobi/psonic" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;Go ahead and try sonic as well. It's a really cool product. 😍😍😍&lt;/p&gt;

</description>
      <category>php</category>
      <category>sonic</category>
      <category>sockets</category>
      <category>opensource</category>
    </item>
    <item>
      <title>Part 2- An in-depth video tutorial on deploying a Django application with static file serving</title>
      <dc:creator>Shobi</dc:creator>
      <pubDate>Fri, 22 Mar 2019 07:17:38 +0000</pubDate>
      <link>https://dev.to/ppshobi/part-2--an-in-depth-video-tutorial-on-deploying-a-django-application-with-static-file-serving-6ia</link>
      <guid>https://dev.to/ppshobi/part-2--an-in-depth-video-tutorial-on-deploying-a-django-application-with-static-file-serving-6ia</guid>
      <description>

&lt;p&gt;Django is the most popular Python-based web framework for a while now. Django is powerful, robust, full of capabilities and surrounded by a supportive community. &lt;/p&gt;

&lt;p&gt;In this video, we are going to take a look into how to set up static file serving in our app, such as CSS, javascript, images etc... in our simple Django application. which we built and deployed in &lt;a href="https://www.youtube.com/watch?v=u0oEIqQV_-E"&gt;Part 1&lt;/a&gt; of the series&lt;/p&gt;

&lt;p&gt;Static files on Django should be served by &lt;code&gt;nginx&lt;/code&gt; directly rather than our Django app. So you need to add a few lines to your &lt;code&gt;nginx&lt;/code&gt; configuration, to tell where your static files are. I have tried to explain things neatly in this video. feel free to as any doubts. &lt;/p&gt;

&lt;p&gt;Let me know the suggestions, thoughts &amp;amp; the doubts in the comments. Subscribe to the channel &amp;amp; Share this with your friends &amp;amp; colleagues&lt;/p&gt;

&lt;p&gt;Link to sample application repo with static files already setup: &lt;a href="https://github.com/ShobiExplains/AwsDemo/releases/tag/v0.0.2"&gt;https://github.com/ShobiExplains/AwsDemo/releases/tag/v0.0.2&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Nginx Configuration for reference: &lt;a href="https://github.com/ShobiExplains/AwsDemo/blob/master/django.conf"&gt;https://github.com/ShobiExplains/AwsDemo/blob/master/django.conf&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/_TBw7ALJp0Y"&gt; &lt;/iframe&gt;&lt;/p&gt;


</description>
      <category>django</category>
      <category>aws</category>
      <category>nginx</category>
      <category>staticfiles</category>
    </item>
    <item>
      <title>An in-depth tutorial on deploying a Django application into AWS</title>
      <dc:creator>Shobi</dc:creator>
      <pubDate>Fri, 01 Feb 2019 11:24:42 +0000</pubDate>
      <link>https://dev.to/ppshobi/an-in-depth-tutorial-on-deploying-a-django-application-into-aws-58m5</link>
      <guid>https://dev.to/ppshobi/an-in-depth-tutorial-on-deploying-a-django-application-into-aws-58m5</guid>
      <description>&lt;p&gt;Django is the most popular Python-based web framework for a while now. Django is &lt;br&gt;
powerful, robust, full of capabilities and surrounded by a supportive community. &lt;/p&gt;

&lt;p&gt;In this video, we are going to take a look into deploying a simple Django application to an AWS ubuntu instance, with Nginx, Gunicorn &amp;amp; Supervisor configuration.&lt;/p&gt;

&lt;p&gt;In this video, I have tried to explain every single step &amp;amp; each line of code I have written. Hopefully, this video will help you out.&lt;/p&gt;

&lt;p&gt;Let me know the suggestions, thoughts &amp;amp; the doubts in the comments. Subscribe to the channel &amp;amp; Share this with your friends &amp;amp; colleagues&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Shameless plug:&lt;/strong&gt; I am building a tool to automate server provisioning and deployments for django and other python apps. The free early access is availble at &lt;a href="https://pyployer.com?ref=dev.to"&gt;pyployer.com&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Link to sample application repo: &lt;a href="https://github.com/ShobiExplains/AwsDemo"&gt;https://github.com/ShobiExplains/AwsDemo&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/u0oEIqQV_-E"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

</description>
      <category>django</category>
      <category>aws</category>
      <category>gunicorn</category>
      <category>supervisord</category>
    </item>
    <item>
      <title>How do I tie Laravel and Lumen together?</title>
      <dc:creator>Shobi</dc:creator>
      <pubDate>Tue, 30 Oct 2018 06:58:16 +0000</pubDate>
      <link>https://dev.to/ppshobi/how-do-i-tie-laravel-and-lumen-together-4cod</link>
      <guid>https://dev.to/ppshobi/how-do-i-tie-laravel-and-lumen-together-4cod</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;I have asked this question in SO, But no responses after 20 Hours, if any of you guys can help it by either answering here, or give an upvote in SO so that it gets more attension.&lt;a href="https://stackoverflow.com/questions/53043684/how-do-i-tie-laravel-and-lumen-together"&gt;Original Stack overflow question&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;I am building an application from scratch which has 2 main parts&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;A Laravel server - Which will serve HTML pages by querying an API (Preferably no DB interaction)&lt;/li&gt;
&lt;li&gt;A Lumen Server - Which will be the API being queried (DB interaction goes here)&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Now I need to log in a user. &lt;/p&gt;

&lt;p&gt;I can send username and password from laravel server to the lumen API and get a token back (I think it's the way, correct me if I am wrong). &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;After that what should I do to make the user logged in &lt;em&gt;IN&lt;/em&gt; the Laravel server?&lt;/strong&gt; &lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Keep the token in session with some key?&lt;/strong&gt; &lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;How do I make this work with the &lt;code&gt;Auth::user()&lt;/code&gt; functionality in the Laravel Server?&lt;/strong&gt; &lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Or what are some good approaches to this problem?&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>discuss</category>
      <category>laravel</category>
      <category>lumen</category>
      <category>microservices</category>
    </item>
    <item>
      <title>I have created a chrome extension to paste random data to form fields 🎷🥁</title>
      <dc:creator>Shobi</dc:creator>
      <pubDate>Thu, 18 Oct 2018 12:16:59 +0000</pubDate>
      <link>https://dev.to/ppshobi/i-have-created-a-chrome-extension-to-paste-random-data-to-form-fields--476j</link>
      <guid>https://dev.to/ppshobi/i-have-created-a-chrome-extension-to-paste-random-data-to-form-fields--476j</guid>
      <description>

&lt;p&gt;Hey guys, &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Since the last two days I was working on a chrome extension, which can insert fake data to form fields. and finally I have published it in chrome web store, you can check it out ⚡️ &lt;a href="https://chrome.google.com/webstore/detail/random-text-generator/lmealcdbihjhocippaajjhijhjciaojo"&gt;here&lt;/a&gt; ⚡️&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;I was tinkering around typescript for a few days and then I thought yes. I should do something with typescript.🤠&lt;/p&gt;

&lt;p&gt;And one day my colleague was testing a feature where he needs to fill a lot of forms, he was copying lorem ipsum from one site and pasting it into the form field. I told him, Man... you can do better, check for a chrome extension and you can fill the form easily for testing purpose.&lt;/p&gt;

&lt;p&gt;He did a search and found some extensions which were helping him. but still, the copy paste part was involved, (ie: you click on the extension icon, it will give a popup and you need to copy it from there and paste it in the form. ) which of course was not up to the mark.&lt;/p&gt;

&lt;p&gt;And moreover there is no support for data like a credit card, names, address, zip code etc... and yes ☃️, I got my idea for a chrome extension and again I can try doing it in typescript and it will be good to learn the chrome API's as well. yay... yay...&lt;/p&gt;

&lt;p&gt;I took &lt;a href="https://github.com/marak/faker.js"&gt;faker.js&lt;/a&gt; as a starting point and it can generate almost any type/amount of fake data as required.and its a widely accepted library for unit testing purpose as well. &lt;/p&gt;

&lt;p&gt;But as the project progressed, it took 2 entire nights to figure out the typescript intricacies, and the chrome extension architecture, Then I was like, okay... rather than doing a full-blown extension, let me create a version, where it can give a random text for a given length and publish a beta. Then from there I can keep adding features.&lt;/p&gt;

&lt;p&gt;Today I did it 🍾🍾🍾&lt;/p&gt;

&lt;p&gt;So at this point, after the installation of the extension, you need to press &lt;br&gt;
&lt;code&gt;Alt + Shift + I&lt;/code&gt;, and then give a length in the prompt box. Your last focused input field will be filled with random data. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Extension Url&lt;/strong&gt; -  &lt;a href="https://chrome.google.com/webstore/detail/random-text-generator/lmealcdbihjhocippaajjhijhjciaojo"&gt;https://chrome.google.com/webstore/detail/random-text-generator/lmealcdbihjhocippaajjhijhjciaojo&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;Github Repo&lt;/strong&gt; - &lt;a href="https://github.com/ppshobi/chrome-random-text-generator"&gt;https://github.com/ppshobi/chrome-random-text-generator&lt;/a&gt; %}&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;So guys... please test it out. Let me know the issues here or in the github issues page. If you would like to contribute I would be glad to guide you as well. ❤️❤️❤️&lt;/strong&gt;&lt;/p&gt;

&lt;h4&gt;Short Demo Video&lt;/h4&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/_sGQypdmLXc"&gt; &lt;/iframe&gt;&lt;/p&gt;


</description>
      <category>chromeextension</category>
      <category>typescript</category>
      <category>opensource</category>
    </item>
    <item>
      <title> Email Sending in Django 2, Part -1 </title>
      <dc:creator>Shobi</dc:creator>
      <pubDate>Wed, 10 Oct 2018 07:02:04 +0000</pubDate>
      <link>https://dev.to/ppshobi/-email-sending-in-django-2-part--1--1i0a</link>
      <guid>https://dev.to/ppshobi/-email-sending-in-django-2-part--1--1i0a</guid>
      <description>

&lt;p&gt;Yay ... I made another django video,&lt;/p&gt;

&lt;p&gt;Emails are an integral part of any web application. You need them for user verification, billing or any kind of communication with users. &lt;/p&gt;

&lt;p&gt;In this video, we are taking a look into django's console email backend, We will be sending emails as usual, but instead of actual email, Django will display it in the terminal. Let me know what you guys think in comments here or in youtube, I am happy to help you resolve any issues you encounter.&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/sCQebCRL7AU"&gt; &lt;/iframe&gt; &lt;/p&gt;

&lt;p&gt;Source code : &lt;a href="https://github.com/ShobiExplains/SimpleDjangoAuthentication/releases/tag/v0.0.2"&gt;https://github.com/ShobiExplains/SimpleDjangoAuthentication/releases/tag/v0.0.2&lt;/a&gt;&lt;/p&gt;


</description>
      <category>django</category>
      <category>emails</category>
      <category>consoleemailbackend</category>
    </item>
    <item>
      <title>I have created a tutorial video on how to build a login system in Django by leveraging Django's built-in auth component</title>
      <dc:creator>Shobi</dc:creator>
      <pubDate>Wed, 03 Oct 2018 08:17:51 +0000</pubDate>
      <link>https://dev.to/ppshobi/i-have-created-a-video-on-how-to-build-a-login-system-in-django-by-leveraging-djangos-built-in-auth-component-51em</link>
      <guid>https://dev.to/ppshobi/i-have-created-a-video-on-how-to-build-a-login-system-in-django-by-leveraging-djangos-built-in-auth-component-51em</guid>
      <description>

&lt;p&gt;At some point for a web application, we need the authentication feature to identify the user and manage them.&lt;/p&gt;

&lt;p&gt;Being a battery included framework Django comes with a builtin login system. So I have created a video screencast with step by step instructions to build an auth system in Django. &lt;/p&gt;

&lt;p&gt;In this screencast, we will be taking a look into how to leverage Django's power to build a powerful authentication system&lt;/p&gt;

&lt;p&gt;Here is the link &lt;a href="http://bit.ly/2NXLgnf"&gt;http://bit.ly/2NXLgnf&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/sCQebCRL7AU"&gt; &lt;/iframe&gt;&lt;/p&gt;

&lt;p&gt;Source Code : &lt;a href="https://github.com/ShobiExplains/SimpleDjangoAuthentication"&gt;https://github.com/ShobiExplains/SimpleDjangoAuthentication&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Let me know what you guys thinks about the video.&lt;/p&gt;


</description>
      <category>django</category>
      <category>authentication</category>
      <category>youtubescreencast</category>
    </item>
    <item>
      <title>A look into Laravel and its Ecosystem</title>
      <dc:creator>Shobi</dc:creator>
      <pubDate>Wed, 19 Sep 2018 20:37:25 +0000</pubDate>
      <link>https://dev.to/ppshobi/a-look-into-laravel-and-its-ecosystem-e52</link>
      <guid>https://dev.to/ppshobi/a-look-into-laravel-and-its-ecosystem-e52</guid>
      <description>&lt;p&gt;As a developer working primarily on PHP and Laravel I have come across a multitude of services and products related to Laravel. These things made Laravel a popular (Extremely popular I would say)  among PHP developers. &lt;/p&gt;

&lt;p&gt;Even though criticisms are present against Laravel being batteries included framework, its popularity skyrocketed since its stable release 4.2 launches in June 2014. &lt;/p&gt;

&lt;h4&gt;
  
  
  See the Google trends chart for past 5 years
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F4n4a6gmkuhryax3wqtn5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F4n4a6gmkuhryax3wqtn5.png" alt="Laravel Google Trends"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I would say Laravel gained its momentum not only because its a developer friendly framework or a robust framework; rather because of its surrounding ecosystem of products and services which would help in crafting an application faster. Much like Apple's products and ecosystem.  &lt;/p&gt;

&lt;p&gt;As of August 2018, &lt;strong&gt;Laravel 5.7&lt;/strong&gt; is released and with the ecosystem, it's a whole lot powerful. Let me list out some of those here. Even though I haven’t used all of them in production, I would consider these things as important as laravel itself.&lt;/p&gt;

&lt;p&gt;1 . &lt;a href="https://laracasts.com" rel="noopener noreferrer"&gt;Laracasts.com&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Robustness of a frameworks doesn’t help when there are not enough resources to introduce or teach them to the developers. At least in my case, I am super lazy to learn a new framework just because the learning that I get from it is nothing but how the framework does a specific thing? How routing is done in Framework X doesn’t make any change in what routing is. &lt;/p&gt;

&lt;p&gt;Laracasts is one of the obvious names in the laravel world. Jefrrey Way produces upto date screencasts on laravel and related technologies. I personally found the videos quite entertaining and informative (Its the Netflix for developers). Laracasts is not only about Laravel but as an integral part PHP and its intricacies are introduced.&lt;/p&gt;

&lt;p&gt;2 . &lt;a href="https://laravel.com" rel="noopener noreferrer"&gt;Laravel.com&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;No matter what the software is, it's incomplete and unusable without its documentation. Laravel.com contains the documentation for the framework, officially supported packages such as Scout, Passport etc… and related subjects such as setting up a development environment, deployment instructions etc…&lt;/p&gt;

&lt;p&gt;Being an open source project the laravel documentation is constantly updated and accurate as well.&lt;/p&gt;

&lt;p&gt;3 . &lt;a href="https://laravel.com/docs/homestead" rel="noopener noreferrer"&gt;Laravel Homestead &amp;amp; Valet&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Setting up a development environment as similar as to the production was a pain in the ass previously, but with vagrant and virtualisation, this task is as simple as installing few softwares, and no need to worry about cross platform issues as well. &lt;/p&gt;

&lt;p&gt;I feel pity for those who use xampp or mamp and whine after deployments. Time to switch to the new world dudes…&lt;/p&gt;

&lt;p&gt;4 . &lt;a href="https://envoyer.io" rel="noopener noreferrer"&gt;Envoyer&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Envoyer is a deployment tool built on top of laravel itself. It can hook into your version control systems events, and trigger deployments automatically. Envoyer can deploy any PHP application on AWS, Digital Ocean etc… (Of course tuned for Laravel as they say).&lt;/p&gt;

&lt;p&gt;5 . &lt;a href="https://forge.laravel.com" rel="noopener noreferrer"&gt;Laravel Forge&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Laravel forge is a server provisioning and managing service. It can create and manage PHP servers for you on AWS, Digital Ocean or Linode. It can provision SSL certificates and can manage deployments as well. &lt;/p&gt;

&lt;p&gt;Forge gives you cutting edge Linux server configurations and also supports horizontal scaling as well.&lt;/p&gt;

&lt;p&gt;6 . &lt;a href="https://lumen.laravel.com/" rel="noopener noreferrer"&gt;Laravel Lumen&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Lumen is the small brother of Laravel. A slimmed down version of Laravel with the primary focus on the development of api's and micro services.&lt;/p&gt;

&lt;p&gt;A goto software for building API based apps.&lt;/p&gt;

&lt;p&gt;7 . &lt;a href="https://spark.laravel.com/" rel="noopener noreferrer"&gt;Laravel Spark&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I wouldn’t say spark is an integral part of laravel developer ecosystem. But to scaffold an application super fast you have laravel spark. Spark can help you to start an application with ready-made Billing, Subscription, Invoices, Notifications etc…&lt;/p&gt;

&lt;p&gt;8 . &lt;a href="https://nova.laravel.com/" rel="noopener noreferrer"&gt;Laravel Nova&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Nova is a recent addition to the ecosystem. Laravel Nova provides you an admin panel for your application. With the addition of ready to use CRUD components, you can build an admin section super easy.&lt;/p&gt;

&lt;p&gt;Typically nova doesn’t need any database tables to manage itself. It's completely code driven. You don’t have to touch the existing laravel models at all. &lt;/p&gt;

&lt;p&gt;9 . &lt;a href="https://horizon.laravel.com/" rel="noopener noreferrer"&gt;Laravel Horizon and Queues&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Laravel ships with queue component out of the box. You can view and manage your asynchronous jobs and queues with the horizon in a breeze. &lt;/p&gt;

&lt;p&gt;Horizon integrates with Redis and it can retry failed jobs automatically based on the specified configuration which makes our life a whole easier.&lt;/p&gt;

&lt;p&gt;10 . &lt;a href="https://laravelshift.com/" rel="noopener noreferrer"&gt;Laravel Shift&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Laravel Shift is a service which can automatically upgrade Laravel versions on your behalf. All you have to do is give access to your git repository and it will upgrade your codebase by creating a detailed pull request.&lt;/p&gt;

&lt;p&gt;11 . &lt;a href="https://laravel-news.com/" rel="noopener noreferrer"&gt;Laravel News&lt;/a&gt;&lt;br&gt;
Since 2012 when the Laravel initial release came out, Laravel news has been bringing the latest news, tutorials and podcasts to us. I would recommend everyone to have a look there to get the latest updates on Laravel.&lt;/p&gt;

&lt;h3&gt;
  
  
  Final Notes
&lt;/h3&gt;

&lt;p&gt;PHP runs the ~70% of the web. Being an opensource project with ~46k stars in GitHub as of now, Laravel really stands out. It means nothing but its going to be around for a while. With official packages such as Cashier for billing, Scout for instant search etc... it's even more powerful and almost every day new features and bugfixes are being added to the framework. &lt;/p&gt;

&lt;p&gt;🔥🔥 &lt;strong&gt;I would say stay tuned for more excitement&lt;/strong&gt; 🔥🔥&lt;/p&gt;

</description>
      <category>laravel</category>
      <category>laravelecosystem</category>
    </item>
    <item>
      <title>Laravel Collections Higher Order Messages - Single Line Magic</title>
      <dc:creator>Shobi</dc:creator>
      <pubDate>Fri, 17 Aug 2018 21:11:38 +0000</pubDate>
      <link>https://dev.to/ppshobi/laravel-collections-higher-order-messages---single-line-magic-1fok</link>
      <guid>https://dev.to/ppshobi/laravel-collections-higher-order-messages---single-line-magic-1fok</guid>
      <description>

&lt;p&gt;Collections are wrappers around arrays in PHP. Collections provide fluent interfaces and &lt;strong&gt;intuitive&lt;/strong&gt; APIs to access arrays. Laravel comes with collections out of the box, and Laravel's eloquent ORM returns the result set in the form of collections by default.&lt;/p&gt;

&lt;p&gt;Collections come with many useful methods which allow us to easily manipulate arrays, and they are chainable as well. Compared to the built-in PHP array manipulation functions, collections offers much readable and consistent syntax. &lt;/p&gt;

&lt;p&gt;Here I will show you a little refactoring technique you can do while tinkering with collections using higher order messages.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Collections provide support for "higher order messages", which are short-cuts for performing common actions on collections. &lt;a href="https://laravel.com/docs/5.6/collections#higher-order-messages"&gt;Documentation&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Consider the scenario where you need to map over a collection and call method on the item&lt;/strong&gt;&lt;/p&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="cp"&gt;&amp;lt;?php&lt;/span&gt;
&lt;span class="nx"&gt;User&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;php&lt;/span&gt;
&lt;span class="o"&gt;---------&lt;/span&gt; 

&lt;span class="sd"&gt;/** 
 * the method returns the full name of the user 
 * by joining first and last name 
**/&lt;/span&gt;

&lt;span class="k"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;fullName&lt;/span&gt;&lt;span class="p"&gt;(){&lt;/span&gt;
   &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nv"&gt;$this&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="na"&gt;first_name&lt;/span&gt; &lt;span class="o"&gt;.&lt;/span&gt; &lt;span class="s1"&gt;' '&lt;/span&gt; &lt;span class="o"&gt;.&lt;/span&gt; &lt;span class="nv"&gt;$this&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="na"&gt;last_name&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nx"&gt;SomeFile&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;php&lt;/span&gt;
&lt;span class="o"&gt;------------&lt;/span&gt;
&lt;span class="sd"&gt;/** 
 * In some other file, we need full names of all users 
**/&lt;/span&gt;

&lt;span class="nv"&gt;$fullNames&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;User&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="na"&gt;all&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="na"&gt;map&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;$user&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="nv"&gt;$user&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="na"&gt;fullName&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;the above code shows how we do it normally with &lt;code&gt;map()&lt;/code&gt;, but functions with the simple body as in the above code, we can use higher-order functions to cut the explicit crap.&lt;/p&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="cp"&gt;&amp;lt;?php&lt;/span&gt;
&lt;span class="nv"&gt;$fullNames&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;User&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="na"&gt;all&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="na"&gt;map&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="na"&gt;fullName&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Boom ⚡ Single line Magic 🔥❤️&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Let's goto a little more complex scenario where we need to filter over a collection and then map over them again&lt;/strong&gt;&lt;/p&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="cp"&gt;&amp;lt;?php&lt;/span&gt;

&lt;span class="nx"&gt;User&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;php&lt;/span&gt;
&lt;span class="o"&gt;---------&lt;/span&gt;
&lt;span class="sd"&gt;/** 
 * the method returns the full name of the user by joining first and last name 
**/&lt;/span&gt;

&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;fullName&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="nv"&gt;$this&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="na"&gt;first_name&lt;/span&gt; &lt;span class="o"&gt;.&lt;/span&gt; &lt;span class="s1"&gt;' '&lt;/span&gt; &lt;span class="o"&gt;.&lt;/span&gt; &lt;span class="nv"&gt;$this&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="na"&gt;last_name&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="sd"&gt;/** 
 * the method returns the if the first_name starts with a given letter 
**/&lt;/span&gt;

&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;isStartingWith&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$letter&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="nx"&gt;starts_with&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$this&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="na"&gt;first_name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;$letter&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nx"&gt;OtherFile&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;php&lt;/span&gt;
&lt;span class="o"&gt;-------------&lt;/span&gt;
&lt;span class="sd"&gt;/** 
 * In some file, we need full names of all users which starts with 'A'
**/&lt;/span&gt;

&lt;span class="nv"&gt;$fullNamesWithA&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;User&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="na"&gt;all&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="na"&gt;filter&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;$user&lt;/span&gt;&lt;span class="p"&gt;){&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nv"&gt;$user&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="na"&gt;isStartingWith&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'A'&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="na"&gt;map&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;$user&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="nv"&gt;$user&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="na"&gt;fullName&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;Let's try to use Collection Higher-order functions here and cut explicit syntax crap.&lt;/p&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="cp"&gt;&amp;lt;?php&lt;/span&gt;
&lt;span class="nv"&gt;$fullNamesWithA&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;User&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="na"&gt;all&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="na"&gt;filter&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="na"&gt;isStartingWith&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'A'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="na"&gt;map&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="na"&gt;fullName&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Boom ⚡ Single line Magic 🔥❤️ Again&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Adiós&lt;/strong&gt;&lt;/p&gt;


</description>
      <category>php</category>
      <category>laravel</category>
      <category>collections</category>
      <category>higherordermessages</category>
    </item>
  </channel>
</rss>
