Download the PHP package augustpermana/laravel-meta-generator without Composer

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

Laravel Meta Generator

Laravel Meta Generator is a powerful package that enables you to easily attach and manage metadata for your Eloquent models without modifying their primary database tables. It provides a flexible key-value system featuring automatic type detection, casting, and handy artisan commands to simplify installation and maintenance.


Table of Contents


Installation

There are two ways to integrate Laravel Meta Generator into your project:

1. Via Packagist

Run the following command:

Laravel will automatically discover the service provider via package discovery. If necessary, manually add the provider in your config/app.php:

2. Using a Local Repository

If the package isn’t published on Packagist yet, add it as a local repository. Modify your project's composer.json:

Then run:

This configuration instructs Composer to use the specified local path for the package.


Usage

Laravel Meta Generator lets you attach metadata to your models without modifying the original database tables. Once installed, you can either use the provided artisan commands or manually integrate the functionality into your models.

Attaching Metadata to a Model

  1. Generate Metadata Files:

    Run the artisan command to set up the metadata system for an existing model. For example, for a Book model:

    When you run this command, it performs the following actions:

    • Creates a Meta Model File: Generates a new file (e.g., BookMeta.php) in your application's Models directory. This file extends the package’s base MetaModel class.
    • Updates the Original Model: You must manually update your original model file (e.g., Book.php) to include the HasMetadata trait. For example:

    • Creates a Migration: Generates a migration to create the corresponding metadata table (e.g., book_meta).

Managing Metadata

Once set up, your model gains several useful methods via the HasMetadata trait:


Artisan Commands

make:metadata

This command sets up the metadata infrastructure for a specific model.

Usage:

What It Does:

metadata:clean-orphaned

This command cleans up metadata records that no longer have an associated parent model.

Usage:

What It Does:


Configuration

No additional configuration is required. Simply run the artisan commands as needed. Ensure that your models are located in the default directory (e.g., app/Models) or adjust the paths accordingly if customized.


License

Laravel Meta Generator is open-sourced software licensed under the MIT license.


This documentation provides an overview of the package's functionality and usage. For more details and further customization options, please refer to the source code.


All versions of laravel-meta-generator with dependencies

PHP Build Version
Package Version
Requires php Version >=7.3
laravel/framework Version >=8.0
illuminate/support Version ^8.0|^9.0|^10.0|^11.0|^12.0
illuminate/database Version ^8.0|^9.0|^10.0|^11.0|^12.0
illuminate/events Version ^8.0|^9.0|^10.0|^11.0|^12.0
ext-json Version *
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 augustpermana/laravel-meta-generator contains the following files

Loading the files please wait ....