Download the PHP package mad-web/laravel-initializer without Composer

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

⚠️ Repository archived, new version maintaining under Qruto organization. New version released πŸŽ‰ check out qruto/laravel-flora. Find upgrade guide to switch from outdated version.

πŸ‡ΊπŸ‡¦ 🀝 If you can support me, I would be very greatful!

A convenient way to initialize your application.

Latest Stable Version Build Status Code Style Status Code Coverage Status Quality Score Quality Score

Introduction

We all know, that every application should contain readme file and Installation section with list of actions that you should to do for preparing an application to work.

Typical instruction:

Some of actions you should do on every application update (composer update, git pull...) or branch change (git checkout) for preparing an application to work.

Laravel Initializer gives you the ability to declare these processes and run it by simple app:install and app:update artisan commands, which run predefined actions chain depending on the current environment.

Also app:update command could simplify your deploy script in Forge, Envoy.blade.php, laravel-deployer, bash script etc.

With Laravel Initializer you keep both of these processes in the source control.

Put a knowledge of application initialization process into the right place

Installation

Via Composer

then publish initializer classes:

It will create Install and Update classes in app directory which contains local and production methods according to different environments. This methods should return runner chain with specific actions to install or update processes.

You can override config key which stores current environment value, publish config file and set env_config_key value.

by default value is set to app.env for laravel, in most cases you don't need to override this value.

Usage

Usage of app:install and app:update command are the same except that app:install uses Install class and app:update uses Update class.

Install class contents:

Update class contents:

You can add any other method which should have the same name as your environment name, for example staging, and define different actions.

If you need to run actions with root privileges separately, you can define a method according to the following convention:

Run it by passing "root" option:

To see details of running actions use verbosity mode:

You can inject any service from service container in constructor:

If you want to move config classes from the app directory to a different place, rebind app.installer and app.updater keys of service container in the AppServiceProvider.

Runner API (available actions to run)

Laravel Nova

If you use Laravel Nova, don't forget to publish Nova assets on each update:

Useful jobs

Laravel initializer provides some useful jobs to make initializing of your application much easier.

Create cron task for scheduling tasks

To enable Laravel Scheduling add dispatch MakeCronTask job to runner chain to create cron task for your application.

This job will add

to crontab list.

Create laravel-echo-server.json config file

If you use Laravel Echo Server for broadcasting events in your application, add dispatch MakeEchoServerConfig job to runner chain to create configuration file.

It will create configuration file with default options of laravel-echo-server and prefilled values from your laravel application configuration.

You can override default value by passing array into the job constructor. It would be a good practice to create additional config value for laravel-echo-server in broadcasting.php config:

And pass these values to MakeEchoServerConfig job constructor.

Create supervisor config file for queues

This job creates supervisor config file for queue workers. Add dispatch MakeQueueSupervisorConfig job to runner chain.

This job creates configuration file with the command php artisan queue:work --sleep=3 --tries=3 in /etc/supervisor/conf.d/ folder by default, with a filename according to this convention your-application-name-queue.conf.

If you want to override default options, pass it into job constructor. For example if you want to use Laravel Horizon instead of default queue workers.

Create supervisor config file for laravel echo server

On the same way as MakeQueueSupervisorConfig job, you can use MakeSocketSupervisorConfig to create supervisor config file for launching laravel echo server. The difference from MakeQueueSupervisorConfig is the command node ./node_modules/.bin/laravel-echo-server start and the config filename is your-application-name-socket.conf.

Both config files save log files to your-app-path/storage/logs.

Installation by one command

For running php artisan app:install command, you should install composer dependencies at first. It would be nice to have the ability to install an application by one command. We provide nice hack to implement this behavior.

Add app-install script into scripts section in composer.json.

Then you can run just

to initialize your application.

If your application has actions that require root privileges and you use Unix based system, add the following command into your runner chain:

Safe Update

In cases when latest changes has been pulled from source control and some functionality of currently not installed package is used in one of a Service Provider you will get an error. To prevent this issue you should make composer install at first, to simplify this process you can define app-update script:

Then you can run:

Upgrading

Please see UPGRADING for details.

Changelog

Please see CHANGELOG for more information what has changed recently.

Testing

Contributing

Please see CONDUCT for details.

Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.

Credits

Thanks Nuno Maduro for laravel-console-task package which gives pretty tasks outputs

License

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


All versions of laravel-initializer with dependencies

PHP Build Version
Package Version
Requires php Version ^7.2.5 || ^8.0
illuminate/bus Version ^6.0 || ^7.0 || ^8.0 || ^9.0
illuminate/config Version ^6.0 || ^7.0 || ^8.0 || ^9.0
illuminate/console Version ^6.0 || ^7.0 || ^8.0 || ^9.0
illuminate/container Version ^6.0 || ^7.0 || ^8.0 || ^9.0
illuminate/support Version ^6.0 || ^7.0 || ^8.0 || ^9.0
nunomaduro/laravel-console-task Version ^1.5
symfony/process Version ^4.4.11 || ^5.0.9 || ^6.0.3
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 mad-web/laravel-initializer contains the following files

Loading the files please wait ....