Chapter 6. Frontend Components

Laravel is mainly known as a PHP framework, but it’s also full stack, meaning it has a series of components and conventions focused on generating frontend code. Some of these, like pagination and message bags, are PHP helpers that target the frontend, but Laravel also provides a Vite-based frontend build system, some conventions around non-PHP assets, and several starter kits.

Laravel Starter Kits

Out of the box, Laravel provides an entire build system, which we’ll cover shortly, but it also includes easy-to-install starter kits that contain templates, auth, styles, JavaScript, and user registration and management workflows.

Laravel’s two starter kits are called Breeze and Jetstream.

Breeze is the simpler option; it provides all the needed routes, views, and styles for Laravel’s auth system, including registration, login, password reset, password confirmation, email confirmation, and an “edit profile” page. Breeze includes Tailwind styles, and you can choose Blade/Livewire templates, Inertia with React or Vue, or API-only.

Jetstream is more complex and robust; it provides everything Breeze does, but it also adds two-factor authentication, session management, API token management, and team management features. Jetstream includes Tailwind styles, and you can choose either Livewire or Inertia with Vue.

Note

Inertia is a frontend tool that allows you to build single-page apps in JavaScript, while using Laravel routes and controllers to provide the routing ...

Get Laravel: Up & Running, 3rd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.