#39 Multiple File Uploading in codeigniter 4

Поділитися
Вставка
  • Опубліковано 14 січ 2025

КОМЕНТАРІ • 6

  • @smartchoicesoftwares
    @smartchoicesoftwares 4 роки тому +2

    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

  • @softwareEngineerKunwar
    @softwareEngineerKunwar 4 роки тому

    Hello GoPHP,
    Thanks for your nice tutorial video.

  • @HakdogHatkik
    @HakdogHatkik Рік тому

    this video tutorial is amazing... do you also have a video tutorial like saving multiple files in database?

  • @alpeshmistryofficial
    @alpeshmistryofficial 4 роки тому

    $ci=get_instance() is not available in ci4... What is the workaround for it? I have Googled it but couldn't find it

    • @GoPHP
      @GoPHP  4 роки тому +3

      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.

  • @debabratapani8487
    @debabratapani8487 3 роки тому

    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');
    }