<?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: Kerry Owston</title>
    <description>The latest articles on DEV Community by Kerry Owston (@kowston).</description>
    <link>https://dev.to/kowston</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%2F1202024%2Faf31bbd8-c961-49d4-a160-aa9438343f63.png</url>
      <title>DEV Community: Kerry Owston</title>
      <link>https://dev.to/kowston</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/kowston"/>
    <language>en</language>
    <item>
      <title>More info on ambiguous 500 errors</title>
      <dc:creator>Kerry Owston</dc:creator>
      <pubDate>Tue, 16 Apr 2024 21:31:39 +0000</pubDate>
      <link>https://dev.to/kowston/more-info-on-ambiguous-500-errors-4ej9</link>
      <guid>https://dev.to/kowston/more-info-on-ambiguous-500-errors-4ej9</guid>
      <description>&lt;p&gt;While Pest testing in a laravel project I get a 500 HTTP error. Great now what? How can I get more detail from this generic gem?&lt;/p&gt;

&lt;p&gt;You can eek out a little more information with this:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;$this-&amp;gt;withoutExceptionHandling();&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Whichh I placed at the top of my test.&lt;/p&gt;

&lt;p&gt;It's kind of like:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;dd();&lt;br&gt;
&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;But for errors.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>errorhandeling</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Laravel Collections and Resources</title>
      <dc:creator>Kerry Owston</dc:creator>
      <pubDate>Tue, 16 Apr 2024 17:47:48 +0000</pubDate>
      <link>https://dev.to/kowston/laravel-collections-and-resources-2653</link>
      <guid>https://dev.to/kowston/laravel-collections-and-resources-2653</guid>
      <description>&lt;p&gt;When working with API's I'd been becoming frustrated with the process around creating resources and collections. Sure when creating resources which seemed to follow a different pattern as when creating migrations, controllers, requests and what not.&lt;/p&gt;

&lt;p&gt;Previously when creating contact resource I had used:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;a make:resource ContactResource&lt;br&gt;
&lt;/code&gt;&lt;br&gt;
With a being an alias for PHP artisan.&lt;/p&gt;

&lt;p&gt;This was fine for the resource but I also needed a collection.&lt;/p&gt;

&lt;p&gt;Intuitively I tried:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;a make:collection ContactCollection&lt;br&gt;
&lt;/code&gt;&lt;br&gt;
Which was the wrong way to go about this.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;a make:resource --collection ContactColllection&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;In the given scenario, Laravel knows that it should create both the resource and its associated collection. This distinction ensures that Laravel sets up the necessary files and configurations for both the resource and its collection correctly.&lt;/p&gt;

</description>
      <category>laravel</category>
      <category>api</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Users table wiped out after testing.</title>
      <dc:creator>Kerry Owston</dc:creator>
      <pubDate>Tue, 16 Apr 2024 12:23:41 +0000</pubDate>
      <link>https://dev.to/kowston/users-table-wiped-out-after-testing-5e14</link>
      <guid>https://dev.to/kowston/users-table-wiped-out-after-testing-5e14</guid>
      <description>&lt;p&gt;After switching to SQLite and I was wondering why I can't authenticate when trying to log in via Postman.&lt;/p&gt;

&lt;p&gt;Since everything was working fine before I started building out my tests this morning.&lt;/p&gt;

&lt;p&gt;But suddenly I'm looking at an empty users table where previously there had been several - test users.&lt;/p&gt;

&lt;p&gt;The culprit...&lt;/p&gt;

&lt;p&gt;phpunit.xml&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&amp;gt;
        &amp;lt;env name="APP_ENV" value="testing"/&amp;gt;
        &amp;lt;env name="APP_MAINTENANCE_DRIVER" value="file"/&amp;gt;
        &amp;lt;env name="BCRYPT_ROUNDS" value="4"/&amp;gt;
        &amp;lt;env name="CACHE_STORE" value="array"/&amp;gt;
        &amp;lt;!-- &amp;lt;env name="DB_CONNECTION" value="sqlite"/&amp;gt; --&amp;gt;
        &amp;lt;!-- &amp;lt;env name="DB_DATABASE" value=":memory:"/&amp;gt; --&amp;gt;
        &amp;lt;env name="MAIL_MAILER" value="array"/&amp;gt;
        &amp;lt;env name="PULSE_ENABLED" value="false"/&amp;gt;
        &amp;lt;env name="QUEUE_CONNECTION" value="sync"/&amp;gt;
        &amp;lt;env name="SESSION_DRIVER" value="array"/&amp;gt;
        &amp;lt;env name="TELESCOPE_ENABLED" value="false"/&amp;gt;
    &amp;lt;/php&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Simple fix:&lt;/p&gt;

&lt;p&gt;&amp;lt;!--  --&amp;gt;&lt;br&gt;
 &amp;lt;!--  --&amp;gt;&lt;/p&gt;

&lt;p&gt;Now I no longer experience a wipeout on my db user tables.&lt;/p&gt;

&lt;p&gt;Now each test run is on a fresh isolated instance of the database and will not interfere with my project's live data.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>laravel</category>
      <category>testing</category>
      <category>sqlite</category>
    </item>
    <item>
      <title>2 Great feelings for newbie coders</title>
      <dc:creator>Kerry Owston</dc:creator>
      <pubDate>Sun, 12 Nov 2023 19:31:37 +0000</pubDate>
      <link>https://dev.to/kowston/2-great-feelings-for-newbie-coders-3knh</link>
      <guid>https://dev.to/kowston/2-great-feelings-for-newbie-coders-3knh</guid>
      <description>&lt;p&gt;1) The moment you realise that thing you were convinced you will never understand or remember has become second nature - and replaced by some other thing you're convinced you will never understand or remember. 😂&lt;/p&gt;

&lt;p&gt;2) When you delay doing some task u gotta do because you're too into the problem you're working on.&lt;/p&gt;

&lt;p&gt;Because you are enjoying it.&lt;/p&gt;

&lt;p&gt;Which gives you faith you're on the right path.&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>learning</category>
      <category>codenewbie</category>
      <category>laravel</category>
    </item>
  </channel>
</rss>
