I don't understand English well, because my language is Portuguese, but you explain it better ... You should have met you before ... I regret taking the time to discover these videos ... today is December 25th, it's Christmas but I'm not even there, I'm here watching your videos, congratulations
By importing those libraries we can do.. for example : I want load a controller or a model into a custom helper method //Load Model Class use App\Models\UsersModel; //Load Controller Class use App\Controllers\Contact; function usersList(){ //calling a Model into a custom helper $obj = new UsersModel(); $data = $obj->getUsersList(); return $data; } function displayContactForm(){ //calling a Controller class into a custom helper $obj = new Contact(); return $obj->myFunction(); } now you can call usersList(), displayContactForm() functions wherever you want.
I don't understand English well, because my language is Portuguese, but you explain it better ... You should have met you before ... I regret taking the time to discover these videos ... today is December 25th, it's Christmas but I'm not even there, I'm here watching your videos, congratulations
Hello GoPHP,
Thanks for your nice tutorial video.
this video tutorial is amazing... do you also have a video tutorial like saving multiple files in database?
$ci=get_instance() is not available in ci4... What is the workaround for it? I have Googled it but couldn't find it
By importing those libraries we can do..
for example :
I want load a controller or a model into a custom helper method
//Load Model Class
use App\Models\UsersModel;
//Load Controller Class
use App\Controllers\Contact;
function usersList(){
//calling a Model into a custom helper
$obj = new UsersModel();
$data = $obj->getUsersList();
return $data;
}
function displayContactForm(){
//calling a Controller class into a custom helper
$obj = new Contact();
return $obj->myFunction();
}
now you can call usersList(), displayContactForm() functions wherever you want.
How CodeIgniter 4 upload multiple images to save data in blob with comma?
public function upload_multiple_files() {
if($this->request->getPost('files_upload')) {
$files = $this->request->getFiles();
$img = $files['multiple_files'];
foreach($img as $im){
$name= $im->getName();
$im->move('assets/imgs', $name);
$userdata = [
'title' => $this->request->getPost('title'),
'img' => $name
];
$this->imageModel->insert($userdata);
}
}
echo view('files_upload');
}