GithubHelp home page GithubHelp logo

bagisto / laravel-data-faker Goto Github PK

View Code? Open in Web Editor NEW
22.0 9.0 23.0 81 KB

Creates fake data of products and customers for testing

License: MIT License

PHP 100.00%
hacktoberfest hacktoberfest2020

laravel-data-faker's Issues

Error to create faker data

In Faker.php line 26:
syntax error, unexpected 'protected' (T_PROTECTED), expecting variable (T_VARIABLE)

Screenshot 2024-01-01 050902

categories fake data

Class Database\Factories\Webkul\Category\Models\CategoryTranslationFactory not found

Job batch doesn't exist

SQLSTATE[42S02]: Base table or view not found: 1146 Table 'bagisto.job_batches' doesn't exist
(SQL: insert into job_batches (id, name, total_jobs, pending_jobs, failed_jobs, f ailed_job_ids, options, created_at, cancelled_at, finished_at) values (97a3e995-2650-
48c4-a6a7-ef940b277a16, , 0, 0, 0, [], a:0:{}, 1667302543, ?, ?))

Error on seeding

Latest version of Bagisto v0.2.0

``
In Connection.php line 678:

SQLSTATE[HY000]: General error: 1267 Illegal mix of collations (utf8mb4_unicode_ci,IMPLICIT) and (utf8mb4_general_c
i,IMPLICIT) for operation '=' (SQL: update categories set _rgt = 26 where categories.id = 1)

In Exception.php line 18:

SQLSTATE[HY000]: General error: 1267 Illegal mix of collations (utf8mb4_unicode_ci,IMPLICIT) and (utf8mb4_general_c
i,IMPLICIT) for operation '='

In PDOStatement.php line 112:

SQLSTATE[HY000]: General error: 1267 Illegal mix of collations (utf8mb4_unicode_ci,IMPLICIT) and (utf8mb4_general_c
i,IMPLICIT) for operation '='

Update fakerphp/faker

