@php($title = __('games.title_games_list')) @extends('layouts.main') @section('breadclumbs') @endsection @section('content')
{{ Form::open(['method' => 'PATCH', 'url' => route('admin.games.upgrade'), 'style'=>'display:inline']) }} {{ Form::button( ' ' . __('games.upgrade'), [ 'class' => 'btn btn-dark', 'v-on:click' => 'confirmAction($event, \'' . __('games.d_upgrade_confirm') . '\')', 'type' => 'submit' ] ) }} {{ Form::close() }}  {{ __('games.add') }}  {{ __('games.add_mod') }}
@include('components.grid', [ 'modelsList' => $games, 'labels' => [__('games.name'), __('games.code'), __('games.engine'), __('games.mods')], 'attributes' => [ 'name', 'code', 'engine', ['lambda', function($gameModel) { $modLinks = ''; foreach ($gameModel->mods as $mod) { $destroyButton = Form::open(array('url' => route('admin.game_mods.destroy', ['game_mod' => $mod->getKey()]), 'style'=>'display:inline')); $destroyButton .= Form::hidden('_method', 'DELETE'); $destroyButton .= Form::button('', [ 'class' => 'btn btn-link btn-sm text-danger', 'v-on:click' => 'confirmAction($event, \'' . __('main.confirm_message'). '\')', 'type' => 'submit', ]); $destroyButton .= Form::close(); $modLinks .= "
  • $mod->id]) . "\">{$mod->name} {$destroyButton}
  • "; } if (empty($modLinks)) { return " $gameModel->getKey()]) . "\">  " . __('games.add_first_mod') . " "; } else { return ""; } }] ], // 'viewRoute' => 'admin.games.show', 'editRoute' => 'admin.games.edit', 'destroyRoute' => 'admin.games.destroy', ]) {!! $games->links() !!} @endsection