Browse Source

Merge branch 'master' of https://revinr.site/mostafij-revinr/student-admission

Israat Zarin 1 year ago
parent
commit
001746edcf

+ 9 - 9
app/Http/Controllers/AjaxController.php

@@ -73,15 +73,15 @@ class AjaxController extends Controller
             $teacher->status =$req->status;
             $teacher->update();
 
-            // $data['name'] = $teacher->first_name.' '.$teacher->last_name;  
-            // $user_mail = $teacher->email;
-            // $from = 'test@mail.com'; 
-
-            // Mail::send('email.send_apply_student_teacher_email',$data, function ($message) use ($user_mail,$from) {
-            //     $message->from($from);
-            //     $message->to($user_mail)->subject('New Email Send to you');
-            // });
-
+            $data['name'] = $teacher->first_name.' '.$teacher->last_name;  
+            $user_mail = $teacher->email;
+            $from = 'test@mail.com'; 
+            if($teacher->status==1){
+                Mail::send('email.approve_teacher_email',$data, function ($message) use ($user_mail,$from) {
+                    $message->from($from);
+                    $message->to($user_mail)->subject('New Email Send to you');
+                });
+            } 
             return response(
                 ['msg'=>'Your login permission successfully updated.']
             );

+ 6 - 0
app/Http/Controllers/StudentHomeController.php

@@ -28,6 +28,12 @@ class StudentHomeController extends Controller
       return view('home',compact('student_proposal'));
    }
 
+   public function application(){
+      $user = Auth::user();
+      $student_proposal =StudentProposal::where('student_id',$user->id)->orderBy('id','DESC')->get();
+      return view('application',compact('student_proposal'));
+   }
+
 
 
 

+ 8 - 8
app/Http/Controllers/TeacherAuth/RegisterController.php

@@ -87,14 +87,14 @@ class RegisterController extends Controller
 
        //Mail::to('test@mail.com')->send(new SignUp($data->id));
 
-        // $data['name'] = $user_data->first_name.' '.$user_data->last_name;  
-        // $user_mail = $user_data->email;
-        // $from = 'test@mail.com'; 
-
-        // Mail::send('email.send_apply_student_teacher_email',$data, function ($message) use ($user_mail,$from) {
-        //     $message->from($from);
-        //     $message->to($user_mail)->subject('New Email Send to you');
-        // });
+        $data['name'] = $user_data->first_name.' '.$user_data->last_name;  
+        $user_mail = $user_data->email;
+        $from = 'test@mail.com'; 
+
+        Mail::send('email.register_teacher_email',$data, function ($message) use ($user_mail,$from) {
+            $message->from($from);
+            $message->to($user_mail)->subject('New Email Send to you');
+        });
 
         return redirect()->to("/login-v2")->with('success','Your registration successfully saved. Please check your email for verification login.');
 

+ 2 - 1
composer.json

@@ -15,7 +15,8 @@
         "laravel/framework": "^7.29",
         "laravel/tinker": "^2.5",
         "laravel/ui": "2.5.0",
-        "laravelcollective/html": "~6.0"
+        "laravelcollective/html": "~6.0",
+        "league/flysystem-aws-s3-v3": "^1.0"
     },
     "require-dev": {
         "facade/ignition": "^2.0",

+ 275 - 1
composer.lock

@@ -4,7 +4,7 @@
         "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
         "This file is @generated automatically"
     ],
-    "content-hash": "e90ec2d19688682752adf782ffa74e6b",
+    "content-hash": "a5c8848983c58963f4396fdf22763e89",
     "packages": [
         {
             "name": "asm89/stack-cors",
@@ -62,6 +62,154 @@
             },
             "time": "2022-01-18T09:12:03+00:00"
         },
