@extends('BackEnd.Layouts.main') @section('title') {{ __('messages.View Books') }} @endsection @section('content')
@include('BackEnd.Layouts.breadcrumb') @if (session('success'))
{{ session('success') }}
@endif @if (session('error'))
{{ session('error') }}
@endif
@include('BackEnd.Layouts.tableheader')
@ability(['admin', 'super_admin'], ['']) @endability @foreach ($books as $book) @ability(['admin', 'super_admin'], ['']) @endability @endforeach
م {{ __('messages.NAME') }}{{ __('messages.STATUS') }}visibility file_download {{ __('messages.PUBLISHED_DATE') }} إضافة تعديل {{ __('messages.CONTROL') }}
{{ $book->id }} {{ $book->name }} {{ $book->views }} {{ $book->downloads }} {{ $book->created_at->toDateString() }}
{{ $book->created_at->toTimeString() }}
{{ $book->getUser->name ?? '' }} {{ $book->getEditor->name ?? '' }} @ability(['publisher', 'admin', 'super_admin'], ['']) @php if (auth()->user()->id == $book->created_by) { $user_ability = 1; } elseif ( $user ->roles() ->get() ->first()->id == 1 ) { $user_ability = 1; } elseif ( $user ->roles() ->get() ->first()->id == 2 ) { $user_ability = 1; } else { $user_ability = 0; } @endphp @if ($user_ability > 0) {{-- --}} @endif @endability
{{ $books->links() }}
@endsection @push('plugin_js') @endpush @push('custom_js') @endpush @push('is_active_ajax') @endpush