<repo_name>kittymama97/Milestone3-256<file_sep>/app/Models/JobModel.php
<?php
namespace App\Models;
class JobModel
{
    private $job_id;
    private $company_name;
    private $company_city;
    private $company_state;
    private $company_zip_code;
    private $job_title;
    private $job_desciption;
    private $date_posted;
    public function __construct($job_id, $company_name, $company_city, $company_state, $company_zip_code, $job_title, $job_description, $date_posted)
    {
        $this->job_id = $job_id;
        $this->company_name = $company_name;
        $this->company_city = $company_city;
        $this->company_state = $company_state;
        $this->company_zip_code = $company_zip_code;
        $this->job_title = $job_title;
        $this->job_desciption = $job_description;
        $this->date_posted = $date_posted;
    }
    /**
     *
     * @return mixed
     */
    public function getJob_id()
    {
        return $this->job_id;
    }
    /**
     *
     * @param mixed $job_id
     */
    public function setJob_id($job_id)
    {
        $this->job_id = $job_id;
    }
    /**
     *
     * @return mixed
     */
    public function getCompany_name()
    {
        return $this->company_name;
    }
    /**
     *
     * @param mixed $company_name
     */
    public function setCompany_name($company_name)
    {
        $this->company_name = $company_name;
    }
    /**
     *
     * @return mixed
     */
    public function getCompany_city()
    {
        return $this->company_city;
    }
    /**
     *
     * @param mixed $company_city
     */
    public function setCompany_city($company_city)
    {
        $this->company_city = $company_city;
    }
    /**
     *
     * @return mixed
     */
    public function getCompany_state()
    {
        return $this->company_state;
    }
    /**
     *
     * @param mixed $company_state
     */
    public function setCompany_state($company_state)
    {
        $this->company_state = $company_state;
    }
    /**
     *
     * @return mixed
     */
    public function getCompany_zip_code()
    {
        return $this->company_zip_code;
    }
    /**
     *
     * @param mixed $company_zip_code
     */
    public function setCompany_zip_code($company_zip_code)
    {
        $this->company_zip_code = $company_zip_code;
    }
    /**
     *
     * @return mixed
     */
    public function getJob_title()
    {
        return $this->job_title;
    }
    /**
     *
     * @param mixed $job_title
     */
    public function setJob_title($job_title)
    {
        $this->job_title = $job_title;
    }
    /**
     *
     * @return mixed
     */
    public function getJob_desciption()
    {
        return $this->job_desciption;
    }
    /**
     *
     * @param mixed $job_desciption
     */
    public function setJob_desciption($job_desciption)
    {
        $this->job_desciption = $job_desciption;
    }
    /**
     *
     * @return mixed
     */
    public function getDate_posted()
    {
        return $this->date_posted;
    }
    /**
     *
     * @param mixed $date_posted
     */
    public function setDate_posted($date_posted)
    {
        $this->date_posted = $date_posted;
    }
}<file_sep>/app/Services/Utility/securePage.php
<?php
if (isset($_SESSION['principle']) == false || $_SESSION['principle'] == NULL || $_SESSION['principle'] == false) {
    header("Location: login2.blade.php");
}<file_sep>/app/Services/Data/JobDataService.php
<?php
namespace App\Services\Data;

use App\Models\JobModel;
use Illuminate\Support\Facades\Log;
use PDO;
use PDOException;
use App\Services\Utility\DatabaseException;

class JobDataService
{

    private $conn = null;

    // best practice: do not create a database connections in a dao
    // so you can support atomic database transactions
    public function __construct($conn)
    {
        $this->conn = $conn;
    }

    public function createJobPost(JobModel $jobModel, $conn)
    {
        Log::info("Entering ProfileDataService.createJobPost()");
        try {
            // select variables and see if the row exists
            $company_name = $jobModel->getCompany_name();
            $company_city = $jobModel->getCompany_city();
            $company_state = $jobModel->getCompany_state();
            $company_zip = $jobModel->getCompany_zip_code();
            $job_title = $jobModel->getJob_title();
            $job_description = $jobModel->getJob_desciption();
            $date_posted = $jobModel->getDate_posted();
            // prepared statements is created
            $stmt = $this->conn->prepare("INSERT INTO `JOB` (`JOB_ID`, `COMPANY_NAME`, `COMPANY_CITY`, `COMPANY_STATE`, `COMPANY_ZIP_CODE`, `JOB_TITLE`, `JOB_DESCRIPTION`, `DATE_POSTED`) VALUES (NULL, :company_name, :company_city, :company_state, :company_zip_code, :job_title, :job_description, :date_posted);");
            // binds parameters
            $stmt->bindParam(':company_name', $company_name);
            $stmt->bindParam(':company_city', $company_city);
            $stmt->bindParam(':company_state', $company_state);
            $stmt->bindParam(':company_zip_code', $company_zip);
            $stmt->bindParam(':job_title', $job_title);
            $stmt->bindParam(':job_description', $job_description);
            $stmt->bindParam(':date_posted', $date_posted);
            /*
             * see if skills existed and return true if found
             * else return false if not found
             */
            if ($stmt->execute()) {
                Log::info("Exit JobDataService.createJobPost() with true");
                return true;
            } else {
                Log::info("Exit JobDataService.createJobPost() with false");
                return false;
            }
        } catch (PDOException $e) {
            // best practice: catch all exceptions (do not swallow exceptions),
            // log the exception, do not throw technology specific exceptions,
            // and throw a custom exception
            Log::error("Exception: ", array(
                "message" => $e->getMessage()
            ));
            throw new DatabaseException("Database Exception: " . $e->getMessage(), 0, $e);
        }
    }

    public function updateJobPost(JobModel $jobModel, $conn)
    {
        Log::info("Entering ProfileDataService.updateJobPost()");
        try {
            // select variables and see if the row exists
            $job_id = $jobModel->getJob_id();
            $company_name = $jobModel->getCompany_name();
            $company_city = $jobModel->getCompany_city();
            $company_state = $jobModel->getCompany_state();
            $company_zip = $jobModel->getCompany_zip_code();
            $job_title = $jobModel->getJob_title();
            $job_description = $jobModel->getJob_desciption();
            $date_posted = $jobModel->getDate_posted();
            // prepared statements is created
            $stmt = $this->conn->prepare("UPDATE `JOB` SET `COMPANY_NAME` = :company_name, `COMPANY_CITY` = :company_city, `COMPANY_STATE` = :company_state, `COMPANY_ZIP_CODE` = :company_zip_code, `JOB_TITLE` = :job_title, `JOB_DESCRIPTION` = :job_description, `DATE_POSTED` = :date_posted WHERE `JOB_ID` = :job_id");
            // binds parameters
            $stmt->bindParam(':job_id', $job_id);
            $stmt->bindParam(':company_name', $company_name);
            $stmt->bindParam(':company_city', $company_city);
            $stmt->bindParam(':company_state', $company_state);
            $stmt->bindParam(':company_zip_code', $company_zip);
            $stmt->bindParam(':job_title', $job_title);
            $stmt->bindParam(':job_desciption', $job_description);
            $stmt->bindParam(':date_posted', $date_posted);
            /*
             * see if jobs existed and return true if found
             * else return false if not found
             */
            if ($stmt->execute()) {
                Log::info("Exit JobDataService.updateJobPost() with true");
                return true;
            } else {
                Log::info("Exit JobDataService.updateJobPost() with false");
                return false;
            }
        } catch (PDOException $e) {
            // best practice: catch all exceptions (do not swallow exceptions),
            // log the exception, do not throw technology specific exceptions,
            // and throw a custom exception
            Log::error("Exception: ", array(
                "message" => $e->getMessage()
            ));
            throw new DatabaseException("Database Exception: " . $e->getMessage(), 0, $e);
        }
    }

    public function deleteJobPost($id)
    {
        Log::info("Entering UserDataService.deleteUser()");
        try {
            // prepared statement is created
            $stmt = $this->conn->prepare('DELETE FROM JOB WHERE JOB_ID = :id');
            // bind parameter
            $stmt->bindParam(':id', $id);
            // executes statement
            $delete = $stmt->execute();
            // returns true or false if skill has been deleted from database
            if ($delete) {
                Log::info("Exiting JobDataService.deleteJobPost() with returning true");
                return true;
            } else {
                Log::info("Exiting JobDataService.deleteJobPost() with returning false");
                return false;
            }
        } catch (\PDOException $e) {
            Log::error("Exception: ", array(
                "message" => $e->getMessage()
            ));
            throw new DatabaseException("Database Exception: " . $e->getMessage(), 0, $e);
        }
    }

    public function showAllJobPosts()
    {
        Log::info("Entering JobDataService.showAllJobPosts()");
        try {
            // select contact and see if the row exists
            $stmt = $this->conn->prepare('SELECT * FROM JOB');
            $stmt->execute();
            if ($stmt->rowCount() > 0) {
                // contact array is created
                $jobArray = array();
                // fetches result from prepared statement and returns as an array
                while ($job = $stmt->fetch(PDO::FETCH_ASSOC)) {
                    // inserts variables into end of array
                    array_push($jobArray, $job);
                }
                Log::info("Exit JobDataService.showAllJobPosts() with true");
                // return contact array
                return $jobArray;
            }
        } catch (PDOException $e) {
            // best practice: catch all exceptions (do not swallow exceptions),
            // log the exception, do not throw technology specific exceptions,
            // and throw a custom exception
            Log::error("Exception: ", array(
                "message" => $e->getMessage()
            ));
            throw new DatabaseException("Database Exception: " . $e->getMessage(), 0, $e);
        }
    }
}
<file_sep>/app/Services/Business/UserBusinessService.php
<?php
// <NAME>
// CST 256
// February 3, 2019
// This is my own work
/* Handles user business logic and connections to database */
namespace App\Services\Business;

use PDO;
use App\Models\UserModel;
use Illuminate\Support\Facades\Log;
use App\Services\Data\UserDataService;

class UserBusinessService
{

    public function createUser(UserModel $user)
    {
        Log::info("Entering UserBusinessService.createUser()");

        // best practice: externalize your app configuration
        // get credentials for accessing the database
        $servername = config("database.connections.mysql.host");
        $dbname = config("database.connections.mysql.database");
        $username = config("database.connections.mysql.username");
        $password = config("database.connections.mysql.password");

        // best practice: do not create database connections in a dao
        // create connection
        $conn = new PDO("mysql:host=$servername;dbname=$dbname", $username, $password);
        $conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);

        // create a security service dao with this connection and try to find the password in user
        $service = new UserDataService($conn);
        $flag = $service->createUser($user);

        // return the finder results
        Log::info("Exit UserBusinessService.createUser() with " . $flag);
        return $flag;
    }

    public function updateUser(UserModel $userModel)
    {
        Log::info("Entering UserBusinessService.updateUser()");
        // get credentials for accessing the database
        $servername = config("database.connections.mysql.host");
        $dbname = config("database.connections.mysql.database");
        $username = config("database.connections.mysql.username");
        $password = config("database.connections.mysql.password");
        // best practice: do not create database connections in a dao
        // create connection
        $conn = new PDO("mysql:host=$servername;dbname=$dbname", $username, $password);
        $conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
        // create a security service dao with this connection and try to find users
        $service = new UserDataService($conn);
        // calls the findAllUsers command
        $flag = $service->updateUser($userModel);
        // return the finder results
        return $flag;
        Log::info("Exit UserBusinessService.displayUsers() with " . $flag);
    }

    public function displayUsers()
    {
        Log::info("Entering UserBusinessService.displayUsers()");
        // get credentials for accessing the database
        $servername = config("database.connections.mysql.host");
        $dbname = config("database.connections.mysql.database");
        $username = config("database.connections.mysql.username");
        $password = config("database.connections.mysql.password");
        // best practice: do not create database connections in a dao
        // create connection
        $conn = new PDO("mysql:host=$servername;dbname=$dbname", $username, $password);
        $conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
        // create a security service dao with this connection and try to find users
        $service = new UserDataService($conn);
        // calls the findAllUsers command
        $flag = $service->findAllUsers();
        // return the finder results
        return $flag;
        Log::info("Exit UserBusinessService.displayUsers() with " . $flag);
    }
}<file_sep>/app/Http/Controllers/ProfileController.php
<?php
// Milestone 1
// Login Module
// <NAME>
// January 20, 2019
// This is my own work
/* Profile controller processes the submitted data for user profile */
namespace App\Http\Controllers;

