Download the PHP package 64robots/webforms without Composer

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

Backend for 64 Robots webforms

Latest Version on Packagist GitHub Tests Action Status Total Downloads

Package to rapidly create custom forms. This package provides you an easy way to start the backend for an SPA Form. You could create forms, form steps and questions. Your users could respond to these forms. Made by 64 Robots.

Installation

You can install the package via composer:

You can publish and run the migrations with:

You can publish the config file with:

This is the contents of the published webforms.php config file:

Usage

1 - Add Routes

At the moment, the package doesn't work with anonymous users. Please, add that to your routes file under an auth middleware:

If you want routes to create Forms, FormSteps and Questions, add that under the appropriate middleware in your routes file:

2 - Add HasWebForms trait in your user entity.

3 - Create Seeders for Form, FormSteps and Question.

Example

Let's start a new form to collect info about coffee in your app:

We will add in routes/api.php:

We will also add in routes/api_admin.php:

The next step is to add a new Form. Just create a new Seeder.

Now in the Seeder file database/seeders/CoffeeSeeder we'll include the creation of the form, form steps and questions.

Let's start with the form creation:

Once we have the form we'll need to add, at least, a form step:

Then we can add questions to this step:

Add now a new step to collect some personal info. We'll encrypt that info in the database:

Then add the questions:

Once we have that, we can add the questions steps to users:

If we want to add all the formSteps to the users we can also use:

When the users ask for the forms they will get only the forms they had steps on it. We need to do an authenticated request to:

/webforms/forms

We'll get something like:

Let's say the form is the one with id 1. Then we can make another one to:

/webforms/form-steps?form=1

We'll obtain all the forms steps info:

For each form step we need to ask for the questions using:

/webforms/questions?form_step=1

We need to do the same with the personal info step:

/webforms/questions?form_step=2

When a user needs to send an answer to a question, we will need to make a POST request to:

/webforms/answers

With the following payload:

We will receive the question but now with an answer on it:

Testing

Copy phpunit.xml.dist to phpunit.xml

Adapt or change the values in the next portion of code to your preferences:

Create the database, in this case r64_webforms.

Execute:

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.

Credits

License

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

Acknowledgments

Thanks to Spatie for the Package Skeleton Laravel.


All versions of webforms with dependencies

PHP Build Version
Package Version
Requires illuminate/broadcasting Version ^7.0|^8.0
illuminate/database Version ^7.0|^8.0
illuminate/http Version ^7.0|^8.0
illuminate/queue Version ^7.0|^8.0
illuminate/support Version ^7.0|^8.0
illuminate/validation Version ^7.0|^8.0
php Version ^7.4
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 64robots/webforms contains the following files

Loading the files please wait ...