The Shift Toward Perceived Performance Traditional optimization often focuses on raw backend execution, such as database indexing and caching. However, Povilas Korop argues that "perceived speed"—how fast a user feels the site is—matters more for conversion. By leveraging Livewire within the Laravel ecosystem, developers can serve an immediate skeletal page and stream data in segments, mimicking the snappy UX of high-end marketplaces like Eneba. Prerequisites To implement these techniques, you should be comfortable with: * **PHP & Laravel**: Fundamental understanding of routing and controllers. * **Blade Templates**: Knowledge of how to structure frontend views. * **Livewire Basics**: Familiarity with components and their lifecycle hooks. Key Libraries & Tools * **Livewire**: A full-stack framework for Laravel that simplifies building dynamic interfaces. * **Chrome DevTools**: Essential for monitoring the **Network Tab** and measuring fetch requests. * **Laravel Daily Premium**: A resource for deeper dives into advanced framework patterns. Code Walkthrough: Decoupling the Controller The first step involves stripping the `HomeController`. Instead of fetching products and hero data in one heavy request, the controller simply returns the view. ```php public function index() { // No queries, no heavy lifting here return view('home'); } ``` In the `home.blade.php`, we replace monolithic HTML sections with Livewire components using `lazy` and `defer` attributes: ```blade <livewire:hero-section defer /> <livewire:product-grid lazy /> ``` Syntax Notes: Defer vs Lazy * **`defer`**: This attribute allows the initial page to load without waiting for the component. Livewire then makes a separate request immediately after the page is ready to swap in the content. * **`lazy`**: This directive delays loading until the component is scrolled into the viewport, which is ideal for "Best Sellers" or bottom-of-the-page sections. * **Placeholders**: You must define a `placeholder()` method in your component class to return the static HTML/skeleton shown while the data fetches. Tips & Gotchas While these techniques drastically improve initial render times, they increase the number of HTTP requests. You must also consider **SEO**; if crucial content is loaded exclusively via deferred components, search engine crawlers may fail to index that text unless they execute JavaScript effectively. Always balance user experience with discoverability.
Vue.js
Software
Dec 2020 • 1 videos
High activity month for Vue.js. Laravel among the most active voices, with 1 videos across 1 sources.
Feb 2021 • 1 videos
High activity month for Vue.js. Laravel among the most active voices, with 1 videos across 1 sources.
Dec 2021 • 1 videos
High activity month for Vue.js. Laravel among the most active voices, with 1 videos across 1 sources.
Jul 2024 • 1 videos
High activity month for Vue.js. Laravel among the most active voices, with 1 videos across 1 sources.
Nov 2024 • 1 videos
High activity month for Vue.js. Laravel among the most active voices, with 1 videos across 1 sources.
Jun 2025 • 1 videos
High activity month for Vue.js. Laravel among the most active voices, with 1 videos across 1 sources.
Aug 2025 • 2 videos
High activity month for Vue.js. Laravel among the most active voices, with 2 videos across 1 sources.
Jun 2026 • 1 videos
High activity month for Vue.js. Laravel Daily among the most active voices, with 1 videos across 1 sources.
Across 8 mentions, Laravel details the transformation from framework to ecosystem in 'Vue's Evolution' and frames the software as a necessary innovation within 'You Should Reinvent The Wheel'.
- Jun 4, 2026
- Aug 12, 2025
- Aug 8, 2025
- Jun 7, 2025
- Nov 7, 2024
Overview of the Inertia Approach Building single-page applications (SPAs) often feels like managing two separate worlds: a complex JavaScript frontend and a robust PHP backend. Usually, this requires building a messy REST API and managing client-side routing, which adds significant overhead. Inertia.js solves this by acting as an adapter rather than a framework. It allows you to build fully client-side rendered SPAs using classic server-side routing and controllers. You get the snappy feel of a modern web app without the pain of manual state synchronization or token-based authentication. Prerequisites Before diving into the code, ensure you have a firm grasp of Laravel fundamentals, particularly routing and controllers. Since Inertia.js lets you use your favorite frontend tools, you should be comfortable with either Vue.js or React. You will also need Node.js and Composer installed on your local machine to manage dependencies. Key Libraries & Tools - **Laravel Installer**: The command-line utility for bootstrapping new projects. - **Laravel Breeze**: A minimal starter kit that provides a perfect starting point for Inertia.js projects. - **Inertia Adapters**: Specialized packages for Vue.js or React that bridge the gap between the backend and the frontend. Code Walkthrough: Data Exchange In a standard app, a link click reloads the whole page. Inertia.js intercepts these clicks and performs an AJAX request instead. On the backend, your controller looks surprisingly familiar: ```php use Inertia\Inertia; public function index() { return Inertia::render('Dashboard', [ 'users' => User::all(), ]); } ``` Instead of returning a Blade view, we use `Inertia::render`. This sends a JSON response containing the component name ('Dashboard') and the data (props). On the frontend, Inertia.js receives this data and swaps the current page component with the new one dynamically. Syntax Notes & Best Practices Always use the `<Link>` component provided by the Inertia.js library rather than standard `<a>` tags. Standard tags trigger a full browser refresh, defeating the purpose of the SPA. ```javascript import { Link } from '@inertiajs/vue3' <Link href="/users">View Users</Link> ``` Tips & Gotchas Don't try to use Inertia.js for public-facing websites where SEO is the top priority unless you implement Server Side Rendering (SSR). For internal dashboards and complex SaaS products, however, it shines. Remember that because Inertia.js shares the same session as your Laravel backend, you don't need to worry about OAuth or JWT for internal navigation. Use the standard Laravel auth guards you already know.
Jul 4, 2024Overview Connecting a Nuxt.js frontend to a Laravel REST API creates a powerful, SEO-friendly architecture. By using session-based authentication rather than just tokens, you gain the native security benefits of CSRF protection and reduced XSS risks. This guide explores how to synchronize these environments to share cookies and fetch data seamlessly using a first-party frontend approach. Prerequisites To follow along, you need a working knowledge of JavaScript and PHP. You should have a Laravel API already configured and Nuxt.js (version 2 is used here) installed. Basic familiarity with terminal commands and local development environments like Laravel Valet will help you manage local subdomains. Key Libraries & Tools * Axios: A promise-based HTTP client for the browser and Node.js. * Nuxt Auth Module: A dedicated library to handle authentication strategies. * Laravel Sanctum: Provides a featherweight authentication system for SPAs and simple APIs. * Tailwind CSS: A utility-first CSS framework for rapid UI development. Environment Synchronization For session-based auth to work, both apps must share a top-level domain. Use Laravel Valet to link your API to `api.ergodnc.test` and proxy your Nuxt app to `app.ergodnc.test`. In your Laravel `.env`, set `SESSION_DOMAIN` to `.ergodnc.test`. This dot prefix is non-negotiable; it tells the browser the cookie belongs to all subdomains. Additionally, update `cors.php` by setting `supports_credentials` to `true` to allow the browser to pass cookies back and forth. Code Walkthrough: Data Fetching and Auth In your Nuxt pages, the `fetch` hook is your best friend. It allows you to populate data on the server side or during client-side navigation. ```javascript async fetch() { const response = await this.$axios.get('/offices'); this.offices = response.data; } ``` For authentication, configure the Nuxt Auth Module in `nuxt.config.js` using the `cookie` strategy. You must define four critical endpoints: `login`, `logout`, `user`, and the Sanctum `client-side-csrf` cookie. This ensures Nuxt initializes the CSRF token before attempting a login. Syntax Notes Nuxt’s `fetchState` is an elegant way to handle UI states. Use `$fetchState.pending` to show loaders and `$fetchState.error` to catch failures. When using the Nuxt Auth Module, the `$auth` helper becomes globally available, allowing you to check `$auth.loggedIn` or access user data via `$auth.user` directly in your templates. Tips & Gotchas Always verify that your Laravel Sanctum stateful domains include your Nuxt URL. If you miss this, Laravel won't attach the session middleware, and your authentication will fail silently. If you get 401 errors after a session expires, use an Axios interceptor to catch the error and force a logout on the frontend to keep the UI in sync with the server.
Dec 6, 2021Overview of Next-Generation Spark Laravel Spark serves as a dedicated SaaS toolkit designed to handle the heavy lifting of recurring billing. Unlike earlier versions, the next generation of Spark is front-end agnostic, meaning it provides a totally isolated billing portal that exists separately from your main application logic. This architectural shift grants you total freedom to use any stack—whether Vue.js, React, or simple Blade templates—without the billing logic cluttering your UI. Prerequisites and Toolkit To follow this implementation, you should be comfortable with the Laravel framework and basic terminal operations. Key Libraries & Tools * **Laravel Breeze**: A minimal, simple starter kit for scaffolding authentication. * **Paddle**: A merchant of record that handles VAT taxes and provides PayPal integration. * **Stripe**: The alternative payment provider supported by Spark. * **Tailwind CSS**: The utility-first CSS framework used for branding the portal. Implementation Walkthrough Start by scaffolding authentication using Laravel Breeze. Once your users can log in, install the Paddle edition of Spark via Composer: ```bash composer require laravel/spark-paddle php artisan spark:install ``` Next, integrate the `Billable` trait into your `User` model. This connects your database entities to the Spark billing engine. ```python use Spark\Billable; class User extends Authenticatable { use Billable; } ``` Configuring Subscription Plans Plans reside in `config/spark.php`. Here, you define your monthly and yearly IDs—which you fetch from your Paddle dashboard—along with feature lists. Spark uses these to automatically generate the pricing toggle in the billing portal. Branding and UI Integration Customizing the portal to match your brand (like the green aesthetic of Laravel Forge) happens in the `branding` section of the config. You can swap the logo and primary button colors using Tailwind CSS classes. To link users to the portal, simply point a navigation link to the `/billing` route defined in your configuration. Practical Tips & Gotchas Always use the `onTrial` method to show trial banners in your UI. One common mistake is forgetting to set up webhooks; Laravel Spark relies on webhooks to process subscription status changes. If your local environment isn't receiving these, your application won't know when a user has successfully paid.
Feb 11, 2021The Architecture of Choice in Laravel 8 Laravel 8 marks a significant shift in how we approach the front-end, or more accurately, how we don't. By default, the framework remains entirely agnostic. When you run `laravel new`, you get Blade templates and nothing else. No Tailwind, no Vue, and certainly no forced architectural patterns. This is intentional. The goal is to provide a clean slate while offering powerful, optional scaffolding for those who want to move faster. Much of the recent noise in the community suggests that using tools like Inertia.js or Livewire is a requirement or a "betting of the farm" on immature tech. This fundamentally misunderstands what these tools do. Inertia isn't a massive framework; it's a bridge that lets you use Laravel's routing to hydrate Vue components. It keeps you productive by removing the need for a separate API repository, which is often a productivity killer for solo developers and small teams. Demystifying the Starter Kits: Breeze and Jetstream To understand where you should start, you have to look at the complexity of your requirements. Laravel Breeze represents the baseline. It is a simple, minimal implementation of all Laravel's authentication features—login, registration, password reset—using simple controllers and routes that you can actually see and modify in your app. It’s the spiritual successor to the old `make:auth` command, but modernized with Tailwind. Laravel Jetstream sits at the other end of the spectrum. It is essentially the free, open-source core of what used to be Laravel Spark. We moved all the non-billing features—team management, two-factor authentication, and API token management—out of Spark and into Jetstream. It uses Laravel Fortify as its headless backend. This means Jetstream handles the UI (via either Inertia or Livewire), while Fortify handles the heavy lifting of authentication logic in the background. Passport vs. Sanctum: Choosing Your API Guard The most persistent confusion in our ecosystem revolves around Laravel Passport and Laravel Sanctum. The decision tree is actually quite simple: if you need to build a full OAuth2 server—the kind where users can "Sign in with Your App" on third-party sites—you need Passport. It is a robust, compliant implementation built on the league/oauth2-server. However, most developers don't actually need OAuth2. They just need to secure an API or a Single Page Application (SPA). For these use cases, Passport is a sledgehammer. Sanctum was built to solve the "API for myself" problem. It provides a lightweight way to issue personal access tokens and, more importantly, a way to authenticate SPAs using secure, stateful cookies. The Secret Sauce of SPA Authentication Sanctum's true power lies in its ability to toggle between token-based and cookie-based authentication. When your SPA sits on the same top-level domain as your Laravel API, you shouldn't be messing with JWT storage in `localStorage`. It’s insecure and unnecessary. Instead, Sanctum allows your SPA to call a login endpoint, which uses standard Laravel session guards to issue a secure HTTP-only cookie. The browser then handles that cookie automatically for every subsequent request. If a request comes in without a cookie, the Sanctum guard looks for a `Bearer` token in the header. This dual-layer approach allows the same API routes to serve your first-party SPA via cookies and third-party mobile apps or SDKs via tokens. It’s the most secure and streamlined way to handle modern web authentication without the overhead of a full OAuth2 handshake. Community Dynamics and Open Contributions There is a narrative that the Laravel ecosystem is a closed circle, but the data proves otherwise. With over 2,800 contributors, the "inner circle" is massive. Developers like Paris Malhotra prove that anyone can show up, submit high-quality pull requests to core packages like Laravel Horizon, and get them merged. This isn't about personal friendships; it's about labor and merit. People like Caleb Porzio and Jonathan Reinink earned their status through hundreds of hours of free work to make the ecosystem better. We want people who bring positive energy and a desire to make programming more enjoyable. If you're here to armchair quarterback, you're missing the point of what we're building.
Dec 31, 2020