| Total Complexity | 4 |
| Total Lines | 24 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 8 | class TycoonController extends Controller |
||
| 9 | { |
||
| 10 | public function getTycoonsByWorld($world_id) |
||
| 11 | { |
||
| 12 | return Tycoon::leftjoin('worlds_tycoons', 'worlds_tycoons.tycoon_id', '=', 'tycoons.id') |
||
| 13 | ->where('worlds_tycoons.world_id', $world_id)->get(); |
||
| 14 | } |
||
| 15 | |||
| 16 | public function getTycoonsByInitial($initial) |
||
| 19 | } |
||
| 20 | |||
| 21 | public function getTycoonsByWorldAndInitial($world_id, $initial) |
||
| 22 | { |
||
| 23 | return Tycoon::leftjoin('worlds_tycoons', 'worlds_tycoons.tycoon_id', '=', 'tycoons.id') |
||
| 24 | ->where('worlds_tycoons.world_id', $world_id) |
||
| 25 | ->where('tycoons.name', 'like', $initial . '%') |
||
| 26 | ->get(); |
||
| 27 | } |
||
| 28 | |||
| 29 | public function getTycoons() |
||
| 32 | } |
||
| 33 | } |