composer require bagisto/laravel-datafaker
Using version dev-master for bagisto/laravel-datafaker
./composer.json has been updated
Running composer update bagisto/laravel-datafaker
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Root composer.json requires bagisto/laravel-datafaker dev-master -> satisfiable by bagisto/laravel-datafaker[dev-master].
    - bagisto/laravel-datafaker dev-master requires mbezhanov/faker-provider-collection ^1.2 -> satisfiable by mbezhanov/faker-provider-collection[1.2.0, 1.2.1].
    - mbezhanov/faker-provider-collection[1.2.0, ..., 1.2.1] require fzaninotto/faker ^1.6 -> satisfiable by fzaninotto/faker[v1.6.0, ..., 1.9.x-dev (alias of dev-master)].
    - fakerphp/faker v1.14.1 conflicts with fzaninotto/faker v1.9.2.
    - fakerphp/faker v1.14.1 conflicts with fzaninotto/faker v1.9.1.
    - fakerphp/faker v1.14.1 conflicts with fzaninotto/faker v1.9.0.
    - fakerphp/faker v1.14.1 conflicts with fzaninotto/faker v1.8.0.
    - fakerphp/faker v1.14.1 conflicts with fzaninotto/faker v1.7.1.
    - fakerphp/faker v1.14.1 conflicts with fzaninotto/faker v1.7.0.
    - fakerphp/faker v1.14.1 conflicts with fzaninotto/faker v1.6.0.
    - fakerphp/faker v1.14.1 conflicts with fzaninotto/faker 1.9.x-dev.
    - fakerphp/faker v1.14.1 conflicts with fzaninotto/faker v1.9.2.x-dev.
    - fakerphp/faker is locked to version v1.14.1 and an update of this package was not requested.
    ```

Class 'Webkul\DataFaker\DataFakerServiceProvider' not found

When I try to setup laravel-data-faker it shows me these error,

In ProviderRepository.php line 208:

Class 'Webkul\DataFaker\DataFakerServiceProvider' not found

Script @php artisan package:discover handling the post-autoload-dump event returned with error code 1

Installation failed, reverting ./composer.json to its original content.

Call to undefined function Webkul\DataFaker\Database\Seeders\factory()

Steps to reproduce

Run php artisan db:seed --class="Webkul\DataFaker\Database\Seeders\DatabaseSeeder"

Actual result

Seeding: Webkul\DataFaker\Database\Seeders\CustomerAddressTableDataSeeder

In CustomerAddressTableDataSeeder.php line 16:

Call to undefined function Webkul\DataFaker\Database\Seeders\factory()

File path for ProductFlat seems to be wrong

Hi! I am currently setting up bagisto for a test phase for an ecommerce site.

While trying to populate the database with dummy data, I realize that there might be an issue with the file path for ProductFlat while using the db:seed command.

Do see attached image of my attempt at moving the files to fulfill the path needed for db:seed to run. It appears ProductFlat is the only one without a \src\ directory path included.

Kindly note that the second db:seed command is when I moved the Model files out of the src directory and into the \Product\ directory.

image

Upgrade for Laravel 8 and bagisto 1.3.0

Seed command not work with Bagisto 1.3.0 and Laravel 8:
php artisan db:seed --class="Webkul\DataFaker\Database\Seeders\DatabaseSeeder"

We have this error:
Unable to locate factory for [Webkul\Product\Models\ProductFlat].

Seeder not completed

stucked in:

Seeding: Webkul\DataFaker\Database\Seeders\CustomerAddressTableDataSeeder
Seeded: Webkul\DataFaker\Database\Seeders\CustomerAddressTableDataSeeder (1.05 seconds)
Seeding: Webkul\DataFaker\Database\Seeders\ProductCategoryTableDataSeeder
Seeded: Webkul\DataFaker\Database\Seeders\ProductCategoryTableDataSeeder (0.04 seconds)
Seeding: Webkul\DataFaker\Database\Seeders\ProductTableDataSeeder

version:

php artisan bagisto:version
v1.2.0

Unable to locate publishable resources.

Bagisto 1.3.3 version
published factories with
php artisan vendor:publish --force --provider=Webkul\DataFaker\Providers\DataFakerServiceProvider

and run seeder. Got error
Call to undefined function Webkul\DataFaker\Database\Seeders\factory() .

fixed this by installing composer require laravel/legacy-factories run seeder again
php artisan db:seed --class="Webkul\DataFaker\Database\Seeders\DatabaseSeeder"

Seeding: Webkul\DataFaker\Database\Seeders\CustomerAddressTableDataSeeder
Seeded: Webkul\DataFaker\Database\Seeders\CustomerAddressTableDataSeeder (1,323.75ms)
Seeding: Webkul\DataFaker\Database\Seeders\ProductCategoryTableDataSeeder
Seeded: Webkul\DataFaker\Database\Seeders\ProductCategoryTableDataSeeder (126.52ms)
Seeding: Webkul\DataFaker\Database\Seeders\ProductTableDataSeeder

In FactoryBuilder.php line 273:

Unable to locate factory for [Webkul\Product\Models\Product].

addresses and categories seeded but products not

Db Seeding is not working..

when i run php artisan db:seed --class="Webkul\DataFaker\Database\Seeders\DatabaseSeeder" command it gives me this:

Seeding: Webkul\DataFaker\Database\Seeders\CustomerAddressTableDataSeeder

In Connection.php line 669:

SQLSTATE[42S02]: Base table or view not found: 1146 Table 'bagisto3.customer_addresses' doesn't exist (SQL: delete from cust omer_addresses)

In PDOConnection.php line 63:

SQLSTATE[42S02]: Base table or view not found: 1146 Table 'bagisto3.customer_addresses' doesn't exist

In PDOConnection.php line 61:

SQLSTATE[42S02]: Base table or view not found: 1146 Table 'bagisto3.customer_addresses' doesn't exist

i'm using bagisto v1.1.2

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.