+        {
+            "name": "aws/aws-crt-php",
+            "version": "v1.2.1",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/awslabs/aws-crt-php.git",
+                "reference": "1926277fc71d253dfa820271ac5987bdb193ccf5"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/awslabs/aws-crt-php/zipball/1926277fc71d253dfa820271ac5987bdb193ccf5",
+                "reference": "1926277fc71d253dfa820271ac5987bdb193ccf5",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=5.5"
+            },
+            "require-dev": {
+                "phpunit/phpunit": "^4.8.35||^5.6.3||^9.5",
+                "yoast/phpunit-polyfills": "^1.0"
+            },
+            "suggest": {
+                "ext-awscrt": "Make sure you install awscrt native extension to use any of the functionality."
+            },
+            "type": "library",
+            "autoload": {
+                "classmap": [
+                    "src/"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "Apache-2.0"
+            ],
+            "authors": [
+                {
+                    "name": "AWS SDK Common Runtime Team",
+                    "email": "aws-sdk-common-runtime@amazon.com"
+                }
+            ],
+            "description": "AWS Common Runtime for PHP",
+            "homepage": "https://github.com/awslabs/aws-crt-php",
+            "keywords": [
+                "amazon",
+                "aws",
+                "crt",
+                "sdk"
+            ],
+            "support": {
+                "issues": "https://github.com/awslabs/aws-crt-php/issues",
+                "source": "https://github.com/awslabs/aws-crt-php/tree/v1.2.1"
+            },
+            "time": "2023-03-24T20:22:19+00:00"
+        },
+        {
+            "name": "aws/aws-sdk-php",
+            "version": "3.262.3",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/aws/aws-sdk-php.git",
+                "reference": "f5c8142d43846194bbb3bb40b18e7f6df2788409"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/f5c8142d43846194bbb3bb40b18e7f6df2788409",
+                "reference": "f5c8142d43846194bbb3bb40b18e7f6df2788409",
+                "shasum": ""
+            },
+            "require": {
+                "aws/aws-crt-php": "^1.0.4",
+                "ext-json": "*",
+                "ext-pcre": "*",
+                "ext-simplexml": "*",
+                "guzzlehttp/guzzle": "^6.5.8 || ^7.4.5",
+                "guzzlehttp/promises": "^1.4.0",
+                "guzzlehttp/psr7": "^1.8.5 || ^2.3",
+                "mtdowling/jmespath.php": "^2.6",
+                "php": ">=5.5"
+            },
+            "require-dev": {
+                "andrewsville/php-token-reflection": "^1.4",
+                "aws/aws-php-sns-message-validator": "~1.0",
+                "behat/behat": "~3.0",
+                "composer/composer": "^1.10.22",
+                "dms/phpunit-arraysubset-asserts": "^0.4.0",
+                "doctrine/cache": "~1.4",
+                "ext-dom": "*",
+                "ext-openssl": "*",
+                "ext-pcntl": "*",
+                "ext-sockets": "*",
+                "nette/neon": "^2.3",
+                "paragonie/random_compat": ">= 2",
+                "phpunit/phpunit": "^4.8.35 || ^5.6.3 || ^9.5",
+                "psr/cache": "^1.0",
+                "psr/simple-cache": "^1.0",
+                "sebastian/comparator": "^1.2.3 || ^4.0",
+                "yoast/phpunit-polyfills": "^1.0"
+            },
+            "suggest": {
+                "aws/aws-php-sns-message-validator": "To validate incoming SNS notifications",
+                "doctrine/cache": "To use the DoctrineCacheAdapter",
+                "ext-curl": "To send requests using cURL",
+                "ext-openssl": "Allows working with CloudFront private distributions and verifying received SNS messages",
+                "ext-sockets": "To use client-side monitoring"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "3.0-dev"
+                }
+            },
+            "autoload": {
+                "files": [
+                    "src/functions.php"
+                ],
+                "psr-4": {
+                    "Aws\\": "src/"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "Apache-2.0"
+            ],
+            "authors": [
+                {
+                    "name": "Amazon Web Services",
+                    "homepage": "http://aws.amazon.com"
+                }
+            ],
+            "description": "AWS SDK for PHP - Use Amazon Web Services in your PHP project",
+            "homepage": "http://aws.amazon.com/sdkforphp",
+            "keywords": [
+                "amazon",
+                "aws",
+                "cloud",
+                "dynamodb",
+                "ec2",
+                "glacier",
+                "s3",
+                "sdk"
+            ],
+            "support": {
+                "forum": "https://forums.aws.amazon.com/forum.jspa?forumID=80",
+                "issues": "https://github.com/aws/aws-sdk-php/issues",
+                "source": "https://github.com/aws/aws-sdk-php/tree/3.262.3"
+            },
+            "time": "2023-03-28T18:18:50+00:00"
+        },
         {
             "name": "brick/math",
             "version": "0.9.3",
@@ -1434,6 +1582,71 @@
             ],
             "time": "2022-10-04T09:16:37+00:00"
         },
