Welcome Guest, Not a member yet? Register   Sign In
  These 20 Awesome API Clients Will Change How You Work with APIs
Posted by: InsiteFX - 06-12-2025, 07:41 AM - Replies (1)

These 20 Awesome API Clients Will Change How You Work with APIs


  twig and view cell
Posted by: foxbille - 06-11-2025, 08:54 AM - No Replies

Hi all,
When i try to use view cells and twig i get this error
Twig\Error\SyntaxError
The arrow function argument must be a list of variables or a single variable in "blog/index.twig" at line 15
at line

Code:
<li class="list-inline-item">Tags : {{ view_cell('App\Cells\TagsCell::getOne',['article_id' => article.id ]) }}</li>
Does someone can help ?
Thanks
Eric


  query builder updateBatch behavior on 4.6.x
Posted by: tomasoma - 06-11-2025, 06:05 AM - Replies (2)

I come from 4.1.9 (was stuck in PHP7.3 for a long time) and upgrade to 4.6.1 and i notice a change in updateBatch behavior :

PHP Code:
model('Foo')->builder()->updateBatch([
[
'id' => ,
'content' => 'bar',
],
[
'id' => ,
'content' => 'bim',
'plus' => 'tac',
],
],
'id') ; 

that updateBatch with array structure differences worked in 4.1.9 and does not work in 4.6.x

Is that an expected behavior or is it a bug that will be fixed ?

thanks for your attention


  Call to a member function get() on null Error
Posted by: Vespa - 06-07-2025, 03:44 AM - Replies (3)

Sometimes weird things happens...
I'm developing my web site locally on my PC...things run quite fine...
I have installed Codeigniter Shield ...and now I got the following error:

[Image: basecontroller_error.png]

Any help or hint to fix the issue? Thanks a lot

In my Base Controller I have the following code to have multi language functions:

Code:
public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger)
    {
        // Do Not Edit This Line
        parent::initController($request, $response, $logger);
        // Preload any models, libraries, etc, here.
        // E.g.: $this->session = service('session');
/**
        * E.g.: $this->session = \Config\Services::session();
        * Ensure that the session is started and running
        */
        if (session_status() == PHP_SESSION_NONE) {
$this->session = Services::session();
        }
$config = new App();
        $language = \Config\Services::language();
        $locale = $this->session->get('locale') ?? $this->request->getLocale();
        $language->setLocale($locale);
       
        $this->viewData['locale'] = $locale;
        $this->viewData['supportedLocales'] = $config->supportedLocales;
    }


  Alternative multisite structure - problems? concerns?
Posted by: Crenel - 06-06-2025, 09:26 PM - Replies (2)

I wanted to accomplish in CI4 what I was doing in CI3 - have a system folder that was shared by multiple sites/projects and upgrade them individually as their code became (or was confirmed as) ready for the new version.

Using this approach, when a new release of CI3 was available, I would immediately install the new framework, but this wouldn't affect any existing code. Only when I was ready, I would point a site/project to the new system code, and I could revert that immediately and fully if something failed in a major way.

I think I have this working in CI4, but I'd like to know if anyone sees problems or concerns with how I'm doing this now. Life's been too busy for me to deal with upgrading things from CI3, but I'm now at a point where I can't delay further, thus the timing of this question.

In the following, structures assume a manual installation. I don't use Composer and have no idea how this would impact Composer-installed CI4.

The differences between how I'm doing this and what the documentation suggests are file organization and using an absolute path to the system folder in Config/Paths.php

The documentation suggests the following structure for a manually-installed multi-site CI4:

Code:
foo/
    app/
    public/
    tests/
    writable/
    env
    phpunit.xml.dist
    spark
bar/
    app/
    public/
    tests/
    writable/
    env
    phpunit.xml.dist
    spark
codeigniter4/system

