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