×

Why cities must take charge of their energy future

High power voltage lines in Nairobi. [File, Standard]

The recent confrontation between the Nairobi City Government and Kenya Power highlights an entrenched challenge in the provision of public services. Cities largely treat energy as a recurrent expense, investing little in cost management. As a result, electricity bills spiral, leaving local governments struggling to keep public facilities operational. Streetlights, meant to enhance security, become political showpieces, flickering on before elections and fading into darkness soon after due to cost constraints.

Urban centres are expanding, and with them, their energy needs. Public hospitals, schools, markets, and administrative offices are among the largest consumers of electricity, yet most remain tethered to Kenya Power’s grid despite frequent supply disruptions and rising costs. The financial strain is significant. Power bills for major hospitals, for instance, run into staggering amounts, intensifying disputes between city governments and the utility company. Public institutions, already reliant on subsidies, find themselves further burdened.

The situation reached a breaking point recently when Kenya Power disconnected electricity to several Nairobi County Government buildings over unpaid bills. In response, the city retaliated by dumping garbage at Kenya Power’s premises and cutting off sewer lines, flooding the area with raw sewage. Similar confrontations have played out in Mombasa where authorities impounded Kenya Power vehicles over unpaid parking fees after a power disconnection. These disputes highlight the urgency for cities to rethink their energy strategies and reduce dependence on the national grid.

Kenya enjoys abundant sunlight, yet city governments remain overly reliant on grid electricity instead of leveraging solar power. A shift to solar photovoltaic systems, alongside energy-efficient measures such as LED lighting, smart appliances, and optimised air conditioning, could significantly lower costs. However, the main hurdle remains financing.

Encouragingly, funding options are available for cities keen on clean energy transition. The recent Urban Shift Africa Forum in Nairobi showcased various financial and technical support initiatives, including C40 Cities’ clean energy programmes, the Gap Fund for early-stage project development, and Covenant of Mayors, which helps cities prepare bankable energy proposals. Additionally, the World Bank Cities Programme offers demonstration grants for small-scale energy projects. These avenues provide solutions to the technical and financial barriers hindering large-scale adoption of solar power by municipal authorities.

At the Energy Investor Roundtable during the forum, city leaders voiced frustration over high energy costs and the slow pace of transition. Investors tend to prioritise large-scale projects, yet cities can achieve immediate impact through smaller, modular interventions. Donors are increasingly willing to support models that minimise upfront costs while delivering long-term infrastructure resilience.

One promising approach is Energy-as-a-Service. Under this model, a private investor finances and maintains solar installations, ensuring optimal system performance. Instead of shouldering high initial costs, cities pay for energy as a service. In essence, the cities avoid the risk of paying for nonfunctional panels and instead, only pay for the electricity generated under the service agreement. Over time, they can choose to take ownership of the system or renegotiate terms for continued service. Throughout the service duration, cities can gradually build operational expertise while mitigating financial risks.

However, for most investors, cities must still address the risks associated with this kind of investment to guarantee that their capital will be repaid. De-risking instruments such as city investment corporations provide a pathway to mitigate these risks. This requires creating an independent investment vehicle subject to corporate law shielding it from political transitions and immunity from rash decisions. This will also help extend the sunset for county projects beyond the medium term into the long term range with a 10 or 15-year cycle.

Mombasa is already adopting this approach through the Mombasa Investment Corporation, which serves as a financial entity that can de-risk energy projects by ensuring that payments to energy service providers are secured. These city service companies operate under corporate law and can enter contracts with energy service providers to pay for energy supplied. They can be funded directly by the city or leverage innovative financing models such as city green bonds, which allow municipalities to crowdsource public and private funding for energy projects.

Mombasa is already setting the pace with a 1MWp solar photovoltaic and energy efficiency transition at Coast General Hospital. The project, presented to investors at the Energy Investors Roundtable, proves this concept. Instead of the county shouldering the upfront cost of around Sh179 million, a private investor can fund and manage the project. This means the city avoids a heavy financial burden while still benefiting from reliable, clean energy. The investor will see positive cash flows within the first year, the hospital will save 15 per cent on energy costs while cutting CO2 emissions by 755 tonnes annually.

City leaders must take control of their energy future. The solutions exist, the funding is available, and the impact on cost savings and climate resilience is undeniable. How quickly cities make the shift will determine the speed at which quality and reliable energy services are attained in the counties. This will define the future of public services and urban sustainability. As we head to the middle of the second decade of devolution, it is important that counties explore possibilities of venturing into long-term projects with more complex technical and financial requirements.

