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
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...
ECMAScript 2025 Detailed Update Guide for Frontend Developers
Jul 06, 2025
🔍 ECMAScript 2025 – Detailed Feature Guide All new ECMAScript 2025 features with code examples and explanation of their importance for front...
Mastering Laravel 12 Conditional Validation
Jul 07, 2025
Mastering Laravel 12 Conditional Validation Laravel 12's validation system is super powerful, and conditional validation makes your forms...
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...
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(...
Laravel 12.16.0 - New Features for Developers
Jun 03, 2025
Laravel 12.16.0 - New Features for Developers 1. New Validation Rule: in_array_keys You can now validate that an array contains at least one of the...
