<?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 John Gowelle on Medium]]></title>
        <description><![CDATA[Stories by John Gowelle on Medium]]></description>
        <link>https://medium.com/@chiefmfalme?source=rss-3c3595d8bd3f------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*tHY2ZFdyLhQIxMHx8iDXJw.jpeg</url>
            <title>Stories by John Gowelle on Medium</title>
            <link>https://medium.com/@chiefmfalme?source=rss-3c3595d8bd3f------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 22:10:53 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@chiefmfalme/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[A Laravel Package for Flutterwave v4 That Handles the Hard Parts]]></title>
            <link>https://medium.com/@chiefmfalme/a-laravel-package-for-flutterwave-v4-that-handles-the-hard-parts-1573f30d87bb?source=rss-3c3595d8bd3f------2</link>
            <guid isPermaLink="false">https://medium.com/p/1573f30d87bb</guid>
            <category><![CDATA[laravel]]></category>
            <category><![CDATA[payments]]></category>
            <category><![CDATA[php]]></category>
            <category><![CDATA[mobile-money]]></category>
            <category><![CDATA[flutterwave]]></category>
            <dc:creator><![CDATA[John Gowelle]]></dc:creator>
            <pubDate>Thu, 26 Nov 2026 00:20:27 GMT</pubDate>
            <atom:updated>2026-11-26T00:20:27.268Z</atom:updated>
            <content:encoded><![CDATA[<h3>Direct charges, card encryption, PIN/OTP flows, webhooks, and payouts, without hand-rolling the plumbing.</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5eSIlDoIVYrxksLLWrueBw.png" /></figure><p>Payment integrations look easy in a sandbox. In production, a card charge is rarely one request.</p><p>A card charge is rarely one request. It is an encrypted payload, then maybe a PIN, an OTP, a 3-D Secure redirect, or an approval on the customer’s phone. Mobile money adds its own timing. Webhooks arrive after the fact, and sometimes not in the order you expect. Every market brings a different mix of banks, networks, currencies, and failure modes that only show up in production.</p><p>Flutterwave v4 improved the API side of this. The orchestrator endpoint creates a customer, a payment method, and a charge in one call, and the response tells you exactly what the customer needs to do next. But on the Laravel side you still have to wire the HTTP client, cache the OAuth token, encrypt card data the way Flutterwave requires, verify webhook signatures, and model a charge that can sit in requires_action for several minutes.</p><p>That is the gap <a href="https://github.com/gowelle/flutterwave-php">gowelle/flutterwave-php</a> fills. It is a Laravel package for Flutterwave v4, currently at v3.2.3, and this post is a tour of what it does and how the pieces fit together.</p><h3>What is in the box</h3><p>The package covers the parts of v4 that a typical Laravel product needs:</p><ul><li>Direct charges through the orchestrator, with a typed status and next-action model</li><li>Card, mobile money, and bank account payment methods</li><li>PIN, OTP, and AVS authorization steps</li><li>Customers, payment methods, orders, refunds, chargebacks, and fees</li><li>Bank payout, mobile money payout, and wallet transfer flows</li><li>Bank lists, mobile networks, and account resolution</li><li>Virtual accounts, wallets, balances, statements, and settlements</li><li>Webhooks with signature verification and typed events</li><li>Database-backed charge sessions for multi-step payments</li><li>Livewire and Vue payment UI components</li><li>Built-in retries, rate limiting, idempotency keys, and trace IDs</li><li>English, Swahili, and French translations for the UI components</li></ul><p>That is a lot of surface. If a service you need is missing, Flutterwave::api() exposes the lower-level request methods, so you are not blocked while waiting for a release. The rest of this post focuses on the parts that are hardest to get right by hand.</p><h3>Why a Laravel package at all</h3><p>You can call Flutterwave with Http::withToken(...)-&gt;post(...) and be done in an afternoon. I did that more than once. The problem is everything that accumulates around that one call: token refresh, encrypted card payloads, idempotency headers, retry behavior, signature checks, and a charge state machine that spans multiple requests.</p><p>The package is built around a few opinions:</p><ul><li>One service per domain, reachable from a single facade, so Flutterwave::transfers() and Flutterwave::banks() read the way you think about them.</li><li>Typed request and response objects instead of loose arrays, so your IDE and static analysis can help you.</li><li>Laravel-native integration: config publishing, migrations, events, a webhook route, and container bindings for the service contracts.</li><li>Sensible defaults for the boring reliability work, with config keys when you need to change them.</li></ul><p>The other benefit is consistency. A bank lookup, a refund, and a payout all go through the same header builder, auth service, retry handler, and error mapper. When you change a timeout policy or an error message, it applies everywhere instead of in one controller.</p><h3>Install and verify</h3><pre>composer require gowelle/flutterwave-php<br>php artisan vendor:publish --tag=&quot;flutterwave-config&quot;<br>php artisan flutterwave:verify</pre><p>Laravel auto-discovers the service provider and the Flutterwave facade. Add your credentials to .env:</p><pre>FLUTTERWAVE_CLIENT_ID=<br>FLUTTERWAVE_CLIENT_SECRET=<br>FLUTTERWAVE_SECRET_HASH=<br>FLUTTERWAVE_ENCRYPTION_KEY=<br>FLUTTERWAVE_ENVIRONMENT=staging</pre><p>flutterwave:verify requests an OAuth token with your credentials, so a bad key fails at deploy time instead of at checkout. The package caches that token and refreshes it shortly before expiry, so you are not requesting a new one on every charge.</p><p>If you want charge sessions, publish and run the migrations too:</p><pre>php artisan vendor:publish --tag=&quot;flutterwave-migrations&quot;<br>php artisan migrate</pre><h3>The direct charge, end to end</h3><p>The orchestrator is the shortest path from “customer wants to pay” to “money moved.” You send the customer, the payment method, and the charge in one request.</p><p>The part people underestimate is the card payload. Flutterwave requires the card number, CVV, and expiry to be encrypted with AES-256-GCM using a 12-character nonce before they leave your server. That is a small pile of cryptography you should not want to own. ChargeRequestBuilder handles it:</p><pre>use Gowelle\Flutterwave\Builders\ChargeRequestBuilder;<br>use Gowelle\Flutterwave\Facades\Flutterwave;</pre><pre>$request = ChargeRequestBuilder::for(&#39;ORDER-&#39; . $order-&gt;id)<br>    -&gt;amount(45000, &#39;TZS&#39;)<br>    -&gt;customer($order-&gt;email, &#39;Amina&#39;, &#39;Mwinyi&#39;, &#39;+255712345678&#39;)<br>    -&gt;card(<br>        cardNumber: &#39;5531886652142950&#39;, // Flutterwave test card<br>        expiryMonth: &#39;09&#39;,<br>        expiryYear: &#39;32&#39;,<br>        cvv: &#39;564&#39;,<br>    )<br>    -&gt;redirectUrl(route(&#39;checkout.callback&#39;))<br>    -&gt;meta([&#39;order_id&#39; =&gt; $order-&gt;id])<br>    -&gt;build();</pre><pre>$charge = Flutterwave::directCharge()-&gt;create($request-&gt;toArray());</pre><p>build() validates the fields, encrypts the card data with your encryption key, and returns a typed DTO. toArray() gives you the API payload with the plaintext card values gone. The same builder covers mobile money and bank accounts:</p><pre>-&gt;mobileMoney(&#39;VODACOM&#39;, &#39;255712345678&#39;)<br>-&gt;bankAccount(&#39;0123456789&#39;, &#39;044&#39;)</pre><p>A charge often comes back as requires_action rather than succeeded. DirectChargeData gives you an enum and a next-action object, so you branch on intent instead of guessing at array keys:</p><pre>if ($charge-&gt;status-&gt;isSuccessful()) {<br>    // Fulfil the order.<br>} elseif ($charge-&gt;status-&gt;requiresAction()) {<br>    if ($charge-&gt;nextAction-&gt;requiresCustomerInput()) {<br>        // Render a PIN or OTP form.<br>    } elseif ($charge-&gt;nextAction-&gt;requiresRedirect()) {<br>        return redirect($charge-&gt;getRedirectUrl());<br>    }<br>}</pre><p>There is also isTerminal(), which tells you when no further action is possible, whether that is succeeded, failed, cancelled, or timeout.</p><h3>PIN, OTP, and AVS</h3><p>When the customer responds, you send the authorization back to the same charge. Each shape is a factory method, so you are not rebuilding the request body from memory:</p><pre>use Gowelle\Flutterwave\Data\AuthorizationData;<br>use Gowelle\Flutterwave\Support\EncryptionService;</pre><pre>// PIN: encrypt with your key and the nonce Flutterwave returned<br>$encryption = new EncryptionService(config(&#39;flutterwave.encryption_key&#39;));<br>$encryptedPin = $encryption-&gt;encrypt($pin, $nonce);</pre><pre>$auth = AuthorizationData::createPin($nonce, $encryptedPin);</pre><pre>// OTP: the code the customer received<br>$auth = AuthorizationData::createOtp($code);</pre><pre>// AVS: the billing address fields Flutterwave asked for<br>$auth = AuthorizationData::createAvs([<br>    &#39;line1&#39; =&gt; &#39;123 Main St&#39;,<br>    &#39;city&#39; =&gt; &#39;Dar es Salaam&#39;,<br>    &#39;country&#39; =&gt; &#39;TZ&#39;,<br>]);</pre><pre>$charge = Flutterwave::directCharge()-&gt;updateChargeAuthorization(<br>    chargeId: $charge-&gt;id,<br>    authorizationData: $auth,<br>);</pre><p>The response is another DirectChargeData, so the same status checks apply. In staging, each factory accepts an optional scenarioKey so you can force a specific outcome without waiting for a real issuer. It is ignored in production.</p><h3>Customers, orders, and the traditional flow</h3><p>The orchestrator is convenient when you start from a fresh checkout. But plenty of products already have a customer record, or need to charge a saved payment method later. The package exposes that flow too:</p><pre>$customer = Flutterwave::customers()-&gt;create([<br>    &#39;email&#39; =&gt; &#39;amina@example.com&#39;,<br>    &#39;name&#39; =&gt; [&#39;first&#39; =&gt; &#39;Amina&#39;, &#39;last&#39; =&gt; &#39;Mwinyi&#39;],<br>]);</pre><pre>$method = Flutterwave::payments()-&gt;createMethod([<br>    &#39;customer_id&#39; =&gt; $customer-&gt;id,<br>    &#39;type&#39; =&gt; &#39;card&#39;,<br>    // encrypted card details<br>]);</pre><pre>$charge = Flutterwave::payments()-&gt;process([<br>    &#39;amount&#39; =&gt; 45000,<br>    &#39;currency&#39; =&gt; &#39;TZS&#39;,<br>    &#39;reference&#39; =&gt; &#39;ORDER-&#39; . $order-&gt;id,<br>    &#39;customer_id&#39; =&gt; $customer-&gt;id,<br>    &#39;payment_method_id&#39; =&gt; $method-&gt;id,<br>    &#39;payment_method_type&#39; =&gt; &#39;card&#39;,<br>    &#39;redirect_url&#39; =&gt; route(&#39;checkout.callback&#39;),<br>], function (string $traceId) {<br>    logger()-&gt;info(&#39;Charge created&#39;, [&#39;trace_id&#39; =&gt; $traceId]);<br>});</pre><p>The callback receives the trace ID as soon as the charge is created, which makes it easy to correlate your logs with Flutterwave’s. You can also search customers by email, update them, list saved methods, and check charge status. The Orders API covers merchant-initiated flows: create, retrieve, list, update, void, capture, and an orchestrator variant that creates the order and charge together.</p><h3>Webhooks with verification built in</h3><p>A payment integration is not done until webhooks are boring. The package registers a route at /webhooks/flutterwave, verifies the flutterwave-signature header against your secret hash, and dispatches a FlutterwaveWebhookReceived event. Bad signatures are rejected before your listener runs.</p><p>You subscribe like any other Laravel event:</p><pre>use Gowelle\Flutterwave\Enums\WebhookEventType;<br>use Gowelle\Flutterwave\Events\FlutterwaveWebhookReceived;<br>use Illuminate\Support\Facades\Event;</pre><pre>Event::listen(FlutterwaveWebhookReceived::class, function (FlutterwaveWebhookReceived $event) {<br>    match ($event-&gt;getEventTypeEnum()) {<br>        WebhookEventType::CHARGE_COMPLETED =&gt; $this-&gt;fulfil($event-&gt;getTransactionData()),<br>        WebhookEventType::TRANSFER_COMPLETED =&gt; $this-&gt;markPayoutPaid($event-&gt;getTransactionData()),<br>        default =&gt; null,<br>    };<br>});</pre><p>You can use the raw string (getEventType()) or the enum, and helpers like isPaymentEvent() and isSuccessful() are there when you do not want to enumerate everything. Point your dashboard at https://yourdomain.com/webhooks/flutterwave and move on.</p><h3>The part nobody warns you about</h3><p>Here is the scenario that breaks naive integrations. A customer starts a card payment. The charge comes back requires_action. They get distracted, close the tab, and come back four minutes later to enter the OTP. Your webhook fires in between. Your support team asks why the order is stuck.</p><p>Charge Sessions exist for this. They are database-backed records that follow a charge across authorization steps, linked to your user and payment models, with metadata you control. Turn them on in config:</p><pre>&#39;charge_sessions&#39; =&gt; [<br>    &#39;enabled&#39; =&gt; true,<br>    &#39;auto_create&#39; =&gt; true,<br>],</pre><p>The package creates a session when a charge is created, updates it when authorization is submitted, and updates it again from webhooks. A polling job is included for charges that outlive the request, and a flutterwave:cleanup-sessions command prunes old rows on whatever schedule you choose. You can pick the session back up from anywhere:</p><pre>use Gowelle\Flutterwave\Models\ChargeSession;</pre><pre>$session = ChargeSession::byRemoteChargeId($charge-&gt;id)-&gt;first();</pre><pre>$session?-&gt;requiresAction();<br>$session?-&gt;isSuccessful();</pre><p>If you have ever built a payments table with a status column and a pile of special cases, this is that table, already modeled.</p><h3>Payouts use the same shape</h3><p>Collecting money is half the job. Transfers cover bank, mobile money, and wallet payouts through the orchestrator, so you do not need to create a recipient first:</p><pre>use Gowelle\Flutterwave\Data\Transfer\BankTransferRequest;<br>use Gowelle\Flutterwave\Data\Transfer\MobileMoneyTransferRequest;</pre><pre>// $payout is your local payout record<br>$bankPayout = Flutterwave::transfers()-&gt;bankTransfer(<br>    new BankTransferRequest(<br>        amount: 50000,<br>        sourceCurrency: &#39;NGN&#39;,<br>        destinationCurrency: &#39;NGN&#39;,<br>        accountNumber: &#39;0123456789&#39;,<br>        bankCode: &#39;044&#39;,<br>        reference: &#39;PAYOUT-&#39; . $payout-&gt;id,<br>    )<br>);</pre><pre>$momoPayout = Flutterwave::transfers()-&gt;mobileMoneyTransfer(<br>    new MobileMoneyTransferRequest(<br>        amount: 1000,<br>        sourceCurrency: &#39;NGN&#39;,<br>        destinationCurrency: &#39;GHS&#39;,<br>        network: &#39;MTN&#39;,<br>        phoneNumber: &#39;2339012345678&#39;,<br>        firstName: &#39;John&#39;,<br>        lastName: &#39;Doe&#39;,<br>        reference: &#39;MOMO-&#39; . $payout-&gt;id,<br>    )<br>);</pre><p>Before sending, resolve the account so a typo does not become a support ticket:</p><pre>$account = Flutterwave::banks()-&gt;resolveAccount(&#39;044&#39;, &#39;0123456789&#39;);</pre><pre>echo $account-&gt;accountName;</pre><p>The package handles the different lookup schemas for NGN, USD-on-NGN, and GBP corporate and individual accounts. Failed transfers can be retried, and rates are exposed through the same service.</p><h3>The rest of the surface</h3><p>The same facade reaches refunds, orders, virtual accounts, wallets, chargebacks, fees, settlements, banks, and mobile networks. A few examples:</p><pre>Flutterwave::orders()-&gt;create($payload);                             // array payload<br>Flutterwave::refunds()-&gt;create($refundRequest);                      // CreateRefundRequest<br>Flutterwave::wallets()-&gt;getBalance(&#39;NGN&#39;);                           // WalletBalanceData<br>Flutterwave::banks()-&gt;createVirtualAccount($virtualAccountRequest);  // CreateVirtualAccountRequestDTO<br>Flutterwave::settlements()-&gt;get($settlementId);                      // SettlementData</pre><p>The package also ships UI components, which is unusual for a payment SDK. There are five Livewire components (payment form, PIN, OTP, status, and saved methods) and Vue equivalents for Inertia apps. They handle client-side encryption and emit events you wire into your own flow:</p><pre>&lt;livewire:flutterwave-payment-form<br>    :amount=&quot;45000&quot;<br>    currency=&quot;TZS&quot;<br>    :customer=&quot;[&#39;email&#39; =&gt; $email, &#39;firstName&#39; =&gt; $firstName, &#39;lastName&#39; =&gt; $lastName]&quot;<br>    redirect-url=&quot;/checkout/callback&quot;<br>    @payment-success=&quot;handleSuccess&quot;<br>    @authorization-required=&quot;handleAuth&quot;<br>/&gt;</pre><p>UI strings ship in English, Swahili, and French, and the components use scoped flw- classes so you can restyle them without fighting specificity.</p><h3>Reliability is the default</h3><p>Most payment bugs are not logic bugs. They are the network being slow, an API being briefly unavailable, or a request being sent twice. The package makes reasonable choices for you:</p><ul><li>The OAuth token is cached and refreshed before it expires, not fetched on every request.</li><li>Failed requests are retried with exponential backoff on 5xx responses, 429 rate limits, and 408 timeouts. The default is three attempts, and it is configurable.</li><li>A local rate limiter keeps you under your Flutterwave quota. The default is 100 requests per minute.</li><li>Mutating requests carry an X-Idempotency-Key and an X-Trace-Id. The package generates UUIDs if you do not supply your own, and lets you set them per charge.</li><li>Request and response logging is off by default, because payment payloads are sensitive.</li></ul><p>None of this removes the need to think about money. It removes the need to reimplement the same plumbing in every project.</p><p>Much of the maintenance work has been alignment rather than features. Response shapes change, sandbox behavior differs from production, and a field that was optional becomes required. The package tracks those changes in its changelog and upgrade notes, which is the least glamorous part of a payment SDK and the part that saves you the most time.</p><h3>Testing without touching the API</h3><p>The services go through Laravel’s HTTP client, so Http::fake() works the way you expect. You can test the full charge flow without a Flutterwave account:</p><pre>use Gowelle\Flutterwave\Facades\Flutterwave;<br>use Illuminate\Support\Facades\Http;</pre><pre>it(&#39;creates a mobile money charge&#39;, function () {<br>    Http::fake([<br>        &#39;idp.flutterwave.com/*&#39; =&gt; Http::response([<br>            &#39;access_token&#39; =&gt; &#39;test-token&#39;,<br>            &#39;expires_in&#39; =&gt; 3600,<br>        ]),<br>        &#39;developersandbox-api.flutterwave.com/*&#39; =&gt; Http::response([<br>            &#39;status&#39; =&gt; &#39;success&#39;,<br>            &#39;data&#39; =&gt; [<br>                &#39;id&#39; =&gt; &#39;dc_123&#39;,<br>                &#39;amount&#39; =&gt; 1000,<br>                &#39;currency&#39; =&gt; &#39;TZS&#39;,<br>                &#39;reference&#39; =&gt; &#39;ORDER-1&#39;,<br>                &#39;status&#39; =&gt; &#39;succeeded&#39;,<br>            ],<br>        ]),<br>    ]);</pre><pre>    $charge = Flutterwave::directCharge()-&gt;create([<br>        &#39;amount&#39; =&gt; 1000,<br>        &#39;currency&#39; =&gt; &#39;TZS&#39;,<br>        &#39;reference&#39; =&gt; &#39;ORDER-1&#39;,<br>        &#39;customer&#39; =&gt; [<br>            &#39;email&#39; =&gt; &#39;test@example.com&#39;,<br>            &#39;name&#39; =&gt; [&#39;first&#39; =&gt; &#39;Amina&#39;, &#39;last&#39; =&gt; &#39;Mwinyi&#39;],<br>            &#39;phone_number&#39; =&gt; &#39;+255712345678&#39;,<br>        ],<br>        &#39;payment_method&#39; =&gt; [<br>            &#39;type&#39; =&gt; &#39;mobile_money&#39;,<br>            &#39;mobile_money&#39; =&gt; [<br>                &#39;network&#39; =&gt; &#39;VODACOM&#39;,<br>                &#39;phone_number&#39; =&gt; &#39;+255712345678&#39;,<br>            ],<br>        ],<br>        &#39;redirect_url&#39; =&gt; &#39;https://example.com/callback&#39;,<br>    ]);</pre><pre>    expect($charge-&gt;status-&gt;isSuccessful())-&gt;toBeTrue();<br>});</pre><p>Because the response objects are typed, the assertions read like the domain: status-&gt;isSuccessful(), nextAction-&gt;requiresRedirect(), isSettled(). The package itself is tested with Pest and analysed with PHPStan, and the service contracts are bound in the container if you prefer to inject them instead of using the facade.</p><h3>When this is not the right tool</h3><p>If you are not building on Laravel, use Flutterwave’s own SDKs. If all you need is a hosted checkout link, you do not need a charge orchestrator. This package is for teams that want the charge, the authorization flow, the webhook, and the payout record to live inside their Laravel app, with types and tests around them.</p><h3>Try it</h3><pre>composer require gowelle/flutterwave-php</pre><p>The package requires PHP 8.3 or newer and Laravel 11, 12, or 13. It is on <a href="https://github.com/gowelle/flutterwave-php">GitHub</a> and <a href="https://packagist.org/packages/gowelle/flutterwave-php">Packagist</a>, and the README goes much deeper than this post: every service, every DTO, and the encryption details.</p><p>If you ship something with it, I would like to hear which market you are in and what broke first. That is usually where the next release comes from.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1573f30d87bb" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[My Intel Mac Was Left Behind, So I Built Its Local PHP Environment Myself]]></title>
            <link>https://medium.com/@chiefmfalme/my-intel-mac-was-left-behind-so-i-built-its-local-php-environment-myself-b7d1d0c562ab?source=rss-3c3595d8bd3f------2</link>
            <guid isPermaLink="false">https://medium.com/p/b7d1d0c562ab</guid>
            <category><![CDATA[macos]]></category>
            <category><![CDATA[laravel]]></category>
            <category><![CDATA[php]]></category>
            <category><![CDATA[developer-tools]]></category>
            <category><![CDATA[web-development]]></category>
            <dc:creator><![CDATA[John Gowelle]]></dc:creator>
            <pubDate>Sun, 22 Nov 2026 07:03:23 GMT</pubDate>
            <atom:updated>2026-11-22T07:03:23.462Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Paddock is a free, native app that serves every project at its own .test address, with PHP, databases, mail, logs and Xdebug built in.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*7C-_X-HTwyv_t2O-.png" /></figure><p>My Mac still works. It builds my projects, runs my tests and has never once asked to be replaced.</p><p>But the tools around it have quietly moved on. Laravel Herd no longer supports Intel Macs, and what remains for local PHP development means Homebrew formulas that drift, Docker eating memory in the background, or an afternoon of wiring things together by hand.</p><p>I didn’t want to buy a new computer to keep doing the same work. And I don’t think tools like this should cost money. A local development environment is the ground you stand on before you’ve written a line of code. Nobody should have to pay to get started, least of all the people on older machines.</p><p>So I built the tool I wanted, and I’m giving it away. It’s called Paddock.</p><h3>What I wanted</h3><p>The promise I was after is simple: install it, and your sites work. No configuration forms, no “which web server would you like”, no question the software could answer itself.</p><p>In practice that means:</p><ul><li><strong>Every project folder is a site.</strong> Park a directory once and each folder in it is served at &lt;folder&gt;.test. ~/Sites/blog is blog.test.</li><li><strong>HTTPS that browsers trust.</strong> paddock secure blog, and it&#39;s done.</li><li><strong>PHP versions side by side.</strong> PHP 8.5 and 8.4 are built in. Each site can pin its own, and php and composer in the terminal follow the site you&#39;re standing in.</li><li><strong>Services in one action.</strong> PostgreSQL, MySQL, Redis, Meilisearch, S3-compatible storage and a mail catcher. Each one prints the exact .env lines for a Laravel app.</li><li><strong>Xdebug, only when asked.</strong> One switch per PHP version, and it starts a session only when a request asks for one.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/560/0*zWYIcwu6f8dEdTjw.png" /></figure><h3>Three windows I now can’t work without</h3><p>Once the basics worked, I kept building the things I reach for all day.</p><p><strong>Mail.</strong> Every email my apps send is caught locally and shown as HTML, plain text or source, with attachments. Remote images stay blocked until I ask for them.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*sKcH9PR-2xTSH5Rd.png" /></figure><p><strong>Logs.</strong> Paddock’s own logs, each service’s, each background task’s and every site’s storage/logs, in one window that follows them as they&#39;re written. Laravel errors fold their stack traces so the log stays readable.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*yiwYl9MnuLlIj9Ro.png" /></figure><p><strong>Dumps.</strong> While the window is open, dump() and dd() from every site show up there instead of in the page. Close it and they go back to where they always were.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*SR9du7Xp9E2Xkpsq.png" /></figure><h3>Background tasks that belong to the project</h3><p>A Laravel app is rarely just a web server. There’s a queue worker, a scheduler, maybe a websocket server.</p><p>In Paddock, a paddock.json in the project lists them, and Paddock keeps them running: restarted when they crash, restarted when the code changes. Nothing runs until I&#39;ve read the commands and approved them.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*oBZJ73ujDWvXI1tR.png" /></figure><h3>How it’s built</h3><p>Paddock is three programs sharing one Swift core: a menu bar app, a background service, and a paddock command-line tool.</p><p>The background service runs Caddy as the web server, one PHP-FPM pool per PHP version, and a small DNS responder for .test. Requests are routed by Laravel Valet&#39;s router, so Laravel, WordPress and Symfony resolve the way people already expect.</p><p>A few decisions I’m glad I made:</p><ul><li><strong>Everything is inside the app.</strong> PHP, the web server and Composer ship in the bundle, so the first launch works with no network.</li><li><strong>One password prompt, ever.</strong> Set-up installs the .test resolver and a tiny helper for ports 80 and 443. After that, nothing of Paddock&#39;s runs as root.</li><li><strong>It puts things back.</strong> Uninstalling restores what it changed.</li><li><strong>It updates itself politely.</strong> Paddock checks once a day and asks before installing, and your sites stay up while it does.</li></ul><p>The hardest parts were the ones nobody sees. PHP is built from source for each version, so it can ship inside the app and run with nothing else installed. Xdebug is built against those same builds. And the Dumps window speaks the same protocol as Symfony’s dump server, which meant teaching Swift to read PHP’s serialized data safely.</p><h3>The honest part</h3><p>A few things you should know before trying it:</p><ul><li><strong>Intel Macs only</strong>, on macOS 13 or later. That’s the point of it.</li><li><strong>Free, and it will stay free.</strong> The source is public so you can see exactly what it does on your machine. It isn’t open source: the licence says what you may do with it.</li><li><strong>Not signed with an Apple Developer ID.</strong> That costs a yearly fee, which doesn’t sit well with a free tool. So installation is a command: it downloads the release, checks it against a published SHA-256 and puts it in Applications. The README explains how to install by hand if you’d rather.</li><li><strong>It’s version 0.1.</strong> It has met very few Macs so far, and I expect rough edges.</li></ul><h3>Try it</h3><pre>curl -fsSL https://raw.githubusercontent.com/gowelle/paddock/main/Scripts/install.sh | bash</pre><ul><li>Website: <a href="https://gowelle.github.io/paddock/">https://gowelle.github.io/paddock/</a></li><li>Source and documentation: <a href="https://github.com/gowelle/paddock">https://github.com/gowelle/paddock</a></li></ul><p>If you’re still on an Intel Mac and you write PHP, I built this for you. Tell me what breaks: the issue tracker is open, and I read everything.</p><p><em>John Gowelle is a Tanzanian software developer working in PHP, Laravel and Swift. Find his other work at </em><a href="https://github.com/gowelle"><em>github.com/gowelle</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b7d1d0c562ab" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Vuejs Support for Legacy Browsers — Laravel]]></title>
            <link>https://medium.com/@chiefmfalme/vuejs-support-for-legacy-browsers-laravel-bfce528baa33?source=rss-3c3595d8bd3f------2</link>
            <guid isPermaLink="false">https://medium.com/p/bfce528baa33</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[vuejs]]></category>
            <category><![CDATA[ie11-compatibility]]></category>
            <category><![CDATA[laravel]]></category>
            <category><![CDATA[babel]]></category>
            <dc:creator><![CDATA[John Gowelle]]></dc:creator>
            <pubDate>Wed, 15 May 2019 02:34:46 GMT</pubDate>
            <atom:updated>2019-05-15T04:02:31.511Z</atom:updated>
            <content:encoded><![CDATA[<h3>Vuejs Support for Legacy Browsers — Laravel</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*c4vOKKzeNholVJ1oLxXTIA.png" /></figure><p>I hope this post will help fellow coders that will have the unfortunate luck of running into the headache I endured recently when finalizing yet another Laravel project.</p><p>After a couple of weeks of coding away Vuejs components — all tested using Mozilla Firefox. I started testing my application against other browsers. The application worked as intended on all the other browsers, but Internet Explorer 11 (IE11); every area covered by my Vuejs components were blank.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/220/1*ZllAxkLlzYYn7zzcdCtNeA.png" /><figcaption>Internet Explorer 11 (IE11)</figcaption></figure><p>I did some Google searches and tried out some of the solutions I found from various sources, and they were all useless. This is my solution and I hope it will be of use to you fellow coder — I’ll try keep it short, simple and direct.</p><h3>Step 01:</h3><p>Install ‘targets-webpack-plugin’</p><p># npm install --save-dev targets-webpack-plugin</p><p>or</p><p># yarn add --dev targets-webpack-plugin</p><h3>Step 02:</h3><p>Under your project root, open webpack.mix.js, require ‘targets-webpack-plugin’ and make alterations to the webpackConfig as shown on the image below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/709/1*ebSCRVtfAo1WkKTcwxgFNg.jpeg" /></figure><h3>Step 03:</h3><p>Run the command below then re-run your application.</p><p># npm run dev</p><h3>Remarks</h3><p>‘targets-webpack-plugin’ is a webpack plugin for transcompilig final bundles so they support legacy browsers. To learn more, follow this link:</p><p><a href="https://www.npmjs.com/package/targets-webpack-plugin">targets-webpack-plugin</a></p><p>I hope this will be helpful to you as it was helpful to me. Cheers!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bfce528baa33" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>