<?php trait UserLevel(){ public function get($level = 'one'){ $this->where('user', $level)->get(); } } trait SpecialUser(){ public function get(){ $this->where('special','yes')->get(); } } Class GetUser{ use UserLevel, SpecialUser; } $user = new GetUser; $user->get() //Ideally I want the methods should be chained as $this->where('special','yes') //->where('user','one')->get();
You have javascript disabled. You will not be able to edit any code.