for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/*
* This file is part of questocat/laravel-referral package.
*
* (c) questocat <[email protected]>
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
*/
namespace Questocat\Referral;
use Illuminate\Database\Eloquent\Model;
class Referral extends Model
{
/**
* The attributes that are mass assignable.
* @var array
protected $fillable = [
'referrer_id', 'referral_id',
];
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
public function referrer()
return $this->belongsTo(config('referral.user_model', 'App\User'), 'referral_id');
}