欢迎各位兄弟 发布技术文章
这里的技术是共享的
->select('activity_log.id as id','activity_log.operated_created_at as operated_created_at','activity_log.created_at as created_at') ->where('activity_log.is_finance','=',1)->orderby('activity_log.id','desc')->paginate(20); $user_activitys[0]的主对象是 Activity 实例的对象 $user_activitys = User::join('users','users.id','=','activity_log.user_id')
->select('activity_log.id as id','activity_log.operated_created_at as operated_created_at','activity_log.created_at as created_at') ->where('activity_log.is_finance','=',1)->orderby('activity_log.id','desc')->paginate(20);
$user_activitys[0]的主对象是 User 实例的对象