PHPackages                             mjderoode/advent\_of\_code\_helper - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. mjderoode/advent\_of\_code\_helper

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

mjderoode/advent\_of\_code\_helper
==================================

Laravel package to make the advent of code a bit more "manageable"

v2.0(5mo ago)012MITPHPPHP ^8.3

Since Oct 6Pushed 5mo ago1 watchersCompare

[ Source](https://github.com/mjderoode/advent_of_code_helper)[ Packagist](https://packagist.org/packages/mjderoode/advent_of_code_helper)[ RSS](/packages/mjderoode-advent-of-code-helper/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (2)Versions (10)Used By (0)

Advent of Code Helper, Laravel Package
======================================

[](#advent-of-code-helper-laravel-package)

Every year, I run into the same issues and start “hacking and cracking” as soon as Advent of Code begins. Not anymore! I wrote this Laravel package with two clear goals: to download your personal puzzle inputs and to prepare controller files so you don’t have to start hacking in your web.php.

This Laravel package can download all of your personal puzzle inputs for a specific year and, afterward, it prepares a default controller split into two parts, allowing you to solve each part of the daily Advent of Code challenges. I also prepared some options on how to view your solution.

**My Laravel package is currently in a “WIP” (Work in Progress) phase, so please keep this in mind when using it.**

Get your Session Cookie
-----------------------

[](#get-your-session-cookie)

```
1.   Log in to the Advent of Code website: https://adventofcode.com
2.   Open the developer console in your browser and navigate to the Cookies section
2.5  - For Chromium-based browsers, go to Application → Storage → Cookies, then click on the Advent of Code website URL.
3.   Look for the "session" cookie, and copy its value
4.   Add the following key to your .env file: ADVENT_OF_CODE_SESSION_COOKIE, and paste your session cookie value here.

```

Installation
------------

[](#installation)

Install `mjderoode/advent_of_code_helper` with composer:

```
composer require mjderoode/advent_of_code_helper
```

Add your session cookie value to the .env:

```
ADVENT_OF_CODE_SESSION_COOKIE="################################"
```

Optionally, you can disable routing by setting the following key in your .env file (must be a boolean; the default is true):

```
ADVENT_OF_CODE_ROUTING_ENABLED=false
```

Usage/ Examples
---------------

[](#usage-examples)

The Laravel package includes two commands: `aoc:import` and `aoc:try`.

The `aoc:import` command is used to download your personal puzzle inputs and prepare the necessary Controller files. This command expects two parameters: the first (year) is mandatory with a default value of 2024, and the second (day) is optional.

To download all of your puzzle inputs from 2023, run:

```
php artisan aoc:import 2023
```

By specifying the second argument, you can download the puzzle input for a specific day, for example day 3 of 2016.

```
php artisan aoc:import 2016 3
```

The `aoc:try` command is used to test your solutions. This command expects three parameters: year, day, and part (with defaults: year=2024 and part=1).

```
php artisan aoc:try 2023 1 1
```

Publishable assets
------------------

[](#publishable-assets)

Don’t like the stub? No problem! Just run the following command, and the stub will be published, ready for you to edit as you like!

```
php artisan vendor:publish --tag="stubs-aoc"
```

Try out your solutions
----------------------

[](#try-out-your-solutions)

In this Laravel package, you have several options to try out your solutions. The first is through the command line—refer to the `aoc:try` command as explained in the previous section.

The second option is to view your solution in the browser. I’ve prepared a specific route for your Advent of Code controllers (see `php artisan route:list`, specifically `aoc.solution`). For example, to view your solution for “year 2016, day 2, part 2,” go to `{{ YOUR APP URL HERE }}/2016/2/2`.

TODO's
------

[](#todos)

#### Tasks

[](#tasks)

- Refactor code; this one never ends.
- Detach the “GenerateControllerLayoutJob”.
- Make “GenerateControllerLayoutJob” available in its own command.
- Download all puzzle inputs from the start to the current year? (Not sure yet).

Authors
-------

[](#authors)

- [@mjderoode (github)](https://github.com/mjderoode)

License
-------

[](#license)

The MIT License ([MIT](https://choosealicense.com/licenses/mit/)).

###  Health Score

38

—

LowBetter than 85% of packages

Maintenance71

Regular maintenance activity

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~60 days

Recently: every ~104 days

Total

8

Last Release

164d ago

Major Versions

v1.0.6 → v2.02025-11-30

PHP version history (2 changes)v1.0.0PHP ^8.2

v2.0PHP ^8.3

### Community

Maintainers

![](https://www.gravatar.com/avatar/74964d55c497eaa224f83346a19e4a9167ce02ed2597f098b9f0789c130db291?d=identicon)[mjderoode](/maintainers/mjderoode)

---

Top Contributors

[![mjderoode](https://avatars.githubusercontent.com/u/4389321?v=4)](https://github.com/mjderoode "mjderoode (11 commits)")

---

Tags

laravel-packageaocadvent of codeaoc helperadvent of code helper

### Embed Badge

![Health badge](/badges/mjderoode-advent-of-code-helper/health.svg)

```
[![Health](https://phpackages.com/badges/mjderoode-advent-of-code-helper/health.svg)](https://phpackages.com/packages/mjderoode-advent-of-code-helper)
```

###  Alternatives

[nativephp/mobile

NativePHP for Mobile

82724.0k43](/packages/nativephp-mobile)[bensampo/laravel-embed

Painless responsive embeds for videos, slideshows and more.

142146.8k](/packages/bensampo-laravel-embed)[erag/laravel-pwa

A simple and easy-to-use PWA (Progressive Web App) package for Laravel applications.

16083.3k](/packages/erag-laravel-pwa)[glhd/conveyor-belt

14797.0k](/packages/glhd-conveyor-belt)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

255.2k](/packages/aedart-athenaeum)[ankurk91/laravel-ses-webhooks

Handle AWS SES webhooks in Laravel php framework

2534.2k](/packages/ankurk91-laravel-ses-webhooks)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
