Download the PHP package victor-falcon/laravel-task without Composer

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

Laravel Task

GitHub Workflow Status Packagist Packagist Packagist

🇪🇸 Documentación en español aqui

Table of content:

Installation

Install via composer

Usage

1. Basic usage

Create a simple task using:

You can pass Shop/CreateUserShop to create the class in a sub-folder or just the task name. The default path is app/Tasks.

and trigger it:

2. With validation

If you want, you can pass validated data to your tasks using the Laravel validator. For example, If you need to validate a user creation you can do something like this.

And then you can trigger your task with extra data using:

You can customize the messages with the method messages(): array in your task or add custom attributes with customAttributes(): array.

If you want to customize the errors bag name of the validator just define the string $errorBag property in your class.

3. With authorization

Sometimes you need to check if the user triggering the task is authorized or not. You can do that by adding a simple authorize(): bool method to your task. If this method returns false an AuthorizationException will thrown on before execution.

In any task you can access to the current logged user with $this->user() or, if you want, you can pass a user object by doing:

4. Recover response

By default, each task is executed without returning any value. So if you want to recover the result of a task you must call the result() method.

Generate IDE Help

In order to make more easy to write and use your task you can generate a _ide_helper_tasks.php file automatically with the artisan task:ide-help command.

Update config

If you want, you can publish the package config to customize, for example, where do you want you task to be store at:

Credits


All versions of laravel-task with dependencies

PHP Build Version
Package Version
Requires php Version >=8.0
illuminate/support Version ^6.0|^7.0|^8.0
composer/composer Version ^2.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 victor-falcon/laravel-task contains the following files

Loading the files please wait ....