Download the PHP package matt-daneshvar/laravel-survey without Composer

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

Laravel Survey

Build Status GitHub

Create and manage surveys within your Laravel app. alt text

This video walks through installing this package and creating a basic survey.

Installation

Require the package using composer.

Publish the package migrations.

Run the migrations to create all the required tables.

Usage

Creating a Survey

Creating a new Survey is easy! You can build your survey fluently just like how you create all your Eloquent models in your app.

See the list of available question types.

Creating Multiple Sections

You may also park your questions under multiple sections.

Creating an Entry

From an Array

The Entry model comes with a fromArray function.
This is especially useful when you're creating an entry from a form submission.

By a Specific User

You may fluently specify the participant using the by() function.

Setting Constraints

When creating your survey, you may set some constraints to be enforced every time a new Entry is being created.

Allowing Guest Entries

By default, Entry models require a participant_id when being created. If you wish to change this behaviour and accept guest entries, set the accept-guest-entries option on your Survey model.

Adjusting Entries Per Participant Limit

All Survey models default to accept only 1 entry per unique participant. You may adjust the limit-per-participant option on your Survey model or set it to -1 to remove this limit altogether.

Note that this setting will be ignored if the accept-guest-entries option is activated.

Validation

Defining Validation Rules

Add in a rules attribute when you're creating your Question to specify the validation logic for the answers being received.

Note that as opposed to the survey constraints, the question validators are not automatically triggered during the entry creation process. To validate the answers, you should manually run the validation in your controller (see below)

Validating Submissions

Validate user's input against the entire rule set of your Survey using Laravel's built in validator.

Views

This package comes with boilerplate Bootstrap 4.0 views to display the surveys and some basic question types. These views are meant to serve as examples, and may not be sufficient for your final use case. To display a survey in a card, include the survey partial in your views:

Question Types

These are the question types included out of the box:

Customizing the Views

To customize the boilerplate views shipped with this package run package:publish with the views tag.

This will create a new vendor/survey directory where you can fully customize the survey views to your liking.

Creating New Question Types

Once you publish the views that come with this package, you can add your own custom question types by implementing new templates for them.

To implement a new custom-select type, for example, you should implement a new template under:

License

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


All versions of laravel-survey with dependencies

PHP Build Version
Package Version
Requires php Version ^7.3|^7.4|^8.0|^8.1
illuminate/database Version ^6.0|^7.0|^8.0|^9.0

The package matt-daneshvar/laravel-survey contains the following files

Loading the files please wait ....