Closed mshanak closed 8 years ago
Hello @mshanak , Can you please show me created_by()
method.
namespace App;
use Illuminate\Database\Eloquent\Model;
class Page extends \Orientdb
{
protected $table = 'Page';
protected $fillable = [
'title', 'body', 'status',
];
public function created_by()
{
return $this->hasOne('\App\User', '\App\CreatedBy');
}
}
Have you created CreatedBy
class which will extends \Orientdb
. Also please check and tell me if the record for user and page get inserted into orientdb database.
i already have createdBy class
namespace App;
use Illuminate\Database\Eloquent\Model;
class CreatedBy extends \Orientdb
{
protected $table = 'CreatedBy';
}
the two records ( page + user ) is inserted successfully , the problem appears when i call the relation
Ok.. I am looking into it. Will try to fix it soon.
Thank you for your help
Be Green & Save a tree. Don't print this e-mail unless it's really necessary.
Mahdi Atawneh, ‹Web Developer…›
On 28 Mar 2016, at 12:30 PM, Sumit Patil notifications@github.com wrote:
Ok.. I am looking into it. Will try to fix it soon.
— You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub
fixed
Hi @mshanak, yes... that fixed the bug. :+1:
hello i have tried to create relation between tow objects like following
but Laravel throw this error :