@extends('layouts.adminpanel') @section('title') Admin Panel - Subjects @endsection @section('admin_content')
Add new subject
@csrf
@error('name') {{ $message }} @enderror
@error('type') {{ $message }} @enderror
@error('weekday') {{ $message }} @enderror
@error('time') {{ $message }} @enderror
@error('room_id') {{ $message }} @enderror
@error('user_id') {{ $message }} @enderror
@if ($subjects->count() > 0)
All subjects: ({{ $subjects->count() }})
@foreach ($subjects as $subject) @endforeach
ID Name Type Day of the week Time User id User name Room id Room name
{{ $subject->id }} {{ $subject->name }} {{ $subject->type }} {{ $subject->weekday }} {{ $subject->time }} {{ $subject->user_id}} {{ App\User::find($subject->user_id)->name }} {{ App\User::find($subject->user_id)->surname }} {{ $subject->room_id}} {{ App\Room::find($subject->room_id)->name }} Delete Edit
@else

No subjects yet.

@endif
@endsection