use Illuminate\Http\Request;
use Illuminate\Support\Facades\Log;
use Exception;
use App\Models\SkillsModel;
use App\Services\Business\ProfileBusinessService;
use App\Models\EducationModel;
use App\Models\JobHistoryModel;
use App\Models\ContactModel;
use App\Models\UserModel;
use App\Services\Business\UserBusinessService;

class ProfileController extends Controller
{

    public function createSkills(Request $request)
    {
        try {
            // 1. process form data
            // get posted form data
            $skills = $request->input('user_skills');
            $user_user_id = $request->input('user_user_id');
            // assigns the data from the variables to one array named $data
            $data = [
                'user_skills' => $skills,
                'user_user_id' => $user_user_id
            ];
            // 2. create object model
            // save posted form data in user object model
            $userSkills = new SkillsModel(0, $skills, $user_user_id);
            // 3. execute business service
            // call security business service
            $service = new ProfileBusinessService();
            $status = $service->createSkills($userSkills);
            // 4. process results from business service (navigation)
            // render a failed or success response view and pass the user model to it
            if ($status) {
                $data = [
                    'model' => $userSkills
                ];
                return view('createSkillsSuccess')->with($data);
            } else {
                return view('createSkillsFail');
            }
        } catch (Exception $e) {
            // best practice: call all exceptions, log the exception, and display a common error page (or use a global exception handler)
            // log exception and display exception view
            Log::error("Exception: ", array(
                "message" => $e->getMessage()
            ));
            $data = [
                'errorMsg' => $e->getMessage()
            ];
            return view('exception')->with($data);
        }
    }

    public function updateSkills(Request $request)
    {
        try {
            // 1. process form data
            // get posted form data
            $skills_id = $request->input('skills_id');
            $skills = $request->input('user_skills');
            // assigns the data from the variables to one array named $data
            $data = [
                'skills_id' => $skills_id,
                'user_skills' => $skills
            ];
            // 2. create object model
            // save posted form data in user object model
            $userSkillsUpdate = new SkillsModel(0, $skills);
            // 3. execute business service
            // call security business service
            $service = new ProfileBusinessService();
            $status = $service->updateSkills($userSkillsUpdate);
            // 4. process results from business service (navigation)
            // render a failed or success response view and pass the user model to it
            if ($status) {
                $data = [
                    'model' => $userSkillsUpdate
                ];
                return view('updateSkillsSuccess')->with($data);
            } else {
                return view('updateSkillsFail');
            }
        } catch (Exception $e) {
            // best practice: call all exceptions, log the exception, and display a common error page (or use a global exception handler)
            // log exception and display exception view
            Log::error("Exception: ", array(
                "message" => $e->getMessage()
            ));
            $data = [
                'errorMsg' => $e->getMessage()
            ];
            return view('exception')->with($data);
        }
    }

    public function deleteSkills()
    {
        try {
            // GET method for user id
            $id = $_GET['SKILLS_ID'];
            // call user business service
            $service = new ProfileBusinessService();
            $delete = $service->deleteSkills($id);
            // render a success or fail view
            if ($delete) {
                return view('deleteSkillsSuccess');
            } else {
                return view('deleteSkillsFail');
            }
        } catch (Exception $e) {
            // best practice: call all exceptions, log the exception, and display a common error page (or use a global exception handler)
            // log exception and display exception view
            Log::error("Exception: ", array(
                "message" => $e->getMessage()
            ));
            $data = [
                'errorMsg' => $e->getMessage()
            ];
            return view('exception')->with($data);
        }
    }

    public function showSkills()
    {
        try {
            $user_user_id = $_GET['USER_USER_ID'];
            // call profile business service
            $service = new ProfileBusinessService();
            $skills = $service->showSkills($user_user_id);
            // render a response view
            if ($skills) {
                return view('displaySkills')->with($skills);
            }
        } catch (Exception $e) {
            // best practice: call all exceptions, log the exception, and display a common error page (or use a global exception handler)
            // log exception and display exception view
            Log::error("Exception: ", array(
                "message" => $e->getMessage()
            ));
            $data = [
                'errorMsg' => $e->getMessage()
            ];
            return view('exception')->with($data);
        }
    }

    public function createEducation(Request $request)
    {
        try {
            // 1. process form data
            // get posted form data
            $degree = $request->input('degree');
            $school_name = $request->input('school_name');
            $school_city = $request->input('school_city');
            $school_state = $request->input('school_state');
            $school_zip_code = $request->input('school_zip_code');
            $graduation_year = $request->input('graduation_year');
            // assigns the data from the variables to one array named $data

            $data = [
                'degree' => $degree,
                'school_name' => $school_name,
                'school_city' => $school_city,
                'school_state' => $school_state,
                'school_zip_code' => $school_zip_code,
                'graduation_year' => $graduation_year
            ];
            // 2. create object model
            // save posted form data in user object model
            $education = new EducationModel(0, $degree, $school_name, $school_city, $school_state, $school_zip_code, $graduation_year);
            // 3. execute business service
            // call security business service
            $service = new ProfileBusinessService();
            $status = $service->createEducation($education);
            // 4. process results from business service (navigation)
            // render a failed or success response view and pass the user model to it
            if ($status) {
                $data = [
                    'model' => $education
                ];
                return view('createEducationSuccess')->with($data);
            } else {
                return view('createEducationFail');
            }
        } catch (Exception $e) {
            // best practice: call all exceptions, log the exception, and display a common error page (or use a global exception handler)
            // log exception and display exception view
            Log::error("Exception: ", array(
                "message" => $e->getMessage()
            ));
            $data = [
                'errorMsg' => $e->getMessage()
            ];
            return view('exception')->with($data);
        }
    }

    public function updateEducation(Request $request)
    {
        try {
            // 1. process form data
            // get posted form data
            $degree = $request->input('degree');
            $school_name = $request->input('school_name');
            $school_city = $request->input('school_city');
            $school_state = $request->input('school_state');
            $school_zip_code = $request->input('school_zip_code');
            $graduation_year = $request->input('graduation_year');
            // assigns the data from the variables to one array named $data
            $data = [
                'degree' => $degree,
                'school_name' => $school_name,
                'school_city' => $school_city,
                'school_state' => $school_state,
                'school_zip_code' => $school_zip_code,
                'graduation_year' => $graduation_year
            ];
            // 2. create object model
            // save posted form data in user object model
            $educationUpdate = new EducationModel(0, $degree, $school_name, $school_state, $school_city, $school_zip_code, $graduation_year);
            // 3. execute business service
            // call security business service
            $service = new ProfileBusinessService();
            $status = $service->updateEducation($educationUpdate);
            // 4. process results from business service (navigation)
            // render a failed or success response view and pass the user model to it
            if ($status) {
                $data = [
                    'model' => $educationUpdate
                ];
                return view('updateEducationSuccess')->with($data);
            } else {
                return view('updateEducationFail');
            }
        } catch (Exception $e) {
            // best practice: call all exceptions, log the exception, and display a common error page (or use a global exception handler)
            // log exception and display exception view
            Log::error("Exception: ", array(
                "message" => $e->getMessage()
            ));
            $data = [
                'errorMsg' => $e->getMessage()
            ];
            return view('exception')->with($data);
        }
    }

    public function deleteEducation()
    {
        try {
            // GET method for user id
            $id = $_GET['EDUCATION_ID'];
            // call user business service
            $service = new ProfileBusinessService();
            $delete = $service->deleteEducation($id);
            // render a success or fail view
            if ($delete) {
                return view('deleteEducationSuccess');
            } else {
                return view('deleteEducationFail');
            }
        } catch (Exception $e) {
            // best practice: call all exceptions, log the exception, and display a common error page (or use a global exception handler)
            // log exception and display exception view
            Log::error("Exception: ", array(
                "message" => $e->getMessage()
            ));
            $data = [
                'errorMsg' => $e->getMessage()
            ];
            return view('exception')->with($data);
        }
    }

    public function showEducation()
    {
        try {
            // call profile business service
            $service = new ProfileBusinessService();
            $profile = $service->showEducation();
            // render a response view
            if ($profile) {
                return view('displayProfile')->with($profile);
            }
        } catch (Exception $e) {
            // best practice: call all exceptions, log the exception, and display a common error page (or use a global exception handler)
            // log exception and display exception view
            Log::error("Exception: ", array(
                "message" => $e->getMessage()
            ));
            $data = [
                'errorMsg' => $e->getMessage()
            ];
            return view('exception')->with($data);
        }
    }

    public function createJobHistory(Request $request)
    {
        try {
            // 1. process form data
            // get posted form data
            $current_job = $request->input('current_job');
            $previous_job = $request->input('previous_job');
            $current_employment_date = $request->input('current_employment_date');
            $previous_employment_date = $request->input('previous_employment_date');
            $current_employment_location = $request->input('current_employment_location');
            // // assigns the data from the variables to one array named $data
            $data = [
                'current_job' => $current_job,
                'previous_job' => $previous_job,
                'current_employment_date' => $current_employment_date,
                'previous_employment_date' => $previous_employment_date,
                'current_employment_location' => $previous_job
            ];
            // 2. create object model
            // save posted form data in user object model
            $jobHistory = new JobHistoryModel(0, $current_job, $previous_job, $current_employment_date, $previous_employment_date, $current_employment_location);
            // 3. execute business service
            // call security business service
            $service = new ProfileBusinessService();
            $status = $service->createJobHistory($jobHistory);
            // 4. process results from business service (navigation)
            // render a failed or success response view and pass the user model to it
            if ($status) {
                $data = [
                    'model' => $jobHistory
                ];
                return view('createJobHistorySuccess')->with($data);
            } else {
                return view('createJobHistoryFail');
            }
        } catch (Exception $e) {
            // best practice: call all exceptions, log the exception, and display a common error page (or use a global exception handler)
            // log exception and display exception view
            Log::error("Exception: ", array(
                "message" => $e->getMessage()
            ));
            $data = [
                'errorMsg' => $e->getMessage()
            ];
            return view('exception')->with($data);
        }
    }

    public function updateJobHistory(Request $request)
    {
        try {
            // 1. process form data
            // get posted form data
            $current_job = $request->input('current_job');
            $previous_job = $request->input('previous_job');
            $current_employment_date = $request->input('current_employment_date');
            $previous_employment_date = $request->input('previous_employment_date');
            $current_employment_location = $request->input('current_employment_location');
            // assigns the data from the variables to one array named $data
            $data = [
                'current_job' => $current_job,
                'previous_job' => $previous_job,
                'current_employment_date' => $current_employment_date,
                'previous_employment_date' => $previous_employment_date,
                'current_employment_location' => $current_employment_location
            ];
            // 2. create object model
            // save posted form data in user object model
            $jobHistoryUpdate = new EducationModel(0, $current_job, $previous_job, $current_employment_date, $previous_employment_date, $current_employment_location);
            // 3. execute business service
            // call security business service
            $service = new ProfileBusinessService();
            $status = $service->updateJobHistory($jobHistoryUpdate);
            // 4. process results from business service (navigation)
            // render a failed or success response view and pass the user model to it
            if ($status) {
                $data = [
                    'model' => $jobHistoryUpdate
                ];
                return view('updateJobHistorySucess')->with($data);
            } else {
                return view('updateJobHistoryFail');
            }
        } catch (Exception $e) {
            // best practice: call all exceptions, log the exception, and display a common error page (or use a global exception handler)
            // log exception and display exception view
            Log::error("Exception: ", array(
                "message" => $e->getMessage()
            ));
            $data = [
                'errorMsg' => $e->getMessage()
            ];
            return view('exception')->with($data);
        }
    }

    public function deleteJobHistory()
    {
        try {
            // GET method for user id
            $id = $_GET['JOB_HISTORY_ID'];
            // call user business service
            $service = new ProfileBusinessService();
            $delete = $service->deleteJobHistory($id);
            // render a success or fail view
            if ($delete) {
                return view('deleteJobHistorySuccess');
            } else {
                return view('deleteJobHistoryFail');
            }
        } catch (Exception $e) {
            // best practice: call all exceptions, log the exception, and display a common error page (or use a global exception handler)
            // log exception and display exception view
            Log::error("Exception: ", array(
                "message" => $e->getMessage()
            ));
            $data = [
                'errorMsg' => $e->getMessage()
            ];
            return view('exception')->with($data);
        }
    }

