kevupton / ethereal Goto Github PK
View Code? Open in Web Editor NEWCore files for the laravel packages.
Core files for the laravel packages.
Hello Sr,
Playing with this Wonderfull library but I bump in to an issue trying to make seeders-
got this:
$factory->define(App\Models\Post::class, function ($faker) {
$taggable = [
App\Models\PostVideo::class,
App\Models\PostAudio::class,
];
return [
'title' => $faker->catchPhrase,
'post_id' => 1,
'post_type' => $faker->randomElement($taggable),
];
});
$factory->defineAs(App\Models\Post::class, 'audio', function (Faker\Generator $faker) use ($factory) {
$follow = $factory->raw(App\Models\Post::class);
$extras = [
'post_id' => $faker->randomElement(App\Models\PostAudio::pluck('id')->toArray()),
'post_type' => App\Models\PostAudio::class,
];
return array_merge($follow, $extras);
});
I run the seeds doing this:
factory(App\Models\Post::class, 'soundcloud', rand(1,8))->create([
'hub_id' => $hub->id
]);
factory(App\Models\Post::class, 'youtube', rand(1,8))->create([
'hub_id' => $hub->id
]);
main class
// relationships
public static $relationsData = [
'post' => [self::MORPH_TO],
];
Subclass
protected $morphBy = 'post';
protected $morphTable = 'posts'; //the name of the parent table
protected $morphModel = Post::class; //the class of the parent table
Its complaining about declaring the $relationsData
in the subclass.
Symfony\Component\Debug\Exception\FatalThrowableError: Access to undeclared static property: App\Models\PostVideo::$relationsData in /Kevupton/Ethereal/Models/MorphModel.php:23
Any idea why? Need more info?
Thank you, excellent job btw.
There is conflict here
- kevupton/ethereal v2.4 requires kevupton/laravel-json-response dev-master -> satisfiable by kevupton/laravel-json-response[dev-master]but these conflict with your requirements or minimum-stability.
Will avoid updating.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.