/var/www/hkosl.com/nick/codeigniter/application/controllers/Product.php


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<?php
defined
('BASEPATH') OR exit('No direct script access allowed');

use 
Illuminate\Database\Capsule\Manager as DB;

class 
Product extends CI_Controller
{

    public function 
__construct()
    {
        
parent::__construct();

    }

    public function 
index($id$friendly_url)
    {
        If(empty(
$id)){
            
//use $name to find table: page_seo, where table = “product”, friendly_url = “product_one” => find table_id (product id)
            
var_dump($friendly_url);
        }else{
            
//direct use $id to find product id
            
echo 1;
        }

    }

}