    public function showJobHistory()
    {
        try {
            // call profile business service
            $service = new ProfileBusinessService();
            $profile = $service->showJobHistory();
            // render a response view
            if ($profile) {
                return view('displayProfile')->with($profile);
            }
        } catch (Exception $e) {
            // best practice: call all exceptions, log the exception, and display a common error page (or use a global exception handler)
            // log exception and display exception view
            Log::error("Exception: ", array(
                "message" => $e->getMessage()
            ));
            $data = [
                'errorMsg' => $e->getMessage()
            ];
            return view('exception')->with($data);
        }
    }

    public function createContactInformation(Request $request)
    {
        try {
            // 1. process form data
            // get posted form data
            $business_email = $request->input('business_email');
            $phone_number = $request->input('phone_number');
            $street_address = $request->input('street_address');
            $city = $request->input('city');
            $state = $request->input('state');
            $zip_code = $request->input('zip_code');
            $about_me = $request->input('about_me');

            // assigns the data from the variables to one array named $data
            $data = [
                'business_email' => $business_email,
                'phone_number' => $phone_number,
                'street_address' => $street_address,
                'city' => $city,
                'state' => $state,
                'zip_code' => $zip_code,
                'about_me' => $about_me
            ];
            // 2. create object model
            // save posted form data in user object model
            $contact = new ContactModel(0, $business_email, $phone_number, $street_address, $state, $city, $zip_code, $about_me);
            // 3. execute business service
            // call security business service
            $service = new ProfileBusinessService();
            $status = $service->createContactInfo($contact);
            // 4. process results from business service (navigation)
            // render a failed or success response view and pass the user model to it
            if ($status) {
                $data = [
                    'model' => $contact
                ];
                return view('createContactInformationSuccess')->with($data);
            } else {
                return view('createContactInformationFail');
            }
        } catch (Exception $e) {
            // best practice: call all exceptions, log the exception, and display a common error page (or use a global exception handler)
            // log exception and display exception view
            Log::error("Exception: ", array(
                "message" => $e->getMessage()
            ));
            $data = [
                'errorMsg' => $e->getMessage()
            ];
            return view('exception')->with($data);
        }
    }

    public function updateContactInformation(Request $request)
    {
        try {
            // 1. process form data
            // get posted form data
            $business_email = $request->input('business_email');
            $phone_number = $request->input('phone_number');
            $street_address = $request->input('street_address');
            $city = $request->input('city');
            $state = $request->input('state');
            $zip_code = $request->input('zip_code');
            $about_me = $request->input('about_me');

            $data = [
                'business_email' => $business_email,
                'phone_number' => $phone_number,
                'street_address' => $street_address,
                'city' => $city,
                'state' => $state,
                'zip_code' => $zip_code,
                'about_me' => $about_me
            ];
            // 2. create object model
            // save posted form data in user object model
            $contact = new ContactModel(0, $business_email, $phone_number, $street_address, $city, $state, $zip_code, $about_me);
            // 3. execute business service
            // call security business service
            $service = new ProfileBusinessService();
            $status = $service->updateContactInfo($contact);
            // 4. process results from business service (navigation)
            // render a failed or success response view and pass the user model to it
            if ($status) {
                $data = [
                    'model' => $contact
                ];
                return view('updateContactInformationSuccess')->with($data);
            } else {
                return view('updateContactInformationFail');
            }
        } catch (Exception $e) {
            // best practice: call all exceptions, log the exception, and display a common error page (or use a global exception handler)
            // log exception and display exception view
            Log::error("Exception: ", array(
                "message" => $e->getMessage()
            ));
            $data = [
                'errorMsg' => $e->getMessage()
            ];
            return view('exception')->with($data);
        }
    }

    public function deleteContactInformation()
    {
        try {
            // GET method for user id
            $id = $_GET['CONTACT_ID'];
            // call user business service
            $service = new ProfileBusinessService();
            $delete = $service->deleteSkills($id);
            // render a success or fail view
            if ($delete) {
                return view('deleteContactInformationSuccess');
            } else {
                return view('deleteContactInformationFail');
            }
        } catch (Exception $e) {
            // best practice: call all exceptions, log the exception, and display a common error page (or use a global exception handler)
            // log exception and display exception view
            Log::error("Exception: ", array(
                "message" => $e->getMessage()
            ));
            $data = [
                'errorMsg' => $e->getMessage()
            ];
            return view('exception')->with($data);
        }
    }

    public function showContactInformation()
    {
        try {
            // call profile business service
            $service = new ProfileBusinessService();
            $profile = $service->showContactInfo();
            // render a response view
            if ($profile) {
                return view('displayProfile')->with($profile);
            }
        } catch (Exception $e) {
            // best practice: call all exceptions, log the exception, and display a common error page (or use a global exception handler)
            // log exception and display exception view
            Log::error("Exception: ", array(
                "message" => $e->getMessage()
            ));
            $data = [
                'errorMsg' => $e->getMessage()
            ];
            return view('exception')->with($data);
        }
    }

    public function updateUser(Request $request)
    {
        try {
            // 1. process form data
            // get posted form data
            $firstname = $request->input('firstname');
            $lastname = $request->input('lastname');
            $email = $request->input('email');
            $username = $request->input('username');
            $password = $request->input('password');
            // 2. create object model
            // save posted form data in user object model
            $user = new UserModel(0, $firstname, $lastname, $email, $username, $password);
            // 3. execute business service
            // call security business service
            $service = new UserBusinessService();
            $status = $service->updateUser($user);
            // 4. process results from business service (navigation)
            // render a failed or success response view and pass the user model to it
            if ($status) {
                $data = [
                    'model' => $user
                ];
                return view('updateRegistrationSuccess')->with($data);
            } else {
                return view('updateRegistrationFail');
            }
        } catch (Exception $e) {
            // best practice: call all exceptions, log the exception, and display a common error page (or use a global exception handler)
            // log exception and display exception view
            Log::error("Exception: ", array(
                "message" => $e->getMessage()
            ));
            $data = [
                'errorMsg' => $e->getMessage()
            ];
            return view('exception')->with($data);
        }
    }
}<file_sep>/app/Http/Controllers/AdminController.php
<?php
// Milestone 1
// Login Module
// <NAME>
// February 6, 2019
// This is my own work
/* Admin controller handles user admin methods */
namespace App\Http\Controllers;

use Illuminate\Http\Request;
use Illuminate\Support\Facades\Log;
use Exception;
use App\Services\Business\UserBusinessService;
use App\Services\Data\UserDataService;
use App\Models\JobModel;
use App\Services\Business\JobBusinessService;
use App\Services\Data\JobDataService;

class AdminController extends Controller
{

    public function showCreatePostForm()
    {
        return view('createJobPost');
    }

    public function showUsers()
    {
        try {
            // call user business service
            $service = new UserBusinessService();
            $users = $service->displayUsers();
            // render a response view
            if ($users) {
                return view('displayUsers')->with($users);
            }
        } catch (Exception $e) {
            // best practice: call all exceptions, log the exception, and display a common error page (or use a global exception handler)
            // log exception and display exception view
            Log::error("Exception: ", array(
                "message" => $e->getMessage()
            ));
            $data = [
                'errorMsg' => $e->getMessage()
            ];
            return view('exception')->with($data);
        }
    }

    public function deleteUser()
    {
        try {
            // GET method for user id
            $id = $_GET['USER_ID'];
            // call user business service
            $service = new UserBusinessService();
            $delete = $service->deleteUser($id);
            // render a success or fail view
            if ($delete) {
                return view('deleteUserSuccess');
            } else {
                return view('deleteUserFail');
            }
        } catch (Exception $e) {
            // best practice: call all exceptions, log the exception, and display a common error page (or use a global exception handler)
            // log exception and display exception view
            Log::error("Exception: ", array(
                "message" => $e->getMessage()
            ));
            $data = [
                'errorMsg' => $e->getMessage()
            ];
            return view('exception')->with($data);
        }
    }

    public function suspendUser()
    {
        try {
            // GET method for user id
            $id = $_GET['ID'];
            // call user business service
            $service = new UserBusinessService();
            $suspend = $service->suspendUser($id);
            // renders a success or fail view
            if ($suspend) {
                return view('suspendUserSuccess');
            } else {
                return view('suspendUserFail');
            }
        } catch (Exception $e) {
            // best practice: call all exceptions, log the exception, and display a common error page (or use a global exception handler)
            // log exception and display exception view
            Log::error("Exception: ", array(
                "message" => $e->getMessage()
            ));
            $data = [
                'errorMsg' => $e->getMessage()
            ];
            return view('exception')->with($data);
        }
    }

    public function unsuspendUser()
    {
        try {
            // GET method for user id
            $id = $_GET['ID'];
            // calls user business service
            $service = new UserBusinessService();
            $unsuspend = $service->unsuspendUser($id);
            // renders a success or fail view
            if ($unsuspend) {
                return view('unsuspendUserSuccess');
            } else {
                return view('unsuspendUserFail');
            }
        } catch (Exception $e) {
            // best practice: call all exceptions, log the exception, and display a common error page (or use a global exception handler)
            // log exception and display exception view
            Log::error("Exception: ", array(
                "message" => $e->getMessage()
            ));
            $data = [
                'errorMsg' => $e->getMessage()
            ];
            return view('exception')->with($data);
        }
    }

    public function createJobPost(Request $request)
    {
        try {
            // 1. process form data
            // get posted form data
            $company_name = $request->input('company_name');
            $company_city = $request->input('company_city');
            $company_state = $request->input('company_state');
            $company_zip = $request->input('company_zip');
            $job_title = $request->input('job_title');
            $job_description = $request->input('job_description');
            $date_posted = $request->input('date_posted');
            // assigns the data from the variables to one array named $data
            $data = [
                'company_name' => $company_name,
                'company_city' => $company_city,
                'company_state' => $company_state,
                'company_zip' => $company_zip,
                'job_title' => $job_title,
                'job_description' => $job_description,
                'date_posted' => $date_posted
            ];
            // 2. create object model
            // save posted form data in user object model
            $jobs = new JobModel(0, $company_name, $company_city, $company_state, $company_zip, $job_title, $job_description, $date_posted);
            // 3. execute business service
            // call security business service
            $service = new JobBusinessService();
            $status = $service->createJobPost($jobs);
            // 4. process results from business service (navigation)
            // render a failed or success response view and pass the user model to it
            if ($status) {
                $data = [
                    'model' => $jobs
                ];
                return view('createJobPostSuccess')->with($data);
            } else {
                return view('createJobPostFail');
            }
        } catch (Exception $e) {
            // best practice: call all exceptions, log the exception, and display a common error page (or use a global exception handler)
            // log exception and display exception view
            Log::error("Exception: ", array(
                "message" => $e->getMessage()
            ));
            $data = [
                'errorMsg' => $e->getMessage()
            ];
            return view('exception')->with($data);
        }
    }

    public function updateJobPost(Request $request)
    {
        try {
            // 1. process form data
            // get posted form data
            $company_name = $request->input('company_name');
            $company_city = $request->input('company_city');
            $company_state = $request->input('company_state');
            $company_zip = $request->input('company_zip');
            $job_title = $request->input('job_title');
            $job_description = $request->input('job_description');
            $date_posted = $request->input('date_posted');
            // assigns the data from the variables to one array named $data
            $data = [
                'company_name' => $company_name,
                'company_city' => $company_city,
                'company_state' => $company_state,
                'company_zip' => $company_zip,
                'job_title' => $job_title,
                'job_description' => $job_description,
                'date_posted' => $date_posted
            ];
            // 2. create object model
            // save posted form data in user object model
            $jobs = new JobModel(- 1, $company_name, $company_city, $company_state, $company_zip, $job_title, $job_description, $date_posted);
            // 3. execute business service
            // call security business service
            $service = new JobBusinessService();
            $status = $service->updateJobPost($jobs);
            // 4. process results from business service (navigation)
            // render a failed or success response view and pass the user model to it
            if ($status) {
                $data = [
                    'model' => $jobs
                ];
                return view('updateJobPostSuccess')->with($data);
            } else {
                return view('updateJobPostFail');
            }
        } catch (Exception $e) {
            // best practice: call all exceptions, log the exception, and display a common error page (or use a global exception handler)
            // log exception and display exception view
            Log::error("Exception: ", array(
                "message" => $e->getMessage()
            ));
            $data = [
                'errorMsg' => $e->getMessage()
            ];
            return view('exception')->with($data);
        }
    }

