Initial commit
This commit is contained in:
20
app/Models/User.php
Normal file
20
app/Models/User.php
Normal file
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
namespace App\Models;
|
||||
|
||||
use App\Core\Model;
|
||||
|
||||
class User extends Model {
|
||||
// Tell the model which database table to use
|
||||
protected static $table = 'auth_users';
|
||||
|
||||
// You can add custom business logic here
|
||||
public static function findActive() {
|
||||
return self::builder()->where('status', 'active')->get();
|
||||
}
|
||||
public static function getByToken($token) {
|
||||
return self::builder()->where('bearer_token', $token)->get();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user