Ross ROSS = Recommend OSS · open-source software intelligence for agents

spatie/laravel-view-models

View models in Laravel observed · 2026-08-28

github.com/spatie/laravel-view-models · homepage · PHP · MIT (permissive) observed · 2026-08-28

Health v2 · maintenance only

72/100

  • Activity 85
  • Release rhythm 39
  • Longevity 100
How is this computed?

round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-09-03. Adoption (stars, forks) is never an input.

  • gap_med: 372
  • age_days: 2917
  • days_rel: 193
  • days_push: 92
  • n_releases_24m: 2

Full methodology

Adoption not part of the score

1090 stars · 60 forks observed · 2026-08-28

What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-30, confidence not recorded

A Laravel package by Spatie that provides view models: classes that prepare and transform data for views, keeping controllers slim. It offers a simple ViewModel base class to encapsulate view-specific logic.

Use cases

  • move view preparation logic out of fat Laravel controllers
  • pass structured data objects to Blade views
  • organize complex view data like categories and URLs in one class
  • replace or complement Laravel view composers
  • keep create/edit form controllers clean

When to choose

  • you use Laravel and controllers are doing heavy data preparation for views
  • you want an alternative to view composers with explicit per-action data
  • you prefer object-oriented view data over passing loose arrays

When to avoid

  • you don't use Laravel or PHP
  • your views are simple and controllers are already thin
  • you rely on Blade components or Livewire for view logic

Facets

library · maturity stable

templating middleware web-development backend developer-tools php laravel view-models mvc spatie blade

4 sources

Member repositories

RepositoryRoleHealth v2
spatie/laravel-view-modelsmain72

For agents

markdown · JSON · MCP: product_card(name="spatie/laravel-view-models")

Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem