Download the PHP package kevinorriss/contactform without Composer

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

ContactForm

A simple contact form where a user enters their email address, message and passes a Google reCAPTCHA robot test. The message is then sent to the configured email address.

How it works

This library adds contact form functionality to your Laravel application. Two new routes (get and post) are set up under the "contact" url. A view needs to be set up, but this library provides a partial containing the form HTML, or you may create your own view with application specific layout and CSS styles.

Installation

  1. Add ContactForm to your composer.json file under require:

    "kevinorriss\contactform": "1.1.*"

  2. Add the ContactFormServiceProvider to your app.php file:

    KevinOrriss\ContactForm\ContactFormServiceProvider::class,

  3. Run composer update

Usage

Google reCAPTCHA

This library makes use of Google's reCAPTCHA to help stop the contact form being spammed. In order to use this follow these steps:

  1. Follow the Usage section from Google's reCAPTCHA READMME file, to generate a site key and secret for your application.

  2. Add your reCAPTCHA secret and key to your application environment file, for example:

Email configuration

You must first set up your mail driver, please refer to the Laravel documentation for this.

  1. Add the following to your application's environment file

This is the email address that the users message will be sent to.

  1. Add these optional settings to your environment file

These allow you to override the subject of the email and also the flash message that the users sees when the email is sent successfully.

Example

A simple view

To get going, create a file named contact.blade.php in the resources/views folder and add the following:

This form uses Bootstrap for style which is included in the contactform::stylesheet partial.

When including the form itself, you can provide an optional array with a heading key which overrides the panel heading (defaults to "Contact Form").

By default, the contact form controller will look for contact.blade.php, you can override this by creating an entry in your application's environment file such as:

CONTACT_FORM_VIEW="mycontactformview"

You will then need to name your view file to match this.

Javascript

The contactform::javascript partial includes three extra partials, one each for:

  1. jQuery (contactform::jquery)
  2. Bootstrap (contactform::bootstrap)
  3. reCAPTCHA (contactform::recaptcha)

If your template already includes jQuery or bootstrap, or you simply do not want to use bootstrap then you can replace the contactform::javascript partial and use only the ones you need.

Authors

See also the list of contributors who participated in this project.

License

This project is licensed under the MIT License - see the LICENSE file for details


All versions of contactform with dependencies

PHP Build Version
Package Version
Requires laravel/framework Version 5.4.*
google/recaptcha Version 1.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 kevinorriss/contactform contains the following files

Loading the files please wait ....