Download the PHP package eren/laravel-commands without Composer
On this page you can find all versions of the php package eren/laravel-commands. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download eren/laravel-commands
More information about eren/laravel-commands
Files in eren/laravel-commands
Package laravel-commands
Short Description Laravel all custom commands for daily development
License MIT
Informations about the package laravel-commands
Laravel Commands Package
This Laravel package provides custom Artisan commands to simplify common tasks, such as creating symbolic links, deleting files, and generating Contracts and Responses with service provider bindings.
Installation
-
Install the package via Composer:
- (Optional) Publish the package configuration file:
Available Commands
1. storage:link-custom
Create a symbolic link from public/storage
to storage/app/public
. If the link already exists, it will be skipped. Additionally, it creates an uploads
folder if it doesn’t exist.
Usage
Behavior
- Creates a symbolic link:
public/storage
→storage/app/public
. - Creates an
uploads
folder instorage/app
if it doesn’t exist.
2. files:delete-all
Delete all files from a specified directory. If no path is provided, it defaults to storage/app/uploads
.
Usage
Examples
-
Delete files from the default
uploads
folder: - Delete files from a custom path:
Behavior
- Deletes all files in the specified directory.
- If no path is provided, it defaults to
storage/app/uploads
.
3. make:contract-response
Generate a Contract and Response class, and bind them in a service provider.
Usage
Examples
-
Generate
AuthContract
andAuthResponse
: - Specify a custom service provider:
Behavior
- Creates a Contract class in
app/Http/Contracts/{Name}Contract.php
. - Creates a Response class in
app/Http/Responses/{Name}Response.php
. - Binds the Contract and Response in the specified service provider (default:
HomeController1Provider
). - If the service provider doesn’t exist, it will be created automatically.
Configuration
You can customize the behavior of the package by publishing the configuration file:
-
Publish the configuration file:
- Update the configuration file located at
config/laravel-commands.php
.
Testing
To run the package’s tests, use the following command:
or
Contributing
Contributions are welcome! Please follow these steps:
- Fork the repository.
- Create a new branch for your feature or bugfix.
- Submit a pull request.
License
This package is open-source software licensed under the MIT license.
Support
If you encounter any issues or have questions, please open an issue on the GitHub repository.