mirror of
https://github.com/PhyreApps/PhyrePanel.git
synced 2024-11-25 09:00:27 +00:00
update
This commit is contained in:
parent
996b219ed6
commit
cacaa5c452
2 changed files with 43 additions and 0 deletions
|
@ -2,6 +2,7 @@
|
|||
|
||||
namespace Modules\Minecraft\App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Modules\Minecraft\Database\factories\MinecraftServerFactory;
|
||||
|
@ -16,4 +17,37 @@ class MinecraftServer extends Model
|
|||
protected $fillable = [];
|
||||
|
||||
|
||||
protected static function booted(): void
|
||||
{
|
||||
static::addGlobalScope('customer', function (Builder $query) {
|
||||
if (auth()->check() && auth()->guard()->name == 'web_customer') {
|
||||
$query->where('customer_id', auth()->user()->id);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
public static function boot()
|
||||
{
|
||||
parent::boot();
|
||||
|
||||
static::creating(function ($model) {
|
||||
|
||||
|
||||
});
|
||||
|
||||
static::created(function ($model) {
|
||||
|
||||
|
||||
});
|
||||
|
||||
static::deleting(function ($model) {
|
||||
|
||||
|
||||
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
services:
|
||||
minecraft-server:
|
||||
image: itzg/minecraft-server
|
||||
tty: true
|
||||
stdin_open: true
|
||||
ports:
|
||||
- "25565:25565"
|
||||
environment:
|
||||
EULA: "TRUE"
|
Loading…
Reference in a new issue