+        {
+            "name": "league/flysystem-aws-s3-v3",
+            "version": "1.0.30",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/thephpleague/flysystem-aws-s3-v3.git",
+                "reference": "af286f291ebab6877bac0c359c6c2cb017eb061d"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/thephpleague/flysystem-aws-s3-v3/zipball/af286f291ebab6877bac0c359c6c2cb017eb061d",
+                "reference": "af286f291ebab6877bac0c359c6c2cb017eb061d",
+                "shasum": ""
+            },
+            "require": {
+                "aws/aws-sdk-php": "^3.20.0",
+                "league/flysystem": "^1.0.40",
+                "php": ">=5.5.0"
+            },
+            "require-dev": {
+                "henrikbjorn/phpspec-code-coverage": "~1.0.1",
+                "phpspec/phpspec": "^2.0.0"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "1.0-dev"
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "League\\Flysystem\\AwsS3v3\\": "src/"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Frank de Jonge",
+                    "email": "info@frenky.net"
+                }
+            ],
+            "description": "Flysystem adapter for the AWS S3 SDK v3.x",
+            "support": {
+                "issues": "https://github.com/thephpleague/flysystem-aws-s3-v3/issues",
+                "source": "https://github.com/thephpleague/flysystem-aws-s3-v3/tree/1.0.30"
+            },
+            "funding": [
+                {
+                    "url": "https://offset.earth/frankdejonge",
+                    "type": "custom"
+                },
+                {
+                    "url": "https://github.com/frankdejonge",
+                    "type": "github"
+                },
+                {
+                    "url": "https://tidelift.com/funding/github/packagist/league/flysystem",
+                    "type": "tidelift"
+                }
+            ],
+            "time": "2022-07-02T13:51:38+00:00"
+        },
         {
             "name": "league/mime-type-detection",
             "version": "1.11.0",
@@ -1592,6 +1805,67 @@
             ],
             "time": "2023-02-06T13:44:46+00:00"
         },
