在控制器中
public function toGroupStaffView()
{
$nGroupId = $this->arrData['group_id'];
$groupStaffList = StaffService::getInstance()->getGroupStaffList($this->nCompanyId, $nGroupId);
return view('prchargepay.staff.groupstaff')->with('group_staff_list', json_encode($groupStaffList));
}
在blade页面中
<script>
new Vue({
el: '#app',
data: function () {
return {
tableData: {!!$group_staff_list!!},
}
},
methods: {
}
});
</script>