格式化 代码

This commit is contained in:
iVampireSP.com 2023-01-10 21:49:55 +08:00
parent a19b5f865c
commit 30b2592705
No known key found for this signature in database
GPG Key ID: 2F7B001CA27A8132
3 changed files with 10 additions and 9 deletions

View File

@ -4,7 +4,6 @@
use App\Http\Controllers\Controller; use App\Http\Controllers\Controller;
use App\Models\Host; use App\Models\Host;
// use App\Models\User;
use App\Models\User; use App\Models\User;
use Illuminate\Contracts\Pagination\Paginator; use Illuminate\Contracts\Pagination\Paginator;
use Illuminate\Http\JsonResponse; use Illuminate\Http\JsonResponse;
@ -14,6 +13,8 @@
use Illuminate\Validation\ValidationException; use Illuminate\Validation\ValidationException;
use function auth; use function auth;
// use App\Models\User;
class HostController extends Controller class HostController extends Controller
{ {
/** /**

View File

@ -35,13 +35,6 @@ class WorkOrder extends Model
'notify' => 'boolean' 'notify' => 'boolean'
]; ];
public function routeNotificationForMail(WorkOrderNotification $work_order): array
{
$user = $work_order->user;
return [$user->email => $user->name];
}
protected static function boot() protected static function boot()
{ {
parent::boot(); parent::boot();
@ -90,6 +83,13 @@ protected static function boot()
}); });
} }
public function routeNotificationForMail(WorkOrderNotification $work_order): array
{
$user = $work_order->user;
return [$user->email => $user->name];
}
public function scopeThisModule($query) public function scopeThisModule($query)
{ {
return $query->where('module_id', auth('module')->id()); return $query->where('module_id', auth('module')->id());

View File

@ -26,7 +26,7 @@ public function __construct($title)
* *
* @return View * @return View
*/ */
public function render() :View public function render(): View
{ {
return view('components.basic-card', [ return view('components.basic-card', [
'title' => $this->title, 'title' => $this->title,