    public function deleteJobPost()
    {
        try {
            // GET method for user id
            $id = $_GET['JOB_ID'];
            // call user business service
            $service = new JobDataService($id);
            $delete = $service->deleteJobPost($id);
            // render a success or fail view
            if ($delete) {
                return view('deleteJobPostSuccess');
            } else {
                return view('deleteJobPostFail');
            }
        } catch (Exception $e) {
            // best practice: call all exceptions, log the exception, and display a common error page (or use a global exception handler)
            // log exception and display exception view
            Log::error("Exception: ", array(
                "message" => $e->getMessage()
            ));
            $data = [
                'errorMsg' => $e->getMessage()
            ];
            return view('exception')->with($data);
        }
    }

    public function showAllJobPosts()
    {
        try {
            // call user business service
            $service = new JobBusinessService();
            $jobs = $service->showJobPosts();
            // render a response view
            if ($jobs) {
                return view('displayJobPostsAdmin')->with($jobs);
            }
        } catch (Exception $e) {
            // best practice: call all exceptions, log the exception, and display a common error page (or use a global exception handler)
            // log exception and display exception view
            Log::error("Exception: ", array(
                "message" => $e->getMessage()
            ));
            $data = [
                'errorMsg' => $e->getMessage()
            ];
            return view('exception')->with($data);
        }
    }
}<file_sep>/app/Services/Data/ProfileDataService.php
<?php
namespace App\Services\Data;

use PDO;
use PDOException;
use Illuminate\Support\Facades\Log;
use App\Models\ContactModel;
use App\Models\EducationModel;
use App\Models\JobHistoryModel;
use App\Models\SkillsModel;
use App\Services\Utility\DatabaseException;

class ProfileDataService
{

    private $conn = null;

    public function __construct($conn)
    {
        $this->conn = $conn;
    }

    public function createSkills(SkillsModel $skillsModel, $conn)
    {
        Log::info("Entering ProfileDataService.createSkills()");
        try {
            // select variables and see if the row exists
            $skills = $skillsModel->getUser_skills();
            $user_user_id = $skillsModel->getUser_user_id();
            // prepared statements is created
            $stmt = $this->conn->prepare("INSERT INTO SKILLS (SKILLS_ID, USER_SKILLS, USER_USER_ID) VALUES (NULL, :user_skills, :user_user_id)");
            // binds parameters
            $stmt->bindParam(':user_skills', $skills);
            $stmt->bindParam('user_user_id', $user_user_id);

            /*
             * see if skills existed and return true if found
             * else return false if not found
             */
            if ($stmt->execute()) {
                Log::info("Exit ProfileDataService.createSkills() with true");
                return true;
            } else {
                Log::info("Exit ProfileDataService.createSKills() with false");
                return false;
            }
        } catch (PDOException $e) {
            // best practice: catch all exceptions (do not swallow exceptions),
            // log the exception, do not throw technology specific exceptions,
            // and throw a custom exception
            Log::error("Exception: ", array(
                "message" => $e->getMessage()
            ));
            throw new DatabaseException("Database Exception: " . $e->getMessage(), 0, $e);
        }
    }

    public function updateSkills(SkillsModel $skillsModel, $id)
    {
        Log::info("Entering ProfileDataService.updateSkills()");
        try {
            // select variables and see if the row exists
            $skills_id = $skillsModel->getSkills_id();
            $skills = $skillsModel->getUser_skill();
            // prepared statements is created
            $stmt = $this->conn->prepare("UPDATE SKILLS SET USER_SKILLS = :user_skills WHERE SKILLS_ID = :skills_id;");
            // binds parameters
            $stmt->bindParam(':user_skills', $skills);
            $stmt->bindParam(':skills_id', $skills_id);
            /*
             * see if skills existed and return true if found
             * else return false if not found
             */
            if ($stmt->execute()) {
                Log::info("Exit ProfileDataService.updateSkills() with true");
                return true;
            } else {
                Log::info("Exit ProfileDataService.updateSkills() with false");
                return false;
            }
        } catch (PDOException $e) {
            // best practice: catch all exceptions (do not swallow exceptions),
            // log the exception, do not throw technology specific exceptions,
            // and throw a custom exception
            Log::error("Exception: ", array(
                "message" => $e->getMessage()
            ));
            throw new DatabaseException("Database Exception: " . $e->getMessage(), 0, $e);
        }
    }

    public function deleteSkills($id)
    {
        Log::info("Entering ProfileDataService.deleteSkills()");
        try {
            // prepared statement is created
            $stmt = $this->conn->prepare('DELETE FROM SKILLS WHERE SKILLS_ID = :skills_id');
            // bind parameter
            $stmt->bindParam(':skills_id', $id);
            // executes statement
            $delete = $stmt->execute();
            // returns true or false if skill has been deleted from database
            if ($delete) {
                Log::info("Exiting ProfileDataService.deleteSkills() with returning true");
                return true;
            } else {
                Log::info("Exiting ProfileDataService.deleteSkills() with returning false");
                return false;
            }
        } catch (\PDOException $e) {
            Log::error("Exception: ", array(
                "message" => $e->getMessage()
            ));
            throw new DatabaseException("Database Exception: " . $e->getMessage(), 0, $e);
        }
    }

    public function findAllSkills($user_user_id)
    {
        Log::info("Entering ProfileDataService.findAllSkills()");
        try {
            // select skills and see if the row exists
            $stmt = $this->conn->prepare('SELECT * FROM SKILLS WHERE USER_USER_ID = :user_user_id');
            $stmt->bindParam(':user_user_id', $user_user_id);
            $stmt->execute();
            if ($stmt->rowCount() > 0) {
                // skills array is created
                $skillsArray = array();
                // fetches result from prepared statement and returns as an array
                while ($skills = $stmt->fetch(PDO::FETCH_ASSOC)) {
                    // inserts variables into end of array
                    array_push($skillsArray, $skills);
                }
                Log::info("Exit ProfileDataService.findAllSkills() with true");
                // return skills array
                return $skillsArray;
            }
        } catch (PDOException $e) {
            // best practice: catch all exceptions (do not swallow exceptions),
            // log the exception, do not throw technology specific exceptions,
            // and throw a custom exception
            Log::error("Exception: ", array(
                "message" => $e->getMessage()
            ));
            throw new DatabaseException("Database Exception: " . $e->getMessage(), 0, $e);
        }
    }

    public function createEducation(EducationModel $educationModel, $conn)
    {
        Log::info("Entering ProfileDataService.createEducation()");
        try {
            // select variables and see if the row exists
            $degree = $educationModel->getDegree();
            $school_name = $educationModel->getSchool_name();
            $school_city = $educationModel->getSchool_city();
            $school_state = $educationModel->getSchool_state();
            $school_zip_code = $educationModel->getSchool_zip_code();
            $graduation_year = $educationModel->getGraduation_year();
            // prepared statements is created
            $stmt = $this->conn->prepare("INSERT INTO EDUCATION (DEGREE, SCHOOL_NAME, SCHOOL_CITY, SCHOOL_STATE, SCHOOL_ZIP_CODE, GRADUATION_YEAR) VALUES (:degree, :school_name, :school_city, :school_state, :school_zip_code, :graduation_year)");
            // binds parameters
            $stmt->bindParam(':degree', $degree);
            $stmt->bindParam(':school_name', $school_name);
            $stmt->bindParam(':school_city', $school_city);
            $stmt->bindParam(':school_state', $school_state);
            $stmt->bindParam(':school_zip_code', $school_zip_code);
            $stmt->bindParam(':graduation_year', $graduation_year);
            /*
             * see if education existed and return true if found
             * else return false if not found
             */
            if ($stmt->execute()) {
                Log::info("Exit ProfileDataService.createEducation() with true");
                return true;
            } else {
                Log::info("Exit ProfileDataService.createEducation() with false");
                return false;
            }
        } catch (PDOException $e) {
            // best practice: catch all exceptions (do not swallow exceptions),
            // log the exception, do not throw technology specific exceptions,
            // and throw a custom exception
            Log::error("Exception: ", array(
                "message" => $e->getMessage()
            ));
            throw new DatabaseException("Database Exception: " . $e->getMessage(), 0, $e);
        }
    }

    public function updateEducation(EducationModel $educationModel, $conn)
    {
        Log::info("Entering ProfileDataService.updateEducation()");
        try {
            // select variables and see if the row exists
            $degree = $educationModel->getDegree();
            $school_name = $educationModel->getSchool_name();
            $school_city = $educationModel->getSchool_city();
            $school_state = $educationModel->getSchool_state();
            $school_zip_code = $educationModel->getSchool_zip_code();
            $graduation_year = $educationModel->getGraduation_year();
            // prepared statements is created
            $stmt = $this->conn->prepare("UPDATE EDUCATION SET DEGREE = :degree, SCHOOL_NAME = :school_name, SCHOOL_CITY = :school_city, SCHOOL_STATE = :school_state, SCHOOL_ZIP_CODE = :school_zip_code, GRADUATION_YEAR = :graduation_year WHERE EDUCATION_ID = :education_id");
            // binds parameters
            $stmt->bindParam(':degree', $degree);
            $stmt->bindParam(':school_name', $school_name);
            $stmt->bindParam(':school_city', $school_city);
            $stmt->bindParam(':school_state', $school_state);
            $stmt->bindParam(':school_zip_code', $school_zip_code);
            $stmt->bindParam(':graduation_year', $graduation_year);
            /*
             * see if skills existed and return true if found
             * else return false if not found
             */
            if ($stmt->execute()) {
                Log::info("Exit ProfileDataService.updateEducation() with true");
                return true;
            } else {
                Log::info("Exit ProfileDataService.updateEducation() with false");
                return false;
            }
        } catch (PDOException $e) {
            // best practice: catch all exceptions (do not swallow exceptions),
            // log the exception, do not throw technology specific exceptions,
            // and throw a custom exception
            Log::error("Exception: ", array(
                "message" => $e->getMessage()
            ));
            throw new DatabaseException("Database Exception: " . $e->getMessage(), 0, $e);
        }
    }

    public function deleteEducation($id)
    {
        Log::info("Entering ProfileDataService.deleteEducation()");
        try {
            // prepared statement is created
            $stmt = $this->conn->prepare("DELETE FROM EDUCATION WHERE EDUCATION_ID = :education_id");
            // bind parameter
            $stmt->bindParam(':education_id', $id);
            // executes statement
            $delete = $stmt->execute();
            // returns true or false if skill has been deleted from database
            if ($delete) {
                Log::info("Exiting ProfileDataService.deleteEducation() with returning true");
                return true;
            } else {
                Log::info("Exiting ProfileDataService.deleteEducation() with returning false");
                return false;
            }
        } catch (\PDOException $e) {
            Log::error("Exception: ", array(
                "message" => $e->getMessage()
            ));
            throw new DatabaseException("Database Exception: " . $e->getMessage(), 0, $e);
        }
    }

    public function findAllEducation()
    {
        Log::info("Entering ProfileDataServcce.findAllEducation()");
        try {
            // select skills and see if the row exists
            $stmt = $this->conn->prepare("SELECT * FROM EDUCATION");
            $stmt->execute();
            if ($stmt->rowCount() > 0) {
                // skills array is created
                $educationArray = array();
                // fetches result from prepared statement and returns as an array
                while ($education = $stmt->fetch(PDO::FETCH_ASSOC)) {
                    // inserts variables into end of array
                    array_push($educationArray, $education);
                }
                Log::info("Exit ProfileDataServcce.findAllEducation() with true");
                // return skills array
                return $educationArray;
            }
        } catch (PDOException $e) {
            // best practice: catch all exceptions (do not swallow exceptions),
            // log the exception, do not throw technology specific exceptions,
            // and throw a custom exception
            Log::error("Exception: ", array(
                "message" => $e->getMessage()
            ));
            throw new DatabaseException("Database Exception: " . $e->getMessage(), 0, $e);
        }
    }

