我正在尝试为页面(显示)创建授权方法(offer_authorised)。不幸的是,where查询在我的代码中似乎不能正常工作。Offer.where("id = ? AND user_id = ?".* FROM "offers" WHERE (id = 2 AND user_id = 2) LIMIT $1 [["LIMIT", 11]]
我有一个User模型,我有类似的查询,但它不起作用(在Rails中,您可以这样做)。laravel是否提供了类似于Rails的查询?$users = User::where('type', 'user'); // get all the users type == user
// search all users that have'peter' in their name from p