Skip to content

Commit

Permalink
add page department
Browse files Browse the repository at this point in the history
  • Loading branch information
Soeng Souy committed May 17, 2023
1 parent c412cf0 commit 2752769
Show file tree
Hide file tree
Showing 4 changed files with 95 additions and 2 deletions.
14 changes: 14 additions & 0 deletions app/Http/Controllers/DepartmentController.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;

class DepartmentController extends Controller
{
/** index page department */
public function indexDepartment()
{
return view('department.add-department');
}
}
73 changes: 73 additions & 0 deletions resources/views/department/add-department.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@

@extends('layouts.master')
@section('content')
{{-- message --}}
{!! Toastr::message() !!}
<div class="page-wrapper">
<div class="content container-fluid">
<div class="page-header">
<div class="row align-items-center">
<div class="col">
<h3 class="page-title">Add Department</h3>
<ul class="breadcrumb">
<li class="breadcrumb-item"><a href="departments.html">Department</a></li>
<li class="breadcrumb-item active">Add Department</li>
</ul>
</div>
</div>
</div>

<div class="row">
<div class="col-sm-12">
<div class="card">
<div class="card-body">
<form>
<div class="row">
<div class="col-12">
<h5 class="form-title"><span>Department Details</span></h5>
</div>
<div class="col-12 col-sm-4">
<div class="form-group local-forms">
<label>Department ID <span class="login-danger">*</span></label>
<input type="text" class="form-control">
</div>
</div>
<div class="col-12 col-sm-4">
<div class="form-group local-forms">
<label>Department Name <span class="login-danger">*</span></label>
<input type="text" class="form-control">
</div>
</div>
<div class="col-12 col-sm-4">
<div class="form-group local-forms">
<label>Head of Department <span class="login-danger">*</span></label>
<input type="text" class="form-control">
</div>
</div>
<div class="col-12 col-sm-4">
<div class="form-group local-forms calendar-icon">
<label>Department Start Date <span class="login-danger">*</span></label>
<input class="form-control datetimepicker" type="text"
placeholder="DD-MM-YYYY">
</div>
</div>
<div class="col-12 col-sm-4">
<div class="form-group local-forms">
<label>No of Students <span class="login-danger">*</span></label>
<input type="text" class="form-control">
</div>
</div>
<div class="col-12">
<div class="student-submit">
<button type="submit" class="btn btn-primary">Submit</button>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
@endsection
4 changes: 2 additions & 2 deletions resources/views/sidebar/sidebar.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,14 @@
</ul>
</li>

<li class="submenu">
<li class="submenu {{set_active(['department/add/page'])}}">
<a href="#"><i class="fas fa-building"></i>
<span> Departments</span>
<span class="menu-arrow"></span>
</a>
<ul>
<li><a href="departments.html">Department List</a></li>
<li><a href="add-department.html">Department Add</a></li>
<li><a href="{{ route('department/add/page') }}" class="{{set_active(['department/add/page'])}}">Department Add</a></li>
<li><a href="edit-department.html">Department Edit</a></li>
</ul>
</li>
Expand Down
6 changes: 6 additions & 0 deletions routes/web.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
use App\Http\Controllers\Setting;
use App\Http\Controllers\StudentController;
use App\Http\Controllers\TeacherController;
use App\Http\Controllers\DepartmentController;

/*
|--------------------------------------------------------------------------
Expand Down Expand Up @@ -105,4 +106,9 @@ function set_active( $route ) {
Route::get('teacher/edit/{id}', 'editRecord'); // view teacher record
Route::post('teacher/update', 'updateRecordTeacher')->middleware('auth')->name('teacher/update'); // update record
Route::post('teacher/delete', 'teacherDelete')->name('teacher/delete'); // delete record teacher
});

// ----------------------- department -----------------------------//
Route::controller(DepartmentController::class)->group(function () {
Route::get('department/add/page', 'indexDepartment')->middleware('auth')->name('department/add/page'); // page add department
});

0 comments on commit 2752769

Please sign in to comment.