Files
UNIT3D-Community-Edition/app/Follow.php
2018-12-06 14:42:13 +00:00

49 lines
1.1 KiB
PHP

<?php
/**
* NOTICE OF LICENSE.
*
* UNIT3D is open-sourced software licensed under the GNU General Public License v3.0
* The details is bundled with this project in the file LICENSE.txt.
*
* @project UNIT3D
*
* @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
* @author HDVinnie
*/
namespace App;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Notifications\Notifiable;
class Follow extends Model
{
use Notifiable;
/**
* Belongs To A User.
*
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
*/
public function user()
{
return $this->belongsTo(User::class)->withDefault([
'username' => 'System',
'id' => '1',
]);
}
/**
* Belongs To A User.
*
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
*/
public function target()
{
return $this->belongsTo(User::class)->withDefault([
'username' => 'System',
'id' => '1',
]);
}
}