+        {
+            "name": "mtdowling/jmespath.php",
+            "version": "2.6.1",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/jmespath/jmespath.php.git",
+                "reference": "9b87907a81b87bc76d19a7fb2d61e61486ee9edb"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/jmespath/jmespath.php/zipball/9b87907a81b87bc76d19a7fb2d61e61486ee9edb",
+                "reference": "9b87907a81b87bc76d19a7fb2d61e61486ee9edb",
+                "shasum": ""
+            },
+            "require": {
+                "php": "^5.4 || ^7.0 || ^8.0",
+                "symfony/polyfill-mbstring": "^1.17"
+            },
+            "require-dev": {
+                "composer/xdebug-handler": "^1.4 || ^2.0",
+                "phpunit/phpunit": "^4.8.36 || ^7.5.15"
+            },
+            "bin": [
+                "bin/jp.php"
+            ],
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "2.6-dev"
+                }
+            },
+            "autoload": {
+                "files": [
+                    "src/JmesPath.php"
+                ],
+                "psr-4": {
+                    "JmesPath\\": "src/"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Michael Dowling",
+                    "email": "mtdowling@gmail.com",
+                    "homepage": "https://github.com/mtdowling"
+                }
+            ],
+            "description": "Declaratively specify how to extract elements from a JSON document",
+            "keywords": [
+                "json",
+                "jsonpath"
+            ],
+            "support": {
+                "issues": "https://github.com/jmespath/jmespath.php/issues",
+                "source": "https://github.com/jmespath/jmespath.php/tree/2.6.1"
+            },
+            "time": "2021-06-14T00:11:39+00:00"
+        },
         {
             "name": "nesbot/carbon",
             "version": "2.66.0",

+ 18 - 12
resources/views/application.blade.php

@@ -19,7 +19,8 @@
                     </div>
                     <div class="col-md-12">
                         <div class="scrolled_content_part">
-                            <div class="single_ad_pref_item">
+                            @foreach($student_proposal as $key=>$row)
+                            <div class="single_ad_pref_item">  
                                 <div class="p-3" style="border-top: 1px solid #eee; border-bottom-style: dashed; border-width: 0.5px 0px 0.5px; border-bottom-color: #eee; border-left: 1px solid #eee;  border-right: 1px solid #eee; display:flex;">
                                     <div class="left" style="width:50%;"> 
                                         <div class="uni_details" style="display:flex;">
@@ -27,31 +28,35 @@
                                                 <i class="fa fa fa-university ms-1"></i>
                                             </div>
                                             <div class="alert" style="background-color:white; padding: 3px 7px;"> 
-                                                <strong style="font-size:13px;">Mr Z</strong></br>
-                                                    <span style="font-size:10px; font-weight:400;"> designation </span>
+                                                <strong style="font-size:13px;">{{ cn($row,'teacher_details.first_name','')}} {{ cn($row,'teacher_details.last_name','')}}</strong></br>
+                                                    <span style="font-size:10px; font-weight:400;"> {{cn($row,'teacher_details.designation','')}} </span>
                                                     <span>.</span>
-                                                    <span style="font-size:10px; font-weight:400;"> department </span>
+                                                    @if(isset($row->teacher_details->department_name))
+                                                        <span style="font-size:10px; font-weight:400;"> {{cn($row,'teacher_details.department_name.name','')}}</span>
+                                                    @else
+                                                        <span style="font-size:10px; font-weight:400;">{{cn($row,'teacher_details.others_department','')}}</span>
+                                                    @endif
                                                     <span>.</span>
-                                                    <span style="font-size:10px; font-weight:400;"> university-name </span>
+                                                    <span style="font-size:10px; font-weight:400;"> {{cn($row,'teacher_details.university_name','')}} </span>
                                             </div>
                                         </div>
                                     </div>
                                     <div class="text-end" style="width:50%;">
                                         <span style="font-size:11px;">Apply Reference</span><br>
-                                        <span class="label_badge_radius" style="font-size:11px !important; font-weight:800;">23302</span>
+                                        <span class="label_badge_radius" style="font-size:11px !important; font-weight:800;">{{$row->student_apply_ref ?? ''}}</span>
                                     </div>
                                 </div>  
                                 <div class="p-3" style="display:flex; border-width: 0px 0px 0.5px; border-top-style: dashed; border-top-color: #eee; border-left: 1px solid #eee; border-right: 1px solid #eee; border-bottom-style: dashed; border-bottom-color: #eee;">
                                     <div class="left" style="width:50%;"> 
                                         <div class="uni_details" style="display:flex;">
                                             <div class="inner_right ms-5">
-                                                <strong style="font-size:13px;">Title</strong></br>
+                                                <strong style="font-size:13px;">({{cn($row,'proposal.proposal_ref','')}}) - {{cn($row,'proposal.title','')}}</strong></br>
                                                     <div style="margin-top: -8px;">
-                                                        <span style="font-size:10px;">methology</span>
+                                                        <span style="font-size:10px;">{{cn($row,'proposal.methology','')}}</span>
                                                         <span>.</span>
-                                                        <span style="font-size:10px;">department</span> 
+                                                        <span style="font-size:10px;">{{cn($row,'proposal.department','')}}</span> 
                                                         <span>.</span>  
-                                                        <span style="font-size:10px;">status</span> 
+                                                        <span style="font-size:10px;">{{cn($row,'proposal.status','')}}</span> 
                                                     </div>  
                                             </div>
                                         </div>
@@ -61,7 +66,7 @@
                                     <div class="left" style="width:50%;">
                                         <div class="uni_details" style="display:flex;">
                                             <div class="inner_right ms-5">
-                                                <span style="font-size:11px;">Start Date : Sep 2010</span><br>
+                                                <span style="font-size:11px;">Start Date : {{ date('M Y', strtotime($row->created_at))}}</span><br>
                                             </div>
                                         </div>
                                     </div>
@@ -70,8 +75,9 @@
                                         <span class="label_badge_radius" style="background-color: #d8fdd8; color: green;">Applied</span>
                                         <h6 style="font-size:11px !important; font-weight:800;"></h6>
                                     </div>
-                                </div>  
+                                </div> 
                             </div> 
+                            @endforeach  
                         </div>
                     </div> 
                 </div>

+ 11 - 11
resources/views/email/approve_teacher_email.blade.php

@@ -72,17 +72,17 @@
                 margin: 0px;
             }
             .btn1{
-    background-color: #141639c4 !important; 
-    color:white !important; 
-    border-radius: 20px; 
-    box-shadow:none !important;
-}
-.btn1:hover{
-    background: #ffff !important;
-    color: #141639c4 !important;
-    border-radius: 20px;
-    border: 1px solid #141639c4;
-}
+                background-color: #141639c4 !important; 
+                color:white !important; 
+                border-radius: 20px; 
+                box-shadow:none !important;
+            }
+            .btn1:hover{
+                background: #ffff !important;
+                color: #141639c4 !important;
+                border-radius: 20px;
+                border: 1px solid #141639c4;
+            }
        </style>
         <section>
             <div class="container mt-5 mb-5">

