欢迎各位兄弟 发布技术文章

这里的技术是共享的

You are here

得到列表的数组数据

shiping1 的头像
>>> App\Article::all()->toArray();
=> [
    [
        "id"           => 1,
        "title"        => "My updated First Article",
        "body"         => "Lorem ipsum",
        "created_at"   => "2015-05-14 13:26:28",
        "updated_at"   => "2015-05-14 13:31:46",
        "published_at" => "2015-05-14 13:26:16",
        "excerpt"      => null
    ],
    [
        "id"           => 2,
        "title"        => "New Title",
        "body"         => "New body",
        "created_at"   => "2015-05-14 14:00:52",
        "updated_at"   => "2015-05-14 14:00:52",
        "published_at" => "2015-05-14 14:00:52",
        "excerpt"      => null
    ]
]
普通分类: