Update HostingDatabase.php
This commit is contained in:
parent
9373b21241
commit
4ea5286c86
1 changed files with 0 additions and 37 deletions
|
@ -3,25 +3,16 @@
|
|||
namespace App\Models;
|
||||
|
||||
use App\ShellApi;
|
||||
use Sushi\Sushi;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class HostingDatabase extends Model
|
||||
{
|
||||
use Sushi;
|
||||
|
||||
protected $fillable = [
|
||||
'database_name',
|
||||
'database_username',
|
||||
'database_password'
|
||||
];
|
||||
|
||||
protected $schema = [
|
||||
'database_name' => 'string',
|
||||
'database_username' => 'string',
|
||||
'database_password' => 'string'
|
||||
];
|
||||
|
||||
public static function boot()
|
||||
{
|
||||
parent::boot();
|
||||
|
@ -45,32 +36,4 @@ class HostingDatabase extends Model
|
|||
});
|
||||
}
|
||||
|
||||
protected function sushiShouldCache()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public function getRows()
|
||||
{
|
||||
// $websitesList = ShellApi::callBin('nginx-websites-list');
|
||||
//
|
||||
// $rows = [];
|
||||
// if (!empty($websitesList)) {
|
||||
// $websitesList = json_decode($websitesList, true);
|
||||
// if (!empty($websitesList)) {
|
||||
// foreach ($websitesList as $website) {
|
||||
// if (isset($website['file'])) {
|
||||
// $rows[] = [
|
||||
// 'file' => $website['file'],
|
||||
// 'domain' => $website['server_name'],
|
||||
// 'root' => $website['root']
|
||||
// ];
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
return [];
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue