Download the PHP package panchodp/laravel-actions without Composer

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

Php Total Downloads Latest Stable Version License Tests

Laravel Actions

Make your Laravel actions classes fast and in a simple way.

Compatibility

Laravel PHP Package
11.x 8.3+ ^2.x
12.x 8.3+ ^2.x
13.x 8.3+ ^2.x

Installation

You can install the package via composer:

Configuration

Publish the configuration file:

This creates config/laravel-actions.php:

Customizing Stubs

You can publish and edit the stub templates used to generate action classes:

This publishes the 4 stubs to resources/stubs/vendor/laravel-actions/. Once published, the package will use your custom stubs instead of the defaults. You can customize each stub independently — any stub not found in your published directory will fall back to the package default.

Method Types

By default, Laravel Actions generates instance methods for better flexibility and dependency injection support. However, you can create static methods when needed for simpler usage.

Instance Methods (Default)

Static Methods

Usage

Interactive Mode

Run make:action without arguments to launch an interactive wizard:

Creating Actions

To create an action class, use the make:action command. You can specify the full path using forward slashes / or backslashes \ (Laravel-style syntax):

Basic action:

This creates a new action class in the app/Actions directory.

Action in a subfolder:

This creates the action in app/Actions/User/CreateAccount.php.

Action in nested subfolders:

This creates the action in app/Actions/User/Auth/Login.php.

Using backslashes (alternative syntax):

This creates the action in app/Actions/Admin/DeletePost.php.

The generated class will have a handle method where you can implement your action logic:

Flags

Flag Shortcut Description
--transaction -t Wraps the action body in a DB::transaction
--user -u Injects User $user into the method
--request -r Generates a Request class and injects it into the method
--static -s Generates a static method instead of an instance method
--force Overwrites the action if it already exists

Shortcuts can be combined in any order, just like make:model:

Example output for --turs:

Other Userfull Commands:

You can show the Actions directory tree in the terminal with the following command:

This will display the structure of the app/Actions or the base directory specified in the config file, showing all action classes and their subdirectories.

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT


All versions of laravel-actions with dependencies

PHP Build Version
Package Version
Requires php Version ^8.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 panchodp/laravel-actions contains the following files

Loading the files please wait ...