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
Mastering Laravel Context: Advanced Logging and Contextual Job Tracing
Jul 20, 2025
Laravel Context is one of the most powerful new features in Laravel 12. It allows you to attach contextual data (like user ID, IP address, request pat...
How OAuth Works
Jun 29, 2025
How OAuth Works OAuth is a protocol that allows third-party applications to access user data without sharing passwords. It's the backbone of secure a...
Mastering Async Iteration in JavaScript with Array.fromAsync()
Jul 27, 2025
🔍 What Exactly is Array.fromAsync()? Array.fromAsync() is a static method introduced in ES2024 as part of JavaScript's growing support for asynchr...
Bypassing $fillable Safely with forceFill() in Laravel
Jul 02, 2025
Bypassing $fillable Safely with forceFill() in Laravel Ever used create() in Laravel and noticed some fields like role or status didn’t save? T...
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...
Laravel 12.21.0 – A Smart Update for Cleaner Queries and Stricter Validation
Aug 03, 2025
Laravel 12.21.0 introduces two game-changing features aimed at writing cleaner, more maintainable code. The update includes the new whereValueBetwe...
