Download the PHP package ghebby/laravel-hfm without Composer

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

draft

UNSTABLE

A simple Laravel packge to help DRY your code

Latest Version on Packagist GitHub Tests Action Status Total Downloads

This packe aims to reduce verbose and repetiteve code in the application by generatinc it at runtime starting from a simple Array declaration in the Model.

This is an opinionated approach, so make sure it suits your project guide lines before using it.

Installation

  1. This package publishes a config/laravel-hfm.php file. If you already have a file by that name, you must rename or remove it.
  2. You can install the package via composer:

  3. Optional: The service provider will automatically get registered. Or you may manually add the service provider in your config/app.php file:

  4. You should publish the config/laravel-hfm.php config file with:

  5. If you want to customize the views for the UI helper functions, then run

to bublish them in resources/views/vendor/laravel-hfm/

Usage

Defining a Field Map on the Model may have a lot of benifits in terms of code duplication, making it easier and faster to develop trivil parts of the application.

Let's see a short example. Model name: company Model fileds:

Tipical approach

In a tipical situation in the model Company.php we will have something like this

On the CompanyController we will have something like

On the view side a tipical situation may be

I hope it's easy to see the problem. If for some reason a constraint is change we will need to fix the code in a few places:

Using this package

The package provides:

Let's how the code changes when sing this package:

Model Company.php

On controller

On the view side

With this approach we centralized the source of truth in the application, if we change the label for the filed name in Company.php it will propagete to all the views that relies on the _standardForm helper function.

If in the Field Map on the filed fiscal_code the attribute required is set to FALSE, the change will immediately affect the store and update methods in Controller and also the required attribute on the input field.

Adding removing fields

Adding or removing a field to an Model entity, is just the mater of adding o removing a line in the getFieldMap() of the model.

Testing

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

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


All versions of laravel-hfm with dependencies

PHP Build Version
Package Version
Requires php Version ^7.2
illuminate/contracts Version ^7.2
laravelcollective/html Version ^6.1
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 ghebby/laravel-hfm contains the following files

Loading the files please wait ....