Download the PHP package glioympas/constella without Composer

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

Enhance searchability - locate database columns in a matter of seconds


What it does?

Constella will automatically publish your DB columns as public PHP constants after every successful regular Laravel php artisan migrate execution.

In addition to that, you may also want to follow same logic on Model relations too and have them as constants. You can simply generate them with an artisan command.

Note: This is mostly to be used for your new projects, since it can get quite cumbersome to refactor your current ones to follow that logic.

What this is about?

Wouldn't it be great for your developers, no matter if they are new to the project, or have been there for some time already, to be able to find where a specific DB column or relation is being used on the codebase, super fast?

Think of it, that's extremelly powerful since almost everything is around data.

That means:

And in general, more confidence on finding where things are being used in a large (or not) codebase.

Example that describes the problem

Your project is a large SaaS application and your new developer needs to do some refactoring on a column named 'title' on a Project model.

Now the developer must find where this column is being used, probably exploring different files or globally searching on the IDE for things like:

After finding some on different files, person just wishes that to be all. That simple task was almost already pain in the ass. The larger the codebase, the worse it gets. The developer experience can get better IMO.

A solution to the above problem

You have a policy / coding standard on your codebase and you don't allow developers to use magic strings for DB columns or even relations. Developers should only use regular PHP constants.

The above developer now just searches for

and immediately finds all the places where title columns is being used in a matter of seconds!

The trick here is to treat it as a strict code policy and see the long term benefits of this.

Specifically

You DON'T using magic string for your columns, for example:

You FORCE your developers (on code reviews for example) to use constants:

In the beginning that may be a bit weird to type, but you get used to it very fast and the long term benefits for the project really worth it IMO.

Installation & usage

You can install the package via composer:

You can publish the config file with:

`

Constella will automatically publish column classes on the same root folder where your models exist.

This will happen after a successful regular migration using:

For first time usage, if you don't have an migration to execute, you can publish them using the following command:

Also need Model relations constants?

Want to also have model relations as constants too? You can generate them with the following command on first time usage or after each time you add a new relation

to your models:

Note: To allow Constella locate the relations, your relation functions on Eloquent models should be type-hinted!

Then you can force a policy for your developers to use relations like that:

License

The MIT License (MIT). Please see License File for more information.


All versions of constella with dependencies

PHP Build Version
Package Version
Requires php Version ^8.4
illuminate/support Version ^12.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 glioympas/constella contains the following files

Loading the files please wait ...