Download the PHP package actb/laravel-form-helpers without Composer

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

Laravel Validatie Helper

A set of blade directives that automatically fill forms using the old input or an Eloquent model, it also helps you to display validation error messages in a clean and easy way.

Table of contents

Example

See how easy is to do cool stuff with these directives, for example if you are using Bootstrap for your markup, you can do something like this:

And in the case of the user is redirected back with errors, the result will be:

¡It's awesame!

Installation

Install with composer, just run the command:

Then add the service provider to your config/app.php file:

That's all.

Configuration

Optionally you can publish the configuration file with this command:

php artisan vendor:publish --provider=ActivismeBE\FormHelper\FormServiceProvider

After that you can edit the config/form-helpers.php file.

NOTE: This step is only needed when your app is below version 5.5

Usage

@form

@form([ Model $model = null ])

Use the optional @form directive to bind a model to your form.
Ignore this directive if you just want the old input binding and no the model binding.

@input

@input(string $attribute [, string $default = null ])

Use the @input directive to assign the value to an input field:

This will result in the following markup:

@text

@text(string $attribute [, string $default = null ])

Use the @text directive to assign the value to a textarea field:

This will result in the following markup:

@checkbox

@checkbox(string $attribute [, mixed $value = 1 [, boolean $checked = false ]])

Use the @checkbox to set the value and the state of a checkbox:

This will result in the following markup:

@radio

@radio(string $attribute [, mixed $value = 1 [, boolean $checked = false ]])

The @radio directive is used in the same way as @checkbox directive, in fact is just an alias:

This will result in the following markup:

@options

@options(array $options, string $attribute [, mixed $default = null [, string $placeholder = null ]])

Use the @options directive to display a list of options for a select field.

Note: It also works with select multiple fields when the model's attribute, old input or $default value is an array.

Let's say we pass an array named $cardTypes to the view and use it with the @options directive:

This will result in the following markup:

Of course you can set a default selected option:

And the result will be:

Also you can define a placeholder option:

The result will be:

@error

@error(string $attribute [, string $template = null ])

Use the @error directive to display a validation error message, this directive will check for you if the error exists or not.

Then when the user is redirected back with errors, the result will be:

Note that the @error directive is Bootstrap friendly by default, but you can define a custom template inline or in the config file:

And the result will be:

See how easy is to do cool stuff with @error directive, for example if you are using Bootstrap for your markup, you can do something like this:

And in the case the user is redirected back with errors, the result will be:

Extending PhpStorm

For letting PhpStorm use the custom blade directives of this package. Following the following steps. And add what u need.

  1. In PhpStorm open Preferences, and navigate to Languages and Frameworks -> PHP -> Blade (File | Settings | Languages & Frameworks | PHP | Blade)
  2. Uncheck "Use default settings", then click on the Directives tab.
  3. Add the follwoing new directives for the validation-helpers package:


name has parameter Prefix Suffix
@form YES ``
@input YES ``
@text YES ``
@checkbox YES ``
@radio YES ``
@options YES ``
@error YES ``

All versions of laravel-form-helpers with dependencies

PHP Build Version
Package Version
Requires php Version >=7.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 actb/laravel-form-helpers contains the following files

Loading the files please wait ....