Skip to content

Food and Beverage names generate using fakerphp/faker

License

Notifications You must be signed in to change notification settings

TappNetwork/FakerRestaurant

 
 

Repository files navigation

FakerRestaurant

Food and Beverage names generate using fakerphp/faker

Installation

Add the FakerRestaurant library to your composer.json file:

composer require jzonta/faker-restaurant

Usage

To use this with Faker, you must add the FakerRestaurant\Restaurant class to the Faker generator:

<?php

$faker = \Faker\Factory::create();
$faker->addProvider(new \FakerRestaurant\Provider\en_US\Restaurant($faker));

// Generator
$faker->foodName();      // A random Food Name
$faker->beverageName();  // A random Beverage Name
$faker->dairyName();  // A random Dairy Name
$faker->vegetableName();  // A random Vegetable Name
$faker->fruitName();  // A random Fruit Name
$faker->meatName();  // A random Meat Name
$faker->sauceName();  // A random Sauce Name

Language specific formatters

ar_SA -> \FakerRestaurant\Provider\ar_SA\Restaurant
de_AT -> \FakerRestaurant\Provider\de_AT\Restaurant
de_DE -> \FakerRestaurant\Provider\de_DE\Restaurant
en_US -> \FakerRestaurant\Provider\en_US\Restaurant
es_PE -> \FakerRestaurant\Provider\es_PE\Restaurant 
fa_IR -> \FakerRestaurant\Provider\fa_IR\Restaurant
fr_FR -> \FakerRestaurant\Provider\fr_FR\Restaurant
id_ID -> \FakerRestaurant\Provider\id_ID\Restaurant
it_IT -> \FakerRestaurant\Provider\it_IT\Restaurant
ja_JP -> \FakerRestaurant\Provider\ja_JP\Restaurant
lt_LT -> \FakerRestaurant\Provider\lt_LT\Restaurant
pt_BR -> \FakerRestaurant\Provider\pt_BR\Restaurant
sv_SE -> \FakerRestaurant\Provider\sv_SE\Restaurant
tr_TR -> \FakerRestaurant\Provider\tr_TR\Restaurant
vi_VN -> \FakerRestaurant\Provider\vi_VN\Restaurant

Development environment

If you want to contribute to the project, use the docker development environment.

To start the docker: docker-compose up -d
To access the container: docker exec -it php_faker_restaurant bash

Run composer install

Tests

Run testes in container ./vendor/bin/phpunit --testdox tests

About

Food and Beverage names generate using fakerphp/faker

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 98.8%
  • Other 1.2%