Download the PHP package moox/core without Composer

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

Moox Core

Moox Core

The Moox Core package provides common features, used by all Moox packages. If you use Moox Builder to create your own Moox package, these features are already included and pre-configured.

Features

The last three features provide traits for model, resource and resource pages. They are named Single... as they can not be used together with other Single... traits. You need to also include the Base traits. Example:

This part is currently not well documented. We will cover that soon.

Installation

If you want to install Moox Core (normally not necessary, because this package is required by all other Moox packages), you can:

Requires

Moox Core requires these packages:

Traits

TabsInListPage

This trait provides functionality for creating dynamic tabs in Filament resources.

Key Methods

Usage

The DynamicTabs trait is already implemented in all Moox packages including Moox Builder. If you want to implement this feature in your existing package:

Configuration

Provide a configuration like:

Disable Tabs

If you want to disable tabs for this resource, just do a

Basic Tabs

A pretty basic example:

Visibility

The visible-option is not necessary, as it defaults to true. But if you want to toggle the visibility of a Tab, you can use a Closure like this:

Queries

See Queries in Config on how to use the query feature.

Translation

See Translatable Config on how to use the trans feature.

QueriesInConfig

This trait allows building complex queries from configuration arrays.

Key Methods

Usage

Configuration

Dynamic Tabs uses the QueriesInConfig Trait, that means you can build queries like this:

The simplest query is for the All tab, of course:

All other queries require three parameters:

Add more, if you need:

We DON'T YET support relations nor the like operator. If you're in the need, we would be happy to merge a PR :-)

The value of a query accepts a closure. Following example is perfect for a "My Tab" as it filters for the current user:

Finally, a special idea and therefor NOT YET implemented: if the value contains a class and a forth parameter hide-if-not-existsset to true, Moox will check, if the class exists and otherwise hide the tab. That allows us to register buttons for packages, that are not necessarily required.

An practical example (works for Sessions, Devices and other user-related entities):

And finally the most-known mistake, throws "Cannot access offset of type string on string":

So don't forget to put the query in an extra array, even if it is a single query.

As mentioned, the QueriesInConfig trait is used in TabsInListPage, another Trait in Moox Core. Please code dive there, to see how to implement the Feature from outside Moox.

TranslatableConfig

This trait provides functionality for translating configuration values.

Key Methods

Usage

Configuration

A simple but useful feature is the TranslationsInConfig Trait that is used a lot in our config files, as seen with Tabs:

Translations of our packages are generally organized in Moox Core. Only few of our packages ship with own translation files. These packages are registered in the core.php configuration file. If you develop a custom package (preferably using Moox Builder) you need to add your custom package to the Package Registration.

RequestInModel

This trait allows access to request data within models.

Key Methods

Usage

The RequestInModel Trait is currently used by all Moox Press packages. It allows us to use the request data in some of our models. You can code dive into Moox\Press\Models\WpTerm.php, to find more code examples. The basic implementation looks like this:

GoogleIcons

This trait provides methods for using Google Material Design Icons in your application.

Key Methods

Usage

As Google Material Design Icons provides one of the largest sets of high quality icons, we decided to use them as default for Moox. The GoogleIcons Trait changes the default Filament Icons, too. It is used in the CoreServiceProvider like this:

You can disable Google Icons and use the Filament default icons instead, see config.

TaxonomyInModel

This trait provides functionality for models to work with dynamic taxonomies.

Key Methods

Usage

TaxonomyInResource

This trait provides methods for generating Filament form fields, table columns, and filters for dynamic taxonomies.

Key Methods

Usage

TaxonomyInPages

This trait provides methods for handling dynamic taxonomies in Filament resource pages.

Key Methods

Usage

Log Level

Log Level is a useful feature to debug things in Moox, even when you're in production, or get your logs silent while developing.

You can adjust the log level and whether to log in production in Moox Core's Config.

Services

TaxonomyService

This service manages taxonomy configurations and provides utility methods for working with taxonomies.

Key Methods

Usage

DnsLookupService

This service provides DNS lookup functionality.

Key Methods

Usage

That Service is currently used in Moox Sync's PlatformResource like so:

TaxonomyCreateForm

This class provides a schema for creating taxonomy entries.

Usage

This form includes fields for title and slug, as these are needed for creating Taxonomies. As your taxonomy might need further fields, you can use your own form to create your custom taxonomies.

APIs

Core API

The Core API api/core provides all available packages (and their configuration).

It is currently not used, and may be changed or removed.

Models API

The Models API api/models provides all available and loaded models. It is used by Moox Sync, for example.

The Models API is work in progress. It probably will be secured.

Shared Hosting API

The Shared Hosting API schedule/run is used to run scheduled tasks in shared hosting environments.

https://yourdomain.com/schedule/run?token=secure

If you want to use the Shared Hosting API, you need to set the SHARED_HOSTING_ENABLED config to true and the SHARED_HOSTING_TOKEN config to a secure token.

Configuration

Package Registration

Register Moox packages and custom packages in the config/core.php file:

Moox has a simple package registration. To ensure that some features of Moox Core are only available for known packages, all Moox packages and all custom packages, created with Moox Builder, need to register here:

You can publish the Moox Core configuration file and add own packages:

but remember to update the Array regularly then, to allow newer Moox packages to work flawlessly.

Google Icons

You can disable Google Icons, and use the Filament default iconset (Heroicons) instead.

This disables the replacement of the Filament core icons, done in Core, as well as the individual icons of most of our packages. Some packages will remain with Google Icons, because there is no corresponding icon in the Heroicon set.

Logging

You can adjust the log level and whether to log in production. Currently used by Moox Sync and soon by other Moox packages, too.

Shared Hosting

You can enable shared hosting features. This is useful if you want to run scheduled tasks in shared hosting environments. It allows you to run the queue:work and 'schedule:run' command from an URL

Assets

Moox Core provides a couple of (non-publishable) assets, loaded by a dynamic route. All images and assets in /public can be used like url('/moox/core/assets/noimage.svg'.

Changelog

Please see CHANGELOG for more information on what has changed recently.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

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


All versions of core with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2.0
adrolli/filament-title-with-slug Version *
spatie/laravel-package-tools Version ^1.13.0
laravel/framework Version ^10.0|^11.0
filament/filament Version ^3.2
pharaonic/laravel-readable Version ^1.0.5
codeat3/blade-google-material-design-icons Version ^1.0
ryangjchandler/filament-progress-column Version ^1.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 moox/core contains the following files

Loading the files please wait ....