public function franchise($franchiseID) { $teams = Team::where('franchID', '=', $franchiseID)->take(999); $franchise = Franchise::where('franchID', '=', $franchiseID)->first(); $grids = TeamsController::grids($teams); return view('teams.franchise')->with(['name' => $franchise->franchName, 'narrowGrid' => $grids['narrowGrid'], 'grid' => $grids['grid']]); }
/** * Remove the specified resource from storage. * * @param int $id * @return \Illuminate\Http\Response */ public function destroy($id, $franchise_id) { // User::where('franchise_id', '=', $franchise_id)->delete(); Franchise::where('id', '=', $franchise_id)->delete(); return response()->json(["Response" => "success", "message" => "Franchise Deleted"]); }
public function index() { $franchises = Franchise::orderBy('franchName', 'asc')->get(); $records = threeColumns($franchises); return view('franchises.index')->with(['recordsCol1' => $records['recordsCol1'], 'recordsCol2' => $records['recordsCol2'], 'recordsCol3' => $records['recordsCol3']]); }