PHP code example of ofthewildfire / relaticle-mods
1. Go to this page and download the library: Download ofthewildfire/relaticle-mods library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
public function projects(): MorphToMany
{
return $this->morphToMany(Projects::class, 'taskable');
}
public function events(): MorphToMany
{
return $this->morphToMany(Events::class, 'taskable');
}
public function ideas(): MorphToMany
{
return $this->morphToMany(Ideas::class, 'taskable');
}
public function projects(): MorphToMany
{
return $this->morphToMany(Projects::class, 'noteable');
}
public function events(): MorphToMany
{
return $this->morphToMany(Events::class, 'noteable');
}
public function ideas(): MorphToMany
{
return $this->morphToMany(Ideas::class, 'noteable');
}
public function ideas()
{
return $this->belongsToMany(
\Ofthewildfire\RelaticleModsPlugin\Models\Ideas::class,
'idea_people',
'people_id',
'idea_id'
);
}
public function projects()
{
return $this->belongsToMany(
\Ofthewildfire\RelaticleModsPlugin\Models\Projects::class,
'project_team_members',
'people_id',
'projects_id'
);
}
public function events()
{
return $this->belongsToMany(
\Ofthewildfire\RelaticleModsPlugin\Models\Events::class,
'event_people',
'people_id',
'event_id'
);
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.