增加 获取此模块的主机
This commit is contained in:
parent
11e1e16a6b
commit
2faecb1701
@ -5,27 +5,23 @@
|
|||||||
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 Illuminate\Contracts\Pagination\Paginator;
|
||||||
use Illuminate\Http\JsonResponse;
|
use Illuminate\Http\JsonResponse;
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
use Illuminate\Http\Response;
|
use Illuminate\Http\Response;
|
||||||
use Illuminate\Support\Str;
|
use Illuminate\Support\Str;
|
||||||
use function auth;
|
use function auth;
|
||||||
|
|
||||||
// use Illuminate\Support\Facades\Log;
|
|
||||||
|
|
||||||
class HostController extends Controller
|
class HostController extends Controller
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Display a listing of the resource.
|
* Display a listing of the resource.
|
||||||
*
|
*
|
||||||
* @return Response|null
|
* @return Paginator
|
||||||
*/
|
*/
|
||||||
public function index(): ?Response
|
public function index(): Paginator
|
||||||
{
|
{
|
||||||
//
|
return Host::where('module_id', auth('module')->user()->module_id)->simplePaginate(100);
|
||||||
// Host::all();
|
|
||||||
|
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user