I've a PermissionController with a permission() function like below, and i want to call the permission() function in another controller. How can i call my permission() function to another controller ?
here my PermissionController
class PermissionController extends Controller
{
    public function permission(){
    $checkPermission = User::leftJoin('employees', 'employees.user_id', '=', 'users.id')
    ->leftJoin('positions', 'employees.position_id', '=', 'positions.id')
    ->leftJoin('divisions', 'employees.division_id', '=', 'divisions.id')
    ->where(function($query){
        $query->where('division_name', 'Sales')
                ->orWhere('division_name', '=', 'Project Management')
                ->orWhere('position_name', '=', 'Dept Head');
    })
    ->get();
    }   
}
 
     
     
     
     
    