    public function createJobHistory(JobHistoryModel $jobHistory, $conn)
    {
        Log::info("Entering ProfileDataService.createJobHistory()");
        try {
            // select variables and see if the row exists
            $current_job = $jobHistory->getCurrent_job();
            $previous_job = $jobHistory->getPrevious_job();
            $current_employment_date = $jobHistory->getCurrent_employment_date();
            $previous_employment_date = $jobHistory->getPrevious_employment_date();
            $current_employment_location = $jobHistory->getCurrent_employment_location();
            // prepared statements is created
            $stmt = $this->conn->prepare("INSERT INTO JOB_HISTORY (JOB_HISTORY_ID, CURRENT_JOB, PREVIOUS_JOB, CURRENT_EMPLOYMENT_DATE, PREVIOUS_EMPLOYMENT_DATE, CURRENT_EMPLOYMENT_LOCATION, USER_USER_ID) VALUES (NULL, :current_job, :previous_job, :current_employment_date, :previous_employment_date, :current_employment_location)");
            // binds parameters
            $stmt->bindParam(':current_job', $current_job);
            $stmt->bindParam(':previous_job', $previous_job);
            $stmt->bindParam(':current_employment_date', $current_employment_date);
            $stmt->bindParam(':previous_employment_date', $previous_employment_date);
            $stmt->bindParam(':current_employment_location', $current_employment_location);
            /*
             * see if skills existed and return true if found
             * else return false if not found
             */
            if ($stmt->execute()) {
                Log::info("Exit ProfileDataService.createJobHistory() with true");
                return true;
            } else {
                Log::info("Exit ProfileDataService.createJobHistory() with false");
                return false;
            }
        } catch (PDOException $e) {
            // best practice: catch all exceptions (do not swallow exceptions),
            // log the exception, do not throw technology specific exceptions,
            // and throw a custom exception
            Log::error("Exception: ", array(
                "message" => $e->getMessage()
            ));
            throw new DatabaseException("Database Exception: " . $e->getMessage(), 0, $e);
        }
    }

    public function updateJobHistory(JobHistoryModel $jobHistory, $conn)
    {
        Log::info("Entering ProfileDataService.createJobHistory()");
        try {
            // select variables and see if the row exists
            $current_job = $jobHistory->getCurrent_job();
            $previous_job = $jobHistory->getPrevious_job();
            $current_employment_date = $jobHistory->getCurrent_employment_date();
            $previous_employment_date = $jobHistory->getPrevious_employment_date();
            $current_employment_location = $jobHistory->getCurrent_employment_location();
            // prepared statements is created
            $stmt = $this->conn->prepare("UPDATE JOB_HISTORY SET CURRENT_JOB = :current_job, PREVIOUS_JOB = :previous_job, CURRENT_EMPLOYMENT_DATE = :current_employment_date, PREVIOUS_EMPLOYMENT_DATE = :previous_employment_date, CURRENT_EMPLOYMENT_LOCATION = :current_employment_location WHERE JOB_HISTORY_ID = :job_history_id;)");
            // binds parameters
            $stmt->bindParam(':current_job', $current_job);
            $stmt->bindParam(':previous_job', $previous_job);
            $stmt->bindParam(':current_employment_date', $current_employment_date);
            $stmt->bindParam(':previous_employment_date', $previous_employment_date);
            $stmt->bindParam(':current_employment_location', $current_employment_location);
            /*
             * see if job history existed and return true if found
             * else return false if not found
             */
            if ($stmt->execute()) {
                Log::info("Exit ProfileDataService.createJobHistory() with true");
                return true;
            } else {
                Log::info("Exit ProfileDataService.createJobHistory() with false");
                return false;
            }
        } catch (PDOException $e) {
            // best practice: catch all exceptions (do not swallow exceptions),
            // log the exception, do not throw technology specific exceptions,
            // and throw a custom exception
            Log::error("Exception: ", array(
                "message" => $e->getMessage()
            ));
            throw new DatabaseException("Database Exception: " . $e->getMessage(), 0, $e);
        }
    }

    public function deleteJobHistory($id)
    {
        Log::info("Entering ProfileDataService.deleteJobHistory()");
        try {
            // prepared statement is created
            $stmt = $this->conn->prepare("DELETE FROM JOB_HISTORY WHERE JOB_HISTORY_ID = :job_history_id");
            // bind parameter
            $stmt->bindParam(':job_history_id', $id);
            // executes statement
            $delete = $stmt->execute();
            // returns true or false if skill has been deleted from database
            if ($delete) {
                Log::info("Exiting ProfileDataService.deleteJobHistory() with returning true");
                return true;
            } else {
                Log::info("Exiting ProfileDataService.deleteJobHistory() with returning false");
                return false;
            }
        } catch (\PDOException $e) {
            Log::error("Exception: ", array(
                "message" => $e->getMessage()
            ));
            throw new DatabaseException("Database Exception: " . $e->getMessage(), 0, $e);
        }
    }

    public function findAllJobHistory()
    {
        Log::info("Entering ProfileDataService.findAllJobHistory()");
        try {
            // select skills and see if the row exists
            $stmt = $this->conn->prepare("SELECT * FROM JOB_HISTORY WHERE USER_USER_ID = user_user_id");
            $stmt->execute();
            if ($stmt->rowCount() > 0) {
                // skills array is created
                $jobhistoryArray = array();
                // fetches result from prepared statement and returns as an array
                while ($jobhistory = $stmt->fetch(PDO::FETCH_ASSOC)) {
                    // inserts variables into end of array
                    array_push($jobhistoryArray, $jobhistory);
                }
                Log::info("Exit ProfileDataService.findAllJobHistory() with true");
                // return skills array
                return $jobhistoryArray;
            }
        } catch (PDOException $e) {
            // best practice: catch all exceptions (do not swallow exceptions),
            // log the exception, do not throw technology specific exceptions,
            // and throw a custom exception
            Log::error("Exception: ", array(
                "message" => $e->getMessage()
            ));
            throw new DatabaseException("Database Exception: " . $e->getMessage(), 0, $e);
        }
    }

    public function createContactInformation(ContactModel $contactModel, $conn)
    {
        Log::info("Entering ProfileDataService.createContactInfo()");
        try {
            // select variables and see if the row exists
            $business_email = $contactModel->getBusiness_email();
            $phone_number = $contactModel->getPhone_number();
            $street_address = $contactModel->getStreet_address();
            $state = $contactModel->getState();
            $city = $contactModel->getCity();
            $zip_code = $contactModel->getZip_code();
            $about_me = $contactModel->getAbout_me();
            // prepared statements is created
            $stmt = $this->conn->prepare("INSERT INTO CONTACT (CONTACT_ID, BUSINESS_EMAIL, PHONE_NUMBER, STREET_ADDRESS, STATE, CITY, ZIP_CODE, ABOUT_ME) VALUES (NULL, :business_email, :phone_number, :street_address, :state, :city, :zip_code, :about_me)");
            // binds parameters
            $stmt->bindParam(':business_email', $business_email);
            $stmt->bindParam(':phone_number', $phone_number);
            $stmt->bindParam(':street_address', $street_address);
            $stmt->bindParam(':$state', $state);
            $stmt->bindParam(':city', $city);
            $stmt->bindParam(':zip_code', $zip_code);
            $stmt->bindParam(':about_me', $about_me);
            /*
             * see if skills existed and return true if found
             * else return false if not found
             */
            if ($stmt->execute()) {
                Log::info("Exit ProfileDataService.createContactInfo() with true");
                return true;
            } else {
                Log::info("Exit ProfileDataService.createContactInfo() with false");
                return false;
            }
        } catch (PDOException $e) {
            // best practice: catch all exceptions (do not swallow exceptions),
            // log the exception, do not throw technology specific exceptions,
            // and throw a custom exception
            Log::error("Exception: ", array(
                "message" => $e->getMessage()
            ));
            throw new DatabaseException("Database Exception: " . $e->getMessage(), 0, $e);
        }
    }

    public function updateContactInformation(ContactModel $contactModel, $conn)
    {
        Log::info("Entering ProfileDataService.updateContactInfo()");
        try {
            // select variables and see if the row exists
            $business_email = $contactModel->getBusiness_email();
            $phone_number = $contactModel->getPhone_number();
            $street_address = $contactModel->getStreet_address();
            $state = $contactModel->getState();
            $city = $contactModel->getCity();
            $zip_code = $contactModel->getZip_code();
            $about_me = $contactModel->getAbout_me();
            // prepared statements is created
            $stmt = $this->conn->prepare("UPDATE CONTACT SET BUSINESS_EMAIL = :business_email, PHONE_NUMBER = :phone_number, STREET_ADDRESS = :street_address, STATE = :state, CITY = :city, ZIP_CODE = :zip_code, ABOUT_ME = :about_me WHERE CONTACT_ID = :contact_id");
            // binds parameters
            $stmt->bindParam(':business_email', $business_email);
            $stmt->bindParam(':phone_number', $phone_number);
            $stmt->bindParam(':street_address', $street_address);
            $stmt->bindParam(':$state', $state);
            $stmt->bindParam(':city', $city);
            $stmt->bindParam(':zip_code', $zip_code);
            $stmt->bindParam(':about_me', $about_me);
            /*
             * see if job history existed and return true if found
             * else return false if not found
             */
            if ($stmt->execute()) {
                Log::info("Exit ProfileDataService.updateContactInfo() with true");
                return true;
            } else {
                Log::info("Exit ProfileDataService.updateContactInfo() with false");
                return false;
            }
        } catch (PDOException $e) {
            // best practice: catch all exceptions (do not swallow exceptions),
            // log the exception, do not throw technology specific exceptions,
            // and throw a custom exception
            Log::error("Exception: ", array(
                "message" => $e->getMessage()
            ));
            throw new DatabaseException("Database Exception: " . $e->getMessage(), 0, $e);
        }
    }

    public function deleteContactInformation($id)
    {
        Log::info("Entering ProfileDataService.deleteContactInfo()");
        try {
            // prepared statement is created
            $stmt = $this->conn->prepare("DELETE FROM CONTACT WHERE CONTACT_ID = :contact_id");
            // bind parameter
            $stmt->bindParam(':contact_id', $id);
            // executes statement
            $delete = $stmt->execute();
            // returns true or false if skill has been deleted from database
            if ($delete) {
                Log::info("Exiting ProfileDataService.deleteContactInfo() with returning true");
                return true;
            } else {
                Log::info("Exiting ProfileDataService.deleteContactInfo() with returning false");
                return false;
            }
        } catch (\PDOException $e) {
            Log::error("Exception: ", array(
                "message" => $e->getMessage()
            ));
            throw new DatabaseException("Database Exception: " . $e->getMessage(), 0, $e);
        }
    }

    public function findContactByID($id)
    {
        Log::info("Entering ProfileDataService.findAllContacts()");
        try {
            // select contact and see if the row exists
            $stmt = $this->conn->prepare("SELECT * FROM CONTACT WHERE CONTACT_ID = :contact_id");
            $stmt->bindParam('contact_id', $id);
            $stmt->execute();
            if ($stmt->rowCount() > 0) {
                // contact array is created
                $contactArray = array();
                // fetches result from prepared statement and returns as an array
                while ($contact = $stmt->fetch(PDO::FETCH_ASSOC)) {
                    // inserts variables into end of array
                    array_push($contactArray, $contact);
                }
                Log::info("Exit ProfileDataService.findAllContacts() with true");
                // return contact array
                return $contactArray;
            }
        } catch (PDOException $e) {
            // best practice: catch all exceptions (do not swallow exceptions),
            // log the exception, do not throw technology specific exceptions,
            // and throw a custom exception
            Log::error("Exception: ", array(
                "message" => $e->getMessage()
            ));
            throw new DatabaseException("Database Exception: " . $e->getMessage(), 0, $e);
        }
    }
}<file_sep>/app/Models/SkillsModel.php
<?php
namespace App\Models;

class SkillsModel
{

    private $skills_id;

    private $user_skills;

    private $user_user_id;

    public function __construct($skills_id, $user_skills, $user_user_id)
    {
        $this->skills_id = $skills_id;
        $this->user_skills = $user_skills;
        $this->user_user_id = $user_user_id;
    }

    /**
     *
     * @return mixed
     */
    public function getSkills_id()
    {
        return $this->skills_id;
    }

    /**
     *
     * @param mixed $skills_id
     */
    public function setSkills_id($skills_id)
    {
        $this->skills_id = $skills_id;
    }

    /**
     *
     * @return mixed
     */
    public function getUser_skills()
    {
        return $this->user_skills;
    }

    /**
     *
     * @param mixed $user_skills
     */
    public function setUser_skills($user_skills)
    {
        $this->user_skills = $user_skills;
    }
    /**
     * @return mixed
     */
    public function getUser_user_id()
    {
        return $this->user_user_id;
    }

    /**
     * @param mixed $user_user_id
     */
    public function setUser_user_id($user_user_id)
    {
        $this->user_user_id = $user_user_id;
    }

}<file_sep>/app/Http/Controllers/RegistrationController.php
<?php
// <NAME>
// CST 256
// <NAME>
// This is my own work
// Milestone 1
// 1/20/2019
// the page that handles the process to
namespace App\Http\Controllers;

