PATH:
home
/
lab2454c
/
omvstudio.com
/
resources
/
views
/
admin
/
sport
@extends('admin.layouts.adminMasterLayout') @section('title', 'List Sport Page') @section('movie_management_select','active') @section('content') <div class="container-fluid"> <div class="dashboard__main mb-4"> <h2>Sport List</h2> </div> <div class="card shadow mb-4"> <div class="card-body"> <div class="col-md-2"> <form action="{{ route('sport.index') }}" method="GET" class="is-featured-frm"> <select name="is_featured" id="is_featured" class="form-control"> <option value="ALL" {{ $is_featured == 'ALL' ? 'selected' : ''}}>ALL</option> <option value="FEATURED" {{ $is_featured == 'FEATURED' ? 'selected' : ''}}>FEATURED</option> </select> </form> </div> <div class="float-right"> <a href="{{ route('sport.create') }}" class="btn btn-success mb-4">Add New</a> </div> <div class="table-responsive"> @if ($is_featured == 'FEATURED') <table class="table table-bordered" id="example" width="100%" cellspacing="0"> <thead> <tr> <th>NAME</th> <th>COVER IMAGE</th> {{-- <th>NUM OF MOVIES</th> --}} <th>STATUS</th> <th>ACTION</th> </tr> </thead> <tbody> @if ($featured_sports->count() > 0 ) @foreach ($featured_sports as $sport) <tr> <td>{{ $sport->title }}</td> <td> <img src="{{ isset($sport->cover_image) ? asset('storage/sports/'.$sport->cover_image) : asset('admin_assets/images/default-image.png') }}" class="hei-120 wid-120 rounded-circle" alt=""> </td> {{-- <td><a href="{{ route('sport.movie',$sport->id) }}" target="_blank"> {{ $sport->movies->count() }} </a></td> --}} <td> @if($sport->status=='active') <a href="{{ url('admin/sport/status/inactive/'.$sport->id) }}" class="btn btn-success frm-btn_handler btn__active">Active</a> @else <a href="{{ url('admin/sport/status/active/'.$sport->id) }}" class="btn btn-warning frm-btn_handler btn__deactive">Deactive</a> @endif </td> <td> <a href="{{ route('sport.edit',$sport) }}" class="btn btn-primary frm-btn_handler btn__edit">Edit</a> <form action="{{ route('sport.destroy',$sport->id) }}" method="POST" onclick="return confirm('Are you sure?')"> {{ csrf_field() }} @method('DELETE') <button class="btn btn-danger frm-btn_handler btn__delete">Delete </button> </form> </td> </tr> @endforeach @else <td colspan="7">No data Found!!</td> @endif </tbody> </table> @else <table class="table table-bordered" id="example" width="100%" cellspacing="0"> <thead> <tr> <th>NAME</th> <th>COVER IMAGE</th> {{-- <th>NUM OF MOVIES</th> --}} <th>STATUS</th> <th>ACTION</th> </tr> </thead> <tbody> @if ($sports->count() > 0 ) @foreach ($sports as $sport) <tr> <td>{{ $sport->title }}</td> <td> <img src="{{ isset($sport->cover_image) ? asset('storage/sports/'.$sport->cover_image) : asset('admin_assets/images/default-image.png') }}" class="hei-120 wid-120 rounded-circle" alt=""> </td> {{-- <td><a href="{{ route('sport.movie',$sport->id) }}" target="_blank"> {{ $sport->movies->count() }} </a></td> --}} <td> @if($sport->status=='active') <a href="{{ url('admin/sport/status/inactive/'.$sport->id) }}" class="btn btn-success frm-btn_handler btn__active">Active</a> @else <a href="{{ url('admin/sport/status/active/'.$sport->id) }}" class="btn btn-warning frm-btn_handler btn__deactive">Deactive</a> @endif </td> <td> <a href="{{ route('sport.edit',$sport) }}" class="btn btn-primary frm-btn_handler btn__edit">Edit</a> <form action="{{ route('sport.destroy',$sport->id) }}" method="POST" onclick="return confirm('Are you sure?')"> {{ csrf_field() }} @method('DELETE') <button class="btn btn-danger frm-btn_handler btn__delete">Delete </button> </form> </td> </tr> @endforeach @else <td colspan="7">No data Found!!</td> @endif </tbody> </table> @endif </div> </div> </div> </div> @endsection @push('backend-scripts') <script type="text/javascript"> (function($){ $(document).ready(function(){ $('#is_featured').on('change',function(){ let is_featured = $(this).val(); $('.is-featured-frm').submit(); }); }); })(jQuery) </script> @endpush
[-] form.blade.php
[edit]
[-] create.blade.php
[edit]
[-] edit.blade.php
[edit]
[+]
..
[-] list.blade.php
[edit]
[-] category-movie-list.blade.php
[edit]