Request history8.1.26PHP Version1.25sRequest Duration3MBMemory UsageGET {category}/article/{id}/{slug}Route
    • Booting (16.08ms)time
    • Application (1.23s)time
    • 1 x Application (98.71%)
      1.23s
      1 x Booting (1.29%)
      16.08ms
      11 templates were rendered
      • 1x mainsite.articlearticle.blade.php#?blade
      • 1x mainsite.partials.topsectionsubscribetopsectionsubscribe.blade.php#?blade
      • 1x common.vocalizedvocalized.blade.php#?blade
      • 1x mainsite.partials.footerfooter.blade.php#?blade
      • 1x mainsite.layouts.appapp.blade.php#?blade
      • 1x mainsite.partials.metasmetas.blade.php#?blade
      • 1x mainsite.partials.topbartopbar.blade.php#?blade
      • 1x mainsite.partials.logo_sectionlogo_section.blade.php#?blade
      • 1x mainsite.partials.menumenu.blade.php#?blade
      • 1x mainsite.partials.streamingstreaming.blade.php#?blade
      • 1x mainsite.partials.stickybottomstickybottom.blade.php#?blade
      uri
      GET {category}/article/{id}/{slug}
      middleware
      web
      controller
      App\Http\Controllers\MainsiteController@article
      namespace
      prefix
      where
      file
      app/Http/Controllers/MainsiteController.php:610-1128
      36 statements were executed (11 duplicates)Show only duplicates529ms
      • Articles.php#513standard_digital_mainConnection Established
        Backtrace
        • app/Utils/Articles.php:513
        • app/Http/Controllers/MainsiteController.php:657
        • vendor/laravel/framework/src/Illuminate/Cache/Repository.php:397
        • vendor/laravel/framework/src/Illuminate/Cache/CacheManager.php:408
        • app/Http/Controllers/MainsiteController.php:658
      • Articles.php#520standard_digital_main4.17msselect `id`, `site_id`, `article_category_id`, `title`, `long_title`, `thumbnail_url`, `story`, `published_at`, `premium`, `keywords`, `summary` from `articles` where `id` = '2001513526' and `published_at` <= '2025-03-26 06:27:36' and `deleted_at` is null
        Bindings
        • 0: 2001513526
        • 1: 2025-03-26 06:27:36
        Backtrace
        • app/Utils/Articles.php:520
        • app/Http/Controllers/MainsiteController.php:657
        • vendor/laravel/framework/src/Illuminate/Cache/Repository.php:397
        • vendor/laravel/framework/src/Illuminate/Cache/CacheManager.php:408
        • app/Http/Controllers/MainsiteController.php:658
      • Articles.php#1435standard_digital_main1.01msselect * from `days_quote` where `deleted_at` is null and `quote_day` = '2025-03-26'
        Bindings
        • 0: 2025-03-26
        Backtrace
        • app/Utils/Articles.php:1435
        • app/Http/Controllers/MainsiteController.php:660
        • vendor/laravel/framework/src/Illuminate/Cache/Repository.php:397
        • vendor/laravel/framework/src/Illuminate/Cache/CacheManager.php:408
        • app/Http/Controllers/MainsiteController.php:661
      • Builder.php#20standard_digital_main1.24msselect `authors`.*, `article_authors`.`article_id` as `pivot_article_id`, `article_authors`.`author_id` as `pivot_author_id` from `authors` inner join `article_authors` on `authors`.`id` = `article_authors`.`author_id` where `article_authors`.`article_id` = 2001513526 and `authors`.`deleted_at` is null
        Bindings
        • 0: 2001513526
        Backtrace
        • vendor/rennokki/laravel-eloquent-query-cache/src/Query/Builder.php:20
        • vendor/rennokki/laravel-eloquent-query-cache/src/Traits/QueryCacheModule.php:103
        • vendor/laravel/framework/src/Illuminate/Cache/Repository.php:397
        • vendor/rennokki/laravel-eloquent-query-cache/src/Traits/QueryCacheModule.php:84
        • vendor/rennokki/laravel-eloquent-query-cache/src/Query/Builder.php:21
      • Articles.php#147standard_digital_main920μsselect `id` from `article_categories` where `site_id` = 1 and `id` = 7 or `parent_id` = 7 and `deleted_at` is null
        Bindings
        • 0: 1
        • 1: 7
        • 2: 7
        Backtrace
        • app/Utils/Articles.php:147
        • app/Http/Controllers/MainsiteController.php:727
        • vendor/laravel/framework/src/Illuminate/Cache/Repository.php:397
        • vendor/laravel/framework/src/Illuminate/Cache/CacheManager.php:408
        • app/Http/Controllers/MainsiteController.php:728
      • Articles.php#164standard_digital_main8.45msselect `id`, `article_category_id`, `title`, `thumbnail_url`, `published_at`, `premium` from `articles` where `article_category_id` in (7, 33, 35, 59, 487, 614) and `site_id` = 1 and `deleted_at` is null and `published_at` <= '2025-03-26 06:27:36' order by `published_at` desc, `list_order` asc, `parent_category_list_order` asc limit 10 offset 0
        Bindings
        • 0: 7
        • 1: 33
        • 2: 35
        • 3: 59
        • 4: 487
        • 5: 614
        • 6: 1
        • 7: 2025-03-26 06:27:36
        Backtrace
        • app/Utils/Articles.php:164
        • app/Http/Controllers/MainsiteController.php:727
        • vendor/laravel/framework/src/Illuminate/Cache/Repository.php:397
        • vendor/laravel/framework/src/Illuminate/Cache/CacheManager.php:408
        • app/Http/Controllers/MainsiteController.php:728
      • Articles.php#164standard_digital_main1.08msselect `id`, `name`, `parent_id` from `article_categories` where `article_categories`.`id` in (7)
        Backtrace
        • app/Utils/Articles.php:164
        • app/Http/Controllers/MainsiteController.php:727
        • vendor/laravel/framework/src/Illuminate/Cache/Repository.php:397
        • vendor/laravel/framework/src/Illuminate/Cache/CacheManager.php:408
        • app/Http/Controllers/MainsiteController.php:728
      • Articles.php#53standard_digital_main1.15msselect `id`, `name`, `short_name`, `parent_id`, `site_id` from `article_categories` where `id` = 7
        Bindings
        • 0: 7
        Backtrace
        • app/Utils/Articles.php:53
        • app/Utils/Articles.php:338
        • app/Http/Controllers/MainsiteController.php:737
        • vendor/laravel/framework/src/Illuminate/Cache/Repository.php:397
        • vendor/laravel/framework/src/Illuminate/Cache/CacheManager.php:408
      • Articles.php#53standard_digital_main940μsselect `id`, `name`, `short_name`, `parent_id`, `site_id` from `article_categories` where `id` is null
        Backtrace
        • app/Utils/Articles.php:53
        • app/Utils/Articles.php:343
        • app/Http/Controllers/MainsiteController.php:737
        • vendor/laravel/framework/src/Illuminate/Cache/Repository.php:397
        • vendor/laravel/framework/src/Illuminate/Cache/CacheManager.php:408
      • Articles.php#55standard_digital_mainConnection Established
        Backtrace
        • app/Utils/Articles.php:55
        • app/Utils/Articles.php:343
        • app/Http/Controllers/MainsiteController.php:737
        • vendor/laravel/framework/src/Illuminate/Cache/Repository.php:397
        • vendor/laravel/framework/src/Illuminate/Cache/CacheManager.php:408
      • Articles.php#55standard_digital_main6.61msselect `id`, `name`, `short_name`, `parent_id`, `site_id` from `article_categories` where `id` is null
        Backtrace
        • app/Utils/Articles.php:55
        • app/Utils/Articles.php:343
        • app/Http/Controllers/MainsiteController.php:737
        • vendor/laravel/framework/src/Illuminate/Cache/Repository.php:397
        • vendor/laravel/framework/src/Illuminate/Cache/CacheManager.php:408
      • Articles.php#57standard_digital_mainConnection Established
        Backtrace
        • app/Utils/Articles.php:57
        • app/Utils/Articles.php:343
        • app/Http/Controllers/MainsiteController.php:737
        • vendor/laravel/framework/src/Illuminate/Cache/Repository.php:397
        • vendor/laravel/framework/src/Illuminate/Cache/CacheManager.php:408
      • Articles.php#57standard_digital_main4.07msselect `id`, `name`, `short_name`, `parent_id`, `site_id` from `article_categories` where `id` is null
        Backtrace
        • app/Utils/Articles.php:57
        • app/Utils/Articles.php:343
        • app/Http/Controllers/MainsiteController.php:737
        • vendor/laravel/framework/src/Illuminate/Cache/Repository.php:397
        • vendor/laravel/framework/src/Illuminate/Cache/CacheManager.php:408
      • Articles.php#60standard_digital_main1.29msselect `id`, `name`, `short_name`, `parent_id`, `site_id` from `article_categories` where `refer_id` is null
        Backtrace
        • app/Utils/Articles.php:60
        • app/Utils/Articles.php:343
        • app/Http/Controllers/MainsiteController.php:737
        • vendor/laravel/framework/src/Illuminate/Cache/Repository.php:397
        • vendor/laravel/framework/src/Illuminate/Cache/CacheManager.php:408
      • Articles.php#688standard_digital_main114msselect `id`, `site_id`, `article_category_id`, `title`, `thumbnail_url`, `story`, `published_at`, `premium` from `articles` where (`keywords` LIKE '%[\"Nairobi County\u00a0Government\",\"Kenya Power\",\"World Bank Cities Programme\",\"Energy Projects\"]%') and `site_id` = 1 and `published_at` <= '2025-03-26 06:27:36' and `deleted_at` is null and `id` not in ('2001513526') order by `published_at` desc limit 4 offset 0
        Bindings
        • 0: %["Nairobi County\u00a0Government","Kenya Power","World Bank Cities Programme","Energy Projects"]%
        • 1: 1
        • 2: 2025-03-26 06:27:36
        • 3: 2001513526
        Backtrace
        • app/Utils/Articles.php:688
        • app/Http/Controllers/MainsiteController.php:821
        • vendor/laravel/framework/src/Illuminate/Cache/Repository.php:397
        • vendor/laravel/framework/src/Illuminate/Cache/CacheManager.php:408
        • app/Http/Controllers/MainsiteController.php:822
      • Articles.php#424standard_digital_main98.71msselect `id`, `article_category_id`, `title`, `thumbnail_url`, `published_at`, `premium` from `articles` where (`site_id` = 1 or `site_id` = 16 or `site_id` = 20) and `deleted_at` is null and `published_at` <= '2025-03-26 06:27:36' and `published_at` >= '2025-03-26 05:27:36' order by RAND(), `published_at` desc, `homepage_list_order` asc, `list_order` asc limit 4 offset 0
        Bindings
        • 0: 1
        • 1: 16
        • 2: 20
        • 3: 2025-03-26 06:27:36
        • 4: 2025-03-26 05:27:36
        Backtrace
        • app/Utils/Articles.php:424
        • app/Http/Controllers/MainsiteController.php:825
        • vendor/laravel/framework/src/Illuminate/Cache/Repository.php:397
        • vendor/laravel/framework/src/Illuminate/Cache/CacheManager.php:408
        • app/Http/Controllers/MainsiteController.php:826
      • Articles.php#424standard_digital_main780μsselect `id`, `name`, `parent_id` from `article_categories` where `article_categories`.`id` in (3, 588)
        Backtrace
        • app/Utils/Articles.php:424
        • app/Http/Controllers/MainsiteController.php:825
        • vendor/laravel/framework/src/Illuminate/Cache/Repository.php:397
        • vendor/laravel/framework/src/Illuminate/Cache/CacheManager.php:408
        • app/Http/Controllers/MainsiteController.php:826
      • Articles.php#147standard_digital_main950μsselect `id` from `article_categories` where `site_id` = 1 and `id` = 480 or `parent_id` = 480 and `deleted_at` is null
        Bindings
        • 0: 1
        • 1: 480
        • 2: 480
        Backtrace
        • app/Utils/Articles.php:147
        • app/Http/Controllers/MainsiteController.php:829
        • vendor/laravel/framework/src/Illuminate/Cache/Repository.php:397
        • vendor/laravel/framework/src/Illuminate/Cache/CacheManager.php:408
        • app/Http/Controllers/MainsiteController.php:830
      • Articles.php#164standard_digital_main1.66msselect `id`, `article_category_id`, `title`, `thumbnail_url`, `published_at`, `premium` from `articles` where `article_category_id` in (480, 481, 482, 719) and `site_id` = 1 and `deleted_at` is null and `published_at` <= '2025-03-26 06:27:36' order by `published_at` desc, `list_order` asc, `parent_category_list_order` asc limit 4 offset 0
        Bindings
        • 0: 480
        • 1: 481
        • 2: 482
        • 3: 719
        • 4: 1
        • 5: 2025-03-26 06:27:36
        Backtrace
        • app/Utils/Articles.php:164
        • app/Http/Controllers/MainsiteController.php:829
        • vendor/laravel/framework/src/Illuminate/Cache/Repository.php:397
        • vendor/laravel/framework/src/Illuminate/Cache/CacheManager.php:408
        • app/Http/Controllers/MainsiteController.php:830
      • Articles.php#164standard_digital_main730μsselect `id`, `name`, `parent_id` from `article_categories` where `article_categories`.`id` in (480, 482)
        Backtrace
        • app/Utils/Articles.php:164
        • app/Http/Controllers/MainsiteController.php:829
        • vendor/laravel/framework/src/Illuminate/Cache/Repository.php:397
        • vendor/laravel/framework/src/Illuminate/Cache/CacheManager.php:408
        • app/Http/Controllers/MainsiteController.php:830
      • Articles.php#753standard_digital_main104msselect `id`, `article_category_id`, `title`, `thumbnail_url`, `published_at`, `premium` from `articles` where (`premium` = 1 or `article_category_id` = 486) and `site_id` = '1' and `deleted_at` is null and `published_at` <= '2025-03-26 06:27:36' and `homepage_list_order` is not null order by `published_at` desc, `homepage_list_order` asc, `list_order` asc limit 4 offset 0
        Bindings
        • 0: 1
        • 1: 486
        • 2: 1
        • 3: 2025-03-26 06:27:36
        Backtrace
        • app/Utils/Articles.php:753
        • app/Http/Controllers/MainsiteController.php:837
        • vendor/laravel/framework/src/Illuminate/Cache/Repository.php:397
        • vendor/laravel/framework/src/Illuminate/Cache/CacheManager.php:408
        • app/Http/Controllers/MainsiteController.php:838
      • Articles.php#753standard_digital_main860μsselect `id`, `name`, `parent_id` from `article_categories` where `article_categories`.`id` in (3, 588)
        Backtrace
        • app/Utils/Articles.php:753
        • app/Http/Controllers/MainsiteController.php:837
        • vendor/laravel/framework/src/Illuminate/Cache/Repository.php:397
        • vendor/laravel/framework/src/Illuminate/Cache/CacheManager.php:408
        • app/Http/Controllers/MainsiteController.php:838
      • Articles.php#819standard_digital_main10.23msselect `id`, `site_id`, `article_category_id`, `title`, `thumbnail_url`, `story`, `published_at`, `premium` from `articles` where `id` < '2001513526' and `site_id` = 1 and `published_at` <= '2025-03-26 06:27:36' and `deleted_at` is null order by `id` desc limit 1
        Bindings
        • 0: 2001513526
        • 1: 1
        • 2: 2025-03-26 06:27:36
        Backtrace
        • app/Utils/Articles.php:819
        • app/Http/Controllers/MainsiteController.php:841
        • vendor/laravel/framework/src/Illuminate/Cache/Repository.php:397
        • vendor/laravel/framework/src/Illuminate/Cache/CacheManager.php:408
        • app/Http/Controllers/MainsiteController.php:842
      • Articles.php#819standard_digital_main770μsselect `id`, `name`, `parent_id` from `article_categories` where `article_categories`.`id` in (6)
        Backtrace
        • app/Utils/Articles.php:819
        • app/Http/Controllers/MainsiteController.php:841
        • vendor/laravel/framework/src/Illuminate/Cache/Repository.php:397
        • vendor/laravel/framework/src/Illuminate/Cache/CacheManager.php:408
        • app/Http/Controllers/MainsiteController.php:842
      • Articles.php#865standard_digital_main1.06msselect `id`, `site_id`, `article_category_id`, `title`, `thumbnail_url`, `story`, `published_at`, `premium` from `articles` where `id` > '2001513526' and `site_id` = 1 and `deleted_at` is null and `published_at` <= '2025-03-26 06:27:36' limit 1
        Bindings
        • 0: 2001513526
        • 1: 1
        • 2: 2025-03-26 06:27:36
        Backtrace
        • app/Utils/Articles.php:865
        • app/Http/Controllers/MainsiteController.php:841
        • vendor/laravel/framework/src/Illuminate/Cache/Repository.php:397
        • vendor/laravel/framework/src/Illuminate/Cache/CacheManager.php:408
        • app/Http/Controllers/MainsiteController.php:842
      • Articles.php#865standard_digital_main640μsselect `id`, `name`, `parent_id` from `article_categories` where `article_categories`.`id` in (24)
        Backtrace
        • app/Utils/Articles.php:865
        • app/Http/Controllers/MainsiteController.php:841
        • vendor/laravel/framework/src/Illuminate/Cache/Repository.php:397
        • vendor/laravel/framework/src/Illuminate/Cache/CacheManager.php:408
        • app/Http/Controllers/MainsiteController.php:842
      • Articles.php#1288standard_digital_main8.37msselect `id`, `site_id`, `article_category_id`, `title`, `thumbnail_url`, `story`, `published_at`, `premium` from `articles` where `published_at` <= '2025-03-26 06:27:36' and `article_category_id` = 7 and `site_id` = 1 and `id` not in ('2001513526') order by `homepage_list_order` asc, `published_at` desc limit 6 offset 0
        Bindings
        • 0: 2025-03-26 06:27:36
        • 1: 7
        • 2: 1
        • 3: 2001513526
        Backtrace
        • app/Utils/Articles.php:1288
        • app/Http/Controllers/MainsiteController.php:845
        • vendor/laravel/framework/src/Illuminate/Cache/Repository.php:397
        • vendor/laravel/framework/src/Illuminate/Cache/CacheManager.php:408
        • app/Http/Controllers/MainsiteController.php:846
      • Articles.php#1288standard_digital_main610μsselect `id`, `name`, `parent_id` from `article_categories` where `article_categories`.`id` in (7)
        Backtrace
        • app/Utils/Articles.php:1288
        • app/Http/Controllers/MainsiteController.php:845
        • vendor/laravel/framework/src/Illuminate/Cache/Repository.php:397
        • vendor/laravel/framework/src/Illuminate/Cache/CacheManager.php:408
        • app/Http/Controllers/MainsiteController.php:846
      • Builder.php#20standard_digital_main25.97msselect `videos`.`id`, `videos`.`video_category_id`, `videos`.`title`, `videos`.`video_url`, `videos`.`description`, `videos`.`published_at`, `videos`.`thumbnail_url` from `videos` inner join `video_categories` on `video_categories`.`id` = `videos`.`video_category_id` where (`keywords` LIKE '%[\"Nairobi County\u00a0Government\",\"Kenya Power\",\"World Bank Cities Programme\",\"Energy Projects\"]%') and `videos`.`deleted_at` is null and `video_categories`.`video_type_id` = 1 order by `published_at` desc limit 3 offset 0
        Bindings
        • 0: %["Nairobi County\u00a0Government","Kenya Power","World Bank Cities Programme","Energy Projects"]%
        • 1: 1
        Backtrace
        • vendor/rennokki/laravel-eloquent-query-cache/src/Query/Builder.php:20
        • vendor/rennokki/laravel-eloquent-query-cache/src/Traits/QueryCacheModule.php:103
        • vendor/laravel/framework/src/Illuminate/Cache/Repository.php:397
        • vendor/rennokki/laravel-eloquent-query-cache/src/Traits/QueryCacheModule.php:84
        • vendor/rennokki/laravel-eloquent-query-cache/src/Query/Builder.php:21
      • Articles.php#3841standard_digital_main910μsselect count(std_trend_article_id) as count, std_trend_article_id from `std_article_trends` group by `std_trend_article_id` order by `count` desc limit 20
        Backtrace
        • app/Utils/Articles.php:3841
        • app/Http/Controllers/MainsiteController.php:853
        • vendor/laravel/framework/src/Illuminate/Cache/Repository.php:397
        • vendor/laravel/framework/src/Illuminate/Cache/CacheManager.php:408
        • app/Http/Controllers/MainsiteController.php:854
      • Articles.php#3867standard_digital_main1.55msselect `id`, `article_category_id`, `title`, `thumbnail_url`, `published_at`, `premium` from `articles` where `id` in (2001514618, 2001514624, 2001249065, 2000198221, 2001514622, 2001514679, 2001514630, 2001514549, 2001514680, 2001472237, 2001514682, 2001514693, 2001514689, 2001514559, 2001514605, 2001465578, 2001466766, 2001512892, 1144015462, 2001514120) and `deleted_at` is null and `published_at` <= '2025-03-26 06:27:36' and `homepage_list_order` is not null order by `published_at` desc, `homepage_list_order` asc, `list_order` asc limit 5
        Bindings
        • 0: 2001514618
        • 1: 2001514624
        • 2: 2001249065
        • 3: 2000198221
        • 4: 2001514622
        • 5: 2001514679
        • 6: 2001514630
        • 7: 2001514549
        • 8: 2001514680
        • 9: 2001472237
        • 10: 2001514682
        • 11: 2001514693
        • 12: 2001514689
        • 13: 2001514559
        • 14: 2001514605
        • 15: 2001465578
        • 16: 2001466766
        • 17: 2001512892
        • 18: 1144015462
        • 19: 2001514120
        • 20: 2025-03-26 06:27:36
        Backtrace
        • app/Utils/Articles.php:3867
        • app/Http/Controllers/MainsiteController.php:853
        • vendor/laravel/framework/src/Illuminate/Cache/Repository.php:397
        • vendor/laravel/framework/src/Illuminate/Cache/CacheManager.php:408
        • app/Http/Controllers/MainsiteController.php:854
      • Articles.php#3867standard_digital_main790μsselect `id`, `name`, `parent_id` from `article_categories` where `article_categories`.`id` in (7, 265, 383, 588)
        Backtrace
        • app/Utils/Articles.php:3867
        • app/Http/Controllers/MainsiteController.php:853
        • vendor/laravel/framework/src/Illuminate/Cache/Repository.php:397
        • vendor/laravel/framework/src/Illuminate/Cache/CacheManager.php:408
        • app/Http/Controllers/MainsiteController.php:854
      • CookieTool.php#185standard_digital_main860μsselect * from `settings` where `meta_name` = 'article_age' limit 1
        Bindings
        • 0: article_age
        Backtrace
        • app/Utils/CookieTool.php:185
        • app/Http/Controllers/MainsiteController.php:870
        • vendor/laravel/framework/src/Illuminate/Routing/Controller.php:54
        • vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php:43
        • vendor/laravel/framework/src/Illuminate/Routing/Route.php:260
      • helper.php#424standard_digital_main1msselect * from article_categories where id = '7'
        Backtrace
        • app/Library/helper.php:424
        • vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php:110
        • vendor/laravel/framework/src/Illuminate/View/Engines/PhpEngine.php:58
        • vendor/laravel/framework/src/Illuminate/View/Engines/CompilerEngine.php:70
        • vendor/laravel/framework/src/Illuminate/View/View.php:195
      • helper.php#424standard_digital_main640μsselect * from article_categories where id = '7'
        Backtrace
        • app/Library/helper.php:424
        • vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php:110
        • vendor/laravel/framework/src/Illuminate/View/Engines/PhpEngine.php:58
        • vendor/laravel/framework/src/Illuminate/View/Engines/CompilerEngine.php:70
        • vendor/laravel/framework/src/Illuminate/View/View.php:195
      • helper.php#424standard_digital_main700μsselect * from article_categories where id = '7'
        Backtrace
        • app/Library/helper.php:424
        • vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php:110
        • vendor/laravel/framework/src/Illuminate/View/Engines/PhpEngine.php:58
        • vendor/laravel/framework/src/Illuminate/View/Engines/CompilerEngine.php:70
        • vendor/laravel/framework/src/Illuminate/View/View.php:195
      • helper.php#424standard_digital_main570μsselect * from article_categories where id = '7'
        Backtrace
        • app/Library/helper.php:424
        • vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php:110
        • vendor/laravel/framework/src/Illuminate/View/Engines/PhpEngine.php:58
        • vendor/laravel/framework/src/Illuminate/View/Engines/CompilerEngine.php:70
        • vendor/laravel/framework/src/Illuminate/View/View.php:195
      • Articles.php#1350standard_digital_main121msselect * from `articles` where `deleted_at` is null and `published_at` <= '2025-03-26 06:27:37' and (`keywords` like '%Nairobi County Government%' or `keywords` like '%Kenya Power%' or `keywords` like '%World Bank Cities Programme%' or `keywords` like '%Energy Projects%') and (`site_id` = 1 or `site_id` = 16 or `site_id` = 20) and `id` <> '2001513526' order by `published_at` desc limit 3
        Bindings
        • 0: 2025-03-26 06:27:37
        • 1: %Nairobi County Government%
        • 2: %Kenya Power%
        • 3: %World Bank Cities Programme%
        • 4: %Energy Projects%
        • 5: 1
        • 6: 16
        • 7: 20
        • 8: 2001513526
        Backtrace
        • app/Utils/Articles.php:1350
        • app/Utils/Articles.php:1674
        • view::mainsite.article:568
        • vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php:110
        • vendor/laravel/framework/src/Illuminate/View/Engines/PhpEngine.php:58
      • app.blade.php#825standard_digital_main1.18msselect * from `favourite_topics` where `status` = 1
        Bindings
        • 0: 1
        Backtrace
        • view::mainsite.layouts.app:825
        • vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php:110
        • vendor/laravel/framework/src/Illuminate/View/Engines/PhpEngine.php:58
        • vendor/laravel/framework/src/Illuminate/View/Engines/CompilerEngine.php:70
        • vendor/laravel/framework/src/Illuminate/View/View.php:195
      App\Models\Category
      385Category.php#?
      App\Models\Article
      39Article.php#?
      App\Models\Trending
      20Trending.php#?
      App\Topic
      16Topic.php#?
      App\Models\Author
      14Author.php#?
          _token
          AqK8a66cnkCu8j5poirn6DpGEywvshV5FkSye3wi
          _previous
          array:1 [ "url" => "http://www.standardmedia.co.ke/main-staging/opinion/article/2001513526/why-cit...
          _flash
          array:2 [ "old" => [] "new" => [] ]
          offset
          0
          path_info
          /opinion/article/2001513526/why-cities-must-take-charge-of-their-energy-future
          status_code
          200
          
          status_text
          OK
          format
          html
          content_type
          text/html; charset=UTF-8
          request_query
          []
          
          request_request
          []
          
          request_headers
          0 of 0
          array:24 [ "cf-ray" => array:1 [ 0 => "92638d9c0b11e830-EWR" ] "x-forwarded-for" => array:1 [ 0 => "3.21.34.214" ] "host" => array:1 [ 0 => "www.standardmedia.co.ke" ] "cf-connecting-ip" => array:1 [ 0 => "3.21.34.214" ] "accept-encoding" => array:1 [ 0 => "gzip, br" ] "sec-fetch-site" => array:1 [ 0 => "none" ] "x-forwarded-proto" => array:1 [ 0 => "https" ] "cookie" => array:1 [ 0 => "story_no=eyJpdiI6IjdBSlhVQm0vQ1FJNkh4ZlUxalJ2M1E9PSIsInZhbHVlIjoidDFUZDNaSDg2N2RTd2t0QktScDFBV2g3cXZBNDZWNjdWQ2hSWG9aU2QyaTRzc2xiTnBQQWZvcW5BMk8zb1RxNiIsIm1hYyI6ImEyMDgwNjAyMDRjODE4MTIyZDMwN2NmNDY2NTAzOTUzMTU2ODBiZWE0OGY0MGRhNDYxNWZjNzE4MGE3MTMzYjEiLCJ0YWciOiIifQ%3D%3D; story_no_insider=eyJpdiI6ImtvV3YydDB3UHZENjJJOHAwUW1kMnc9PSIsInZhbHVlIjoiSUZicm44ZE4yb1JvcW5VeVpyODVJZ1gyQVloeWhXdnJNZ2RPdk4zT0pzd05ZU1JHc252RDBTZkNDNjl1RnJyVCIsIm1hYyI6IjFkM2IwMzFiMWYwZjhhZWQwZjBkODhmZWMyNDg1OWRjYzI1NjNhMGQzOGRmNGNkNGE5YmI0NDdlZmI5YjY0N2YiLCJ0YWciOiIifQ%3D%3D; XSRF-TOKEN=eyJpdiI6Im5CTGorZ3dld1lobTcwMEFOM0xTU3c9PSIsInZhbHVlIjoiaU1hdDYvY0JsREJPdTFJZVJjMVVNZjBlbWNqUG9qd29mWVl2bzdMY0ZodnIxdUJnbTNMR2s4Zkw4eVdMcENIMVFxRUxsQzhBMENRdHVOcGNpdDBtUnRvdWdjY0FqSzdSbG5ZLzlUczVzUXR0SXJZTUFxWTZSdFFmdW1qMyttQXUiLCJtYWMiOiI0OWQxYWE2Y2VjZDk1YmViYzJhNTEwMGE1NDhlYWZmNjVmNzE4Y2EzMjI0Y2E0Njk3MTk4YTc3NWJiZGFmY2U2IiwidGFnIjoiIn0%3D; thestandardmediagroup_session=eyJpdiI6IjJoaDV1YUFpaXlLeW55eWpjcW5WY0E9PSIsInZhbHVlIjoiSGxLTTJOWUNuTURHalhJdm5ZRWh3SnpnbXl3bklHL2xIUnE4UklUVVVxOUt5NHk2eEk3eWpUVHJaMXJYL3llS3BmUjBaSXpCN1pBNWpUSVk4cVMrU2NacDhndGk5QjBNNjYwNFkyUjRJT25BU09vY0lCYU1LaTFReVhGMVBWVlMiLCJtYWMiOiJmOTE1YWUzNjNlMGQ5NTVjYWQ2NDk3MWU0NmRhM2QzMmI4ODhmMWEyMTcwNWIyN2E5Y2Y5Yzg4ZDdjN2QzYTU4IiwidGFnIjoiIn0%3Dstory_no=eyJpdiI6IjdBSlhVQm0vQ1FJNkh4ZlUxalJ2M1E9PSIsInZhbHVlIjoidDFUZDNaSDg2N2RTd2t0QktScDFBV2g3cXZBNDZWNjdWQ2hSWG9aU2QyaTRzc2xiTnBQQWZvcW5BMk8zb1RxNiIsIm1hYyI" ] "priority" => array:1 [ 0 => "u=0, i" ] "cf-visitor" => array:1 [ 0 => "{"scheme":"https"}" ] "cf-ipcountry" => array:1 [ 0 => "US" ] "sec-fetch-dest" => array:1 [ 0 => "document" ] "cdn-loop" => array:1 [ 0 => "cloudflare; loops=1" ] "sec-fetch-user" => array:1 [ 0 => "?1" ] "sec-fetch-mode" => array:1 [ 0 => "navigate" ] "connection" => array:1 [ 0 => "Keep-Alive" ] "pragma" => array:1 [ 0 => "no-cache" ] "cache-control" => array:1 [ 0 => "no-cache" ] "sec-ch-ua" => array:1 [ 0 => ""HeadlessChrome";v="129", "Not=A?Brand";v="8", "Chromium";v="129"" ] "sec-ch-ua-mobile" => array:1 [ 0 => "?0" ] "sec-ch-ua-platform" => array:1 [ 0 => ""Windows"" ] "upgrade-insecure-requests" => array:1 [ 0 => "1" ] "user-agent" => array:1 [ 0 => "Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)" ] "accept" => array:1 [ 0 => "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7" ] ]
          request_cookies
          0 of 0
          array:4 [ "story_no" => "1" "story_no_insider" => "1" "XSRF-TOKEN" => "AqK8a66cnkCu8j5poirn6DpGEywvshV5FkSye3wi" "thestandardmediagroup_session" => "iAAl9zH2VFpeJyAzFPk0M9z2J2n4dCu2tbLB7SXn" ]
          response_headers
          0 of 0
          array:5 [ "content-type" => array:1 [ 0 => "text/html; charset=UTF-8" ] "cache-control" => array:1 [ 0 => "no-cache, private" ] "date" => array:1 [ 0 => "Wed, 26 Mar 2025 03:27:37 GMT" ] "set-cookie" => array:2 [ 0 => "XSRF-TOKEN=eyJpdiI6Im5IcUZoREYxSlBIODRKRmdLbUsxRFE9PSIsInZhbHVlIjoiQzdoa1Vkb1ZsYWJMTWpVbUx0THJzWDcwMkc4eG13WVI0WDc1L1RrYXFEQmdyN3pMRmVoRU9QYWV5bldRN0VaQktBOTE4eEROSCtWNXdPL2JtaWtXdkZKeVJncTJIY3drTmgxcWVZMW45Y3AyYkdVN2xyalRFT251VThOaFRlRlIiLCJtYWMiOiJjOTU2NTdlMmU1ZmViYjcxNDk3OTkwOTUyNGM4ZmJmNjVkMGRkMTIwY2Q0M2ZhMjE3MDNkMGVhNGRhZDY5ODkwIiwidGFnIjoiIn0%3D; expires=Fri, 25 Apr 2025 13:56:37 GMT; Max-Age=2629740; path=/; samesite=laxXSRF-TOKEN=eyJpdiI6Im5IcUZoREYxSlBIODRKRmdLbUsxRFE9PSIsInZhbHVlIjoiQzdoa1Vkb1ZsYWJMTWpVbUx0THJzWDcwMkc4eG13WVI0WDc1L1RrYXFEQmdyN3pMRmVoRU9QYWV5bldRN0VaQktBOTE4e" 1 => "thestandardmediagroup_session=eyJpdiI6IkFETENIdHhsVDV6SjhCSjhaaFdIUXc9PSIsInZhbHVlIjoiTUFSYmpJOS9JRTdhMzE3bXAvRUtWaU5ZWU16TXJWb0pTSUlhaHIwalFWVkpIb1dtaTB2cE52d2JZbXgwMXZpdGxPMlg5aFVYSGZmM2JXSW5DcHJBNTFvQlhPT0hkOGRYdk1aSk0ra2IwWVhuN1BDNFVmMDJpVkFWeVVhMkluaWwiLCJtYWMiOiI5NmUwZGM5NzBkMmNiNDFkNDJiMjQzMjgxZWRlM2IzYmZkYzUyZWJiYzFhYzNmN2ViNzQ3NTlhZDMyOTQxOTQzIiwidGFnIjoiIn0%3D; expires=Fri, 25 Apr 2025 13:56:37 GMT; Max-Age=2629740; path=/; httponly; samesite=laxthestandardmediagroup_session=eyJpdiI6IkFETENIdHhsVDV6SjhCSjhaaFdIUXc9PSIsInZhbHVlIjoiTUFSYmpJOS9JRTdhMzE3bXAvRUtWaU5ZWU16TXJWb0pTSUlhaHIwalFWVkpIb1dtaTB2cE52d2" ] "Set-Cookie" => array:2 [ 0 => "XSRF-TOKEN=eyJpdiI6Im5IcUZoREYxSlBIODRKRmdLbUsxRFE9PSIsInZhbHVlIjoiQzdoa1Vkb1ZsYWJMTWpVbUx0THJzWDcwMkc4eG13WVI0WDc1L1RrYXFEQmdyN3pMRmVoRU9QYWV5bldRN0VaQktBOTE4eEROSCtWNXdPL2JtaWtXdkZKeVJncTJIY3drTmgxcWVZMW45Y3AyYkdVN2xyalRFT251VThOaFRlRlIiLCJtYWMiOiJjOTU2NTdlMmU1ZmViYjcxNDk3OTkwOTUyNGM4ZmJmNjVkMGRkMTIwY2Q0M2ZhMjE3MDNkMGVhNGRhZDY5ODkwIiwidGFnIjoiIn0%3D; expires=Fri, 25-Apr-2025 13:56:37 GMT; path=/XSRF-TOKEN=eyJpdiI6Im5IcUZoREYxSlBIODRKRmdLbUsxRFE9PSIsInZhbHVlIjoiQzdoa1Vkb1ZsYWJMTWpVbUx0THJzWDcwMkc4eG13WVI0WDc1L1RrYXFEQmdyN3pMRmVoRU9QYWV5bldRN0VaQktBOTE4e" 1 => "thestandardmediagroup_session=eyJpdiI6IkFETENIdHhsVDV6SjhCSjhaaFdIUXc9PSIsInZhbHVlIjoiTUFSYmpJOS9JRTdhMzE3bXAvRUtWaU5ZWU16TXJWb0pTSUlhaHIwalFWVkpIb1dtaTB2cE52d2JZbXgwMXZpdGxPMlg5aFVYSGZmM2JXSW5DcHJBNTFvQlhPT0hkOGRYdk1aSk0ra2IwWVhuN1BDNFVmMDJpVkFWeVVhMkluaWwiLCJtYWMiOiI5NmUwZGM5NzBkMmNiNDFkNDJiMjQzMjgxZWRlM2IzYmZkYzUyZWJiYzFhYzNmN2ViNzQ3NTlhZDMyOTQxOTQzIiwidGFnIjoiIn0%3D; expires=Fri, 25-Apr-2025 13:56:37 GMT; path=/; httponlythestandardmediagroup_session=eyJpdiI6IkFETENIdHhsVDV6SjhCSjhaaFdIUXc9PSIsInZhbHVlIjoiTUFSYmpJOS9JRTdhMzE3bXAvRUtWaU5ZWU16TXJWb0pTSUlhaHIwalFWVkpIb1dtaTB2cE52d2" ] ]
          session_attributes
          0 of 0
          array:4 [ "_token" => "AqK8a66cnkCu8j5poirn6DpGEywvshV5FkSye3wi" "_previous" => array:1 [ "url" => "http://www.standardmedia.co.ke/main-staging/opinion/article/2001513526/why-cities-must-take-charge-of-their-energy-future" ] "_flash" => array:2 [ "old" => [] "new" => [] ] "offset" => 0 ]
          ClearShow all
          Date ↕MethodURLData
          #12025-03-26 06:27:37GET/main-staging/opinion/article/2001513526/why-cities-must-take-charge-of-their-energy-future1136474