+ 0 - 3
resources/views/email/send_apply_student_teacher_email.blade.php

@@ -1,3 +0,0 @@
-<div>
-   Dear <h4>{{ $name }}</h4>
-</div>

+ 3 - 3
resources/views/modal_pages/view_apply_proposal.blade.php

@@ -27,11 +27,11 @@
                                 <label class="form-check-label" for="flexRadioDefault1" style="font-size: 13px; font-weight: 400;">({{cn($std_proposal,'proposal.proposal_ref','')}}) - {{cn($std_proposal,'proposal.title','')}}</label>
                                 <div class="pro_title mb-2 mt-3" style="width: 69%;">
                                     <div style="margin-top: -11px; display: block;">
-                                        <span style="font-weight:400;">methology</span>
+                                        <span style="font-weight:400;">{{cn($std_proposal,'proposal.methology','')}}</span>
                                         <span>.</span>
-                                        <span style="font-weight:400;">department</span> 
+                                        <span style="font-weight:400;">{{cn($std_proposal,'proposal.department','')}}</span> 
                                         <span>.</span>  
-                                        <span style="font-weight:400;">funding status</span> 
+                                        <span style="font-weight:400;">{{cn($std_proposal,'proposal.status','')}}</span> 
                                     </div>                                             
                                 </div>
                             </div>

+ 4 - 3
routes/web.php

@@ -29,9 +29,9 @@ Route::get('/dashboard', function () {
     return view('dashboard');
 });
 
-Route::get('/application', function () {
-    return view('application');
-});
+// Route::get('/application', function () {
+//     return view('application');
+// });
 
 Route::get('/profile', function () {
     return view('profile');
@@ -60,6 +60,7 @@ Route::get('/email-verification/{id}', [App\Http\Controllers\RegisterController:
 // });
 Route::group(['middleware' => ['auth']], function() {
 Route::get('/home', [App\Http\Controllers\StudentHomeController::class,'index']);
+Route::get('/application', [App\Http\Controllers\StudentHomeController::class,'application']);
 Route::post('std-logout', [App\Http\Controllers\StudentHomeController::class,'logout'])->name('std-logout');
 Route::get('/save-as-complete', [App\Http\Controllers\StudentHomeController::class,'save_as_complete'])->name('save-as-complete');
 Route::post('/institution_save', [App\Http\Controllers\StudentHomeController::class,'institution_save'])->name('institution-save');