@extends('layouts.app') @section('title', 'Edit Study Material') @section('page-title', 'Edit Study Material') @section('header-buttons')
Back to Materials View Material
@endsection @section('content')
Edit Material Details
@csrf @method('PUT') @if(auth()->user()->teacher && $material->uploaded_by_teacher_id == auth()->user()->teacher->id)
@error('class_id')
{{ $message }}
@enderror
Select the class this material belongs to
@else
{{ $material->class->batch->name }} - {{ $material->class->subject->title }}
Instructor: {{ $material->class->teacher->user->username }}
@endif
@error('title')
{{ $message }}
@enderror
@if($material->isPdf()) @elseif($material->isImage()) @elseif($material->isVideo()) @else @endif
{{ $material->file_name }}
{{ strtoupper($material->file_extension) }} {{ $material->file_size_formatted }} {{ $material->published ? 'Published' : 'Draft' }}
Download
@if(auth()->user()->teacher && $material->uploaded_by_teacher_id == auth()->user()->teacher->id)
Leave empty to keep current file. Maximum file size: 50MB. Supported formats: Documents, Images, Videos, Archives
@error('file')
{{ $message }}
@enderror
@endif
@if(auth()->user()->teacher && $material->uploaded_by_teacher_id == auth()->user()->teacher->id)
published) ? 'checked' : '' }}>
Published materials are visible to students enrolled in the class
@error('published')
{{ $message }}
@enderror
@else
{{ $material->published ? 'Published' : 'Unpublished' }} {{ $material->published ? 'Visible to students' : 'Not visible to students' }}
@endif
Cancel
Quick Actions
View Material Details @if(auth()->user()->teacher && $material->uploaded_by_teacher_id == auth()->user()->teacher->id)
@csrf
@csrf @method('DELETE')
@endif
Material Information
Uploaded By {{ $material->teacher->user->username }}
Upload Date {{ $material->created_at->format('F j, Y') }}
Last Updated {{ $material->updated_at->format('F j, Y') }}
File Type {{ $material->file_type }}
@if(auth()->user()->teacher && $material->uploaded_by_teacher_id == auth()->user()->teacher->id)
Class Information
Batch {{ $material->class->batch->name }}
Subject {{ $material->class->subject->title }}
Instructor {{ $material->class->teacher->user->username }}
Status {{ $material->class->active ? 'Active' : 'Inactive' }}
@endif
@endsection @section('styles') @endsection @section('scripts') @endsection