PHPackages                             fbf/laravel-competitions - 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. fbf/laravel-competitions

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

fbf/laravel-competitions
========================

A Laravel 4 package to add simple competitions, with entries tied to a logged in user, to a site

v0.2.0(12y ago)25101MITPHPPHP &gt;=5.3.0

Since Mar 5Pushed 12y ago1 watchersCompare

[ Source](https://github.com/FbF/Laravel-Competitions)[ Packagist](https://packagist.org/packages/fbf/laravel-competitions)[ RSS](/packages/fbf-laravel-competitions/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (2)Dependencies (3)Versions (3)Used By (0)

Laravel Competitions
====================

[](#laravel-competitions)

A Laravel 4 package for adding multiple, content managed, multiple-choice competitions to a website.

Features
--------

[](#features)

- Paginated index view with configurable results per page, ordered by sticky bit on the competition and closing date (desc)
- Competitions have title, main image, summary, content, question, multiple choice answers
- Draft/Approved status and published date fields for approvals and scheduled publishing of competitions
- Set a closing date for them to automatically close for entries
- Currently, entries are tied to a logged in user, so require a logged in user session in order to enter

Includes
--------

[](#includes)

- Bundled migration for building the database schema for the competition and entries table
- Faker seed to seed your site with loads of good test data
- Administrator config file for use with FrozenNode's Administrator package, which includes functions to download the entries as CSV
- Controller, models and views that are easily extensible for use in your own app

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

[](#installation)

Add the following to you composer.json file (Recommend swapping "dev-master" for the latest release)

```
"fbf/laravel-competitions": "dev-master"

```

Run

```
composer update

```

Add the following to app/config/app.php

```
'Fbf\LaravelCompetitions\LaravelCompetitionsServiceProvider'

```

Run the package migration

```
php artisan migrate --package=fbf/laravel-competitions

```

Publish the config

```
php artisan config:publish fbf/laravel-competitions

```

Optionally tweak the settings in the many config files for your app

Optionally copy the administrator config file (`src/config/administrator/competitions.php`) to your administrator model config directory.

Create the relevant image upload directories that you specify in your config, e.g.

```
public/uploads/packages/fbf/laravel-competitions/main_image/original
public/uploads/packages/fbf/laravel-competitions/main_image/thumbnail
public/uploads/packages/fbf/laravel-competitions/main_image/resized

```

Faker seed
----------

[](#faker-seed)

The package comes with a seed that can populate the table with a whole bunch of sample posts. There are some configuration options for the seed in the config file. To run it:

```
php artisan db:seed --class="Fbf\LaravelCompetitions\FakeCompetitionsSeeder"

```

Configuration
-------------

[](#configuration)

See the many configuration options in the files in the config directory

Administrator
-------------

[](#administrator)

You can use the excellent Laravel Administrator package by FrozenNode to administer your competitions.

A ready-to-use model config file for the Post model (competitions.php) is provided in the src/config/administrator directory of the package, which you can copy into the app/config/administrator directory (or whatever you set as the model\_config\_path in the administrator config file).

Usage
-----

[](#usage)

The package should work out the box (provided you have a master blade layout file, since the out-of-the-box views extend this) but if you want to add other content to the pages, such as your own header, logo, navigation, sidebar etc, you'll want to override the views provided.

The package views declare several sections that you may want to `yield` in your `app/views/layouts/master.blade.php` file, e.g.:

```
>

	@yield('title')

	@yield('content')

```

The package's views are actually really simple, and most of the presentation is done in partials. This is deliberate so you can override the package's views in your own app, so you can include your own chrome, navigation and sidebars etc, yet you can also still make use of the partials provided, if you want to.

To override any view in your own app, just create the following directories and copy the file from the package into it, then hack away

- `app/views/packages/fbf/laravel-competitions/competitions`
- `app/views/packages/fbf/laravel-competitions/partials`

Extending the package
---------------------

[](#extending-the-package)

This can be done for the purposes of say, relating the Competition model to a Category model and allowing filtering by category, or relating the Competition model to a User model to add and Author to a Competition, or simply just for overriding the functionality in the bundled Competition model.

### Basic approach

[](#basic-approach)

(See the example below for more specific information.)

To override the `Competition` model in the package, create a model in you app/models directory that extends the package model.

Finally, update the IoC Container to inject an instance of your model into the `Fbf\LaravelCompetitions\CompetitionsController`, instead of the package's model, e.g. in `app/start/global.php`

```
App::bind('Fbf\LaravelCompetitions\CompetitionsController', function() {
    return new Fbf\LaravelCompetitions\CompetitionsController(new Competition);
});
```

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 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 ~40 days

Total

2

Last Release

4407d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/c1890fa7f83fd77b7c73d984199cb9a45ba9871acb4133490f43115c19fe845f?d=identicon)[neilcrookes](/maintainers/neilcrookes)

---

Top Contributors

[![neilcrookes](https://avatars.githubusercontent.com/u/24232?v=4)](https://github.com/neilcrookes "neilcrookes (1 commits)")

---

Tags

laravelcompetitions

### Embed Badge

![Health badge](/badges/fbf-laravel-competitions/health.svg)

```
[![Health](https://phpackages.com/badges/fbf-laravel-competitions/health.svg)](https://phpackages.com/packages/fbf-laravel-competitions)
```

###  Alternatives

[barryvdh/laravel-ide-helper

Laravel IDE Helper, generates correct PHPDocs for all Facade classes, to improve auto-completion.

14.9k123.0M683](/packages/barryvdh-laravel-ide-helper)[interaction-design-foundation/laravel-geoip

Support for multiple Geographical Location services.

17221.0k3](/packages/interaction-design-foundation-laravel-geoip)[nedwors/navigator

A Laravel package to ease defining navigation menus

433.1k](/packages/nedwors-navigator)[xefi/faker-php-laravel

Faker php integration with laravel

1915.1k](/packages/xefi-faker-php-laravel)[dcblogdev/laravel-junie

Install pre-configured guides for Jetbrains Junie

392.5k](/packages/dcblogdev-laravel-junie)

PHPackages © 2026

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