  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=\nabla_{\mu}T^{\mu}$ 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 as $f(T,L_m)$ or $C_1 T+
f(B,L_m)$. The 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.
