Ejemplo n.º 1
0
 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"]);
 }