格式化 代码
This commit is contained in:
parent
a19b5f865c
commit
30b2592705
@ -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
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
|
@ -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());
|
||||||
|
@ -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,
|
||||||
|
Loading…
Reference in New Issue
Block a user