Download the PHP package cupidontech/multi-faker without Composer

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

multi-faker

Package for generating Faker by country

Version : 1.0.0 (in version 1.0.0 , currently being tested and developed) GitHub Release

Table of Contents

Installation

Install the Package by the following command,

composer require cupidontech/multi-faker

If you encounter an error during package installation, just type this command:

composer require cupidontech/multi-faker --ignore-platform-reqs

Add Provider

Add the provider to your config/app into provider section if using lower version of laravel,

Cupidontech\MultiFaker\MultiFakerServiceProvider::class,

Add the country configuration to your .env file

MULTI_FAKER_DEFAULT_COUNTRY= {Country}

e.g = MULTI_FAKER_DEFAULT_COUNTRY=Cameroon
e.g = MULTI_FAKER_DEFAULT_COUNTRY=Nigeria
e.g = MULTI_FAKER_DEFAULT_COUNTRY=France
e.g = MULTI_FAKER_DEFAULT_COUNTRY=Canada
e.g = MULTI_FAKER_DEFAULT_COUNTRY=UnitedStates
e.g = MULTI_FAKER_DEFAULT_COUNTRY=Germany
e.g = MULTI_FAKER_DEFAULT_COUNTRY=IvoryCoast
e.g = MULTI_FAKER_DEFAULT_COUNTRY=Senegal
e.g = MULTI_FAKER_DEFAULT_COUNTRY=SouthAfrica

Basic Usage

To use this package, follow these steps:

use Cupidontech\MultiFaker\MultiFakerGenerator;

$faker = new MultiFakerGenerator();

$name = $faker->firstName();
$address = $faker->address();
$email = $faker->email();

use in a controller

<? php
namespace App\Http\Controllers;

use Cupidontech\MultiFaker\MultiFakerGenerator;

class Test extends Controller
{
    public function generateData(MultiFakerGenerator $faker)
    {
        // Example of use
        $name = $faker->last_name();
        $address = $faker->address();
        // ...
    return view('data', compact('name', 'address'));
    }
}

Make sure you add the necessary classes and import the package correctly into your Laravel application.  

Formatters

Local names

$firstName = $faker->first_name();
$lastName = $faker->last_name();

username

$username = $faker->username();

Gender

$gender = $faker->gender();

Local addresses

$address = $faker->address();

Local phone numbers

$phoneNumber = $faker->phone();

email

$email = $faker->email();

date

$date = $faker->date();

Generation of city and region names

$region = $faker->region();
$city = $faker->cities();
$city = $faker->city($region);

Location

$region = $faker->region(); 

coordinates

$coordinates = $faker->coordinates();

password

$password = $faker->password();

text

$text = $faker->text(30);

companyName

$companyName = $faker->companyName();

creditCardNumber

$creditCardNumber = $faker->creditCardNumber();

product

$product = $faker->product();

food

$food = $faker->food();

Countries supported

Cameroon , Nigeria , France , Canada , United State , Germany , IvoryCoast , Senegal , SouthAfrica

(coming soon) ... Ivory Coast ,United States , Brazil , United Kingdom , Germany , Spain , South Africa , Ghana , Ethiopia , Kenya , Morocco , Algeria , India , China , Australia

Contributions

We welcome contributions from the community. If you would like to contribute to this project, please follow these steps:

  1. Fork the project.
  2. Create a branch for your feature (git checkout -b new-feature).
  3. Make your changes and commit them (git commit -am 'Add new feature').
  4. Push the branch (git push origin new-feature).
  5. Create a pull request on GitHub.

License

This package is distributed under the [MIT] license. See LICENSE.md for details.


All versions of multi-faker with dependencies

PHP Build Version
Package Version
Requires php Version ^5.3.3 || ^7.0 || ^8.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 cupidontech/multi-faker contains the following files

Loading the files please wait ....