Comments (9)
How have you installed the project? Did you use Composer? Please share some code.
from redseed.
Yes, composer, project is working example of code below
$users = \R::seed('users', 10, [
'email' => 'email()',
'login' => 'word(3,10)',
'password' => 'word(5,15)',
'status' => 'integer(1,2)'
]);
from redseed.
Please post your composer.json
file, as well as your full code (I can't see anywhere you're referencing require 'vendor/autoload.php
.
from redseed.
{
"name": "top/top",
"require": {
"vlucas/valitron": "^1.4",
"intervention/image": "^2.5",
"benmajor/redseed": "^1.0"
},
"autoload":{
"psr-4":{
"top\": "vendor/top",
"app\": "app"
}
}
}
from redseed.
the project works, it's a catalog, i'm installing your package for testing seed, but i see this message "Plugin 'seed' does not exist, add this plugin using: R::ext('seed')", redbean works
from redseed.
This seems to be an autoloading issue in Composer. Calling class_exists('BenMajor\\RedSeed\\RedSeed');
before running R::seed()
resolves the issue, for some reason.
I need to look into it further, but the following works as expected:
<?php
require 'vendor/autoload.php';
use RedBeanPHP\R;
class_exists('BenMajor\\RedSeed\\RedSeed');
R::setup(
'mysql:dbname=redseed;host=localhost',
'root',
'root'
);
R::seed('user', 10, [
'forename' => 'word(3,10)',
'surname' => 'word(5,15)',
'email' => 'email()'
]);
from redseed.
the project works, it's a catalog, i'm installing your package for testing seed, but i see this message "Plugin 'seed' does not exist, add this plugin using: R::ext('seed')", redbean works
from redseed.
Yes, thanks - it's that i need
public function seeding(){
class_exists('BenMajor\RedSeed\RedSeed');
$users = \R::seed('users', 10, [
'email' => 'email()',
'login' => 'word(3,10)',
'password' => 'word(5,15)',
'status' => 'integer(1,2)'
]);
}
from redseed.
I had the same error, but your solution works for me too :-)
from redseed.
Related Issues (1)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from redseed.