Download the PHP package dev-lnk/moonshine-builder without Composer

On this page you can find all versions of the php package dev-lnk/moonshine-builder. 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 moonshine-builder

logo

Generate code using JSON schema, SQL tables, and console commands for MoonShine.

Latest Stable Version tests License

Laravel required PHP required MoonShine required

Table of contents

Description

Hello, Laravel and MoonShine User!

This package allows you to describe the entire project structure using a JSON table schema, SQL table, console command and generate the necessary files such as:

Installation:

Configuration:

Publish the package configuration file:

In the configuration file, specify the path to your JSON schemas:

Generate code using JSON or MYSQL

Now you can run the command:

You will be given options as to which scheme to use when generating the code, for example:

Creating a JSON schema

In the builds_dir directory, create a schema file, for example, category.json:

To generate project files, run the command:

A more detailed example with multiple resources and relationships can be found here. For hints in your IDE or for a more detailed description of the JSON structure, you can use this file.

Timestamps

You can specify the timestamps: true flag

The created_at and updated_at fields will be added to your code. If you manually specified the created_at and updated_at fields, the timestamps flag will be automatically set to true.

Soft deletes

Works similarly to the timestamps flag and the deleted_at field.

Flags for generating files

Using flags withResource, withModel, withMigration, you can configure what exactly you want to generate for your resource:

Creation from SQL table

You can create a resource using a table schema. You must specify the table name and select table type. Example:

Result:

After generating the files, make sure to register all new Resources in your MoonShineServiceProvider.

Bulk table import

If you already have a project with its own database and you don't want to build the resources one by one, you can use the following command:

First, select all your Pivot tables to correctly form the BelongsToMany relationship, then select all the necessary tables for which you want to generate resources.

A JSON schema will be generated, which you can edit and apply if desired.

Generating code using console command

To generate the resource, model, and migration, run the command:

Specify all required fields:

Once all fields have been specified, generate the code

Specifying fields in the command

You can also specify all fields at once in the command, ignoring the interactive mode:

The structure of the value has the following scheme: <column>:<column name>:<type>

If the field type is relation, the structure is as follows: <column>(name of the relationship method in the model):<column name>:<type>:<table>

List of field types

The list of field types can be retrieved using the command:


All versions of moonshine-builder with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
dev-lnk/laravel-code-builder Version ^v1.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 dev-lnk/moonshine-builder contains the following files

Loading the files please wait ....