Download the PHP package arkadiuszbachorski/laravel-xmake without Composer

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

Additional Laravel Artisan xmake command for faster resource creating and scaffolding. Created to speed up developing process and stop typing same things in various places.

Table of contents

Getting started

Prerequisites

This package was developed for Laravel 5.8 and up. I haven't tested earlier versions yet.

Installation

Require this package with composer for development only.

Publish config

Change default resource paths if you would like to.

Publish resources

Features

Usage

You'd rather see than read?

Everything Is AWESOME

Example:

Result

FoobarController.php

Foobar.php

FoobarRequest.php

Pretty nice, huh? For more details and possibilities, see documentation.

To-do list

Documentation

Config

config/xmake.php

Stubs

Stubs can be found in /resources/xmake/stubs path by default. You will see a few text files there. All of them contain "Dummy..." content, that means it will be replaced by generated things. Everything what isn't prefixed with "Dummy..." can be customised by you.

Fields

Fields file can be found in /resources/xmake/fields.php path by default. It's a source of data about fields.

You don't have to fill in all the data about each field. The only required one is the "name". If you enter unknown field to --fields option, it will be treated as the key is the name and the other parameters are empty.

This means you can completely ignore this file if you would like just list every field in created files.

However Xmake has a few self-filling and data processing mechanisms as you could see in config. If you provide database field there is probability of getting at least some of repetitive things filled in validation and factory.

Commands

Every command has --help, so you can check available options faster than checking here.

In examples below I assume default config and file fields.php contains:

xmake

It's a command that will be used most often, because it gives powerful scaffolding ability. It can call every single command listed below.

Xmake by default runs interactive shell experience. If you would like to create resources even faster - use --instant flag. Results are almost the same, but you can't name your files independently. Probably you wouldn't do it anyway, because auto-naming works great.

Available options

--instant -i

Use this flag if you want don't want to use interactive shell.

--modelName

This parameter is required, almost every command uses it.

--fields

Get fields keys array, use comma as separator

--all

Create everything based on your config. By default - it's literally everything.

--api

Create API version of Controller and enable resource creating

--model

Create model with given modelName

--migration

Create migration with given fields prepared or filled

--factory

Create factory with given fields prepared of filled

--seeder

Create seeder that invokes factory

--request

Create request with given fields prepared or filled

--resource

Create resource with given fields prepared of filled

--controller

Create controller with various options - request, resource and api, based on your previous choices.

xmake:model

It simply creates model.

Example Result: _Foobar.php_

xmake:controller

It creates controller with:

Available options

--model -m

It's required. You must provide your models name.

--api

It's a flag that changes responses from Blade views to REST API.

--fields

You can provide fields for validation there.

--resource -x

It injects given resource to index, store, show, edit and update returns. It does nothing when no --api flag provided.

--request -r

It injects given request to create and update methods. If the file doesn't exist - it can be created with fields you provided.

Example Result:

xmake:resource

It creates resource with given fields filled. It makes fields name camelCase by default, however it can be changed in config.

Available options

--fields
Example Result:

xmake:migration

It creates migration with given fields prepared or filled.

Available options

--create

Table name

--fields
Example Result:

xmake:request

It creates request with given validation rules prepared or filled.

Example Result:

xmake:factory

It creates factory with given factory rules prepared or filled.

Example Result:

xmake:seeder

It creates seeder with given model.

Available options

--model

Model name.

--amount

Number of models to be created in seeder. Default value can be changed in config.

Example Result:

Summary

All the above files can be created with just one command:


All versions of laravel-xmake with dependencies

PHP Build Version
Package Version
Requires php Version ^7.2
laravel/framework Version >=5.8
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 arkadiuszbachorski/laravel-xmake contains the following files

Loading the files please wait ....