Code Coverage |
||||||||||
Classes and Traits |
Functions and Methods |
Lines |
||||||||
Total | |
0.00% |
0 / 1 |
|
0.00% |
0 / 3 |
CRAP | |
0.00% |
0 / 14 |
GroupController | |
0.00% |
0 / 1 |
|
0.00% |
0 / 3 |
12 | |
0.00% |
0 / 14 |
__construct | |
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 1 |
|||
index | |
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 6 |
|||
show | |
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 7 |
<?php | |
namespace App\Http\Controllers; | |
use Illuminate\Support\Facades\DB; | |
class GroupController extends Controller | |
{ | |
/** | |
* Create a new controller instance. | |
* | |
* @return void | |
*/ | |
public function __construct() | |
{ | |
// | |
} | |
public function index($church_id) { | |
$groups = DB::table('groups') | |
->where('church_id', '=', $church_id) | |
->select([ | |
'id', 'church_id', 'campus_id', 'name', 'status', | |
'active', 'address', 'city', 'state', 'zipcode']) | |
->get(); | |
return response()->json($groups); | |
} | |
public function show($church_id, $group_id) { | |
$group = DB::table('groups') | |
->where('church_id', '=', $church_id) | |
->where('id', '=', $group_id) | |
->select([ | |
'id', 'church_id', 'campus_id', 'name', 'status', | |
'active', 'address', 'city', 'state', 'zipcode']) | |
->get(); | |
return response()->json($group); | |
} | |
} |