42 lines
752 B
PHP
42 lines
752 B
PHP
<?php namespace App\Controllers;
|
|
|
|
use App\Models\Donation_model;
|
|
|
|
class Donation extends BaseController
|
|
{
|
|
// public function index()
|
|
// {
|
|
|
|
// return view('show');
|
|
// }
|
|
public function edit_view()
|
|
{
|
|
$model = new Donation_model();
|
|
|
|
$data['users_detail'] = $model->orderBy('id', 'DESC')->findAll();
|
|
|
|
return view('list', $data);
|
|
}
|
|
|
|
public function test($type,$type2)
|
|
{
|
|
echo '<h2>this is a product:'.$type.'and'.$type2.'</h2>';
|
|
//return view('show');
|
|
}
|
|
public function register()
|
|
{
|
|
if($this->request->getMethod() == 'post'){
|
|
$model = new Donation_model();
|
|
$model->save($_POST);
|
|
}
|
|
return view('show');
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
}
|