use Illuminate\Http\Request;
use App\Models\UserModel;
use App\Services\Business\SecurityService;
use App\Services\Business\UserBusinessService;

class RegistrationController extends Controller
{

    public function register(Request $request)
    {
        // capture form data
        $firstname = $request->input('firstname');
        $lastname = $request->input('lastname');
        $email = $request->input('email');
        $username = $request->input('username');
        $password = $request->input('password');
        // assigns the data from the variables to one array named $data
        $data = [
            'firstname' => $firstname,
            'lastname' => $lastname,
            'email' => $email,
            'username' => $username,
            'password' => $<PASSWORD>
        ];
        // 2. create object model
        // save posted form data in user object model
        $user = new UserModel(- 1, $firstname, $lastname, $email, $username, $password, 0, 0);
        // 3. execute business service
        // call security business service
        $service = new UserBusinessService();
        $status = $service->createUser($user);
        // 4. process results from business service (navigation)
        // render a failed or success response view and pass the user model to it
        if ($status) {
            $data = [
                'model' => $user
            ];
            return view('registrationSuccess')->with($data);
        } else {
            return view('registrationFail');
        }
    }
}<file_sep>/app/Services/Business/AdminBusinessService.php
<?php
// <NAME>
// CST 256
// February 3, 2019
// This is my own work
/* Handles user business logic and connections to database */
namespace App\Services\Business;

use App\Services\Data\UserDataService;
use Illuminate\Support\Facades\Log;
use PDO;
use App\Services\Data\AdminDataService;

class AdminBusinessService
{

    public function deleteUser($id)
    {
        Log::info("Entering UserBusinessService.deleteUser()");
        // get credentials for accessing the database
        $servername = config("database.connections.mysql.host");
        $dbname = config("database.connections.mysql.database");
        $username = config("database.connections.mysql.username");
        $password = config("<PASSWORD>.connections.mysql.password");
        // create connection to database
        $conn = new \PDO("mysql:host=$servername;dbname=$dbname", $username, $password);
        $conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
        // create a security service dao with this connection and try to find and delete user
        $service = new AdminDataService($conn);
        $flag = $service->deleteUser($id);
        // return the finder results
        Log::info("Exit SecurityService.deleteUser() with " . $flag);
        return $flag;
    }

    public function suspendUser($id)
    {
        Log::info("Entering UserBusinessService.suspendUser()");
        // get credentials for accessing the database
        $servername = config("database.connections.mysql.host");
        $dbname = config("database.connections.mysql.database");
        $username = config("database.connections.mysql.username");
        $password = config("<PASSWORD>.password");
        // create connection to database
        $conn = new PDO("mysql:host=$servername;dbname=$dbname", $username, $password);
        $conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
        // create a security service dao with this connection and try to find and suspend user
        $service = new AdminDataService($conn);
        $flag = $service->suspendUser($id);
        // return the finder results
        Log::info("Exit SecurityService.suspendUser() with " . $flag);
        return $flag;
    }

    public function unsuspendUser($id)
    {
        Log::info("Entering UserBusinessService.unsuspendUser()");
        // get credentials for accessing the database
        $servername = config("database.connections.mysql.host");
        $dbname = config("database.connections.mysql.database");
        $username = config("database.connections.mysql.username");
        $password = config("database.connections.mysql.password");
        // create connection to database
        $conn = new PDO("mysql:host=$servername;dbname=$dbname", $username, $password);
        $conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
        // create a security service dao with this connection and try to find and unsuspend user
        $service = new AdminDataService($conn);
        $flag = $service->unsuspendUser($id);
        // return the finder results
        Log::info("Exit SecurityService.unsuspendUser() with " . $flag);
        return $flag;
    }
}<file_sep>/routes/web.php
<?php

/*
 * |--------------------------------------------------------------------------
 * | Web Routes
 * |--------------------------------------------------------------------------
 * |
 * | Here is where you can register web routes for your application. These
 * | routes are loaded by the RouteServiceProvider within a group which
 * | contains the "web" middleware group. Now create something great!
 * |
 */
use Illuminate\Support\Facades\Route;

Route::get('/', function () {
    return view('welcome');
});
Route::get('start', function () {
    return view('displayJobs');
});

/*
 * LOGIN
 */
// returns a login form
Route::get('/login', function () {
    return view('login');
});

// links the login form to the login function
Route::post('doLogin', 'LoginController@login');

/*
 * REGISTRATION
 */
// returns a registration form
Route::get('/registration', function () {
    return view('registration');
});
// links the registration form to the registration function
Route::post('doRegistration', 'RegistrationController@register');

/*
 * PROFILE
 */
// returns the profile view
Route::get('/profile', function () {
    return view('profile');
});

/*
 * SKILLS
 */

Route::get('/createSkills', function () {
    return view('createSkills');
});

Route::post('createSkills', 'ProfileController@createSkills');

Route::get('/updateSkills', function () {
    return view('updateSkills');
});

Route::post('/updateSkills', 'ProfileController@updateSkills');
Route::get('/displaySkills', function () {
    return view('displaySkills');
});

/*
 * CONTACT INFORMATION
 */

Route::get('/createContactInformation', function () {
    return view('createContactInformation');
});

Route::post('createContactInformation', 'ProfileController@createContactInformation');

Route::get('/updateContactInformation', function () {
    return view('updateContactInformation');
});

Route::post('/updateContactInformation', 'ProfileController@updateContactInformation');

/*
 * EDUCATION
 */
Route::get('/createEducation', function () {
    return view('createEducation');
});

Route::post('createEducation', 'ProfileController@createEducation');

Route::get('/updateEducation', function () {
    return view('updateEducation');
});

Route::post('updateEducation', 'ProfileController@updateEducation');

/*
 * JOB HISTORY
 */
Route::get('/createJobHistory', function () {
    return view('createJobHistory');
});

Route::post('createJobHistory', 'ProfileController@createJobHistory');

Route::post('updateJobHistory', 'ProfileController@updateJobHistory');

Route::get('/updateJobHistory', function () {
    return view('updateJobHistory');
});

/*
 * REGISTRATION EDIT
 */
Route::get('/updateRegistration', function () {
    return view('updateRegistration');
});

Route::post('updateRegistration', 'ProfileController@updateUser');

/*
 * JOB ADMINISTRATION
 */
Route::get('jobPost', function () {
    return view('createJobPost');
});

Route::get('/usersAdmin', 'AdminController@showUsers');
Route::get('/userDelete', 'AdminController@deleteUser');
Route::get('/userSuspend', 'AdminController@suspendUser');
Route::get('/userUnsuspend', 'AdminController@unsuspendUser');

route::get('/createJobPost', 'AdminController@showCreatePostForm');
Route::get('/jobsAdmin', 'AdminController@showAllJobPosts');
Route::get('/jobEdit', 'AdminController@updateJobPost');
Route::get('/jobDelete', 'AdminController@deleteJobPost');
<file_sep>/app/Http/Controllers/LoginController.php
<?php
// Milestone 3
// Login Module
// <NAME> and <NAME>
// January 20, 2019
// This is our own work
/* Login module processes the authentication of user credentials */
namespace App\Http\Controllers;

use App\Models\UserModel;
use App\Services\Business\SecurityService;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Log;
use Exception;

class LoginController extends Controller
{

    // authenticates user credentials
    public function login(Request $request)
    {
        try {
            // 1. process form data
            // get posted form data
            $firstname = $request->input('firstname');
            $lastname = $request->input('lastname');
            $email = $request->input('email');
            $username = $request->input('username');
            $password = $request->input('<PASSWORD>');
            $active = $request->input('active');

            // 2. create object model
            // save posted form data in user object model
            $user = new UserModel(- 1, $firstname, $lastname, $email, $username, $password, 0, $active);

            // 3. execute business service
            // call security business service
            $service = new SecurityService();
            $status = $service->login($user);

            // 4. process results from business service (navigation)
            // render a failed or success response view and pass the user model to it

            if ($status) {
                $_SESSION['principle'] = true;
                $_SESSION['USERNAME'] = $username;
                $data = [
                    'model' => $user
                ];
                return view('displayJobs')->with($data);
            } else if ($active == 1) {
                return view('suspendUser');
            } else {
                return view('loginFail');
            }
        } catch (Exception $e) {
            // best practice: call all exceptions, log the exception, and display a common error page (or use a global exception handler)
            // log exception and display exception view
            Log::error("Exception: ", array(
                "message" => $e->getMessage()
            ));
            $data = [
                'errorMsg' => $e->getMessage()
            ];
            return view('exception')->with($data);
        }
    }
}<file_sep>/app/Models/JobHistoryModel.php
<?php
namespace App\Models;

class JobHistoryModel
{

    private $job_history_id;

    private $current_job;

    private $previous_job;

    private $current_employment_date;

    private $previous_employment_date;

    private $current_employment_location;

    private $user_user_id;

    public function __construct($job_history_id, $current_job, $previous_job, $current_employment_date, $previous_employment_date, $current_employment_location, $user_user_id)
    {
        $this->job_history_id = $job_history_id;
        $this->current_job = $current_job;
        $this->current_employment_date = $current_employment_date;
        $this->previous_employment_date = $previous_employment_date;
        $this->current_employment_location = $current_employment_location;
        $this->user_user_id = $user_user_id;
    }

    /**
     *
     * @return mixed
     */
    public function getJob_history_id()
    {
        return $this->job_history_id;
    }

    /**
     *
     * @param mixed $job_history_id
     */
    public function setJob_history_id($job_history_id)
    {
        $this->job_history_id = $job_history_id;
    }

    /**
     *
     * @return mixed
     */
    public function getCurrent_job()
    {
        return $this->current_job;
    }

    /**
     *
     * @param mixed $current_job
     */
    public function setCurrent_job($current_job)
    {
        $this->current_job = $current_job;
    }

    /**
     *
     * @return mixed
     */
    public function getPrevious_job()
    {
        return $this->previous_job;
    }

    /**
     *
     * @param mixed $previous_job
     */
    public function setPrevious_job($previous_job)
    {
        $this->previous_job = $previous_job;
    }

    /**
     *
     * @return mixed
     */
    public function getCurrent_employment_date()
    {
        return $this->current_employment_date;
    }

    /**
     *
     * @param mixed $current_employment_date
     */
    public function setCurrent_employment_date($current_employment_date)
    {
        $this->current_employment_date = $current_employment_date;
    }

    /**
     *
     * @return mixed
     */
    public function getPrevious_employment_date()
    {
        return $this->previous_employment_date;
    }

    /**
     *
     * @param mixed $previous_employment_date
     */
    public function setPrevious_employment_date($previous_employment_date)
    {
        $this->previous_employment_date = $previous_employment_date;
    }

    /**
     *
     * @return mixed
     */
    public function getCurrent_employment_location()
    {
        return $this->current_employment_location;
    }

    /**
     *
     * @param mixed $current_employment_location
     */
    public function setCurrent_employment_location($current_employment_location)
    {
        $this->current_employment_location = $current_employment_location;
    }
    /**
     * @return mixed
     */
    public function getUser_user_id()
    {
        return $this->user_user_id;
    }

    /**
     * @param mixed $user_user_id
     */
    public function setUser_user_id($user_user_id)
    {
        $this->user_user_id = $user_user_id;
    }

}<file_sep>/app/Services/Business/JobBusinessService.php
<?php
// <NAME>
// CST 256
// February 3, 2019
// This is my own work
/* Handles user business logic and connections to database */
namespace App\Services\Business;

use PDO;
use App\Models\UserModel;
use Illuminate\Support\Facades\Log;
use App\Models\JobModel;
use App\Services\Data\JobDataService;

class JobBusinessService
{

    public function createJobPost(JobModel $jobModel)
    {
        Log::info("Entering JobBusinessService.createJobPost()");
        // get credentials for accessing the database
        $servername = config("database.connections.mysql.host");
        $dbname = config("database.connections.mysql.database");
        $username = config("database.connections.mysql.username");
        $password = config("<PASSWORD>");
        // best practice: do not create database connections in a dao
        // create connection
        $conn = new PDO("mysql:host=$servername;dbname=$dbname", $username, $password);
        $conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
        // create a security service dao with this connection and try to find users
        $service = new JobDataService($conn);
        // calls the createJobPost command
        $flag = $service->createJobPost($jobModel, $conn);
        // return the finder results
        return $flag;
        Log::info("Exit JobBusinessService.createJobPost() with " . $flag);
    }

