database interaction in codeigniter
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class ActiveRecordController extends CI_Controller {
public function store_order(){
$data = [
'date' => '2018-12-19',
'customer_name' => 'Joe Thomas',
'customer_address' => 'US'
];
$this->db->insert('orders', $data);
echo 'order has successfully been created';
}
}
$route['ar/insert'] = 'activerecordcontroller/store_order';
Also in PHP:
- create model controller migration factory laravel in one command
- clear laravel cash
- check strinh in php
- add date + 1 PHP
- date object to string in php
- delete file using php
- array_unique array to string conversion
- enable reporting php
- can php create folders
- $product->product_type
- create crandon string php
- add days to date php
- current URL without url site laravel
- M-d h:i:a
- failed to open stream: no such file or directory php
- add_filter wordpress
- conole.log in php
- catch new exception php
- add seeder in laravel
- display success message after form submit laravel
- date now function in php
- codeigniter db insert return id
- console log with php on form sent
- array key exists php child child nodes