mirror of
https://github.com/claradex/nativegallery.git
synced 2024-12-22 16:41:04 +03:00
19 lines
No EOL
474 B
PHP
19 lines
No EOL
474 B
PHP
<?php
|
|
namespace App\Models;
|
|
use \App\Services\DB;
|
|
|
|
class Vehicle {
|
|
|
|
public $userid;
|
|
function __construct(int $user_id) {
|
|
$this->userid = $user_id;
|
|
}
|
|
public function i($table) {
|
|
return DB::query("SELECT * FROM entities WHERE id=:id", array(':id'=>$this->userid))[0][$table];
|
|
}
|
|
public function getvehicle($table) {
|
|
return DB::query("SELECT * FROM entities WHERE id=:id", array(':id'=>self::i('entityid')))[0][$table];
|
|
}
|
|
|
|
|
|
} |