<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Jesse Vista on Medium]]></title>
        <description><![CDATA[Stories by Jesse Vista on Medium]]></description>
        <link>https://medium.com/@upwebdesign?source=rss-86faf1568fd6------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*01EK7PjLhQlW3JK50cXjqw.jpeg</url>
            <title>Stories by Jesse Vista on Medium</title>
            <link>https://medium.com/@upwebdesign?source=rss-86faf1568fd6------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 06:15:30 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@upwebdesign/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Effortless Laravel Upgrades: Azure DevOps & LaravelShift Explained]]></title>
            <link>https://medium.com/@upwebdesign/effortless-laravel-upgrades-azure-devops-laravelshift-explained-0bb160c7842a?source=rss-86faf1568fd6------2</link>
            <guid isPermaLink="false">https://medium.com/p/0bb160c7842a</guid>
            <category><![CDATA[php]]></category>
            <category><![CDATA[github]]></category>
            <category><![CDATA[laravel]]></category>
            <category><![CDATA[azure-devops]]></category>
            <dc:creator><![CDATA[Jesse Vista]]></dc:creator>
            <pubDate>Thu, 12 Sep 2024 14:24:59 GMT</pubDate>
            <atom:updated>2024-09-12T14:24:59.394Z</atom:updated>
            <content:encoded><![CDATA[<p>The Ultimate LaravelShift Guide for Azure DevOps Users</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*a6zbWZQjNyaYSf3XZ-_mLw.jpeg" /><figcaption>Effortless Laravel upgrades, even for Azure DevOps users</figcaption></figure><p>Yes, you can upgrade your Laravel application smoothly — even when working with Azure DevOps. To get started, temporarily push your project repository from Azure DevOps to GitHub to run LaravelShift (don’t worry, we won’t tell Azure DevOps you’re seeing other repositories). Here’s a step-by-step guide to making the process painless; let’s get started.</p><h3>Clone Your Repository from Azure DevOps</h3><p>Clone your existing repository from Azure DevOps to your local machine.</p><pre>git clone &lt;Azure_DevOps_Repo_URL&gt;<br>cd &lt;Your_Project_Directory&gt;</pre><p>Replace &lt;Azure_DevOps_Repo_URL&gt; with your actual Azure DevOps repository URL and &lt;Your_Project_Directory&gt; with the directory name where you will be cloning the project.</p><h3>Create a New Repository on GitHub</h3><p>Go to GitHub and create a new repository where you want to push your project temporarily.</p><ul><li>Go to <a href="https://github.com/">GitHub</a></li><li>Click on <strong>New</strong> to create a new repository.</li><li>Name your repository and set it to private (or public, depending on your preference).</li><li>Don’t initialize it with a README or other files; you’ll push your existing code.</li></ul><h3>Add GitHub as a New Remote</h3><p>Add your newly created GitHub repository as a new remote in your local Git configuration.</p><pre>git remote add github &lt;GitHub_Repo_URL&gt;</pre><p>Replace &lt;GitHub_Repo_URL&gt; with the URL of your new GitHub repository.</p><h3>Push Your Code to GitHub</h3><p>Push your code to the GitHub repository.</p><pre>git push github --all  # Pushes all branches<br>git push github --tags # Pushes all tags</pre><h3>Run LaravelShift</h3><p>With your project now in GitHub, you can run the LaravelShift tasks. Follow LaravelShift’s instructions to perform the shifts on your repository.</p><h3>Update Your Azure DevOps Repo</h3><p>After completing the shifts, update your Azure DevOps repository with the changes from LaravelShift by pulling the changes from GitHub back to your local repository and pushing them to Azure DevOps.</p><pre>git pull github main  # Assuming &#39;main&#39; is the branch with the changes<br>git push origin main  # Push changes back to Azure DevOps</pre><h3>Clean Up — or not</h3><p>Optionally, you can remove the GitHub remote from your local repository if you don’t need it anymore:</p><pre>git remote remove github</pre><p>If you plan on running Shifts in the future, keep the GitHub remote active in your local repository.</p><h3>Conclusion</h3><p>Following this guide, you can easily upgrade your Laravel application using LaravelShift while keeping Azure DevOps as your primary code repository. With the help of GitHub for quick integration, the upgrade process is streamlined and efficient. With the right tools, it’s time to confidently upgrade your Laravel applications and keep them running smoothly with minimal effort!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0bb160c7842a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Was Your Laravel Model Updated? Here’s How to Find Out]]></title>
            <link>https://medium.com/@upwebdesign/was-your-laravel-model-updated-heres-how-to-find-out-9e9ca99eb853?source=rss-86faf1568fd6------2</link>
            <guid isPermaLink="false">https://medium.com/p/9e9ca99eb853</guid>
            <category><![CDATA[database]]></category>
            <category><![CDATA[php]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[laravel]]></category>
            <dc:creator><![CDATA[Jesse Vista]]></dc:creator>
            <pubDate>Fri, 16 Aug 2024 13:58:25 GMT</pubDate>
            <atom:updated>2024-08-16T13:58:25.698Z</atom:updated>
            <content:encoded><![CDATA[<p>You’d think it would be a core feature, but it’s not</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RhJl1HScmwWznMIx7xXdgg.jpeg" /></figure><h4>Introduction</h4><p>Have you ever needed to find out when a model was last updated? Laravel models offer an attribute called wasRecentlyCreated to check for recent creations, but there&#39;s no equivalent for updates. However, you can achieve this by leveraging Laravel&#39;s model events. Let&#39;s explore how to do it.</p><p>Imagine you’re working with a User model and preparing a form to update user information. Once the form is submitted, you validate the input and update the user record.</p><pre>&lt;?php<br><br>namespace App\Http\Controllers;<br><br>use App\Models\User;<br>use Illuminate\Http\Request;<br>use App\Http\Controllers\Controller;<br><br>class UserController extends Controller<br>{<br>    public function __construct()<br>    {<br>        $this-&gt;authorizeResource(User::class);<br>    }<br><br>    public function update(Request $request, User $user): RedirectResponse<br>    {<br>        $validated = $this-&gt;validate($request, [<br>            &#39;name&#39; =&gt; [&#39;required&#39;, &#39;string&#39;, &#39;max:255&#39;],<br>            &#39;email&#39; =&gt; [&#39;required&#39;, &#39;email:rfc,dns&#39;, &#39;max:255&#39;],<br>        ]);<br><br>        $user-&gt;update($validated);<br><br>        if($user-&gt;isDirty) {<br>            // will not execute<br>        }<br><br>        if($user-&gt;wasRecentlyUpdated) {<br>            // perform some other action<br>        }<br><br>        return redirect()<br>            -&gt;route(&#39;user.index&#39;)<br>            -&gt;withGrowl([<br>                &#39;type&#39; =&gt; &#39;success&#39;,<br>                &#39;title&#39; =&gt; &#39;Success&#39;,<br>                &#39;message&#39; =&gt; &#39;Group created successfully&#39;,<br>            ]);<br>    }</pre><blockquote>There are claims that after performing the update, the isDirty() method will indicate the model was updated, but it’s not true. So how do you tell if a model has been updated?</blockquote><blockquote>To be clear, the isDirty option should be used if the model needs saving.</blockquote><h4>Using Model Observers</h4><p>One way to tackle this issue is with model observers. A key distinction is that we are not using a [Model]Observer class.</p><pre>&lt;?php<br><br>use Illuminate\Database\Eloquent\Model;<br><br>class User extends Model<br>{<br>    protected $guarded = [&#39;id&#39;];<br><br>    public $wasRecentlyUpdated = false;<br><br>    protected static function booted(): void<br>    {<br>        static::updating(function (User $user) {<br>            $user-&gt;wasRecentlyUpdated = true;<br>        });<br>    }<br>}</pre><p>The main reason why we use the booted method is because it fires BEFORE a registered observer. This allows you to have the wasRecentlyUpdated property available to your observers.</p><h4>Create the Trait</h4><p>You can encapsulate the logic used in the booted method of your User model into a trait. If needed, this allows you to reuse the observer logic across multiple models and keeps your codebase clean and maintainable.</p><p>First, create a trait that contains the booted logic. In this trait, you will define a static method boot Laravel will call when the model booted.</p><p>Laravel automatically calls the boot method on any traits used by a model. By convention, Laravel looks for a boot[TraitName] method in traits. Here, it will be called when the User model is booted.</p><pre>&lt;?php<br><br>namespace App\Models\Traits;<br><br>use Illuminate\Database\Eloquent\Model;<br><br>trait TracksUpdates<br>{<br>    public $wasRecentlyUpdated = false;<br><br>    public static function bootTracksUpdates()<br>    {<br>        static::updating(function (Model $model) {<br>            $model-&gt;wasRecentlyUpdated = true;<br>        });<br>    }<br>}</pre><p>You can use this trait in your User model to automatically attach the observer logic.</p><pre>&lt;?php<br><br>namespace App\Models;<br><br>use App\Models\Traits\TracksUpdates;<br>use Illuminate\Database\Eloquent\Model;<br><br>class User extends Model<br>{<br>    use TracksUpdates;<br><br>    protected $guarded = [&#39;id&#39;];<br>}</pre><p>Now, you can add the TracksUpdates trait to any other model that needs this same updating observer logic.</p><h4>Testing</h4><pre>&lt;?php<br><br>namespace Tests\Unit;<br><br>use App\Models\Tag;<br>use Tests\TestCase;<br>use App\Models\User;<br>use Illuminate\Foundation\Testing\RefreshDatabase;<br><br>class TracksUpdatesTest extends TestCase<br>{<br>    use RefreshDatabase;<br><br>    /**<br>     * @test<br>     */<br>    public function itTracksUpdates(): void<br>    {<br>        $user = User::factory()-&gt;create();<br>        $this-&gt;assertFalse($user-&gt;isDirty());<br>        $this-&gt;assertFalse($user-&gt;wasRecentlyUpdated);<br><br>        $user = User::factory()-&gt;create();<br>        $user-&gt;update([&#39;name&#39; =&gt; &#39;User Name&#39;]);<br>        $this-&gt;assertFalse($user-&gt;isDirty());<br>        $this-&gt;assertTrue($user-&gt;wasRecentlyUpdated);<br><br>        // No changes to the user (which means no updating event is fired)<br>        $user = User::factory()-&gt;create();<br>        $user-&gt;update([&#39;name&#39; =&gt; $user-&gt;name]);<br>        $this-&gt;assertFalse($user-&gt;isDirty());<br>        $this-&gt;assertFalse($user-&gt;wasRecentlyUpdated);<br><br>        $user = User::factory()-&gt;create();<br>        $user-&gt;save();<br>        $this-&gt;assertFalse($user-&gt;isDirty());<br>        $this-&gt;assertFalse($user-&gt;wasRecentlyUpdated);<br><br>        $user = User::factory()-&gt;create();<br>        $user-&gt;name = &#39;User Name&#39;;<br>        $this-&gt;assertTrue($user-&gt;isDirty());<br>        $this-&gt;assertFalse($user-&gt;wasRecentlyUpdated);<br>        $user-&gt;save();<br>        $this-&gt;assertFalse($user-&gt;isDirty());<br>        $this-&gt;assertTrue($user-&gt;wasRecentlyUpdated);<br>    }<br>}</pre><h4>Conclusion</h4><p>This approach keeps your model code clean and adheres to the DRY (Don’t Repeat Yourself) principle, making it easier to maintain and extend your application.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9e9ca99eb853" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Feature Testing in Laravel: Ensuring High-Quality Application Performance]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/@upwebdesign/feature-testing-in-laravel-ensuring-high-quality-application-performance-3388463a2240?source=rss-86faf1568fd6------2"><img src="https://cdn-images-1.medium.com/max/1792/1*HdS7QvJwAf32BmpI7ADSbw.png" width="1792"></a></p><p class="medium-feed-snippet">Gain confidence in your Laravel application by testing your controllers!</p><p class="medium-feed-link"><a href="https://medium.com/@upwebdesign/feature-testing-in-laravel-ensuring-high-quality-application-performance-3388463a2240?source=rss-86faf1568fd6------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://medium.com/@upwebdesign/feature-testing-in-laravel-ensuring-high-quality-application-performance-3388463a2240?source=rss-86faf1568fd6------2</link>
            <guid isPermaLink="false">https://medium.com/p/3388463a2240</guid>
            <category><![CDATA[php]]></category>
            <category><![CDATA[laravel]]></category>
            <category><![CDATA[testing]]></category>
            <dc:creator><![CDATA[Jesse Vista]]></dc:creator>
            <pubDate>Fri, 22 Dec 2023 14:37:52 GMT</pubDate>
            <atom:updated>2023-12-22T14:37:52.931Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Beyond the Basics: Elevating Infusionsoft Integration with Laravel]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/@upwebdesign/beyond-the-basics-elevating-infusionsoft-integration-with-laravel-c4ab4e1ccb38?source=rss-86faf1568fd6------2"><img src="https://cdn-images-1.medium.com/max/1792/1*UCWLsNW2Jb10ByTsgKPiHw.png" width="1792"></a></p><p class="medium-feed-snippet">Empowering Developers with a Custom Laravel Package for Seamless Infusionsoft Integration</p><p class="medium-feed-link"><a href="https://medium.com/@upwebdesign/beyond-the-basics-elevating-infusionsoft-integration-with-laravel-c4ab4e1ccb38?source=rss-86faf1568fd6------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://medium.com/@upwebdesign/beyond-the-basics-elevating-infusionsoft-integration-with-laravel-c4ab4e1ccb38?source=rss-86faf1568fd6------2</link>
            <guid isPermaLink="false">https://medium.com/p/c4ab4e1ccb38</guid>
            <category><![CDATA[laravel]]></category>
            <category><![CDATA[api]]></category>
            <category><![CDATA[crm]]></category>
            <category><![CDATA[php]]></category>
            <category><![CDATA[infusionsoft]]></category>
            <dc:creator><![CDATA[Jesse Vista]]></dc:creator>
            <pubDate>Wed, 20 Dec 2023 15:16:05 GMT</pubDate>
            <atom:updated>2023-12-21T14:46:04.865Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Laravel Distinct MorphToMany Relations]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/@upwebdesign/laravel-distinct-morphtomany-relations-cffa7b6c90a9?source=rss-86faf1568fd6------2"><img src="https://cdn-images-1.medium.com/max/2600/1*0Lzww7_TH03Xb5uUMFXXNA.jpeg" width="4000"></a></p><p class="medium-feed-snippet">Returning the distinct result of a Polymorphic relationship</p><p class="medium-feed-link"><a href="https://medium.com/@upwebdesign/laravel-distinct-morphtomany-relations-cffa7b6c90a9?source=rss-86faf1568fd6------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://medium.com/@upwebdesign/laravel-distinct-morphtomany-relations-cffa7b6c90a9?source=rss-86faf1568fd6------2</link>
            <guid isPermaLink="false">https://medium.com/p/cffa7b6c90a9</guid>
            <category><![CDATA[sql]]></category>
            <category><![CDATA[database]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[laravel]]></category>
            <category><![CDATA[php]]></category>
            <dc:creator><![CDATA[Jesse Vista]]></dc:creator>
            <pubDate>Tue, 21 Nov 2023 17:52:04 GMT</pubDate>
            <atom:updated>2023-12-21T14:45:43.633Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Laravel Model Relationship & Union with Pagination]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/@upwebdesign/laravel-model-relationship-union-with-pagination-ff63bc640421?source=rss-86faf1568fd6------2"><img src="https://cdn-images-1.medium.com/max/1024/1*DKg3F7-ux2841YM_1yZayg.jpeg" width="1024"></a></p><p class="medium-feed-snippet">A limitation found in the Laravel framework</p><p class="medium-feed-link"><a href="https://medium.com/@upwebdesign/laravel-model-relationship-union-with-pagination-ff63bc640421?source=rss-86faf1568fd6------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://medium.com/@upwebdesign/laravel-model-relationship-union-with-pagination-ff63bc640421?source=rss-86faf1568fd6------2</link>
            <guid isPermaLink="false">https://medium.com/p/ff63bc640421</guid>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[php]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[database]]></category>
            <category><![CDATA[laravel]]></category>
            <dc:creator><![CDATA[Jesse Vista]]></dc:creator>
            <pubDate>Tue, 25 Jul 2023 02:58:24 GMT</pubDate>
            <atom:updated>2023-12-21T14:45:21.202Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Creating A Simple Identity Provider using SAML and Laravel: Part 2]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/@upwebdesign/creating-a-simple-identity-provider-using-saml-and-laravel-part-2-ffd3ad68b7d?source=rss-86faf1568fd6------2"><img src="https://cdn-images-1.medium.com/max/1280/1*G1jKxO5aW8Zk104YwG46lw.jpeg" width="1280"></a></p><p class="medium-feed-snippet">Installing Laravel SAML IdP into a Laravel application</p><p class="medium-feed-link"><a href="https://medium.com/@upwebdesign/creating-a-simple-identity-provider-using-saml-and-laravel-part-2-ffd3ad68b7d?source=rss-86faf1568fd6------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://medium.com/@upwebdesign/creating-a-simple-identity-provider-using-saml-and-laravel-part-2-ffd3ad68b7d?source=rss-86faf1568fd6------2</link>
            <guid isPermaLink="false">https://medium.com/p/ffd3ad68b7d</guid>
            <category><![CDATA[laravel]]></category>
            <category><![CDATA[saml2]]></category>
            <category><![CDATA[idp]]></category>
            <category><![CDATA[aml]]></category>
            <dc:creator><![CDATA[Jesse Vista]]></dc:creator>
            <pubDate>Sat, 18 Feb 2023 16:02:45 GMT</pubDate>
            <atom:updated>2023-12-10T13:46:27.775Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Creating A Simple Identity Provider using SAML and Laravel: Part 1]]></title>
            <link>https://medium.com/@upwebdesign/creating-a-simple-identity-provider-using-saml-and-laravel-part-1-e3d070adad44?source=rss-86faf1568fd6------2</link>
            <guid isPermaLink="false">https://medium.com/p/e3d070adad44</guid>
            <category><![CDATA[saml2]]></category>
            <category><![CDATA[laravel]]></category>
            <category><![CDATA[sso]]></category>
            <dc:creator><![CDATA[Jesse Vista]]></dc:creator>
            <pubDate>Sat, 04 Feb 2023 16:30:46 GMT</pubDate>
            <atom:updated>2023-11-16T23:47:14.841Z</atom:updated>
            <content:encoded><![CDATA[<h4>A story about turning your Laravel app into a fully functional Identity Provider.</h4><figure><img alt="Creating a simple identity provider using SAML and Laravel" src="https://cdn-images-1.medium.com/max/1024/1*8bWyE8wiGr38cKbM0UuUhw.jpeg" /><figcaption>Photo of <a href="https://jessevista.com/">Jesse Vista</a> of <a href="https://upwebdesign.com/">UPWebDesign, LLC</a></figcaption></figure><p><a href="https://www.buymeacoffee.com/upwebdesign">Buy me a coffee! ☕️</a></p><blockquote>Once you are finished with Part 1, please check out Part 2.<br><a href="https://medium.com/@upwebdesign/creating-a-simple-identity-provider-using-saml-and-laravel-part-2-ffd3ad68b7d">Creating A Simple Identity Provider using SAML and Laravel: Part 2</a></blockquote><p>I was minding my own business producing code like a madman when suddenly, one of the wheels fell off the cart and came to a screeching halt. The client asked for Single Sign-On (SSO) functionality added to their application. Uh oh! Now it’s time to start the research and discussions, inching toward implementation and not coding for a while.</p><p>This article and its subsequent parts focus on PHP with the <a href="https://laravel.com/">Laravel</a> framework using a package created by <a href="https://codegreencreative.com/">Code Green Creative</a> called <a href="https://github.com/codegreencreative/laravel-samlidp">Laravel SAML IdP</a>.</p><h4>What is SSO, and how does it work?</h4><p>SSO is a method of authentication that enables a user to access multiple related yet independent software systems with just one set of credentials. The primary purpose of SSO is to increase user convenience and improve security by reducing the number of times a user has to provide their authentication information. SSO transfers authentication data, such as a token, between the systems and maintains user session information centrally.</p><h4>What authentication standard should we use?</h4><p>So how do we do this thing called SSO? A quick search on Google provided many ideas on implementing SSO with Laravel, but all were related to the other side of SSO, the Service Provider (SP).</p><p>Another debate was about what authentication standard we should be providing. A couple bubbled up to the surface. OAuth 2.0 and SAML.</p><p>After further investigation, OAuth 2.0 didn’t feel suitable to use as an SSO solution, and Google used SAML for its SSO implementation. Google using SAML was good enough evidence that SAML was up to the challenge. SAML it is!</p><h4>What is SAML, and how does it work?</h4><p><strong>SAML</strong> (Security Assertion Markup Language) is an XML-based open standard for exchanging authentication and authorization data between parties, specifically between an identity provider (IdP) and an SP.</p><p>With SAML, the IdP is responsible for authenticating the user and generating a SAML assertion, which contains a set of claims about the authentication event and the user. Next, send the assertion to the SP, which trusts the IdP and uses the information in the assertion to grant the user access to its services. The SP never sees the user’s login credentials, only the information contained in the SAML assertion, and allows for a secure and seamless SSO experience for the user.</p><h4>How do we implement SSO with SAML?</h4><p>Google results focused on the SP side of SSO. Things were dicey on how to implement SAML into the application as an IdP. SP knowledge was essential, but there needed to be more information on the IdP side.</p><p>Luckily, an existing library dealt with this exact problem. The name of the package is <a href="https://github.com/litesaml/lightsaml">LiteSAML</a>! Unfortunately, the documentation could be better.</p><p>Aside from documentation hell, LiteSAML is an excellent package and works as advertised. However, integrating it into your applications was another story. The time spent just trying to get it to work was ridiculous. Because of this struggle, an idea came to create a package to handle this exact problem.</p><figure><img alt="Integrate SAML 2.0 into your Laravel application as a Identity Provider" src="https://cdn-images-1.medium.com/max/1024/1*xSPZxnAYIRhrnPHv0nppBw.png" /><figcaption>Laravel + SAML 2.0</figcaption></figure><h4>A Laravel package was created</h4><p>The Laravel package <a href="https://github.com/codegreencreative/laravel-samlidp">Laravel SAML IdP</a> was born to solve the complexity of integrating SAML 2.0 authentication and authorization into a Laravel application and provides SAML IdP functionality. There are many added conveniences when working with Laravel SAML IdP as highlighted below.</p><ul><li>Simple configuration file for easy setup</li><li>A built-in artisan command to generate self-signed certificates</li><li>Provided blade directives to handle the SSO process</li><li>Logout logic handler</li><li>Access to the assertion claim types through Laravel events</li></ul><p>Once installed, your IdP should be up and running in less than an hour. Getting to this point took weeks of research, experimentation, and development.</p><h4><strong>Why write about this process?</strong></h4><p>The motivation for creating this series comes from an <a href="https://github.com/codegreencreative/laravel-samlidp/issues/102">issue</a> in the Github repository asking for a guide/tutorial about SSO using <a href="https://github.com/codegreencreative/laravel-samlidp">Laravel SAML IdP</a>. It was a great idea, so here we are!</p><p>Be sure to follow to get notifications of future releases of this story. The follow-up story will discuss how to implement this package into a fresh installation of Laravel. Code happy!</p><p><a href="https://www.buymeacoffee.com/upwebdesign">Buy me a coffee! ☕️</a></p><blockquote>Now that you have finished Part 1, it&#39;s time to check out Part 2.<br><a href="https://medium.com/@upwebdesign/creating-a-simple-identity-provider-using-saml-and-laravel-part-2-ffd3ad68b7d">Creating A Simple Identity Provider using SAML and Laravel: Part 2</a></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e3d070adad44" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Laravel’s Time-Saving Tools: Models, Migrations, Factories, and Seeders]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/@upwebdesign/laravels-time-saving-tools-models-migrations-factories-and-seeders-91c9f9e014bd?source=rss-86faf1568fd6------2"><img src="https://cdn-images-1.medium.com/max/1280/1*SqcYVavjxGPOdbzOsWm27g.jpeg" width="1280"></a></p><p class="medium-feed-snippet">Speeding up Development with Laravel&#x2019;s Migrations</p><p class="medium-feed-link"><a href="https://medium.com/@upwebdesign/laravels-time-saving-tools-models-migrations-factories-and-seeders-91c9f9e014bd?source=rss-86faf1568fd6------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://medium.com/@upwebdesign/laravels-time-saving-tools-models-migrations-factories-and-seeders-91c9f9e014bd?source=rss-86faf1568fd6------2</link>
            <guid isPermaLink="false">https://medium.com/p/91c9f9e014bd</guid>
            <category><![CDATA[eloquent]]></category>
            <category><![CDATA[database]]></category>
            <category><![CDATA[development]]></category>
            <category><![CDATA[laravel]]></category>
            <dc:creator><![CDATA[Jesse Vista]]></dc:creator>
            <pubDate>Fri, 27 Jan 2023 04:07:02 GMT</pubDate>
            <atom:updated>2023-11-15T00:58:43.769Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Unleash the Power of WKHTMLTOIMAGE: A Step-by-Step Guide to Generating Images with Laravel]]></title>
            <link>https://medium.com/@upwebdesign/unleash-the-power-of-wkhtmltoimage-a-step-by-step-guide-to-generating-images-with-laravel-40e14f1e30cf?source=rss-86faf1568fd6------2</link>
            <guid isPermaLink="false">https://medium.com/p/40e14f1e30cf</guid>
            <category><![CDATA[laravel]]></category>
            <category><![CDATA[php]]></category>
            <category><![CDATA[image-processing]]></category>
            <dc:creator><![CDATA[Jesse Vista]]></dc:creator>
            <pubDate>Thu, 19 Jan 2023 15:16:51 GMT</pubDate>
            <atom:updated>2023-03-06T15:23:58.190Z</atom:updated>
            <content:encoded><![CDATA[<h4>A Step-by-Step Guide</h4><figure><img alt="Unleash the Power of WKHTMLTOIMAGE: A Step-by-Step Guide to Generating Images with Laravel" src="https://cdn-images-1.medium.com/max/1024/1*dELp0vOJDaOfGLtU_wvVqQ.jpeg" /><figcaption>Photo of <a href="https://jessevista.com/">Jesse Vista</a> of <a href="https://upwebdesign.com/">UPWebDesign, LLC</a></figcaption></figure><p><a href="https://www.buymeacoffee.com/upwebdesign">Buy me a coffee! ☕️</a></p><h3>Introduction</h3><p>I recently had an idea that required me to create images based on customer input, and I quickly discovered that there were no easy ways to accomplish my goal. What I am about to share took many hours of research and trial and error to get the expected output. You can see a working application of precisely what I am about to explain on my wife’s <a href="https://jbloomjewelry.com/">jBloom jewelry</a> website and click on Save the date generator at the top of the page.</p><p>So, what is wkhtmltoimage?</p><blockquote>wkhtmltoimage is a command line tool that converts HTML pages to images. To generate an image using this tool, you need to install it on your computer and then use the command line to run the conversion.</blockquote><p>That is an unofficial and somewhat unrelated explanation of wkhtmltoimage, but you get the idea. We need this program in our application to create images using HTML. Whether using a traditional hosting environment or serverless, I found this method foolproof. It just works.</p><p>Here we go!</p><h3>Install wkhtmltoimage</h3><p>Head over to the <a href="https://wkhtmltopdf.org/downloads.html">downloads page of wkhtmltopdf</a> and download the operating system file you need for your environment. Then, extract the zip file and move and create a directory in your project to store the executables. This is where I like to keep the binary, but you can store it anywhere in your project/repository.</p><p>wkhtmltoimage/bin/wkhtmltoimage</p><p>It would also be good to get familiar with the <a href="https://www.mankier.com/1/wkhtmltoimage">documentation website</a>.</p><h3>Install Laravel Snappy</h3><p>Next, We need to install the <a href="https://github.com/barryvdh/laravel-snappy">barryvdh/laravel-snappy</a> package to interact with wkhtmltoimage.</p><blockquote>Snappy is a PHP library allowing thumbnail, snapshot or PDF generation from a url or a html page. It uses the excellent webkit-based <a href="http://wkhtmltopdf.org/">wkhtmltopdf and wkhtmltoimage</a> available on OSX, linux, windows.</blockquote><pre>composer require barryvdh/laravel-snappy</pre><p>Publish the laravel-snappy config file.</p><pre>php artisan vendor:publish - provider=&quot;Barryvdh\Snappy\ServiceProvider&quot;</pre><p>Update the newly created config/snappy.php config file for images.</p><pre>&lt;?php<br><br>// config/snappy.php<br><br>return [<br>    &#39;image&#39; =&gt; [<br>        &#39;enabled&#39; =&gt; true,<br>        &#39;binary&#39; =&gt; env(&#39;WKHTMLTOIMAGE_BINARY&#39;),<br>        &#39;timeout&#39; =&gt; false,<br>        &#39;options&#39; =&gt; [],<br>        &#39;env&#39;     =&gt; [],<br>    ],<br>];</pre><p>Update your .env to set the binary location. Depending on your operating system, this value may need to be the full path to the binary.</p><pre>WKHTMLTOIMAGE_BINARY=&quot;/path/to/wkhtmltoimage/bin/wkhtmltoimage&quot;</pre><h3>Create a Sample Image using Laravel</h3><p>Next, we will use a Laravel controller to process and return an image. These will be the parameters of our final image.</p><ol><li>The image produced will be square, 400x400.</li><li>The background will be white with black text.</li><li>The text in the image will be “Hello World.”</li><li>We will use a blade file to house the HTML to render the image.</li></ol><p>Let’s start with the blade file. Create a new test.blade.php blade file in your resources/views folder with the following HTML.</p><pre>&lt;html&gt;<br><br>&lt;head&gt;<br>  &lt;meta charset=&quot;utf-8&quot;&gt;<br>  &lt;style&gt;<br>    div {<br>      width: 100%;<br>      height: 100%;<br>      border: 1px solid #000;<br>      font-size: 50px;<br>      text-align: center;<br>    }<br>  &lt;/style&gt;<br>&lt;/head&gt;<br><br>&lt;body&gt;<br>  &lt;div&gt;<br>    {{ $text }}<br>  &lt;/div&gt;<br>&lt;/body&gt;<br><br>&lt;/html&gt;</pre><p>Next, let’s create a new controller to render the image.</p><pre>php artisan make:controller TestController</pre><pre>&lt;?php<br><br>namespace App\Http\Controllers;<br><br>use Illuminate\Http\Request;<br>use Barryvdh\Snappy\Facades\SnappyImage;<br><br>class TestController extends Controller<br>{<br>    public function index()<br>    {<br>        $img = SnappyImage::loadView(&#39;test&#39;, [<br>            &#39;text&#39; =&gt; &#39;Hello World&#39;,<br>        ]);<br><br>        $img-&gt;setOption(&#39;format&#39;, &#39;jpeg&#39;);<br>        $img-&gt;setOption(&#39;width&#39;, 400);<br>        $img-&gt;setOption(&#39;height&#39;, 400);<br><br>        return response($img-&gt;output(), 200, [<br>            &#39;Content-Type&#39; =&gt; &#39;image/jpeg&#39;,<br>        ]);<br><br>        // This is the response if you want populate an &lt;img&gt; tag<br>        // return response(&#39;data:image/jpeg;charset=utf-8;base64,&#39; . base64_encode($img-&gt;output()), 200, [<br>        //     &#39;Content-Type&#39; =&gt; &#39;image/jpeg&#39;,<br>        // ]);<br>    }<br>}</pre><p>Then, open web.php to add the route necessary to view the image in a web browser.</p><pre>&lt;?php<br><br>Route::get(&#39;test&#39;, TestController::class . &#39;@index&#39;);</pre><p>Finally, let’s view the results of our work. You can now visit the route you created in your project and see an image like this.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/400/1*tqEqcZ5FIbF_LkfOrf7UlQ.jpeg" /><figcaption>Sample Image produced by WKHTMLTOIMAGE</figcaption></figure><h3>Conclusion</h3><p>This is a straightforward example of interacting with wkhtmltoimage using the snappy package. As you can imagine, you can do some fun things with this practical example. To see a real-life example of what I worked on that required this setup, head over to my wife’s <a href="https://jbloomjewelry.com/">jBloom jewelry</a> website to see a fully working instance by clicking on the Save the date generator link at the top of the page.</p><p><a href="https://www.buymeacoffee.com/upwebdesign">Buy me a coffee! ☕️</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=40e14f1e30cf" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>