i have tried to use everythimg and import everything till now but in migration table of my users the hasOne function is not defined. i tried it in APP\model and it worked and the auto complete shows it… in migration tables it wont let me use it why?
You will get a better response of people helping you → if you have the code inserted here </>.
Example
public function showAdminNavigation(): void
{
$protocol = isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off' ? 'https://' : 'http://';
$host = $_SERVER['HTTP_HOST'];
// Define your base path here
$base_path = ($host === 'localhost:8888') ? '/innsoltech' : '';
$base_url = $protocol . $host . $base_path;
$adminItems = [
'Create Entry' => $base_url . '/create_cms.php',
'Edit Entry' => $base_url . '/edit_cms.php',
'Add Product' => $base_url . '/new_portfolio.php',
'Edit Product' => $base_url . '/product_edit.php'
];
echo '<div class="admin-navigation">';
foreach ($adminItems as $adminTitle => $adminPath) {
$adminSafeTitle = htmlspecialchars($adminTitle, ENT_QUOTES, 'UTF-8');
echo "<a href=\"{$adminPath}\">{$adminSafeTitle}</a>";
}
echo '</div>';
}