PATH:
home
/
lab2454c
/
credityorkgroup.com
/
resources
/
views
/
admin
/
category
@extends('admin.layout.adminMasterLayout') @section('title', 'Feed Category List') @section('content') <div class="content-wrapper"> <div> <a href="{{ route('category.create') }}" class="btn btn-info font-weight-bold mb-3">+ Create New Category</a> </div> <div class="row"> <div class="col-lg-12 grid-margin stretch-card"> <div class="card"> <div class="card-body"> <h4 class="card-title">Category Lists</h4> <div class="table-responsive"> <table class="table table-striped"> <thead> <tr> <th>Image</th> <th>Category name</th> <th>Status</th> <th>Action</th> </tr> </thead> <tbody> @if($categories->count() > 0 ) @foreach($categories as $category) <tr> <td class="py-1"> <img src="{{ isset($category->image) ? config("app.url").Storage::url($category->image) : asset('adminAssets/images/default-page-banner.png') }}" alt="category_image"/> </td> <td> {{ $category->name }} </td> <td> <div class="dropdown action-label"> <a class="btn btn-info dropdown-toggle btn-sm" data-toggle="dropdown" aria-expanded="false"> <?=(isset($category->status) && $category->status=='active')?'<i class="fa fa-dot-circle-o text-success"></i> Active':'<i class="fa fa-dot-circle-o text-danger"></i> Inactive';?> <span class="caret"></span> </a> <div class="dropdown-menu"> <form action="{{route('category.destroy', $category->id)}}" method="POST" > @csrf @method('DELETE') <button type="submit" class="dropdown-item status-btn btn-sm" style="cursor: pointer;"> {!! ($category->status=='active')? "<i class='fa fa-dot-circle-o text-danger'></i> Inactive":"<i class='fa fa-dot-circle-o text-success'></i> Active" !!} </button> </form> </div> </div> </td> <td> <a href="{{ route('category.edit', $category) }}" class="btn btn-primary btn-sm"><i class="icon-open"></i> Edit</a> </td> </tr> @endforeach @else <td colspan="4">No Categoy Listed Yet</td> @endif </tbody> </table> </div> </div> </div> </div> </div> </div> @endsection
[-] form.blade.php
[edit]
[-] create.blade.php
[edit]
[-] edit.blade.php
[edit]
[+]
..
[-] list.blade.php
[edit]