@extends('adminlte::page') @section('title', 'Lista de Películas') @can('crear peliculas') @section('content_header')
Excel @can('crear peliculas') PDF @endcan
@stop @section('content')
@if (session('success')) @endif @if ($errors->any())) @endif
@foreach ($peliculas as $pelicula) @endforeach
ID Título Duración Formato Categoría Estado Acciones
{{ $pelicula->id }} {{ $pelicula->titulo }} {{ floor($pelicula->duracion / 60) }}h {{ $pelicula->duracion % 60 }}min {{ $pelicula->formato }} {{ optional($pelicula->categoria)->nombre ?? 'Sin categoría' }} {{ strtoupper($pelicula->estado) }}
@csrf @method('DELETE')
    @if ($peliculas->currentPage() > 5)
  • «
  • @endif @php $currentBlock = floor(($peliculas->currentPage() - 1) / 5); $startPage = $currentBlock * 5 + 1; $endPage = min($startPage + 4, $peliculas->lastPage()); @endphp @for ($i = $startPage; $i <= $endPage; $i++)
  • {{ $i }}
  • @endfor @if ($endPage < $peliculas->lastPage())
  • »
  • @endif
@stop @section('footer')
Sistema de Gestión de Películas © {{ date('Y') }}
@stop @section('js') @stop @endcan