<?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: JohnDivam - justnote8.com</title>
    <description>The latest articles on DEV Community by JohnDivam - justnote8.com (@johndivam).</description>
    <link>https://dev.to/johndivam</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.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1117777%2F84c084ba-ea49-4650-abdf-c74df4f4989f.png</url>
      <title>DEV Community: JohnDivam - justnote8.com</title>
      <link>https://dev.to/johndivam</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/johndivam"/>
    <language>en</language>
    <item>
      <title>RESTful API vs REST API: Is There Actually a Difference?</title>
      <dc:creator>JohnDivam - justnote8.com</dc:creator>
      <pubDate>Mon, 12 Oct 2026 01:21:14 +0000</pubDate>
      <link>https://dev.to/johndivam/restful-api-vs-rest-api-is-there-actually-a-difference-2eo3</link>
      <guid>https://dev.to/johndivam/restful-api-vs-rest-api-is-there-actually-a-difference-2eo3</guid>
      <description>&lt;h2&gt;
  
  
  What is REST?
&lt;/h2&gt;

&lt;p&gt;REST (Representational State Transfer) is an &lt;strong&gt;architectural style&lt;/strong&gt;, not a protocol or a standard. It was introduced by Roy Fielding in his 2000 doctoral dissertation.&lt;/p&gt;

&lt;p&gt;REST defines a set of constraints:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Client-server&lt;/strong&gt;: UI and data storage are separated.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Stateless&lt;/strong&gt;: each request contains everything the server needs; no session state on the server.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cacheable&lt;/strong&gt;: responses declare whether they can be cached.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Uniform interface&lt;/strong&gt;: resources are identified by URLs and manipulated through standard methods.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Layered system&lt;/strong&gt;: clients don't know if they talk to the real server or an intermediary.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Code on demand&lt;/strong&gt; &lt;em&gt;(optional)&lt;/em&gt;: the server can send executable code to the client.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  REST API vs RESTful API
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;&lt;/th&gt;
&lt;th&gt;REST API&lt;/th&gt;
&lt;th&gt;RESTful API&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Meaning&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;An API that uses REST ideas&lt;/td&gt;
&lt;td&gt;An API that faithfully follows REST constraints&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Strictness&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Loose, common usage&lt;/td&gt;
&lt;td&gt;Strict, by-the-book&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Typical in practice&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;JSON over HTTP, resource URLs&lt;/td&gt;
&lt;td&gt;Same, plus correct verbs, status codes, statelessness, ideally HATEOAS&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;In other words:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;REST&lt;/strong&gt; is the architectural style.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;REST API&lt;/strong&gt; is the everyday label for an HTTP API inspired by it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;RESTful&lt;/strong&gt; describes how well an API &lt;em&gt;conforms&lt;/em&gt; to that style.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Example: not RESTful
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight http"&gt;&lt;code&gt;&lt;span class="err"&gt;POST /getUser
POST /createUser
POST /deleteUser?id=42
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here HTTP is just a tunnel. The action is in the URL, and every call is a &lt;code&gt;POST&lt;/code&gt;. This is closer to RPC than REST.&lt;/p&gt;

&lt;h2&gt;
  
  
  Example: RESTful
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight http"&gt;&lt;code&gt;&lt;span class="err"&gt;GET    /users        # list users
GET    /users/42     # get one user
POST   /users        # create a user
PUT    /users/42     # replace a user
PATCH  /users/42     # partially update a user
DELETE /users/42     # delete a user
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The URL identifies the &lt;strong&gt;resource&lt;/strong&gt; (a noun), and the HTTP method expresses the &lt;strong&gt;action&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  RESTful in Laravel
&lt;/h2&gt;

&lt;p&gt;Laravel makes this almost free with resource routes:&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="c1"&gt;// routes/api.php&lt;/span&gt;
&lt;span class="nc"&gt;Route&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;apiResource&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'users'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nc"&gt;UserController&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="n"&gt;class&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This single line generates &lt;code&gt;index&lt;/code&gt;, &lt;code&gt;store&lt;/code&gt;, &lt;code&gt;show&lt;/code&gt;, &lt;code&gt;update&lt;/code&gt;, and &lt;code&gt;destroy&lt;/code&gt;, mapped to the right verbs and URLs.&lt;/p&gt;

