<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Beyondcode on R A Fletcher&#39;s Blog</title>
    <link>https://www.rafletcher.co.uk/tags/beyondcode/</link>
    <description>Recent content in Beyondcode on R A Fletcher&#39;s Blog</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en</language>
    <copyright>R Fletcher</copyright>
    <lastBuildDate>Tue, 09 Jun 2026 13:28:38 +0100</lastBuildDate><atom:link href="https://www.rafletcher.co.uk/tags/beyondcode/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Notes on beyondcode-laravel/er-diagram-generator</title>
      <link>https://www.rafletcher.co.uk/posts/beyondcode-laravel-er-diagram-generator/</link>
      <pubDate>Tue, 09 Jun 2026 13:28:38 +0100</pubDate>
      
      <guid>https://www.rafletcher.co.uk/posts/beyondcode-laravel-er-diagram-generator/</guid>
      <description>Notes on beyondcode-laravel-er-diagram-generator Generate entity relation diagrams from your Laravel model files.
Overview I have used different software over the years to produce schema diagrams of database structures in order to quickly gain or remind myself of the moving parts of what I&amp;rsquo;m working with. It seemed to me there should really be something for laravel which utilises the artisan command to do this.
Terms &amp;ldquo;ER Diagram&amp;rdquo; - Entity Relationship Diagram</description>
      <content>&lt;h1 id=&#34;notes-on-beyondcode-laravel-er-diagram-generator&#34;&gt;Notes on beyondcode-laravel-er-diagram-generator&lt;/h1&gt;
&lt;blockquote&gt;
&lt;p&gt;Generate entity relation diagrams from your Laravel model files.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2 id=&#34;overview&#34;&gt;Overview&lt;/h2&gt;
&lt;p&gt;I have used different software over the years to produce schema diagrams of database structures in order to quickly gain
or remind myself of the moving parts of what I&amp;rsquo;m working with. It seemed to me there should really be something for laravel
which utilises the artisan command to do this.&lt;/p&gt;
&lt;h2 id=&#34;terms&#34;&gt;Terms&lt;/h2&gt;
&lt;p&gt;&amp;ldquo;ER Diagram&amp;rdquo;  - Entity Relationship Diagram&lt;/p&gt;
&lt;h2 id=&#34;what-it-does&#34;&gt;What it does&lt;/h2&gt;
&lt;p&gt;This software provides a new artisan command&lt;/p&gt;
&lt;h2 id=&#34;installation&#34;&gt;Installation&lt;/h2&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;sudo apt-get install graphviz
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;# install instructions&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;composer require beyondcode/laravel-er-diagram-generator --dev
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;first-impressions&#34;&gt;First impressions&lt;/h2&gt;
&lt;p&gt;The command has no filters, so you get the whole thing and it&amp;rsquo;s too much for an established codebase. You can filter
by updating a config file.&lt;/p&gt;
&lt;p&gt;There is an output format of text for LLM usage.&lt;/p&gt;
&lt;h2 id=&#34;pros&#34;&gt;Pros&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Quick to install.&lt;/li&gt;
&lt;li&gt;Contains all the data&lt;/li&gt;
&lt;li&gt;Looks to DB for column types&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;cons&#34;&gt;Cons&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Can&amp;rsquo;t specify on the command line a single Model and it&amp;rsquo;s relations.&lt;/li&gt;
&lt;li&gt;Graphic output is not searchable.&lt;/li&gt;
&lt;li&gt;Graphviz gets all the relations on a massive png, but not in an easy way to find what you are looking for. The lines
between entitites are too large.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Look at this and imagine following a bunch of lines to find the relations:
&lt;img alt=&#34;graphviz-output&#34; src=&#34;https://www.rafletcher.co.uk/images/screenshots/graphviz-output-20260609-134416.png&#34;&gt;&lt;/p&gt;
&lt;h2 id=&#34;notes&#34;&gt;Notes&lt;/h2&gt;
&lt;p&gt;This is not a good choice as of 09/06/2026 if you have more than a dozen or so tables/models in your project and you
want to investigate them in parts.&lt;/p&gt;
&lt;p&gt;But you could use the output to get the .dot to then edit and pass to graphviz. That could be a pain though.&lt;/p&gt;
</content>
    </item>
    
  </channel>
</rss>
