/home/darymode/public_html/views/produit_detail.php
use App\Tables\TablePartenaire;
use App\Tables\TableFamille;
use App\Tables\TableProduits;
/******************************************************************************************/
$pdo = Connection::getPDO();
$i = 0; $p =0; $j =0; $m = 0; $k=0;
$prixvar = 1;
if(isset($_SESSION['id_public'])){
$user = (New TablePartenaire($pdo))->find($_SESSION['id_public']);
$prixvar = $user->getPrix();
}
$categories = (new TableCategorie($pdo))->FindActive();
$i = count($categories);
$familles = (new TableFamille($pdo))->FindActive();
$k= count($familles);
$produit = (new TableProduits($pdo))->find($params['id']);
?>
<meta property="og:title" content="<?= $produit->getNom(); ?>" />
<meta property="og:description" content="" />
<meta property="og:image" content="<?= $produit->getImage(); ?>" />
<div class="interne_banner"></div>
<div class="container-fluid titre_pages">
<div class="container">
<h2 >Nos Produits</h2>
</div>
</div>
<div class="container main_body">
<!-- Three columns of text below the carousel -->
<div class="col-md-3">
<div class="side-menu">
<nav class="navbar navbar-default">
<!-- Main Menu -->
<?php include('side_menu.php'); ?>
<!-- /.navbar-collapse -->
</nav>
</div>
Arguments
"Call to a member function getNom() on null"
/home/darymode/public_html/src/Router.php
* run
*
* @return self
*/
public function run():self
{
$match = $this->router->match();
if($match!= false){
$view = $match['target'];
$params = $match['params'];
}else{
$view = '404';
}
$router = $this;
$js = '';
$layout = 'layouts/default';
//dd($view);
try{
ob_start();
require $this->viewPath . DIRECTORY_SEPARATOR . $view .'.php';
$content = ob_get_clean();
require $this->viewPath . DIRECTORY_SEPARATOR . $layout .'.php';
}catch(Exception $e){
print_r($e);
}
return $this;
}
}
/home/darymode/public_html/public/index.php
->get('/Presentation','presentation','Presentation')
->get('/Magasins','magasins','Magasins')
->get('/Contactez-nous','contact','Contacts')
->get('/Panier','panier','Panier')
->get('/Validation','valid_commande','Validation')
->post('/Envoi','envoi','Send')
->post('/EnvoiMessage','envoimessage','SendMessage')
->post('/Interet','interested','Interested')
->get('/Social','social','social')
->get('/MessageOk','messagesent','MessageOk')
->get('/InteretOk/[a:id]','interetok','InteretOk')
->match('/Recherche','search','Search')
->get('/RechercheMobile','mobsearch','MobSearch')
->get('/Ok','end_commande','End')
->match('/Produits/[a:id]','produit_detail','Detail')
->match('/List/[a:idc]','produits','Produits')
->match('/List/[a:idc]/[a:idf]','produits','Produits_fam')
->post('/membre/delete_image/[a:id]/[a:ann]','clients/delete_image','Image_delete')
->get('/[*:wilaya]/[*:commune]/[*:id]/[*:nom]','detail','Recherche')
->run();