@extends('admin.layouts.master') @section('content')

{{ trans('app.users') }}

@can('create', \App\Models\User::class) {{ trans('app.add_user') }} @endcan
@can('massDelete', \App\Models\User::class) @endcan @foreach ($users as $user) @can('massDelete', \App\Models\User::class) @endcan @endforeach
{{ trans('app.avatar') }} {{ trans('app.nice_name') }} {{ trans('app.full_name') }} {{ trans('app.email') }} {{ trans('app.role') }} {{ trans('app.status') }}  
{{ trans('app.avatar') }} {{ $user->nice_name }} {{ $user->name }} {{ $user->email }} {{ optional($user->role)->name }} {{ $user->active ? trans('app.active') : trans('app.inactive') }} @can('view', $user)   @endcan @can('secretLogin', $user)   @endcan @can('update', $user)     @if ($user->primaryAddress)   @else   @endif @endcan @can('delete', $user) {!! Form::open(['route' => ['admin.admin.user.trash', $user->id], 'method' => 'delete', 'class' => 'data-form']) !!} {!! Form::button('', ['type' => 'submit', 'class' => 'confirm ajax-silent', 'title' => trans('app.trash'), 'data-toggle' => 'tooltip', 'data-placement' => 'top']) !!} {!! Form::close() !!} @endcan

@can('massDelete', \App\Models\User::class) {!! Form::open(['route' => ['admin.admin.user.emptyTrash'], 'method' => 'delete', 'class' => 'data-form']) !!} {!! Form::button('', ['type' => 'submit', 'class' => 'confirm btn btn-default btn-flat ajax-silent', 'title' => trans('help.empty_trash'), 'data-toggle' => 'tooltip', 'data-placement' => 'right']) !!} {!! Form::close() !!} @else @endcan {{ trans('app.trash') }}

@foreach ($trashes as $trash) @endforeach
{{ trans('app.avatar') }} {{ trans('app.nice_name') }} {{ trans('app.full_name') }} {{ trans('app.email') }} {{ trans('app.role') }} {{ trans('app.deleted_at') }} {{ trans('app.option') }}
{{ trans('app.avatar') }} {{ $trash->nice_name }} {{ $trash->name }} {{ $trash->email }} {{ optional($trash->role)->name }} {{ $trash->deleted_at->diffForHumans() }} @can('delete', $trash)   {!! Form::open(['route' => ['admin.admin.user.destroy', $trash->id], 'method' => 'delete', 'class' => 'data-form']) !!} {!! Form::button('', ['type' => 'submit', 'class' => 'confirm ajax-silent', 'title' => trans('app.delete_permanently'), 'data-toggle' => 'tooltip', 'data-placement' => 'top']) !!} {!! Form::close() !!} @endcan
@endsection