c11k / starter-kit
The skeleton application for the Laravel framework, opinionated by the C11K team.
Requires
- php: ^8.4
- ext-pdo: *
- ext-redis: *
- ext-yaml: *
- cknow/laravel-money: ^8.4
- guzzlehttp/guzzle: ^7.9.3
- inertiajs/inertia-laravel: ^2.0.2
- laravel/framework: ^12.18
- laravel/horizon: ^5.33.0
- laravel/reverb: ^1.5
- laravel/telescope: ^5.9.1
- laravel/tinker: ^2.10.1
- owen-it/laravel-auditing: ^14.0
- propaganistas/laravel-phone: ^6.0.1
- psr/http-factory-implementation: *
- spatie/laravel-permission: ^6.19
- sqids/sqids: >=0.5
- symfony/http-client: ^7.3
- tightenco/ziggy: ^2.5.3
Requires (Dev)
- barryvdh/laravel-debugbar: ^3.15.4
- barryvdh/laravel-ide-helper: ^3.5.5
- fakerphp/faker: ^1.24.1
- larastan/larastan: ^3.4.2
- laravel/pail: ^1.2.3
- laravel/pint: ^1.22.1
- laravel/sail: ^1.43.1
- mockery/mockery: ^1.6.12
- nunomaduro/collision: ^8.8.1
- phpunit/phpunit: ^11.5.22
- roave/security-advisories: dev-latest
- soloterm/solo: ^0.5.0
- worksome/request-factories: ^3.4
This package is auto-updated.
Last update: 2025-06-13 15:19:10 UTC
README
This is an opinionated starter kit for a Laravel Project.
Installation
In your shell, substituting awesome-app
for your app name:
laravel new awesome-app --using=c11k/starter-kit
Extra Composer Packages
This adds the extra composer packages that we all love and enjoy, including
Required Packages
- Laravel Money because money should be handled correctly.
- Laravel Horizon
- Laravel Telescope
- Laravel Reverb
- Laravel Auditing to answer the question "Who changed this model and when?
- Laravel Phone because why write your own phone number formatting when it's already been done?
- Laravel Permission
- Sqids because having a raw ID in your url is too 2010.
Development Packages
- Laravel Debug Bar
- Laravel IDE Helper
- Larastan
- Security Advisories
- Solo for Laravel
- Request Factories - Test requests in Laravel without all the boilerplate.
New Methods
This package adds a few new methods to the global space. These are located in app/helpers.local.php
.
unparse_url()
function unparse_url(array | false $parsed_url): string
This is the opposite to, and complementary to parse_url()
. It takes an array from parse_url()
and returns an Url.
$url = 'https://gitlab.com/c11k/starter-kit';
$parts = parse_url($url);
// change the query because of some reason
$parts['query'] = 'search=start';
$newUrl = unparse_url($parts);
// "https://gitlab.com/c11k/starter-kit?search=start"
normalize_url()
function normalize_url(string $url = ''): string
This can be used when a user has provided an Url. It will parse the url, remove parts that don't belong, and unparse the url, returning a string.
normalize_url('https://gitlab.com/c11k/starter-kit?search=start')
// https://gitlab.com/c11k/starter-kit?search=start
normalize_url(' https://gitlab.com/c11k/starter-kit?search=start ')
// https://gitlab.com/c11k/starter-kit?search=start
wrap_string()
function wrap_string(string $string, string $cap = '
'): string`
This will wrap a string in a string.
> wrap_string('hello world');
// "`hello world`"
wrap_string('hello world', '!');
// "!hello world!"
wrap_string('hello world', '~~');
// "~~hello world~~"
immutable()
function immutable(): CarbonImmutable
Like now()
, but returns a new DateTimeImmutable
object.
> immutable()
// Carbon\CarbonImmutable @1749762362 {#5761
// date: 2025-06-12 21:06:02.350449 UTC (+00:00),
// }
array_cleave
function array_cleave(array $array): array
"Cleave" is a contronym; it has two definitions that are opposites of each other. In this case, it means to separate, like a cleaver. Given an array, it returns the keys and values as separate arrays.
$array = ['A' => 65, 'B' => 66, 'a' => 97, 'b' => 98];
[$keys, $values] = array_cleave($array);
// $keys: ['A', 'B', 'a', 'b']
// $values: [65, 66, 97, 98]
array_combine(...array_cleave(['A' => 65, 'B' => 66, 'a' => 97, 'b' => 98]));
// ['A' => 65, 'B' => 66, 'a' => 97, 'b' => 98]
Testing methods
These methods should only be used during testing, and if your specific use case requires.
fake_email()
function fake_email(): string
When seeding too many User
accounts, the uniqueness of Faker overflows. This just adds a
random string to each email for more randomess.
fake_email();
// inc9ns.crystel.buckridge@example.org
fake_phone_number()
function fake_phone_number(): string
Faker can generate phone numbers that do not validate with Laravel Phone. This simply forces a phone number that will validate against Laravel Phone. They will always be in the (704) area code in US because I only wanted to add one. Pull requests are welcome.
fake_phone_number();
// "+17044459994"