Exemple #1
0
 /**
  * Remove the specified resource from storage.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function destroy($id)
 {
     /** @var Tileset $obj */
     $obj = Tileset::findOrFail($id);
     $obj->delete();
     return redirect('/game/tilesets/');
 }
Exemple #2
0
 public function _edit(Request $request, Map $map)
 {
     $tilesets = Tileset::all();
     $maps = Map::query();
     if ($map->id) {
         $maps->where('id', '!=', $map->id);
     }
     return view('admin.maps.create')->with('map', $map)->with('maps', $maps->get())->with('tilesets', $tilesets);
 }