@extends('backend.layouts_backend.master2')
@section('title')
All Project Categories
@endsection
@section('content')
{{-- header --}}
All Project Categories
@if (Auth::user()->can('project-category-create'))
Add Project Category
@endif
@if (Auth::user()->can('project-category-list'))
View Project Categories
@endif
{{-- end header --}}
{{-- alert add item --}}
@if (session('messagesave'))
{{--
{{ session('message')}}
--}}
{{ session('messagesave') }}
@endif
{{-- alert delete item --}}
@if (session('messagedelete'))
{{ session('messagedelete') }}
{{--
{{ session('messagedelete')}}
--}}
@endif
{{-- alert update item --}}
@if (session('messageupdate'))
{{ session('messageupdate') }}
@endif
#Id
Name
Status
Use Status
Created By
Updated By
Action
@foreach ($project_categories as $key => $project_category)
{{ $key + 1 ?? '' }}
{{ $project_category->name ?? '' }}
@if ($project_category->status == 1)
{{ get_status_message($project_category->status) ?? '' }}
@elseif($project_category->status == 2)
{{ get_status_message($project_category->status) ?? '' }}
@else
No Status
@endif
@php
$projectCategoryInUse = $project_category->projects()->withoutTrashed()->exists();
@endphp
@if ($projectCategoryInUse)
In Use
@else
Not In Use
@endif
{{ $users[$project_category->created_by] ?? '' }}
{{ $users[$project_category->updated_by] ?? '' }}
@if (Auth::user()->can('project-category-edit'))
@endif
@if (Auth::user()->can('project-category-delete'))
@if (!$projectCategoryInUse)
@endif
@endif
@endforeach
@endsection