Download the PHP package wendelladriel/laravel-hut without Composer

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

Laravel Hut 🛖

A collection of Helpers and Utilities for your Laravel application

Installation

Run your migrations since this package provides a migration for a table called change_logs that will be explained below.

Usage

This package provides a lot of classes that can be useful for a lot of projects created with Laravel. I created this package because I use a lot of these Helpers and Utilities in the projects I work on, so I hope it can be useful for someone out there as well.

Exceptions

This package provides the class WendellAdriel\LaravelHut\Exceptions\ApiHandler that you can use and/or extend. This class can be used if you're creating an API. It will render all the errors in JSON format.

You can extend it in your App\Exceptions\Handler:

The ApiHandler can also send custom error messages using custom exceptions, you just need to implement the WendellAdriel\LaravelHut\Exceptions\AppExceptionInterface. Example:

When throwing this exception in the code the ApiHandler will return a response with the given message and HTTP code.

If you have your APP_DEBUG set to true, it will also send debug information when throwing an error.

HTTP

API Controller

This package provides the class WendellAdriel\LaravelHut\Http\ApiController that you can extend. Instead of extending from Laravel base controller, extend this Controller to get access to these methods:

Requests and DTOs

This package provides the class WendellAdriel\LaravelHut\Http\BaseRequest that you can extend. Instead of extending from Illuminate\Foundation\Http\FormRequest. This class is used so you can use the DTO pattern when sending data from your Controllers to other application layer like Services or Repositories.

This package also provides the class WendellAdriel\LaravelHut\Support\DTOs\BaseDTO that you can extend to create your own DTOs.

This package also provides a Request + DTO for tables that have basic features like pagination, search and sort that you can use and/or extend. Check the classes: WendellAdriel\LaravelHut\Http\CommonTableRequest and WendellAdriel\LaravelHut\Support\DTOs\CommonTableDTO.

This package also provides a Request + DTO for tables with the basic features above plus date range filters that you can use and/or extend. Check the classes: WendellAdriel\LaravelHut\Http\DateRangeRequestand WendellAdriel\LaravelHut\Support\DTOs\DateRangeDTO`.

Models

This package provides the class WendellAdriel\LaravelHut\Models\BaseModel that you can extend. Instead of extending from Illuminate\Database\Eloquent\Model. This can be used to track changes made in the DB that will be logged in a table called change_logs. Check the class WendellAdriel\LaravelHut\Models\ChangeLog and the trait WendellAdriel\LaravelHut\Models\Traits\LogChanges.

This package also provides the trait WendellAdriel\LaravelHut\Models\Traits\HasUuid that can be used to add a UUID field in your models.

Support

Formatter

This package provides the class WendellAdriel\LaravelHut\Support\Formatter that you can use to format data like integers, floats, monetary values, dates and also provides some generic and useful constants to use in the code to avoid using hardcoded strings.

Paginator

This package provides the class WendellAdriel\LaravelHut\Support\Paginator that you can use to manually paginate Collections.

SlackClient

This package provides the class WendellAdriel\LaravelHut\Support\SlackClient that you can use to send notifications to Slack. First you need to add the configuration below into your config/services file and set the ENV values needed in your .env file:

After that you can already use the sendNotification method:

Credits

Contributing

All PRs are welcome.

For major changes, please open an issue first describing what you want to add/change.


All versions of laravel-hut with dependencies

PHP Build Version
Package Version
Requires php Version ^8.0
ext-curl Version *
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 wendelladriel/laravel-hut contains the following files

Loading the files please wait ....