c11k / starter-kit
The skeleton application for the Laravel framework, opinionated by the C11K team.
Installs: 7
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Forks: 0
Type:project
pkg:composer/c11k/starter-kit
Requires
- php: ^8.4
 - ext-pdo: *
 - ext-redis: *
 - ext-yaml: *
 - cknow/laravel-money: ^8.4
 - guzzlehttp/guzzle: ^7.10.0
 - inertiajs/inertia-laravel: ^2.0.10
 - laravel/framework: ^12.36.1
 - laravel/horizon: ^5.38.0
 - laravel/reverb: ^1.6
 - laravel/telescope: ^5.15.0
 - laravel/tinker: ^2.10.1
 - owen-it/laravel-auditing: ^14.0
 - propaganistas/laravel-phone: ^6.0.2
 - psr/http-factory-implementation: *
 - spatie/laravel-permission: ^6.22
 - sqids/sqids: >=0.5
 - symfony/http-client: ^7.3.4
 - tightenco/ziggy: ^2.6.0
 
Requires (Dev)
- barryvdh/laravel-debugbar: ^3.16.0
 - barryvdh/laravel-ide-helper: ^3.6.0
 - fakerphp/faker: ^1.24.1
 - larastan/larastan: ^3.8.0
 - laravel/pail: ^1.2.3
 - laravel/pint: ^1.25.1
 - laravel/sail: ^1.47.0
 - mockery/mockery: ^1.6.12
 - nunomaduro/collision: ^8.8.2
 - phpunit/phpunit: ^11.5.43
 - roave/security-advisories: dev-latest
 - soloterm/solo: ^0.5.0
 - worksome/request-factories: ^3.4
 
README
This is an opinionated starter kit for a Laravel Project.
[TOC]
Installation
In your shell, substituting awesome-app for your app name:
laravel new awesome-app --using=c11k/starter-kit
Admin Seeder
>>> [!caution] Remember to change the sample email and password if seeding yourself as an admin user in production. >>>
In the .env.example file, there are some SEEDER_SUPER_ADMIN_* environment
variables. These variables are used in the DefaultAdminSeeder class to seed
your default user. This is called when you seed the database using
php artisan db:seed or when seeding after a migration. Make sure to keep this
class updated when you add some non-optional User attributes, and feel free to
add extra attributes, or give the user Roles and/or Permissions. 
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 for other area codes are welcome.
fake_phone_number();
// "+17044459994"