我有2个型号,汽车&品牌
当我想创建新车并设置值时,一切都像
<div class="schedule">
<iframe width="560" height="349" src="http://www.youtube.com/embed/n_dZNLr2cME?rel=0&hd=1" frameborder="0" allowfullscreen></iframe>
</div>
但是,如果我想设置与其他表有关系的Brand,那么我会收到错误:必须是Salon \ Models \ Brand 的实例所有id都存在,只有insert是问题,我试过的是:
// retrieve the index (for std::get) of a tuple by type
// usage: std::get<Analysis::type_index<0, Type, Types ...>::type::index>(tuple)
// TODO: should make this tidier to use
template<int Index, class Search, class First, class ... Types>
struct type_index
{
typedef typename Analysis::type_index<Index + 1, Search, Types ...>::type type;
static constexpr int index = Index;
};
template<int Index, class Search, class ... Types>
struct type_index<Index, Search, Search, Types ...>
{
typedef type_index type;
static constexpr int index = Index;
};
这当然不正确,但有人能告诉我正确的语法吗?