Laravel for Full Stack and Frontend
People describe Laravel as a "backend framework", then show you a Laravel app with polished pages and buttons. Both are true. Laravel can own the whole app, or it can hand the screen to someone else and only serve data. Knowing which shape you are in tells you where the HTML comes from.
The rule
Ask who draws the HTML: Laravel, or a separate frontend.
Full stack: Laravel draws the page. A request reaches a controller, the controller loads data and returns a view. The view is a Blade template, which is HTML with a few extra tags, and Laravel turns it into finished HTML on the server:
Route::get('/books', function () {
return view('books.index', ['books' => Book::all()]);
});Laravel still takes care of the frontend here: it compiles your CSS and JavaScript with Vite and adds them through the @vite directive in your layout.
Two tools push the full-stack shape further:
- Livewire lets you write interactive components in PHP. Clicking a button sends a small request to the server, and the changed part of the page is updated. You write little or no JavaScript.
- Inertia keeps Laravel's routes and controllers but lets React or Vue components draw each page. The controller passes data straight to the component, with no separate API to design.
API only: someone else draws the page. Laravel returns JSON, and a separate app, such as a Next.js site or an iPhone app, fetches it and builds the screen:
Route::get('/api/books', function () {
return Book::all();
});Returning a model collection like this makes Laravel send it as JSON automatically.
The shortcut
Follow one request to the end and ask "what arrives at the browser from Laravel: HTML or JSON?" HTML means full stack. JSON means Laravel is the backend for a frontend that lives somewhere else.
Blade pages
The browser receives finished HTML from Laravel. Full stack.
The trap is thinking Inertia makes Laravel "just an API". With Inertia there are no hand-built API endpoints. The controller still chooses the page and its data.
Drills
Answer fast — trust the rule.
A Laravel route returns view('books.index'). Who draws the HTML?
Lendly needs an Android app and a website sharing one backend. Which shape fits best?
What does Livewire let you do?
Which statement about Inertia is true?
Remember
- Ask who draws the HTML: Laravel (full stack) or a separate frontend (API).
- Blade, Livewire and Inertia are all full-stack shapes, and JSON endpoints make Laravel a backend.
- Trap: Inertia is not an API. Controllers still choose the page.
