Download the PHP package cybex/laravel-reflector without Composer

On this page you can find all versions of the php package cybex/laravel-reflector. 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-reflector

Laravel Reflector

Latest Version on Packagist

This package allows you to get structural information for data models.

Requirements

Installation

You can install the package via composer:

Usage

getModelRelations()

The method returns a Collection of all relations of a Model, with additional information like the name of the relation, relation type, related class and an empty base instance of the given Model from Eloquent.

getRelationByTarget()

The method returns the name of a Relation between the Model and the Target.

hasRelation()

The method returns true if a Model has a specific relation.

getMethodReturnType()

The method returns the type of a specific method on a given Object or Model class. It returns false when the Method does not exist. It returns null if no return type is type hinted.

getModelInstance()

The method checks if the given model is an instance of a Model or the fully qualified class name of a Model, and returns the model or the empty Eloquent base Model of the given class.

getModelClass()

The method checks if the given model is an instance of a Model or the fully qualified class name of a Model, and returns the class of the given Model.

resolveModelObject()

The method resolves a Model based on a given Model or a Class and the according identifier. If no identifier is given, it returns an empty Builder-Model. If the desired Model can not be found, it will return null.

resolveRelatedModel()

The method resolves a related Model by the source and the given Relation. Currently, we only support HasOne or BelongsTo-Relations, as those only return a single Model or null.

resolveRelatedModelByTarget()

The method resolves a related Model by the source and the given TargetModel.

getModelShortName()

The method returns the Short-Name of a Model.

getAllModels()

The method returns a Collection of all available Models via the Filesystem.

getAllInstantiatableModels()

The method returns a Collection of all instantiatable Model-Classes, which are not Abstract. It returns the full qualified Class-Name as key with the according Short-Name as value.

getInstantiatableModelStructureInformation()

The method returns a Collection of structure information for all instantiatable Model-Classes, which include the fully qualified name of the parent class and the child classes.

getClassFromMorphMap()

The method returns the class name from the Morph-Map alias (reverse lookup), the alias or null (if strict is true).

getMorphAliasForClass()

The method returns the morph alias for the specified Model.

modelHasTraits()

The method validates if a Model implements one or more specific Traits.


All versions of laravel-reflector with dependencies

PHP Build Version
Package Version
Requires illuminate/support Version ^8.0|^9.0
php Version ^8.0
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 cybex/laravel-reflector contains the following files

Loading the files please wait ....