My approach, allowing multiple CI4 system/core versions, looks like this:
Code:
foo/
bar/
ci4_5_8/
ci4_6_0/
ci4_6_1/
(I'm actually starting at 4.6.1, so the older versions there are just for illustration.)

In Paths.php I have:
Code:
public string $systemDirectory = '/server/projects/ci4_6_1';

I think this explains enough, but let me know if you have questions about what I mean. My question is: are there any risks (especially regarding security or stability) here that I should be wary of? It seems like a straightforward variation, but dealing with framework code that I don't have time to analyze in depth makes me a little nervous about variations.


  PDF attachment download not working in email in IOS/MAC/APPLE
Posted by: pratibha.cts - 06-05-2025, 02:52 AM - Replies (1)

Hi
I am sending pdf as attachment in email, it works fine when sending "inline", but I found issue, inline pdf is not working properly in ios/mac/apple. So I tried to send force downloadable attachment, it attaches file and I am able to download file, but it doesn't show file content and shows error "Failed to load PDF document." (https://prnt.sc/x0S_mf47G4c4). File showing corrupted on  ios/mac/apple and gmail also.
I have checked the file path, it's correct and same file works fine in inline mode.
I tried the followings, but doesn't worked

PHP Code:
1. $email->attach($attachment'attachment'basename($attachment), 'application/pdf'); 
PHP Code:
2. $email->attach($attachment'attachment''filename.pdf''application/pdf'); 
PHP Code:
3. $tempPath WRITEPATH 'temp/' uniqid() . '.bin';
copy($attachment$tempPath);
$email->attach($tempPath'attachment''document.pdf''application/octet-stream'); 
I am sending dynamically created pdf, which creates on server, then I send it in email. I also tried putting the static PDF on server, that too doesn't worked.
below is my code to send email, please help to resolve this issue.
PHP Code:
function sendEmail($data = [])
{
    if ($data) {

        $email = \Config\Services::email(true);
        $email->clear(true);

        $email->setFrom($data['fromEmail'], $data['fromName']);
        $email->setTo($data['toEmail']);

        if (isset($data['ccEmail']) && !empty($data['ccEmail'])) {
            $email->setCC($data['ccEmail']);
        }

        if (isset($data['bccEmail']) && !empty($data['bccEmail'])) {
            $email->setBCC($data['bccEmail']);
        }

        $email->setSubject($data['subject']);
        $email->setMessage($data['message']);

        if (isset($data['attachments']) && count($data['attachments']) > 0) {
            foreach ($data['attachments'] as $attachment) {
                $email->attach($attachment);
            }
        }

        $res $email->send();        
        
// $error = $email->printDebugger();

        return $res;
    }


Thanks


  Auth Shield and multilanguage
Posted by: kaziul - 06-05-2025, 12:37 AM - Replies (6)

Hello all,
I use SHIELD for authorization
My application is multilingual
The [users] table has a [multi] column
How do I set a session from the [multi] column after logging in.
I use entry in:

PHP Code:
BaseController.php
//...

public function initController(RequestInterface $requestResponseInterface $responseLoggerInterface $logger)
{
    // Do Not Edit This Line
    parent::initController($request$response$logger);

    // Add these lines
    $session = \Config\Services::session();
    $language = \Config\Services::language();
    $language->setLocale($session->lang);
}
//... 
Thank you


  login bug on a codeigniter project
Posted by: gutoazeredogyn - 05-30-2025, 06:14 AM - No Replies

Hello! I have a project that I installed on a hostinger host running php 8. On login screen after user and password it always returned to login screen. After some tips on internet, I change the hostinger server to php 5.6 and the project runned ok. But I´m trying to make it run on my local machine for development and have the same problem on login screen. How to fix it on IIS?


Already tried to change version of PHP on my computer without succsess! It seems to be a route problem on codeigniter


Wink How to Integrate Bootstrap or Tailwind CSS with CodeIgniter
Posted by: bipin775 - 05-28-2025, 10:15 PM - Replies (3)

Have you ever tried integrating Bootstrap or Tailwind CSS into your CodeIgniter project? What’s the best way to include these frameworks—using a CDN or downloading and linking them locally? Also, where do you usually place your CSS files in the CodeIgniter folder structure, and how do you manage responsive layouts within your views? Share your approach or any issues you faced while working with these CSS frameworks in CodeIgniter.


Photo LeekCMS - A Full-featured CMS built with CodeIgniter 4
Posted by: devcodewithai - 05-28-2025, 09:37 PM - No Replies

Hello CI4 Community,
I'd like to introduce a project I've been developing called LeekCMS. It's a fully-featured CMS built from the ground up using CodeIgniter 4, designed specifically for managing and monetizing digital content.

Quote:Goal: To create a CMS that is lightweight, fast, and ready-to-use out of the box for creators selling digital content such as videos, photo galleries, or paid memberships.

? Core Technologies:
  • Framework: CodeIgniter 4 (no 3rd-party CMS base)
  • Database: MySQL
  • Cloud Storage: Amazon S3-compatible
  • Dashboard: Built-in from scratch (no external themes/plugins)

? Key Features:
  • User management with Member Levels
  • Point-based and Subscription-based monetization
  • Full support for Video & Gallery content with Pay-per-view option
  • S3 integration with automatic thumbnail & folder scan for image galleries
  • Auto-generated Pricing & Activation Pages based on Member Levels
  • Activation Code System for points or member upgrades (independent from payment gateways)
  • Built-in Ads Module
  • Custom CSP Header Management via Admin Panel
  • Multi-language support (coming soon)
  • Admin dashboard 100% custom built with a simple, clean UI
  • Email settings, Analytics & Tracking, Site customization all within GUI

? A note from the developer:
This project is solo-developed by me, and while most of the core logic is complete, I'm currently looking for contributors or suggestions — especially help with building the multi-language module.
Many advanced features were created with end-user simplicity in mind, and I would love to bring this to a broader CI4 audience.
Quote:? The first GitHub version will be shared privately to early interested users. It will be made public 2 weeks later.
? Register your interest via Email: [email protected]

?️ Screenshots:

[Image: LeekCMS.jpg]
  • Dashboard
  • Member Levels
  • Video Management
  • Gallery Management
  • Page Builder
  • Settings (Email, Ads, Analytics, S3)

? Future Plan:
  • Open-source under MIT License (with optional paid Pro version)
  • SaaS cloud version: deploy-on-click, integrated domain + hosting (for creators to launch instantly)
  • Pro version includes direct Payment Gateway integrations (PayPal, Stripe, etc.)
  • Community Plugin System
  • Install wizard (
    Code:
    install.php
    ) for easy deployment
  • Improved Multi-language system with GUI text manager
  • Admin theming system (dark/light/custom themes)
  • Potential integration into CI4 official Showcase or community team

? Want to explore or contribute?
  • GitHub link: (Coming soon)
  • Live demo: (Coming soon )
I'm opening this topic to gather feedback, suggestions, or even contributors.
If LeekCMS is considered helpful, I'd be honored to see it listed in CI4's official showcase. ?
Thanks for reading!
Best,
Trí


Welcome, Guest
You have to register before you can post on our site.

Username
  

Password
  





Latest Threads
The Hidden Cost of “Innov...
by LordKaos
18 minutes ago
Validation does not appea...
by grimpirate
Yesterday, 09:01 PM
Best Way to Implement Aff...
by InsiteFX
06-28-2025, 09:35 PM
Unable to scroll left nav...
by Crenel
06-28-2025, 07:58 PM
After GIT Clone: Call to ...
by paulbalandan
06-28-2025, 02:49 AM
I want to install the CI ...
by InsiteFX
06-27-2025, 03:12 AM
HTML6 and CSS5: What's ne...
by HarryKDowns
06-26-2025, 09:08 PM
Installation & Setup on W...
by mohamedtg
06-26-2025, 04:18 AM
Server Push/preloading?
by sanjay210
06-25-2025, 09:38 PM
run codeigniter with wind...
by mohamedtg
06-25-2025, 08:03 AM

Forum Statistics
» Members: 154,015
» Latest member: pg88vnmy
» Forum threads: 78,432
» Forum posts: 379,680

Full Statistics

Search Forums

(Advanced Search)


Theme © iAndrew 2016 - Forum software by © MyBB