Files
opensourcepos/app/Controllers/Office.php
objecttothis 48c04417b8 Fixes
- PHP 8.2 deprecates dynamically declared class properties. Adding these declarations removes deprecation warnings and makes the code PHP 8.3 compatible.
- Add Elvis operator to set search string to an empty string when it's value is null to get rid of an error in the search function call.
- Imported class for OSPOS config
- Replaced private with protected in parent controller's property.
- Removed unneeded TODO
- Refactored local variables
- Replaced ternary notation
- Removed unneeded comments
- Removed unneeded class property
- Removed unneeded @property declarations
- Fixed database version
2024-06-15 17:19:15 +02:00

31 lines
436 B
PHP

<?php
namespace App\Controllers;
use App\Models\Employee;
/**
* @property Employee employee
*/
class Office extends Secure_Controller
{
protected Employee $employee;
function __construct()
{
parent::__construct('office', NULL, 'office');
}
public function getIndex(): void
{
echo view('home/office');
}
public function logout(): void
{
$this->employee = model(Employee::class);
$this->employee->logout();
}
}