Analyze Laravel Projects with Introspect
July 1, 2025Analyze Laravel Codebases with Laravel Introspect
If you’re doing a complex refactor or building dev tools, Laravel Introspect helps you query your app code—views, models, routes, classes—using a type-safe fluent API.
Main Features
- Fluent queries for views, routes, classes, and models.
- Wildcard support (e.g.
components.*.button
). - Parse Eloquent model properties, relationships, casts.
- Serialize/deserialize queries as JSON (great for LLM tools).
Usage Examples
use Mateffy\Introspect\Facades\Introspect;
// Find views used by certain pages
$views = Introspect::views()
->whereNameEquals('components.*.button')
->whereUsedBy('pages.admin.*')
->get();
// Query routes using auth middleware and POST method
$routes = Introspect::routes()
->whereUsesMiddleware('auth')
->whereUsesMethod('POST')
->get();
// Extract model schema or JSON Schema
$detail = Introspect::model(User::class);
$schema = $detail->schema();
Check it out on GitHub: capevace/laravel-introspect.
Blog
React Labs: View Transitions & Activity
Jun 17, 2025
React Labs: View Transitions & Activity Published April 23, 2025 by Ricky Hanlon. React Labs is sharing two new experimental featu...
Essential React Native UI & Interaction Components
Jul 01, 2025
Essential React Native UI & Interaction Components React Native provides a powerful set of built-in components for creating native mobile apps....
Color Everything in CSS – Simple Guide
Jun 26, 2025
Color Everything in CSS – Simple Guide Today we’re diving into CSS colors: how to define them, especially with modern methods like lab(...
React Hooks Complete Guide
Jul 01, 2025
🎣 Complete React Hooks Guide with Practical Examples 🧠 useState What it does: Adds local state to a function component. Code Example: impo...
Laravel Queue & Job System: From Table Creation to Production Deployment
Jul 01, 2025
🚀 Laravel Queue & Job System We’re gonna walk you through Laravel queues from setup to deploying in production using Supervisor. Step 1...
Stop Copy-Pasting Code! Learn How to Use Traits in Laravel the Right Way
Jul 01, 2025
🚫 Stop Copy-Pasting Code! Ever duplicated slug logic or logging across multiple models? Laravel's Traits got your back. 1. What’s a Trait?...
