Search by

wiserwebsolutions / laravel-pde-client

danswiser

Fluent Laravel client for Pennsylvania Department of Education financial, enrollment, assessment, graduation, and staffing data.

Package info

github.com/WiserWebSolutions/laravel-pde-client

pkg:composer/wiserwebsolutions/laravel-pde-client

Statistics

Installs: 55

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v5.2.0 2026-10-15 13:34 UTC

This package is auto-updated.

Last update: 2026-10-15 13:35:53 UTC


README

A Laravel client for discovering, downloading, and querying Pennsylvania Department of Education data. Supported domains are financials, enrollment, assessments, graduation, and professional personnel.

Installation

composer require wiserwebsolutions/laravel-pde-client
php artisan vendor:publish --tag=pde-client-config

Laravel discovers the provider and PDE facade. PHP 8.2+ and Laravel 10–13 APIs are supported; resolve dependencies for the target PHP/Laravel version.

Query data

use WiserWebSolutions\PDEClient\Facades\PDE;

$summaries = PDE::district('124157203')->year('2024-2025')
    ->financials()->budget()->revenues()->get();

$enrollment = PDE::district('124157203')->year('2024-2025')
    ->enrollments()->sole();

$results = PDE::district('124157203')->year('2024-2025')
    ->assessments()->pssa()->allStudents()->get();

get() always returns a collection. first()/sole() select one DTO; financial and enrollment DTOs are year summaries. records() streams flat account/grade records for imports. Omitting a year selects the most recent available year; allYears() opts into history. Select/configure a nine-digit AUN.

Historical fields known to be omitted from a report throw on access by default. Set PDE_CLIENT_MISSING_DATA=return_null to opt into nulls. Suppressed, blank, and unrequested values remain nullable. Availability helpers explain the reason; serialization follows the same policy.

Every record and year summary includes public PDE source citations in provenance. Use $record->sourcesFor('budget'), for example, to find the listing page and exact workbook supporting that field. Combined results distinguish their input datasets. Numeric methods also have sourced variants such as totalWithSources() and varianceWithSources(). See public source citations.

Compare budgets and actuals

$financials = PDE::district('124157203')->year('2019-2020')->financials()
    ->budgetAndActual()->revenues()->account('6111')->sole();

$account = $financials->accounts->sole();
$budget = $account->budget;
$actual = $account->actual;
$variance = $account->variance(); // actual minus budget, or null if either is missing

Both amounts share one account object when published for that district and fiscal year. This is also the default without budget()/actual(). See combined financial data for serialized examples, year selection, and availability checks.

Optional AI integrations

Expose all 17 datasets through Laravel AI tools, a reference PDE analyst, or a local MCP server. Integrations are installed independently and share source-backed discovery, safe availability results, and deterministic analysis. See AI and MCP setup.

Documentation

Documentation index: all 17 dataset endpoints includes complete access chains, field definitions, synthetic PHP/JSON examples, and historical limitations.

community() is an unsupported placeholder and throws when queried.

Development

composer test
composer format:check
composer analyse
composer audit

The test suite uses synthetic fixture workbooks and validates every documented endpoint example. The compatibility workflow covers supported PHP/Laravel combinations and minimum dependencies. Migration templates and storage guidance are optional consumer references; no consumer database is migrated automatically.

MIT licensed.