    public function updateJobPost(JobModel $jobModel)
    {
        Log::info("Entering JobBusinessService.updateJobPost()");
        // get credentials for accessing the database
        $servername = config("database.connections.mysql.host");
        $dbname = config("database.connections.mysql.database");
        $username = config("database.connections.mysql.username");
        $password = config("<PASSWORD>.connections.mysql.password");
        // best practice: do not create database connections in a dao
        // create connection
        $conn = new PDO("mysql:host=$servername;dbname=$dbname", $username, $password);
        $conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
        // create a security service dao with this connection and try to find users
        $service = new JobDataService($conn);
        // calls the updateJobPosting command
        $flag = $service->updateJobPost($jobModel, $conn);
        // return the finder results
        return $flag;
        Log::info("Exit JobBusinessService.createJobPost() with " . $flag);
    }

    public function deleteJobPost($id)
    {
        Log::info("Entering JobBusinessService.deleteJobPost()");
        // get credentials for accessing the database
        $servername = config("database.connections.mysql.host");
        $dbname = config("database.connections.mysql.database");
        $username = config("database.connections.mysql.username");
        $password = config("database.connections.mysql.password");
        // best practice: do not create database connections in a dao
        // create connection
        $conn = new PDO("mysql:host=$servername;dbname=$dbname", $username, $password);
        $conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
        // create a security service dao with this connection and try to find users
        $service = new JobDataService($conn);
        // calls the deleteJobPost command
        $flag = $service->deleteJobPost($id);
        // return the finder results
        return $flag;
        Log::info("Exit JobBusinessService.deleteJobPost() with " . $flag);
    }

    public function showJobPosts()
    {
        Log::info("Entering JobBusinessService.showJobPosts()");
        // get credentials for accessing the database
        $servername = config("database.connections.mysql.host");
        $dbname = config("database.connections.mysql.database");
        $username = config("database.connections.mysql.username");
        $password = config("<PASSWORD>");
        // best practice: do not create database connections in a dao
        // create connection
        $conn = new PDO("mysql:host=$servername;dbname=$dbname", $username, $password);
        $conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
        // create a security service dao with this connection and try to find users
        $service = new JobDataService($conn);
        // calls the findAllUsers command
        $flag = $service->showAllJobPosts();
        // return the finder results
        return $flag;
        Log::info("Exit JobBusinessService.showJobPosts() with " . $flag);
    }
}<file_sep>/resources/views/exception.php
<?php
echo "Exception Occured: " . $errorMsg;
?>

<br>
<a href="login">Try Again</a>

<file_sep>/app/Services/Data/AdminDataService.php
<?php
namespace App\Services\Data;

use Illuminate\Support\Facades\Log;
use App\Services\Utility\DatabaseException;

class AdminDataService
{

    private $conn = null;

    // best practice: do not create a database connections in a dao
    // so you can support atomic database transactions
    public function __construct($conn)
    {
        $this->conn = $conn;
    }
 
    // method to delete user
    public function deleteUser($id)
    {
        Log::info("Entering UserDataService.deleteUser()");
        try {
            // prepared statement is created
            $stmt = $this->conn->prepare('DELETE FROM USER WHERE `USER_ID` = :id');
            // bind parameter
            $stmt->bindParam(':id', $id);
            // executes statement
            $delete = $stmt->execute();
            // returns true or false if user has been deleted from database
            if ($delete) {
                Log::info("Exiting UserDataService.deleteUser() with returning true");
                return true;
            } else {
                Log::info("Exiting UserDataService.deleteUser() with returning false");
                return false;
            }
        } catch (\PDOException $e) {
            Log::error("Exception: ", array(
                "message" => $e->getMessage()
            ));
            throw new DatabaseException("Database Exception: " . $e->getMessage(), 0, $e);
        }
    }

    // method to suspend user
    public function suspendUser($id)
    {
        Log::info("Entering UserDataService.suspendUser()");
        try {
            // prepared statement is created
            $stmt = $this->conn->prepare("UPDATE USER SET `ACTIVE` = '1' WHERE `USER_ID` = :id");
            // bind parameter
            $stmt->bindParam(':id', $id);
            // executes statement
            $suspend = $stmt->execute();
            // returns true or false if user active row has been set to 1
            if ($suspend) {
                Log::info("Exiting UserDataService.suspendUser() with returning true");
                return true;
            } else {
                Log::info("Exiting UserDataService.suspendUser() with returning false");
                return false;
            }
        } catch (\PDOException $e) {
            Log::error("Exception: ", array(
                "message" => $e->getMessage()
            ));
            throw new DatabaseException("Database Exception: " . $e->getMessage(), 0, $e);
        }
    }

    // method to unsuspend user account
    public function unsuspendUser($id)
    {
        Log::info("Entering UserDataService.unsuspendUser()");
        try {
            // prepared statement is created
            $stmt = $this->conn->prepare("UPDATE USER SET `ACTIVE` = '0' WHERE `USER_ID` = :id");
            // bind parameter
            $stmt->bindParam(':id', $id);
            // executes statement
            $suspend = $stmt->execute();
            // returns true or false if user active row has been set to 0
            if ($suspend) {
                Log::info("Exiting UserDataService.unsuspendUser() with returning true");
                return true;
            } else {
                Log::info("Exiting UserDataService.unsuspendUser() with returning false");
                return false;
            }
        } catch (\PDOException $e) {
            Log::error("Exception: ", array(
                "message" => $e->getMessage()
            ));
            throw new DatabaseException("Database Exception: " . $e->getMessage(), 0, $e);
        }
    }
}
<file_sep>/app/Services/Business/ProfileBusinessService.php
<?php
namespace App\Services\Business;

use Illuminate\Support\Facades\Log;
use PDO;
use App\Models\SkillsModel;
use App\Services\Data\ProfileDataService;
use App\Models\EducationModel;
use App\Models\JobHistoryModel;
use App\Models\ContactModel;

class ProfileBusinessService
{

    public function createSkills(SkillsModel $skillsModel)
    {
        Log::info("Entering ProfileBusinessService.createSkills()");
        // get credentials for accessing the database
        $servername = config("database.connections.mysql.host");
        $dbname = config("database.connections.mysql.database");
        $username = config("database.connections.mysql.username");
        $password = config("database.connections.mysql.password");
        // create connection to database
        $conn = new PDO("mysql:host=$servername;dbname=$dbname", $username, $password);
        $conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
        // create a security service dao with this connection and try to find and delete user
        $service = new ProfileDataService($conn);
        $flag = $service->createSkills($skillsModel, $conn);
        // return the finder results
        Log::info("Exit ProfileBusinessService.createSkills() with " . $flag);
        return $flag;
    }

    public function updateSkills(SkillsModel $skillsModel, $id)
    {
        Log::info("Entering ProfileBusinessService.updateSkills()");
        // get credentials for accessing the database
        $servername = config("database.connections.mysql.host");
        $dbname = config("database.connections.mysql.database");
        $username = config("database.connections.mysql.username");
        $password = config("<PASSWORD>.connections.<PASSWORD>.password");
        // create connection to database
        $conn = new PDO("mysql:host=$servername;dbname=$dbname", $username, $password);
        $conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
        // create a security service dao with this connection and try to find and delete user
        $service = new ProfileDataService($conn);
        $flag = $service->updateSkills($skillsModel, $id);
        // return the finder results
        Log::info("Exit ProfileBusinessService.updateSkills() with " . $flag);
        return $flag;
    }

    public function deleteSkills($id)
    {
        Log::info("Entering ProfileBusinessService.deleteSkills()");
        // get credentials for accessing the database
        $servername = config("database.connections.mysql.host");
        $dbname = config("database.connections.mysql.database");
        $username = config("database.connections.mysql.username");
        $password = config("database.connections.mysql.password");
        // create connection to database
        $conn = new PDO("mysql:host=$servername;dbname=$dbname", $username, $password);
        $conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
        // create a security service dao with this connection and try to find and delete user
        $service = new ProfileDataService($conn);
        $flag = $service->deleteSkills($id);
        // return the finder results
        Log::info("Exit ProfileBusinessService.deleteSkills() with " . $flag);
        return $flag;
    }

    public function showSkills($user_user_id)
    {
        Log::info("Entering ProfileBusinessService.showSkills()");
        // get credentials for accessing the database
        $servername = config("database.connections.mysql.host");
        $dbname = config("database.connections.mysql.database");
        $username = config("database.connections.mysql.username");
        $password = config("database.connections.mysql.password");
        // create connection to database
        $conn = new PDO("mysql:host=$servername;dbname=$dbname", $username, $password);
        $conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
        // create a security service dao with this connection and try to find and delete user
        $service = new ProfileDataService($conn);
        $flag = $service->findAllSkills($user_user_id);
        // return the finder results
        Log::info("Exit ProfileBusinessService.showSkills() with " . $flag);
        return $flag;
    }

    public function createEducation(EducationModel $educationModel)
    {
        Log::info("Entering ProfileBusinessService.createEducation()");
        // get credentials for accessing the database
        $servername = config("database.connections.mysql.host");
        $dbname = config("database.connections.mysql.database");
        $username = config("database.connections.mysql.username");
        $password = config("database.connections.mysql.password");
        // create connection to database
        $conn = new PDO("mysql:host=$servername;dbname=$dbname", $username, $password);
        $conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
        // create a security service dao with this connection and try to find and delete user
        $service = new ProfileDataService($conn);
        $flag = $service->createEducation($educationModel, $conn);
        // return the finder results
        Log::info("Exit ProfileBusinessService.createEducation() with " . $flag);
        return $flag;
    }

    public function updateEducation(EducationModel $educationModel)
    {
        Log::info("Entering ProfileBusinessService.updateEducation()");
        // get credentials for accessing the database
        $servername = config("database.connections.mysql.host");
        $dbname = config("database.connections.mysql.database");
        $username = config("database.connections.mysql.username");
        $password = config("<PASSWORD>.connections.mysql.password");
        // create connection to database
        $conn = new PDO("mysql:host=$servername;dbname=$dbname", $username, $password);
        $conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
        // create a security service dao with this connection and try to find and delete user
        $service = new ProfileDataService($conn);
        $flag = $service->updateEducation($educationModel, $conn);
        // return the finder results
        Log::info("Exit ProfileBusinessService.updateEducation() with " . $flag);
        return $flag;
    }

    public function deleteEducation($id)
    {
        Log::info("Entering ProfileBusinessService.deleteEducation()");
        // get credentials for accessing the database
        $servername = config("database.connections.mysql.host");
        $dbname = config("database.connections.mysql.database");
        $username = config("database.connections.mysql.username");
        $password = config("<PASSWORD>.connections.<PASSWORD>");
        // create connection to database
        $conn = new PDO("mysql:host=$servername;dbname=$dbname", $username, $password);
        $conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
        // create a security service dao with this connection and try to find and delete user
        $service = new ProfileDataService($conn);
        $flag = $service->deleteEducation($id);
        // return the finder results
        Log::info("Exit ProfileBusinessService.deleteEducation() with " . $flag);
        return $flag;
    }

    public function showEducation()
    {
        Log::info("Entering ProfileBusinessService.showEducation()");
        // get credentials for accessing the database
        $servername = config("database.connections.mysql.host");
        $dbname = config("database.connections.mysql.database");
        $username = config("database.connections.mysql.username");
        $password = config("database.connections.mysql.password");
        // create connection to database
        $conn = new PDO("mysql:host=$servername;dbname=$dbname", $username, $password);
        $conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
        // create a security service dao with this connection and try to find and delete user
        $service = new ProfileDataService($conn);
        $flag = $service->findAllEducation();
        // return the finder results
        Log::info("Exit ProfileBusinessService.showEducation() with " . $flag);
        return $flag;
    }

    public function createJobHistory(JobHistoryModel $jobHistory)
    {
        Log::info("Entering ProfileBusinessService.createJobHistory()");
        // get credentials for accessing the database
        $servername = config("database.connections.mysql.host");
        $dbname = config("database.connections.mysql.database");
        $username = config("database.connections.mysql.username");
        $password = config("<PASSWORD>.connections.mysql.password");
        // create connection to database
        $conn = new PDO("mysql:host=$servername;dbname=$dbname", $username, $password);
        $conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
        // create a security service dao with this connection and try to find and delete user
        $service = new ProfileDataService($conn);
        $flag = $service->createJobHistory($jobHistory, $conn);
        // return the finder results
        Log::info("Exit ProfileBusinessService.createJobHistory() with " . $flag);
        return $flag;
    }

