Download the PHP package canvural/laravel-e2e-routes without Composer

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

Set of routes to manage your data in E2E tests

Latest Version on Packagist Run tests Total Downloads

This package provides a set of rules to help you manage your database state when running your E2E tests using Eloquent model factories.

Installation

You can install the package via composer:

If you wish to customize some options, you may publish the config file with

This is the published config files contents. Here you can customize the route prefix which will be added to all the provided routes.Route names, and the namespace that all your models live in.

Usage

For obvious reasons this package does not exposes the routes in the production environment. In other environments you can use the routes.

Reset database (GET e2e/reset)

You can use the http://localhost/e2e/reset route to reset your database. Under the hood this route makes a call to migrate:refresh Artisan command. Also if you wish to seed your database after migrating, you may call the route with seed query string attached. http://localhost/e2e/reset?seed

Creating models (POST e2e/{modelName})

This package uses your Eloquent model factories to create the data.

So, for example if you have a model called User and the associated UserFactory you can make a POST request to the http://localhost/e2e/user endpoint to create a User in your database. Also, newly created model will be returned as a response from the endpoint.

You can substitute user in the above example with any model you want. If the given model is not found, a 404 response will be returned. Also, if the model exists but a factory for that model does not exists a 404 response will be returned.

Overwriting attributes

Like the factory method, this package also provides you an ability to overwrite models attributes. Simply add a body to your request like so:

This will overwrite the name attribute.

Creating many models

You can specify how many model you want to create with

This will return an array containing 3 models.

Using states

If you defined some states for your factories, you can use them when you are making the request.

This will create your model with the withAddress state. If the given state is not endpoint will return a 404 response.

All together

You can also combine the options like this.

Testing

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.


All versions of laravel-e2e-routes with dependencies

PHP Build Version
Package Version
Requires php Version ^7.2
illuminate/database Version ^6.0 || ^7.0
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 canvural/laravel-e2e-routes contains the following files

Loading the files please wait ....