&lt;p&gt;And return proper status codes:&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="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;function&lt;/span&gt; &lt;span class="n"&gt;store&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;StoreUserRequest&lt;/span&gt; &lt;span class="nv"&gt;$request&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nv"&gt;$user&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;User&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$request&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;validated&lt;/span&gt;&lt;span class="p"&gt;());&lt;/span&gt;

    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;response&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;json&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="mi"&gt;201&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// 201 Created, not 200&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;function&lt;/span&gt; &lt;span class="n"&gt;destroy&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;User&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="nv"&gt;$user&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nb"&gt;delete&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;response&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;noContent&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt; &lt;span class="c1"&gt;// 204 No Content&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  The HATEOAS Problem
&lt;/h2&gt;

&lt;p&gt;The most-ignored REST constraint is &lt;strong&gt;HATEOAS&lt;/strong&gt; (Hypermedia as the Engine of Application State): responses should include links telling the client what it can do next.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;42&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Hakim"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"_links"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"self"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"href"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"/users/42"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"orders"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"href"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"/users/42/orders"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"delete"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"href"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"/users/42"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"method"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"DELETE"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Almost nobody implements this, which means that, strictly speaking, &lt;strong&gt;most "RESTful" APIs aren't fully RESTful&lt;/strong&gt; by Fielding's definition. Some people call the pragmatic version "REST-ish" or simply an "HTTP API."&lt;/p&gt;