    public function updateJobHistory(JobHistoryModel $jobHistory)
    {
        Log::info("Entering ProfileBusinessService.updateJobHistory()");
        // get credentials for accessing the database
        $servername = config("database.connections.mysql.host");
        $dbname = config("database.connections.mysql.database");
        $username = config("database.connections.mysql.username");
        $password = config("database.connections.mysql.password");
        // create connection to database
        $conn = new PDO("mysql:host=$servername;dbname=$dbname", $username, $password);
        $conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
        // create a security service dao with this connection and try to find and delete user
        $service = new ProfileDataService($conn);
        $flag = $service->updateJobHistory($jobHistory, $conn);
        // return the finder results
        Log::info("Exit ProfileBusinessService.updateJobHistory() with " . $flag);
        return $flag;
    }

    public function deleteJobHistory($id)
    {
        Log::info("Entering ProfileBusinessService.deleteJobHistory()");
        // get credentials for accessing the database
        $servername = config("database.connections.mysql.host");
        $dbname = config("database.connections.mysql.database");
        $username = config("database.connections.mysql.username");
        $password = config("<PASSWORD>");
        // create connection to database
        $conn = new PDO("mysql:host=$servername;dbname=$dbname", $username, $password);
        $conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
        // create a security service dao with this connection and try to find and delete user
        $service = new ProfileDataService($conn);
        $flag = $service->deleteJobHistory($id);
        // return the finder results
        Log::info("Exit ProfileBusinessService.deleteJobHistory() with " . $flag);
        return $flag;
    }

    public function showJobHistory()
    {
        Log::info("Entering ProfileBusinessService.showJobHistory()");
        // get credentials for accessing the database
        $servername = config("database.connections.mysql.host");
        $dbname = config("database.connections.mysql.database");
        $username = config("database.connections.mysql.username");
        $password = config("database.connections.mysql.password");
        // create connection to database
        $conn = new PDO("mysql:host=$servername;dbname=$dbname", $username, $password);
        $conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
        // create a security service dao with this connection and try to find and delete user
        $service = new ProfileDataService($conn);
        $flag = $service->findAllJobHistory();
        // return the finder results
        Log::info("Exit ProfileBusinessService.showJobHistory() with " . $flag);
        return $flag;
    }

    public function createContactInformation(ContactModel $contactModel)
    {
        Log::info("Entering ProfileBusinessService.createContactInformation()");
        // get credentials for accessing the database
        $servername = config("database.connections.mysql.host");
        $dbname = config("database.connections.mysql.database");
        $username = config("database.connections.mysql.username");
        $password = config("<PASSWORD>");
        // create connection to database
        $conn = new PDO("mysql:host=$servername;dbname=$dbname", $username, $password);
        $conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
        // create a security service dao with this connection and try to find and delete user
        $service = new ProfileDataService($conn);
        $flag = $service->createContactInformation($contactModel, $conn);
        // return the finder results
        Log::info("Exit ProfileBusinessService.createContactInformation() with " . $flag);
        return $flag;
    }

    public function updateContactInformation(ContactModel $contactModel)
    {
        Log::info("Entering ProfileBusinessService.updateContactInformation()");
        // get credentials for accessing the database
        $servername = config("database.connections.mysql.host");
        $dbname = config("database.connections.mysql.database");
        $username = config("database.connections.mysql.username");
        $password = config("database.connections.mysql.password");
        // create connection to database
        $conn = new PDO("mysql:host=$servername;dbname=$dbname", $username, $password);
        $conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
        // create a security service dao with this connection and try to find and delete user
        $service = new ProfileDataService($conn);
        $flag = $service->updateContactInformation($contactModel, $conn);
        // return the finder results
        Log::info("Exit ProfileBusinessService.updateContactInformation() with " . $flag);
        return $flag;
    }

    public function deleteContactInformation($id)
    {
        Log::info("Entering ProfileBusinessService.deleteContactInformation()");
        // get credentials for accessing the database
        $servername = config("database.connections.mysql.host");
        $dbname = config("database.connections.mysql.database");
        $username = config("database.connections.mysql.username");
        $password = config("database.connections.mysql.password");
        // create connection to database
        $conn = new PDO("mysql:host=$servername;dbname=$dbname", $username, $password);
        $conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
        // create a security service dao with this connection and try to find and delete user
        $service = new ProfileDataService($conn);
        $flag = $service->deleteContactInformation($id);
        // return the finder results
        Log::info("Exit ProfileBusinessService.deleteContactInformation() with " . $flag);
        return $flag;
    }

    public function showContactInformation($id)
    {
        Log::info("Entering ProfileBusinessService.showContactInformation()");
        // get credentials for accessing the database
        $servername = config("database.connections.mysql.host");
        $dbname = config("database.connections.mysql.database");
        $username = config("database.connections.mysql.username");
        $password = config("database.connections.mysql.password");
        // create connection to database
        $conn = new PDO("mysql:host=$servername;dbname=$dbname", $username, $password);
        $conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
        // create a security service dao with this connection and try to find and delete user
        $service = new ProfileDataService($conn);
        $flag = $service->findContactByID($id);
        // return the finder results
        Log::info("Exit ProfileBusinessService.showContactInformations() with " . $flag);
        return $flag;
    }
}<file_sep>/README.md
# Milestone3-256
<file_sep>/app/Models/ContactModel.php
<?php
namespace App\Models;

class ContactModel
{

    private $contact_id;

    private $business_email;

    private $phone_number;

    private $street_address;

    private $city;

    private $state;

    private $zip_code;

    private $about_me;

    private $user_user_id;

    public function __construct($contact_id, $business_email, $phone_number, $street_address, $city, $state, $zip_code, $about_me, $user_user_id)
    {
        $this->contact_id = $contact_id;
        $this->business_email = $business_email;
        $this->phone_number = $phone_number;
        $this->street_address = $street_address;
        $this->city = $city;
        $this->state = $state;
        $this->zip_code = $zip_code;
        $this->about_me = $about_me;
        $this->user_user_id = $user_user_id;
    }

    /**
     *
     * @return mixed
     */
    public function getContact_id()
    {
        return $this->contact_id;
    }

    /**
     *
     * @param mixed $contact_id
     */
    public function setContact_id($contact_id)
    {
        $this->contact_id = $contact_id;
    }

    /**
     *
     * @return mixed
     */
    public function getBusiness_email()
    {
        return $this->business_email;
    }

    /**
     *
     * @param mixed $business_email
     */
    public function setBusiness_email($business_email)
    {
        $this->business_email = $business_email;
    }

    /**
     *
     * @return mixed
     */
    public function getPhone_number()
    {
        return $this->phone_number;
    }

    /**
     *
     * @param mixed $phone_number
     */
    public function setPhone_number($phone_number)
    {
        $this->phone_number = $phone_number;
    }

    /**
     *
     * @return mixed
     */
    public function getStreet_address()
    {
        return $this->street_address;
    }

    /**
     *
     * @param mixed $street_address
     */
    public function setStreet_address($street_address)
    {
        $this->street_address = $street_address;
    }

    /**
     *
     * @return mixed
     */
    public function getState()
    {
        return $this->state;
    }

    /**
     *
     * @param mixed $state
     */
    public function setState($state)
    {
        $this->state = $state;
    }

    /**
     *
     * @return mixed
     */
    public function getCity()
    {
        return $this->city;
    }

    /**
     *
     * @param mixed $city
     */
    public function setCity($city)
    {
        $this->city = $city;
    }

    /**
     *
     * @return mixed
     */
    public function getZip_code()
    {
        return $this->zip_code;
    }

    /**
     *
     * @param mixed $zip_code
     */
    public function setZip_code($zip_code)
    {
        $this->zip_code = $zip_code;
    }

    /**
     *
     * @return mixed
     */
    public function getAbout_me()
    {
        return $this->about_me;
    }

    /**
     *
     * @param mixed $about_me
     */
    public function setAbout_me($about_me)
    {
        $this->about_me = $about_me;
    }

    /**
     *
     * @return mixed
     */
    public function getUser_user_id()
    {
        return $this->user_user_id;
    }

    /**
     *
     * @param mixed $user_user_id
     */
    public function setUser_user_id($user_user_id)
    {
        $this->user_user_id = $user_user_id;
    }
}<file_sep>/app/Models/CredentialsModel.php
<?php
namespace App\Models;

class CredentialsModel
{

    private $credentials_id;

    private $username;

    private $password;

    private $user_user_id;

    public function __construct($credentials_id, $username, $password, $user_user_id)
    {
        $this->credentials_id = $credentials_id;
        $this->username = $username;
        $this->password = $<PASSWORD>;
        $this->user_user_id = $user_user_id;
    }

    /**
     *
     * @return mixed
     */
    public function getCredentials_id()
    {
        return $this->credentials_id;
    }

    /**
     *
     * @return mixed
     */
    public function getUsername()
    {
        return $this->username;
    }

    /**
     *
     * @return mixed
     */
    public function getPassword()
    {
        return $this-><PASSWORD>;
    }

    /**
     *
     * @param mixed $credentials_id
     */
    public function setCredentials_id($credentials_id)
    {
        $this->credentials_id = $credentials_id;
    }

    /**
     *
     * @param mixed $username
     */
    public function setUsername($username)
    {
        $this->username = $username;
    }

    /**
     *
     * @param mixed $password
     */
    public function setPassword($password)
    {
        $this->password = $<PASSWORD>;
    }
    /**
     * @return mixed
     */
    public function getUser_user_id()
    {
        return $this->user_user_id;
    }

    /**
     * @param mixed $user_user_id
     */
    public function setUser_user_id($user_user_id)
    {
        $this->user_user_id = $user_user_id;
    }

}<file_sep>/app/Models/EducationModel.php
<?php
namespace App\Models;

class EducationModel
{

    private $education_id;

    private $degree;

    private $school_name;

    private $school_city;

    private $school_state;

    private $school_zip_code;

    private $graduation_year;

    private $user_user_id;

    public function __construct($education_id, $degree, $school_name, $school_city, $school_state, $school_zip_code, $graduation_year, $user_user_id)
    {
        $this->education_id = $education_id;
        $this->degree = $degree;
        $this->school_name = $school_name;
        $this->school_city = $school_city;
        $this->school_state = $school_state;
        $this->school_zip_code = $school_zip_code;
        $this->graduation_year = $graduation_year;
        $this->user_user_id = $user_user_id;
    }

    /**
     *
     * @return mixed
     */
    public function getEducation_id()
    {
        return $this->education_id;
    }

    /**
     *
     * @param mixed $education_id
     */
    public function setEducation_id($education_id)
    {
        $this->education_id = $education_id;
    }

    /**
     *
     * @return mixed
     */
    public function getDegree()
    {
        return $this->degree;
    }

    /**
     *
     * @param mixed $degree
     */
    public function setDegree($degree)
    {
        $this->degree = $degree;
    }

    /**
     *
     * @return mixed
     */
    public function getSchool_name()
    {
        return $this->school_name;
    }

    /**
     *
     * @param mixed $school_name
     */
    public function setSchool_name($school_name)
    {
        $this->school_name = $school_name;
    }

    /**
     *
     * @return mixed
     */
    public function getSchool_city()
    {
        return $this->school_city;
    }

    /**
     *
     * @param mixed $school_city
     */
    public function setSchool_city($school_city)
    {
        $this->school_city = $school_city;
    }

    /**
     *
     * @return mixed
     */
    public function getSchool_state()
    {
        return $this->school_state;
    }

    /**
     *
     * @param mixed $school_state
     */
    public function setSchool_state($school_state)
    {
        $this->school_state = $school_state;
    }

    /**
     *
     * @return mixed
     */
    public function getSchool_zip_code()
    {
        return $this->school_zip_code;
    }

    /**
     *
     * @param mixed $school_zip_code
     */
    public function setSchool_zip_code($school_zip_code)
    {
        $this->school_zip_code = $school_zip_code;
    }

    /**
     *
     * @return mixed
     */
    public function getGraduation_year()
    {
        return $this->graduation_year;
    }

    /**
     *
     * @param mixed $graduation_year
     */
    public function setGraduation_year($graduation_year)
    {
        $this->graduation_year = $graduation_year;
    }
}