Faker Questions
Ad
Cannot write to directory using Faker image
I want to setup a test data through faker using a factory. but when i try to add images to the model "images" =>
Faker get streetAddress throwing ErrorException
I'm building a laravel application, and i've created a fakerserviceprovider to populate factories for testing and local dev.
Factory same ID for a column, auto-incremental, Laravel
I try to give to a column the id of that row, witch is autoincremental. right now are random values . //from factory
Laravel "Undefined offset: 4" exception when working with faker , how to remove the offset?
public function run(){ $types = ['travelling','camping','restaurants','food']; for ($i = 0; $i < 50; $i++){
Issues with Database Seeder and Laravel
I have 3 tables, the schema is below. employees, employeedb.php $factory->define(employee::class,
InvalidArgumentException: Unable to locate factory with name [default] - laravel, faker, phpunit
Since i am developing package, so i put my factories to custom path like this: -- app -- packages -----mockizart -------blog
Clone model field created with Django faker inside DjangoModelFactory
I use django faker to generate ramdom data and it works great. i need to check in a model that two fields responsible and
how to add double quotes while printing in json? Currently i am getting single quotes
Code import json from faker import faker import random from random import randint fake = faker('en_us') for _ in range(1):
How to generate random json data everytime using python?
The following code generates random json data: import json my_dict = {'foo': 42, 'bar': {'baz': "hello", 'poo': 124.2}}
Fake a locale field for model testing
I simply have a collection of languages in a model like this: from
Ad
php faker and laravel factorties unique date for each new row
I am wanting to create 24 rows in a database table each row needs a unique date in it, between the 1/12/2019 (1st december) & 24/12/2019 (24
Change Faker Localization in Lumen
In lumen 5.8, we can make factories in database/factories. faker help us to make dummy data and insert them to database. but
Images created with factory faker get deleted when stored in storage/public/images folder
I'm trying to populate my database with fake images but when faker save it on my images folder after one second it got deleted and on my database
Laravel 5.8 - Seeding a ManyToOne relationship
Evening everyone, i'm looking forward to seed my post table within my category table through a foreign
Laravel - How to set faker locale in phpunit tests?
I'm able to change faker locale in my application in config/app.php to pt_br changing 'faker_locale'
How to remove an item from an array using faker and lodash?
I'm making a datatable with random user information using faker.js and lodash. i want to remove a user with a button. every user has a remove
node.js getting module_not_found faker
I am new to node.js. i want to create mysql connection and insert data into the database and access it later. i installed, node.js, then using
Faker not seeding db properly
I am trying to seed my db with faker. everything gets filled out properly except images. they exist in my storage folders but are written in
Laravel Model seeding in factory with column related to column on same table
I'm seeding some fake data in laravel i have table schema::create('categories', function (blueprint $table) {
Laravel, faker: Call to undefinded function
Call to undefined function sentence() when calling sentence() from faker in laravel 5.8. i'm guesing it's an import issue but i
How to seed a pivot database table with faker values in extra fields in Laravel?
I want to seed my database with faker values. i have 4 database tables: user, order, products and order_products. the last table is a pivot table
Ad
How to create a fake event with faker dateTimeBetween?
I am trying to create a factory in laravel that will fake an event created on a calendar. the event has a start datetime and
How to generate fake data from array in special order
I would like to generate 48 rows (every year with 12 month no repeat) of fake data records in the special order like this...
Adding Faker data to Laravel Database
I am creating this application in laravel. i have 3 tables, employees, departments and salaries the employees table has columns id, name,
Create database seeder with same random value in a table row with Laravel database seeder
I am trying to create a table and populate the table with the following fields with the help of database seeder: option a
Laravel: seeding a nested set table with Faker
I'm using kalnoy/nestedset and trying to seed my comments table using faker, but get "array to string conversion" error. the comment table
Create a datetime by faker laravel with format dd-mm-yyyy minute hour second, for example : 26/01/2022 20:52:23
'from' => $this->faker->datetime($max = 'now', $timezone = null), 'to' => $this->faker->datetime($max = 'now', $timezone
Laravel faking file in the factory not working
I am developing a web application using laravel. i am unit testing my application that involves file operation. have a look at my scenario
PHP Cut String On Character Limit
I'm creating a blog that uses a faker factory to generate demo data. i have a post
How to populate a nested category table with Faker in Laravel?
I want to put the subcategory id into quote table but it seems too complicated! this is my try, obviously it ended up with a loop. here is
Does laravel database seeding have a limit?
I have a program that in total will insert approx 500000 database entries in a year. i am trying to test it to make sure that everything works
python hypothesis unit test using faker
I have a problem with python unit test by using hypothesis additional package,
Ad
Using PHP Faker in Laravel to generate "unique with" entry when seeding a database using a factory
So similar to the unique with validation rule (see:
create multiple comments for each user with faker php library model factories
I want to generate fake data with faker php library but i want for example create 3 comments for each user. how should i do this? i do
Is it possible to use a model in it's own factory in a Laravel project?
My team is building a project using laravel for the server code. early on we were going to use models to manage some of the images used in the
lumen generate fake data with faker from given array
I want to generate fake data for user with diffrent role , my file is below, use illuminatedatabaseseeder; use
Model constraints are not working with Faker ( Django )
I am just starting to use pytest and faker for testing while trying to create text for a field in testing db the
Laravel Seeding with Faker DateTime
Okay so i am developing an application which receives some real time sensor readings from a device and stores it in a table inside the database.
Call to undefined method Directory::create() when seeding in Laravel
I am trying to seed a database in laravel. i am using faker to seed the database but i am getting the following error. call to
Laravel's db:seed is not inserting any record in database
I am using laravel 5.6 and database seeder is not working. i am trying to insert 100 new data in my database but nothing is being inserted. no
Testing a laravel controller - Faking a IlluminateHttpRequest
I have a controller which is getting an instance of illuminatehttp
equest injected through the constructor. now i need to
laravel testing with faker big text
I'm testing a form where user must introduce some text between let's say 100 and 500 characters. i tried to emulate the user input:
Laravel 5.2 seed specific data array
I am trying to seed my database with some specific content to get my application started. i am aware of faker and how to use it (which i
Ad
Blog Categories
Ad