+ public function byType(Request $request, $type) {
+ $techs = Technique::where('index', true)->where('type', '=', $type);
+ $this->applyFilter($request, $techs);
+ return $techs->get()->toJson();
+ }
+
+ public function byTypeAndName(Request $request, $type, $name) {
+ $tech = Technique::where('type', '=', $type)->where('name', '=', $name)->firstOrFail();
+ $this->authorize('view', $tech);
+ $tech->load(['chapters', 'relations']);
+ return $tech->toJson();
+ }
+
+ public function forMap($map) {
+ $techs = TechniqueMap::with(['technique', 'technique.relations'])->where('map', '=', $map);
+
+ return $techs->get()->toJson();
+ }
+