All Projects → James-N-M → faker-pokemon

James-N-M / faker-pokemon

Licence: MIT license
A Faker provider that generates fake pokemon data for you! 🍬

Programming Languages

PHP
23972 projects - #3 most used programming language

Projects that are alternatives of or similar to faker-pokemon

pakdemon
A simple react web app that will show pokemon and their info
Stars: ✭ 17 (+21.43%)
Mutual labels:  pokemon
mkm-sdk
Python SDK for Magickartenmarkt API
Stars: ✭ 33 (+135.71%)
Mutual labels:  pokemon
palettetown
Pokemon themed colour schemes for R.
Stars: ✭ 56 (+300%)
Mutual labels:  pokemon
online-randomizer
Fresh new playthroughs!
Stars: ✭ 23 (+64.29%)
Mutual labels:  pokemon
graphql-pokemon
Extensive Pokémon GraphQL API
Stars: ✭ 81 (+478.57%)
Mutual labels:  pokemon
Pokebot
Pokémon for Discord
Stars: ✭ 15 (+7.14%)
Mutual labels:  pokemon
pokenode-ts
A lightweight Node.js wrapper for the PokéAPI with built-in types.
Stars: ✭ 102 (+628.57%)
Mutual labels:  pokemon
Pokedex
Pokedex is a robust Discord bot that mimics the iconic Pokedex from the Pokemon games and show. It's loaded with features to help players of all skill levels to learn and better enjoy Pokemon! The goal of Pokedex is to provide users with as much data about the Pokemon games as they desire conveniently and with minimal effort.
Stars: ✭ 18 (+28.57%)
Mutual labels:  pokemon
jedi-faker
Faker extension for Star Wars junkie
Stars: ✭ 15 (+7.14%)
Mutual labels:  faker-provider
showdown-battle-bot
Socket Battle Bot for Pokemon Showdown (http://pokemonshowdown.com/)
Stars: ✭ 19 (+35.71%)
Mutual labels:  pokemon
pokemongo-json-pokedex
Transform the data from the Pokemon GO master files to a better readable & processable JSON file.
Stars: ✭ 56 (+300%)
Mutual labels:  pokemon
pokemon-icons
Fan art inspired by Pokémon
Stars: ✭ 85 (+507.14%)
Mutual labels:  pokemon
ps
Modular Pokémon Showdown
Stars: ✭ 38 (+171.43%)
Mutual labels:  pokemon
stylegan-pokemon
Generating Pokemon cards using a mixture of StyleGAN and RNN to create beautiful & vibrant cards ready for battle!
Stars: ✭ 47 (+235.71%)
Mutual labels:  pokemon
pokeai
Develop ultimate AI Pokémon trainer
Stars: ✭ 18 (+28.57%)
Mutual labels:  pokemon
angular2-pokedex
A Pokedex built on Angular with AoT, Tree Shaking, Rollup and TypeScript
Stars: ✭ 34 (+142.86%)
Mutual labels:  pokemon
gracidea
🌺 A Pokémon 2D live map gathering all regions, including wandering pokémons and characters and animated tiles!
Stars: ✭ 163 (+1064.29%)
Mutual labels:  pokemon
Pokedex
Pokedex developed with React Native, consuming the public API "Pokeapi".
Stars: ✭ 18 (+28.57%)
Mutual labels:  pokemon
react-reactions
😲 Create custom reaction pickers and counters or use your favorites!
Stars: ✭ 34 (+142.86%)
Mutual labels:  pokemon
PogoMap
PoGo Map using React Native
Stars: ✭ 59 (+321.43%)
Mutual labels:  pokemon



Faker extension for Pokemon Fans.

Installation

composer require james-n-m/faker-pokemon

Basic usage

Laravel Factory

$factory->define(UserPokemon::class, function (Faker $faker) {

    $faker->addProvider(new \Faker\Provider\FakerPokemon($faker));

    return [
        ...
    ];

$faker->pokemonName;            // Pikachu
$faker->pokemonCharacterName;   // Ash Ketchum
$faker->pokemonType;            // Fire
$faker->pokemonLocation;        // Pallet Town
$faker->pokemonMove;            // Quick Attack
$faker->pokemonQuote('oak')     // Your very own tale of grand adventure is about to unfold
$faker->pokeball()              // Safari Ball
$faker->item()                  // Rare Candy
$faker->keyItem()               // Pokedex 

To then use this factory within a seeder file. First, create a seeder file:

php artisan make:seeder PokemonTableSeeder

Open the seeder file and add the following. Use the factory that we created above for the App\UserPokemon model:

<?php

use Illuminate\Database\Seeder;

class PokemonTableSeeder extends Seeder
{
    public $create_count = 5;
    
    public function run()
    {
        factory(App\UserPokemon::class, $this->create_count)->create();
    }
}

Finally, run the seeder:

php artisan db:seed --class=PokemonTableSeeder
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].