Download the PHP package aracademia/lightning without Composer

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

Lightning Laravel Forms

=========

Create Laravel forms with a single line of code

Installation ( using composer )

  1. Add the code below to your composer.json file

  1. Run Composer update in your terminal

  2. Add the service provider below to app/config/app.php under the providers array

  3. Publish the config file by running the command below in your terminal. After that the config file will be placed under app/config/packages/aracademia/lightning

How to use the package

Let's use an example to see how easy this package is. We are going to create a contact us form. open a view file, make sure it has .blade.php extension, then enter the following code

That's it. These three words will create a contact us form with the following fields: First Name, Last Name, Email, Message, Submit button using bootstrap styling, and the post url will be the current page url by default.

If you would like to create a login form, then all you have to do is change the name contact to login

That will create a login form with email and password fields.

Ok, that's cool... but wait a minute! what if I want to add other fields or maybe edit the existing fields? what if I want to add attributes to my fields or override the class? how about changing the form action url?*

Don't worry, we got your back. This package is very flexible and customizable.

Edit the config file

Let's first start by editing the config file. Let's say we want to add a new form that allows the user to add their personal information to their profile.

  1. Go to the config file, and add another nested array under the forms array with the form name and the fields

  2. Go to your view where you want to place the form and call

You can add more fields or remove some from the existing forms in the config file to suit your needs.

The inputTypes array in the config file show some common input field names linked to their html 5 types, that way if you don't want to specify the type of an input manually, this array will set the correct input types to the name. For example, the email input name will have a type of email automatically instead of the default text You can add more names to the array, however keep in mind that the type of the name needs to be compatible with laravel Form facade. In addition, we can also override the type of any field. check the Inline Customization section below for more information

The rest of the config file are just bootstrap classes and div wrapper. You can change those if you are not using bootstrap.

Inline Customization

The create method for the lightning form accepts 4 arguments Lightning::create(1,[2],[3],[4])

  1. First argument is a string. It is the name of the form we want to create. ex: login, register, contact...

  2. This argument uses the laravel form open argument. we can pass url, route, action, method...etc ex:

  3. Here we can add or edit fields to the form and their attributes. make sure to separate the attribute name and value with a colon : and a comma , between the attributes. ex:

  4. Last argument is an array for the submit button. ex:

Take a look at this example. We are going to customize the registration form

The code above will create a registration form with the default fields in the config file in addition to two new fields (age, mobile). if you want to override an existing field attributes, simply pass the name of the field and the attributes you want to add or override.


All versions of lightning with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4.0
illuminate/support Version 4.2.*
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 aracademia/lightning contains the following files

Loading the files please wait ....