📜  在 laravel 8 中显示表格中的数据 - PHP 代码示例

📅  最后修改于: 2022-03-11 14:54:42.203000             🧑  作者: Mango

代码示例1
use Illuminate\Support\Facades\DB;

class UserController extends Controller
{
    public function index()
    {
        $users = DB::table('users')->select('id','name','email')->get();

        return view('some-view')->with('users', $users);
    }
}