重新格式化

This commit is contained in:
iVampireSP.com 2022-12-28 21:19:40 +08:00
parent 0db209ba72
commit bdf5f1f0c1
No known key found for this signature in database
GPG Key ID: 2F7B001CA27A8132
8 changed files with 77 additions and 77 deletions

View File

@ -4,6 +4,7 @@
use App\Http\Controllers\Controller;
use App\Http\Requests\User\HostRequest;
use App\Jobs\Module\HostJob;
use App\Models\Host;
use Illuminate\Http\JsonResponse;
use Illuminate\Support\Facades\Cache;
@ -60,7 +61,7 @@ public function destroy(HostRequest $request, Host $host): JsonResponse
$host->cost();
}
dispatch(new \App\Jobs\Module\HostJob($host, 'delete'));
dispatch(new HostJob($host, 'delete'));
return $this->deleted($host);
}

View File

@ -31,7 +31,7 @@
*/
class Admin extends Authenticatable
{
use HasFactory, Cachable;
use Cachable;
protected $table = 'admins';

View File

@ -3,6 +3,7 @@
namespace App\Models;
use App\Events\UserEvent;
use App\Jobs\Module\HostJob;
use App\Models\WorkOrder\WorkOrder;
use GeneaLabs\LaravelModelCaching\CachedBuilder;
use GeneaLabs\LaravelModelCaching\Traits\Cachable;
@ -137,7 +138,7 @@ protected static function boot()
// when Updated
static::updated(function ($model) {
dispatch(new \App\Jobs\Module\HostJob($model, 'patch'));
dispatch(new HostJob($model, 'patch'));
Cache::forget('user_hosts_' . $model->user_id);
Cache::forget('user_tasks_' . $model->user_id);
@ -213,7 +214,7 @@ public function safeDelete(): bool
}
}
dispatch(new \App\Jobs\Module\HostJob($this, 'delete'));
dispatch(new HostJob($this, 'delete'));
return true;
}

View File

@ -62,8 +62,6 @@
*/
class Task extends Model
{
use HasFactory;
public $incrementing = false;
protected $fillable = [
'host_id',