&lt;h2&gt;
  
  
  Checklist for a "RESTful enough" API
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;[x] Nouns in URLs, plural (&lt;code&gt;/users&lt;/code&gt;, not &lt;code&gt;/getUsers&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;[x] Correct HTTP verbs for each action&lt;/li&gt;
&lt;li&gt;[x] Meaningful status codes (&lt;code&gt;201&lt;/code&gt;, &lt;code&gt;204&lt;/code&gt;, &lt;code&gt;404&lt;/code&gt;, &lt;code&gt;422&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;[x] Stateless requests (token auth, no server sessions)&lt;/li&gt;
&lt;li&gt;[x] Consistent JSON structure&lt;/li&gt;
&lt;li&gt;[x] Versioning (&lt;code&gt;/api/v1/...&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;[ ] HATEOAS (optional in practice)&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  So which term should you use?
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;In &lt;strong&gt;daily conversation, docs, and job descriptions&lt;/strong&gt;, "REST API" and "RESTful API" mean the same thing. Use either.&lt;/li&gt;
&lt;li&gt;In a &lt;strong&gt;technical discussion&lt;/strong&gt;, "RESTful" implies you follow the constraints properly.&lt;/li&gt;
&lt;li&gt;If someone is being strict, the honest answer is: &lt;em&gt;"It's REST-style, but not full HATEOAS."&lt;/em&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;REST is the style, REST API is the common label, and RESTful means faithful to the style. What matters more than the term is designing APIs that are predictable, stateless, and consistent with HTTP semantics.&lt;/p&gt;

&lt;p&gt;How do you use these terms on your team? Does anyone actually implement HATEOAS? Let me know in the comments.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Found this useful? Follow me for more backend and Laravel content.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>restapi</category>
      <category>symfony</category>
      <category>laravel</category>
    </item>
    <item>
      <title>Why You Should Never Skip .dockerignore</title>
      <dc:creator>JohnDivam - justnote8.com</dc:creator>
      <pubDate>Thu, 01 Oct 2026 14:58:25 +0000</pubDate>
      <link>https://dev.to/johndivam/why-you-should-never-skip-dockerignore-4ien</link>
      <guid>https://dev.to/johndivam/why-you-should-never-skip-dockerignore-4ien</guid>
      <description>&lt;h1&gt;
  
  
  Why You Should Never Skip .dockerignore
&lt;/h1&gt;

&lt;p&gt;When I started using Docker, I wrote a Dockerfile, ran &lt;code&gt;docker build&lt;/code&gt;, and moved on. It worked, so I never thought about it again. Later I noticed my builds were slow and my images were bigger than they should be. The cause was a small file I had never created: &lt;code&gt;.dockerignore&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is it?
&lt;/h2&gt;

&lt;p&gt;A &lt;code&gt;.dockerignore&lt;/code&gt; file tells Docker which files to leave out when you build an image. It works like &lt;code&gt;.gitignore&lt;/code&gt;, but for Docker. When you run &lt;code&gt;docker build&lt;/code&gt;, Docker first sends your whole project folder (the "build context") to the Docker engine. Anything listed in &lt;code&gt;.dockerignore&lt;/code&gt; is not sent.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why it matters
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;1. Faster builds.&lt;/strong&gt;&lt;br&gt;
Think about &lt;code&gt;node_modules&lt;/code&gt;, &lt;code&gt;vendor&lt;/code&gt;, or &lt;code&gt;.git&lt;/code&gt;. These folders can be hundreds of megabytes. Without &lt;code&gt;.dockerignore&lt;/code&gt;, Docker copies all of it on every build, even if your Dockerfile never uses it. With the file in place, the build starts almost right away.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Smaller images.&lt;/strong&gt;&lt;br&gt;
When you write &lt;code&gt;COPY . .&lt;/code&gt;, everything in the folder goes into the image. That includes logs, cache, test files, and editor settings. A smaller image is faster to push, pull, and deploy.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Better security.&lt;/strong&gt;&lt;br&gt;
This one is the most important. Your project folder may contain &lt;code&gt;.env&lt;/code&gt; files, private keys, or passwords. If you copy them into an image, they stay there. Anyone who can pull the image can read them. Ignoring these files keeps secrets out.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Fewer strange bugs.&lt;/strong&gt;&lt;br&gt;
Here is a real example. You install dependencies on your Windows machine, then build a Linux image. If your local &lt;code&gt;node_modules&lt;/code&gt; gets copied into the image, it can overwrite the clean one installed inside Docker. Native packages then break, and the error messages make no sense. Ignoring &lt;code&gt;node_modules&lt;/code&gt; fixes this.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5. Better layer caching.&lt;/strong&gt;&lt;br&gt;
Docker reuses a layer if nothing in it has changed. If a log file or a cache file changes on every run and gets copied into the image, the cache is broken and Docker rebuilds everything. Ignoring those files keeps the cache working.&lt;/p&gt;
&lt;h2&gt;
  
  
  A simple example
&lt;/h2&gt;

&lt;p&gt;For a Node project:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;node_modules
.git
.env
.env.*
dist
npm-debug.log
Dockerfile
.dockerignore
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For a PHP project, you would ignore &lt;code&gt;vendor&lt;/code&gt;, &lt;code&gt;var&lt;/code&gt;, and local &lt;code&gt;.env&lt;/code&gt; files instead.&lt;/p&gt;

&lt;h2&gt;
  
  
  A few tips
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Do not ignore files your build needs, like &lt;code&gt;package.json&lt;/code&gt; or &lt;code&gt;composer.json&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Keep your lock files. They make builds repeatable.&lt;/li&gt;
&lt;li&gt;Create the file on day one, not after problems start.&lt;/li&gt;
&lt;li&gt;Review it from time to time as the project grows.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Final thoughts
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;.dockerignore&lt;/code&gt; takes two minutes to write, and it saves you from slow builds, large images, leaked secrets, and confusing errors. It is one of the easiest improvements you can make to a Docker setup. If your project does not have one yet, add it today.&lt;/p&gt;

</description>
      <category>docker</category>
      <category>devops</category>
    </item>
    <item>
      <title>Just Note – Online Notepad with Visual Flow Notes (justnote8.com)</title>
      <dc:creator>JohnDivam - justnote8.com</dc:creator>
      <pubDate>Thu, 01 Oct 2026 11:42:15 +0000</pubDate>
      <link>https://dev.to/johndivam/just-note-online-notepad-with-visual-flow-notes-justnote8com-2gj7</link>
      <guid>https://dev.to/johndivam/just-note-online-notepad-with-visual-flow-notes-justnote8com-2gj7</guid>
      <description>&lt;p&gt;Online note-taking web application with visual flow-based notes, independently designed and developed using Nuxt.js and Symfony, containerized with Docker, and deployed on a VPS via Dokploy with CI/CD.&lt;/p&gt;

&lt;p&gt;&lt;a href="//justnote8.com"&gt;justnote8.com&lt;/a&gt;&lt;/p&gt;

</description>
      <category>symfony</category>
      <category>nuxt</category>
      <category>docker</category>
    </item>
    <item>
      <title>Containerized Full-Stack Application using Docker, Nuxt 4, and Symfony 7.4</title>
      <dc:creator>JohnDivam - justnote8.com</dc:creator>
      <pubDate>Tue, 01 Sep 2026 09:00:14 +0000</pubDate>
      <link>https://dev.to/johndivam/containerized-full-stack-application-using-docker-nuxt-4-and-symfony-74-4ei4</link>
      <guid>https://dev.to/johndivam/containerized-full-stack-application-using-docker-nuxt-4-and-symfony-74-4ei4</guid>
      <description>&lt;p&gt;To run a multi-container full-stack application, the best practice is to separate your frontend and backend into isolated containers and orchestrate them using Docker Compose. This keeps your development environment clean, handles internal networking automatically, and allows services to scale independently. &lt;/p&gt;

&lt;p&gt;Structure:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;justproject/
├── justproject_api/
│   └── docker/entrypoint.sh   
│   └── docker/nginx.conf   
│   ├── docker-compose.yml   
│   ├── Dockerfile          
└── justproject_front/
    └── Dockerfile           

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;justproject_api\docker-compose.yml&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;services&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;database&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;image&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;mariadb:11&lt;/span&gt;
    &lt;span class="na"&gt;ports&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;3307:3306"&lt;/span&gt;
    &lt;span class="na"&gt;environment&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;MYSQL_DATABASE&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;${MYSQL_DATABASE:-justproject}&lt;/span&gt;
      &lt;span class="na"&gt;MYSQL_ROOT_PASSWORD&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;${MYSQL_ROOT_PASSWORD:-root}&lt;/span&gt;
    &lt;span class="na"&gt;healthcheck&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;test&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;CMD"&lt;/span&gt;&lt;span class="pi"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;healthcheck.sh"&lt;/span&gt;&lt;span class="pi"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;--connect"&lt;/span&gt;&lt;span class="pi"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;--innodb_initialized"&lt;/span&gt;&lt;span class="pi"&gt;]&lt;/span&gt;
      &lt;span class="na"&gt;timeout&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;5s&lt;/span&gt;
      &lt;span class="na"&gt;retries&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;5&lt;/span&gt;
      &lt;span class="na"&gt;start_period&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;30s&lt;/span&gt;
    &lt;span class="na"&gt;volumes&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;database_data:/var/lib/mysql:rw&lt;/span&gt;

  &lt;span class="na"&gt;app&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;build&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;.&lt;/span&gt;
    &lt;span class="na"&gt;volumes&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;.:/var/www/html&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;app_cache:/var/www/html/var/cache&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;app_log:/var/www/html/var/log&lt;/span&gt;
    &lt;span class="na"&gt;depends_on&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;database&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
        &lt;span class="na"&gt;condition&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;service_healthy&lt;/span&gt;

  &lt;span class="na"&gt;nginx&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;image&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;nginx:alpine&lt;/span&gt;
    &lt;span class="na"&gt;ports&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;8000:80"&lt;/span&gt;
    &lt;span class="na"&gt;volumes&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;.:/var/www/html&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;./docker/nginx.conf:/etc/nginx/conf.d/default.conf&lt;/span&gt;
    &lt;span class="na"&gt;depends_on&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;app&lt;/span&gt;

  &lt;span class="na"&gt;frontend&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;build&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;../justproject_front&lt;/span&gt;
    &lt;span class="na"&gt;ports&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;3000:3000"&lt;/span&gt;
    &lt;span class="na"&gt;environment&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;NUXT_PUBLIC_API_BASE&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;http://localhost:8000"&lt;/span&gt;
    &lt;span class="na"&gt;volumes&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;../justproject_front:/app&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;/app/node_modules&lt;/span&gt;

&lt;span class="na"&gt;volumes&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;database_data&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;app_cache&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;app_log&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;justproject_api\Dockerfile&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight docker"&gt;&lt;code&gt;&lt;span class="k"&gt;FROM&lt;/span&gt;&lt;span class="s"&gt; php:8.4-fpm&lt;/span&gt;

&lt;span class="k"&gt;RUN &lt;/span&gt;apt-get update &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; apt-get &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-y&lt;/span&gt; &lt;span class="se"&gt;\
&lt;/span&gt;    git unzip libicu-dev libzip-dev &lt;span class="se"&gt;\
&lt;/span&gt;    &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; docker-php-ext-install pdo_mysql intl zip

&lt;span class="k"&gt;COPY&lt;/span&gt;&lt;span class="s"&gt; --from=composer:2 /usr/bin/composer /usr/bin/composer&lt;/span&gt;

&lt;span class="k"&gt;WORKDIR&lt;/span&gt;&lt;span class="s"&gt; /var/www/html&lt;/span&gt;
&lt;span class="k"&gt;COPY&lt;/span&gt;&lt;span class="s"&gt; . .&lt;/span&gt;
&lt;span class="k"&gt;RUN &lt;/span&gt;composer &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;--no-interaction&lt;/span&gt; &lt;span class="nt"&gt;--optimize-autoloader&lt;/span&gt;

&lt;span class="k"&gt;COPY&lt;/span&gt;&lt;span class="s"&gt; docker/entrypoint.sh /usr/local/bin/entrypoint.sh&lt;/span&gt;
&lt;span class="k"&gt;RUN &lt;/span&gt;&lt;span class="nb"&gt;chmod&lt;/span&gt; +x /usr/local/bin/entrypoint.sh

&lt;span class="k"&gt;ENTRYPOINT&lt;/span&gt;&lt;span class="s"&gt; ["entrypoint.sh"]&lt;/span&gt;
&lt;span class="k"&gt;CMD&lt;/span&gt;&lt;span class="s"&gt; ["php-fpm"]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;justproject_front\Dockerfile&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight docker"&gt;&lt;code&gt;&lt;span class="k"&gt;FROM&lt;/span&gt;&lt;span class="s"&gt; node:20-alpine&lt;/span&gt;

&lt;span class="k"&gt;WORKDIR&lt;/span&gt;&lt;span class="s"&gt; /app&lt;/span&gt;
&lt;span class="k"&gt;COPY&lt;/span&gt;&lt;span class="s"&gt; package*.json ./&lt;/span&gt;
&lt;span class="k"&gt;RUN &lt;/span&gt;npm &lt;span class="nb"&gt;install&lt;/span&gt;

&lt;span class="k"&gt;COPY&lt;/span&gt;&lt;span class="s"&gt; . .&lt;/span&gt;
&lt;span class="k"&gt;EXPOSE&lt;/span&gt;&lt;span class="s"&gt; 3000&lt;/span&gt;
&lt;span class="k"&gt;CMD&lt;/span&gt;&lt;span class="s"&gt; ["npm", "run", "dev", "--", "--host", "0.0.0.0"]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;justproject_api\docker\entrypoint.sh&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;#!/bin/sh&lt;/span&gt;
&lt;span class="nb"&gt;set&lt;/span&gt; &lt;span class="nt"&gt;-e&lt;/span&gt;

&lt;span class="nb"&gt;mkdir&lt;/span&gt; &lt;span class="nt"&gt;-p&lt;/span&gt; var/cache var/log
&lt;span class="nb"&gt;chown&lt;/span&gt; &lt;span class="nt"&gt;-R&lt;/span&gt; www-data:www-data var/cache var/log
&lt;span class="nb"&gt;chmod&lt;/span&gt; &lt;span class="nt"&gt;-R&lt;/span&gt; 775 var/cache var/log

&lt;span class="nb"&gt;exec&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$@&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;justproject_api\docker\nginx.conf&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight nginx"&gt;&lt;code&gt;&lt;span class="k"&gt;server&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kn"&gt;listen&lt;/span&gt; &lt;span class="mi"&gt;80&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="kn"&gt;root&lt;/span&gt; &lt;span class="n"&gt;/var/www/html/public&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

    &lt;span class="kn"&gt;location&lt;/span&gt; &lt;span class="n"&gt;/&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="kn"&gt;try_files&lt;/span&gt; &lt;span class="nv"&gt;$uri&lt;/span&gt; &lt;span class="n"&gt;/index.php&lt;/span&gt;&lt;span class="nv"&gt;$is_args$args&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="kn"&gt;location&lt;/span&gt; &lt;span class="p"&gt;~&lt;/span&gt; &lt;span class="sr"&gt;^/index\.php(/|$)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="kn"&gt;fastcgi_pass&lt;/span&gt; &lt;span class="nf"&gt;app&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;9000&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="kn"&gt;fastcgi_split_path_info&lt;/span&gt; &lt;span class="s"&gt;^(.+&lt;/span&gt;&lt;span class="err"&gt;\&lt;/span&gt;&lt;span class="s"&gt;.php)(/.*)&lt;/span&gt;$&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="kn"&gt;include&lt;/span&gt; &lt;span class="s"&gt;fastcgi_params&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="kn"&gt;fastcgi_param&lt;/span&gt; &lt;span class="s"&gt;SCRIPT_FILENAME&lt;/span&gt; &lt;span class="nv"&gt;$document_root$fastcgi_script_name&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="kn"&gt;fastcgi_param&lt;/span&gt; &lt;span class="s"&gt;DOCUMENT_ROOT&lt;/span&gt; &lt;span class="nv"&gt;$document_root&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;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;up&lt;br&gt;
&lt;code&gt;docker compose up -d --build&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;to check mgirations list :&lt;br&gt;
&lt;code&gt;docker compose exec app php bin/console doctrine:migrations:list&lt;/code&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;This only for local environment&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>backend</category>
      <category>devops</category>
      <category>docker</category>
      <category>php</category>
    </item>
    <item>
      <title>Website Builder : Using Livewire</title>
      <dc:creator>JohnDivam - justnote8.com</dc:creator>
      <pubDate>Tue, 07 Jul 2026 10:23:48 +0000</pubDate>
      <link>https://dev.to/johndivam/website-builder-using-livewire-l8p</link>
      <guid>https://dev.to/johndivam/website-builder-using-livewire-l8p</guid>
      <description>&lt;p&gt;"QubeSite is an integrated platform for creating websites without writing any code. The platform was developed using Laravel with an advanced control panel to manage users, packages, templates, and subscriptions. The platform provides a visual editor, multilingual support, and domain linking, with high performance and a smooth user experience, to facilitate the creation of professional websites in minutes."&lt;/p&gt;

&lt;p&gt;Built with:&lt;br&gt;
Laravel • Livewire • Filament • MySQL • Redis &lt;/p&gt;

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

</description>
      <category>laravel</category>
      <category>php</category>
      <category>showdev</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Filament: Hide Submit and Cancel Buttons in wizard</title>
      <dc:creator>JohnDivam - justnote8.com</dc:creator>
      <pubDate>Tue, 28 Oct 2025 10:19:50 +0000</pubDate>
      <link>https://dev.to/johndivam/filament-hide-submit-and-cancel-buttons-in-wizard-2bi7</link>
      <guid>https://dev.to/johndivam/filament-hide-submit-and-cancel-buttons-in-wizard-2bi7</guid>
      <description>&lt;p&gt;Override the submitAction dynamically in the Page class&lt;br&gt;
If you’re in a CreatePage or EditPage, you can control visibility like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;class CreatePage extends CreateRecord
{
    protected static string $resource = PageResource::class;

    //add this 
    public function getFormActions(): array
    {
        return [

        ];
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And in your PageForm :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Wizard::make([
...
])
 -&amp;gt;submitAction(view('filament.submit-button'))

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;// in resources\views\filament\submit-button.blade.php&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;div 
    x-data
    x-transition
&amp;gt;
    &amp;lt;x-filament::button
        type="submit"
        color="primary"
        class="fi-btn"
    &amp;gt;
        Submit
    &amp;lt;/x-filament::button&amp;gt;
&amp;lt;/div&amp;gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>php</category>
      <category>laravel</category>
      <category>filament</category>
    </item>
    <item>
      <title>Laravel app was slow. Here's how I fixed it</title>
      <dc:creator>JohnDivam - justnote8.com</dc:creator>
      <pubDate>Fri, 17 Oct 2025 14:25:08 +0000</pubDate>
      <link>https://dev.to/johndivam/laravel-app-was-slow-heres-how-i-fixed-it-19hj</link>
      <guid>https://dev.to/johndivam/laravel-app-was-slow-heres-how-i-fixed-it-19hj</guid>
      <description>&lt;p&gt;Imagine fetching 100 users, each with related posts and comments.&lt;br&gt;
Without optimization, your app might execute 1000+ queries just to load a single page!&lt;br&gt;
The result? Slow performance, wasted resources, and frustrated users.&lt;br&gt;
Let’s fix it step by step : &lt;/p&gt;

&lt;p&gt;1️⃣** Eager Loading -&amp;gt;with()**&lt;br&gt;
Instead of making one query per related record, load relationships in advance.&lt;/p&gt;

&lt;p&gt;Before:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$users = User::all();
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$users = User::with('posts', 'comments')-&amp;gt;get(); //Faster. Cleaner. Efficient.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;2️⃣ &lt;strong&gt;Database Indexing&lt;/strong&gt;&lt;br&gt;
Add indexes to columns you frequently query or use in WHERE, JOIN, and ORDER BY clauses.&lt;/p&gt;

&lt;p&gt;Example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;CREATE INDEX idx_user_email ON users(email); //Query time improved from 800ms → 50ms
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;3️⃣ &lt;strong&gt;Query Caching (Laravel Cache)&lt;/strong&gt;&lt;br&gt;
Cache repeated queries or expensive operations using Laravel’s built-in caching.&lt;/p&gt;

&lt;p&gt;Example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$users = Cache::remember('users_with_posts', 60, function() {
    return User::with('posts')-&amp;gt;get();
});
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;4️⃣ &lt;strong&gt;Lazy Loading Assets (Images, Videos, etc.)&lt;/strong&gt;&lt;br&gt;
Optimize your frontend performance by loading assets only when they’re visible.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;img src="image.jpg" loading="lazy" alt="User profile"&amp;gt; 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Faster page rendering and lower initial load times.&lt;/p&gt;

&lt;p&gt;5️⃣ &lt;strong&gt;Optimize Select Queries (Avoid SELECT *)&lt;/strong&gt;&lt;br&gt;
Fetching unnecessary columns bloats your response and slows queries.&lt;/p&gt;

&lt;p&gt;Before:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$users = User::with('posts')-&amp;gt;get();
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$users = User::select('id', 'name', 'email')
             -&amp;gt;with('posts:id,user_id,title')
             -&amp;gt;get(); //Only the data you need — smaller payloads, faster delivery.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Final Thoughts&lt;/strong&gt;&lt;br&gt;
Performance optimization isn’t a one-time task — it’s an ongoing discipline.&lt;br&gt;
By combining eager loading, indexing, caching, and smart query design, you can turn a slow, bloated app into a lightning-fast experience ⚡.&lt;/p&gt;

</description>
      <category>performance</category>
      <category>laravel</category>
      <category>php</category>
      <category>database</category>
    </item>
    <item>
      <title>Is Laravel the Best PHP Framework in 2025</title>
      <dc:creator>JohnDivam - justnote8.com</dc:creator>
      <pubDate>Fri, 17 Oct 2025 14:12:53 +0000</pubDate>
      <link>https://dev.to/johndivam/is-laravel-the-best-php-framework-in-2025-53ch</link>
      <guid>https://dev.to/johndivam/is-laravel-the-best-php-framework-in-2025-53ch</guid>
      <description>&lt;p&gt;While new frameworks pop up every year, Laravel continues to stand tall as the go-to choice for developers worldwide. Here’s why it remains unbeatable: &lt;/p&gt;

&lt;p&gt;1️⃣ Elegant, Readable Syntax&lt;br&gt;
Laravel’s syntax is poetry in code — clean, expressive, and a joy to work with. Writing Laravel feels natural, like speaking fluent English. It’s not just beautiful — it’s maintainable and developer-friendly.&lt;/p&gt;

&lt;p&gt;2️⃣ A Massive, Integrated Ecosystem&lt;br&gt;
Forge – effortless server management and deployment&lt;br&gt;
Vapor – seamless serverless scaling on AWS&lt;br&gt;
Nova – powerful, elegant admin panels&lt;br&gt;
Horizon – advanced queue monitoring and control&lt;br&gt;
Everything you need to build, deploy, and scale — all within reach.&lt;/p&gt;

&lt;p&gt;3️⃣ A Thriving Global Community&lt;br&gt;
Get stuck? You’re never alone. Thousands of Laravel developers are ready to help.&lt;br&gt;
From Laracasts tutorials to active Discord servers, forums, and GitHub discussions, support is always just a message away.&lt;/p&gt;

&lt;p&gt;4️⃣ Packed with Modern Features&lt;br&gt;
Laravel brings all the essentials of modern web development — no extra setup required:&lt;br&gt;
✅ Built-in authentication&lt;br&gt;
✅ Queue management&lt;br&gt;
✅ Real-time event broadcasting&lt;br&gt;
✅ Task scheduling&lt;br&gt;
✅ API resources and resourceful routing&lt;/p&gt;

&lt;p&gt;It’s modern, streamlined, and designed for productivity.&lt;/p&gt;

&lt;p&gt;5️⃣ Scales with Your Vision&lt;br&gt;
Whether you’re launching a small MVP or running an enterprise app serving millions, Laravel grows with you. Its architecture and ecosystem are built for performance and scalability. 💪&lt;/p&gt;

&lt;p&gt;6️⃣ Constantly Evolving&lt;br&gt;
Led by Taylor Otwell and an incredible open-source community, Laravel evolves rapidly. Expect frequent updates, new features, and rock-solid security patches — keeping your stack modern and secure.&lt;/p&gt;

&lt;p&gt;7️⃣ Job Market&lt;br&gt;
Laravel skills are in high demand. From startups to global companies, everyone’s hiring Laravel developers — and the opportunities just keep growing.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Laravel isn’t just surviving the test of time — it’s defining the future of web development.&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>laravel</category>
      <category>php</category>
    </item>
    <item>
      <title>Groups in Filament v4</title>
      <dc:creator>JohnDivam - justnote8.com</dc:creator>
      <pubDate>Sat, 11 Oct 2025 10:56:30 +0000</pubDate>
      <link>https://dev.to/johndivam/groups-in-filament-v4-3m6k</link>
      <guid>https://dev.to/johndivam/groups-in-filament-v4-3m6k</guid>
      <description>&lt;p&gt;you can use it with any layout component. For example, you could use a Group component which has no styling associated with it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;use Filament\Schemas\Components\Section;


public static function configure(Schema $schema): Schema
    {
        return $schema
            -&amp;gt;components([
                Section::make()
                  -&amp;gt;schema([
                    TextInput::make('test1'),
                ])-&amp;gt;columnSpan(['lg' =&amp;gt; 2]),
                Section::make()
                  -&amp;gt;schema([
                    TextInput::make('test2'),
                ])-&amp;gt;columnSpan(['lg' =&amp;gt; 1]),
            ])-&amp;gt;columns(3);
    }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsf1j17vw3ucws341qrei.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsf1j17vw3ucws341qrei.png" alt=" " width="797" height="116"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>laravel</category>
      <category>filament</category>
      <category>php</category>
    </item>
    <item>
      <title>Filament Repeater, total sum &amp; validate</title>
      <dc:creator>JohnDivam - justnote8.com</dc:creator>
      <pubDate>Sat, 27 Sep 2025 10:40:23 +0000</pubDate>
      <link>https://dev.to/johndivam/filament-repeater-total-sum-validate-254k</link>
      <guid>https://dev.to/johndivam/filament-repeater-total-sum-validate-254k</guid>
      <description>&lt;ul&gt;
&lt;li&gt;Sum the values of all repeater rows&lt;/li&gt;
&lt;li&gt;Validate the total against a maximum&lt;/li&gt;
&lt;li&gt;Update another field automatically
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;return $form-&amp;gt;schema([

    // This field will display the calculated total
    Forms\Components\TextInput::make('qnt_allocated')
       -&amp;gt;label('Total Quantity')
        -&amp;gt;required()
        -&amp;gt;numeric()
        -&amp;gt;suffix('Kg'),

    // Repeater of groups
    Forms\Components\Repeater::make('groups')
        -&amp;gt;label('groups:')
        -&amp;gt;relationship('groups')
        -&amp;gt;schema([
            Forms\Components\TextInput::make('quantity')
                -&amp;gt;label('group quantity')
                -&amp;gt;required()
                -&amp;gt;numeric()
                -&amp;gt;reactive()
                -&amp;gt;rules([
                    fn (Get $get): \Closure =&amp;gt; function (string $attribute, $value, \Closure $fail) use ($get) {
                        $total = collect($get('../../groups'))-&amp;gt;sum('quantity');
                        if ($total &amp;gt; 7000) {
                           $fail("Total quantity for all groups cannot exceed 7000 kg (Current total: {$total})");
                        }
                    },
                ])
                -&amp;gt;afterStateUpdated(function ($state, callable $get, callable $set) {
                    $total = collect($get('../../groups'))-&amp;gt;sum('quantity');
                    $set('../../qnt_allocated', $total);
                })
                -&amp;gt;suffix('Kg'),
        ])
]);

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>filament</category>
      <category>laravel</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Filament How to redirect to list page after (create,update) using Trait</title>
      <dc:creator>JohnDivam - justnote8.com</dc:creator>
      <pubDate>Thu, 22 Aug 2024 11:51:59 +0000</pubDate>
      <link>https://dev.to/johndivam/filamtn-how-to-redirect-to-list-page-after-createupdate-using-trait-5b0i</link>
      <guid>https://dev.to/johndivam/filamtn-how-to-redirect-to-list-page-after-createupdate-using-trait-5b0i</guid>
      <description>&lt;p&gt;To redirect to the list page after creating or updating a resource in Filament v3, you can use a custom trait in your resource class . &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Create a Custom Trait&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;?php

namespace App\Traits;

trait RedirectIndex
{
    protected function getRedirectUrl(): string
    {
        return $this-&amp;gt;getResource()::getUrl('index');
    }
}

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Use the Trait in Your Filament Resource&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;class CreateProduct extends CreateRecord
{
    protected static string $resource = ProductResource::class;

   //add trait in your CreateRecord or UpdateRecord
    use \App\Traits\RedirectIndex; 
}

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>laravel</category>
      <category>filament</category>
      <category>php</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Laravel Filament: get resource table data by authenticated id</title>
      <dc:creator>JohnDivam - justnote8.com</dc:creator>
      <pubDate>Tue, 02 Jul 2024 11:06:22 +0000</pubDate>
      <link>https://dev.to/johndivam/laravel-filament-get-resource-table-data-by-authenticated-id-15j7</link>
      <guid>https://dev.to/johndivam/laravel-filament-get-resource-table-data-by-authenticated-id-15j7</guid>
      <description>&lt;p&gt;To restrict the display of resources in a Filament resource based on the user_id of the authenticated user, you can modify the getEloquentQuery() method in your Filament resource class. Here’s how you can do it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; public static function getEloquentQuery(): Builder{
        return parent::getEloquentQuery()-&amp;gt;where('user_id',auth()-&amp;gt;id());
    }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>laravel</category>
      <category>filament</category>
      <category>webdev</category>
      <category>php</category>
    </item>
  </channel>
</rss>
