You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
GeekQu_sspanel/app/Models/Payback.php

21 lines
408 B
PHTML

9 years ago
<?php
namespace App\Models;
class Payback extends Model
{
protected $connection = 'default';
9 years ago
protected $table = 'payback';
9 years ago
public function user()
{
$user = User::where('id', $this->attributes['userid'])->first();
9 years ago
if ($user == null) {
Bought::where('id', '=', $this->attributes['id'])->delete();
return null;
}
return $user;
9 years ago
}
}