Download the PHP package dandoetech/laravel-resource-registry without Composer

On this page you can find all versions of the php package dandoetech/laravel-resource-registry. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-resource-registry

Laravel Resource Registry

Pre-release — Architecture by senior tech lead, implementation largely AI-assisted with human review. Not fully reviewed. Architecture may change before v1.0.0.

Laravel bridge for the DanDoeTech Resource Registry. Auto-discovers Resource classes, binds the Registry as a singleton, and provides capability interfaces for Eloquent integration.

This is the central package — install it first, then add consumer packages as needed.

Installation

The service provider is auto-discovered. Publish the config:

Quick Start

1. Define a Resource

Create a Resource class in app/Resources/:

2. Use the Registry

The Registry is bound as a singleton. Inject or resolve it anywhere:

Resources are auto-discovered from configured paths on first access.

Configuration

config/ddt_registry.php:

Note: The API route prefix is configured in config/ddt_api.php (from laravel-generic-api), not here. This config only controls resource discovery.

Glob patterns are supported — Modules/*/Resources discovers resources across all module directories.

Related Packages

This package provides the registry and resource scanning. For a complete setup, you'll also need:

Package Purpose
laravel-generic-api CRUD endpoints (GET/POST/PATCH/DELETE) for all registered resources
laravel-model-meta Generate Eloquent Models + Migrations from registry definitions
laravel-openapi-generator Auto-generate OpenAPI 3.1 spec from registry
laravel-bff Frontend metadata endpoints (fields, forms, tables, permissions)
filament-registry-bridge Generate Filament admin panel from registry definitions

Capability Interfaces

Framework-specific capabilities are opt-in via small interfaces. Implement only what you need:

Bridge packages discover capabilities via instanceof:

Computed Field Resolvers

For resources with computed fields using via syntax, resolvers are built automatically:

Via syntax Resolver Example
relation.field RelationFieldResolver (subselect) category.name
count:relation RelationCountResolver (withCount) count:orders
pluck:relation.field RelationPluckResolver (GROUP_CONCAT) pluck:tags.name

For custom logic, implement EloquentComputedResolverInterface:

Reference it in your resource:

API Overview

Class Purpose
DdtServiceProvider Binds Registry singleton, publishes config
ClassBasedDriver Scans configured paths for Resource classes
PathResolver Resolves glob patterns to PHP file paths
HasEloquentModel Capability: link resource to Eloquent model
HasPolicy Capability: link resource to Laravel policy
HasOwnerScope Capability: scope queries to authenticated user
HasScope (deprecated) Capability: apply query scope
EloquentComputedResolverInterface Contract for custom computed field query logic
ViaResolverFactory Creates resolvers from via syntax strings

Testing

License

MIT


All versions of laravel-resource-registry with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
illuminate/cache Version ^11.0 || ^12.0
illuminate/config Version ^11.0 || ^12.0
illuminate/database Version ^11.0 || ^12.0
illuminate/support Version ^11.0 || ^12.0
dandoetech/resource-registry Version ^0.1 || ^0.2
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package dandoetech/laravel-resource-registry contains the following files

Loading the files please wait ...