Download the PHP package coyote6/laravel-forms without Composer

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

Laravel Forms

About The Project

Laravel Forms is class based form package used to generate the html for the forms and assist with simple validation process in Laravel. This project is still in development, so documentation will be slow going.

Prerequisites

Getting Started

Install via composer:

Optional - Copy the config file to your config folder.

To Use

Basic Example

In the controller file

In Blade Template

Best Practice

For best use it is recommended to set up the form in the controller under its own private/protected method, so that it may be reused for validation.

In the controller file

Validation

Use with Livewire

In the your base app blade template, below where you call @livewireScripts, add a stack('scripts') call if you haven't already done so.

In the component (Basic Method)

In the component (Using Coyote6\LaravelForms\Livewire\Component)

In the Livewire Blade Template

In the Web Routes File -- Optional

Use with Tailwind CSS

Tailwind is now the default theming for the forms. You must already have tailwind purchased, installed, and configured.

Some non-tailwind classes are added to items automatically. These are generic class names such as .form-item, .label, .field, etc. You can shut them off in the .env file using:

Or if you published the config file, you can set default-classes to false.

If you wish to change the default tailwind classes, they are stored in the classes section of the config file. Additional styling options are set in there as well.

Theming

You can theme the forms in a couple ways.

The first which is mentioned above is to edit the config file and overriding the classes.

The other is to copy the files from the -/src/Resources/views/- directory (sorry haven't wrote the publish command yet, but will.) and move any of these files into -resources/views/- directory in your app. The package will check your directory for files and use it over the default files. Be sure to set caching to false on either your individual form/field or set the master caching to false in the config. The template naming conventions are as follows:

-resources/views/forms/{$template}--{$element_id}.blade.php- -resources/views/forms/{$template}--{$element_name}.blade.php- -resources/views/forms/{$theme}/{$template}.blade.php- -resources/views/forms/{$template}--{$theme}.blade.php- -vendor/coyote6/laravel-forms/src/resources/views/forms/{$theme}/{$template}.blade.php- -vendor/coyote6/laravel-forms/src/resources/views/forms/{$template}--{$theme}.blade.php- -resources/views/forms/{$template}.blade.php- -vendor/coyote6/laravel-forms/src/resources/views/forms/{$template}.blade.php-

You can merge your custom classes to any of the attribute variables in the templates:

To utilize a theme on certain forms, and set classes from the config method, set the theme when constructing the form.

If you just with to override the templates without setting classes from the config file, then you can call it anytime before rendering or validating.

Fields will inherit their parent's theme if it is set during the construction, or before fields are added.

Available Fields (More to come)

Button - <button>

Checkbox - <input type="checkbox">

Email - <input type="email">

Simple Email
Email w/ Confirmation

Field Group - <div>

This just wraps a group of fields. It can have a label, if desired.

File - <input type="file">

Setting Default Value, Removing Images, & Retrieving Image w/o Livewire
Single File

Note: Non-Livewire documentation may be out of date as I have not had time to test.

Multi File
Setting Default Value, Removing Images, & Retrieving Image w/ Livewire

The field will add 4 additional properties to the Livewire component. These are properties for previously uploaded files, previously uploaded files that are removed, and all files that up-to-date, and temporary access times for image previews. These properties can be accessed by adding 'PreviousUploads', 'Removed', 'All', 'TempAccessTimes' to the Livewire property. For example, if the property is set to $this->file then the values can be accessed via $this->filePreviousUploads, $this->fileRemoved, $this->fileAll, $this->fileTempAccessTimes respectively.

Note: $this->imageAll may not be updated until after the form is generated or validated.

Single File
Multi File

Hidden - <input type="hidden">

Html - <div>

Image - <input type="file">

This is the same as a file field, but is restricted to image files.

Number - <input type="number">

Password - <input type="password">

Simple Password
Password w/ Confirm

Radio Buttons - <input type="radio">

Simple Radio Button
Radio Buttons with HTML

Select - <select>

Submit Button - <button> or <input type="submit">

Rendered as a Primary/Submit <button>
Rendered as Secondary <button>
Rendered as <input type="submit">

Text - <input type="text">

Textarea - <textarea>

More fields coming in the future.


All versions of laravel-forms with dependencies

PHP Build Version
Package Version
No informations.
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 coyote6/laravel-forms contains the following files

Loading the files please wait ....