In this paper, a new generalised gravity-matter coupled theory of gravity is presented. This theory is constructed by assuming an action with an arbitrary function f (T, B, L m ) which depends on the scalar torsion T , the boundary term B = ∇ μ T μ and the matter Lagrangian L m . Since the function depends on B which appears in R = −T +B, it is possible to also reproduce curvature-matter coupled models such as f (R, L m ) gravity. Additionally, the full theory also contains some interesting new teleparallel gravity-matter coupled theories of gravities such asThe complete dynamical system for flat FLRW cosmology is presented and for some specific cases of the function, the corresponding cosmological model is studied. When it is necessary, the connection of our theory and the dynamical system of other well-known theories is discussed.