PHPackages                             nh/starter-pack - 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. nh/starter-pack

ActiveLibrary

nh/starter-pack
===============

Starter pack presets (Frontend/Backend)

3.0.3(2y ago)0441MITPHP

Since May 8Pushed 2y ago1 watchersCompare

[ Source](https://github.com/NatachaH/laravel-starter-pack)[ Packagist](https://packagist.org/packages/nh/starter-pack)[ RSS](/packages/nh-starter-pack/feed)WikiDiscussions master Synced 5d ago

READMEChangelog (10)Dependencies (6)Versions (92)Used By (0)

Installation
============

[](#installation)

Install the package via composer:

```
composer require nh/starter-pack

```

Preset
------

[](#preset)

Install the preset:

```
php artisan preset:sp

```

Dumb the composer autoload:

```
composer dump-autoload

```

Config
------

[](#config)

Don't forget to change in the config/app.php the locale and the timezone to be on french and have the correct times.

```
'timezone' => 'Europe/Zurich',
'locale' => 'fr',

```

Laravel/Fortify
---------------

[](#laravelfortify)

Install fortify via composer:

```
composer require laravel/fortify

```

Publish the vendor:

```
php artisan vendor:publish --provider="Laravel\Fortify\FortifyServiceProvider"

```

Add the provider in your config/app.php

```
App\Providers\FortifyServiceProvider::class,

```

Add in boot() of app/Providers/FortifyServiceProvider.php:

```
Fortify::resetUserPasswordsUsing(ResetUserPassword::class);

Fortify::loginView(function () {
    return view('auth.login');
});

Fortify::requestPasswordResetLinkView(function () {
    return view('auth.forgot');
});

Fortify::resetPasswordView(function () {
    return view('auth.reset');
});

RateLimiter::for('login', function (Request $request) {
    return Limit::perMinute(5)->by($request->email.$request->ip());
});

```

Change the Password Rule in Actions/Fortify/PasswordValidationRules.php

```
return ['required', 'string', 'confirmed', 'min:6'];

```

Update the file config/fortify.php

```
'features' => [
  //Features::registration(),
  Features::resetPasswords(),
  // Features::emailVerification(),
  //Features::updateProfileInformation(),
  //Features::updatePasswords(),
  /*Features::twoFactorAuthentication([
      'confirm' => true,
      'confirmPassword' => true,
  ]),
  */
],

```

Database
--------

[](#database)

[If Mysql is lower than v5.7.7](https://laravel-news.com/laravel-5-4-key-too-long-error) add in the file **app/Providers/AppServiceProvider.php**

```
use Illuminate\Support\Facades\Schema;

public function boot()
{
    Schema::defaultStringLength(255);
}

```

And in the config/database.php change to UTF8

```
'mysql' => [
  ...
  'charset' => 'utf8',
  'collation' => 'utf8_unicode_ci',
  ...
]

```

Migrate the basic databases and seed the default roles/permissions:

```
php artisan migrate
php artisan db:seed

```

Design
------

[](#design)

Add the NPM packages in your package.json:

```
"@popperjs/core": "^2.6.0",
"bootstrap" : "^5.2.0",
"flatpickr" : "^4.6.7",
"@tiptap/core": "*",
"@tiptap/starter-kit": "*",
"@tiptap/extension-text-style": "*",
"@tiptap/extension-underline": "*",
"@tiptap/extension-link": "*",
"@tiptap/extension-table": "*",
"@tiptap/extension-table-cell": "*",
"@tiptap/extension-table-header": "*",
"@tiptap/extension-table-row": "*",
"sortablejs": "^1.10.2",
"sass": "^1.38.1",

```

Install the NPM packages and run the default js/scss:

```
npm install
npm run dev

```

Commandes
=========

[](#commandes)

Maintenance
-----------

[](#maintenance)

You can put the website in maintenance mode

```
php artisan down --render="errors.maintenance" --secret="aloha"

```

Users
-----

[](#users)

You can create a new user:

```
php artisan user:new

```

Contents
--------

[](#contents)

You can create a new content:

```
php artisan content:new

```

The commande will copy the default files that you needed. You can change them and then do:

```
php artisan migrate

```

Don't forget to add the name of your model in:

- The translation file : **backend.php**
- The translation file : **notification.php**

And you can add the permission seeder in database/seeders/AccessControlSeeder.php

```
$this->createPermissions($actions,'model',true);

```

And enjoy !

Rules
=====

[](#rules)

Lowercase
---------

[](#lowercase)

Check that the field is lowercase.

```
use Nh\StarterPack\Rules\Lowercase;

public function rules()
{
    return [
      'my_field'  => [new Lowercase]
    ];
}

```

WithoutSpace
------------

[](#withoutspace)

Check that the field is without space.

```
use Nh\StarterPack\Rules\WithoutSpace;

public function rules()
{
    return [
      'my_field'  => [new WithoutSpace]
    ];
}

```

Phone
-----

[](#phone)

Check that the field is a valid phone number (can start with +, can contain numbers dash and white space and must have a length of 9 minimum ).

```
use Nh\StarterPack\Rules\Phone;

public function rules()
{
    return [
      'my_field'  => [new Phone]
    ];
}

```

Slug
----

[](#slug)

Check that the field is lowercase, without space and without accent.

```
use Nh\StarterPack\Rules\Slug;

public function rules()
{
    return [
      'my_field'  => [new Slug]
    ];
}

```

Without HTML Tag
----------------

[](#without-html-tag)

Check that the field as no HTML tags

```
use Nh\StarterPack\Rules\WithoutHtmlTag;

public function rules()
{
    return [
      'my_field'  => [new WithoutHtmlTag]
    ];
}

```

Without Url
-----------

[](#without-url)

Check that the field as no url in it

```
use Nh\StarterPack\Rules\WithoutUrl;

public function rules()
{
    return [
      'my_field'  => [new WithoutUrl]
    ];
}

```

Components
==========

[](#components)

History
-------

[](#history)

Get the history (App\\Track) global, for a model or for a user.

AttributeTypeDefaulttitlestringnulltypestring'global'itemsarraynullvaluestringnull*The type can be: global, model or user.**If there is no value and there is multiple items, the value will be the first item time.*

```

```

Listing
-------

[](#listing)

Get a listing of collection with pagination and default layout.

AttributeTypeDefaultmodelstringroutestringheaderstringitemsarrayshow-idbooleanfalseshow-datesstringnullfolderstringnullsortablebooleanfalsesortable-orderstringascwith-childrenbooleanfalse*If there is no folder it will take the route attribute.**In show-dates you can pass the dates to display: created|updated|deleted.*

```

```

Media Dynamic
-------------

[](#media-dynamic)

More settings on package nh/bs-component !

AttributeTypeDefaultformatsstringnullsizestringnullwidthstringnullheightstringnullweightstringnullhas-namebooleanfalsehas-previewbooleanfalsehas-downloadbooleanfalse```

```

Media Listing
-------------

[](#media-listing)

Get a listing of the media from the package nh/mediable.

AttributeTypeDefaultitemsarrayshow-datesbooleanfalsehas-previewbooleanfalsehas-downloadbooleanfalsesortablebooleanfalselistingstringsp::components.media-listing```

```

Search
------

[](#search)

Display a search bar using the package nh/searchable.

AttributeTypeDefaultkeystringmodelstringroutestringfolderstringnullis-advancedbooleanfalsesortablestringnullsortable-orderstringasccollapse-idstringcollapseSearch*If there is no folder it will take the route attribute.**You can separate the sortable fields with pipes.*

```

```

Statistic
---------

[](#statistic)

Display a statistic block.

AttributeTypeDefaulttitlestringvaluestringnullunitstringnulliconstringicon-rocketcolorstringprimaryurlstringnull```

```

Toast
-----

[](#toast)

Display a toast notification.

AttributeTypeDefaultmessagestringcolorstringsuccessiconstringnulldelayint10000*The default icon is defined by the color.*

```

```

Helpers
=======

[](#helpers)

The package come with some helpers.

Nofification
------------

[](#nofification)

Return a translated sentence for notification: *Exemple: Page has been added with success !*

```
notification('added','page')

```

RequestClean
------------

[](#requestclean)

Return a clean request value. *Exemple: \[0 =&gt; 'foo',1 =&gt; false,2 =&gt; -1,3 =&gt; null,4 =&gt; '',5 =&gt; '0', 6 =&gt; 0\] will return \[0 =&gt; 'foo',2 =&gt; -1\]*

```
requestClean('test')

```

Sync
----

[](#sync)

Check if a sync is clean or dirty, and get the event.

```
$sync = $model->items()->sync($array);

syncIsClean(sync); // Check if the sync is clean

syncIsDirty(sync); // Check if the sync is dirty

getSyncEvent(sync); // Return the event as updated/created/deleted

```

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity71

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

Recently: every ~33 days

Total

91

Last Release

1088d ago

Major Versions

1.1.2 → 2.0.02020-12-09

2.8.0 → 3.0.02023-01-19

### Community

Maintainers

![](https://www.gravatar.com/avatar/47361520c40f781d7d5b39e26b3194800a35e89c4819c220ea3eaaaa907c34ec?d=identicon)[NatachaH](/maintainers/NatachaH)

---

Top Contributors

[![NatachaH](https://avatars.githubusercontent.com/u/24412486?v=4)](https://github.com/NatachaH "NatachaH (744 commits)")

### Embed Badge

![Health badge](/badges/nh-starter-pack/health.svg)

```
[![Health](https://phpackages.com/badges/nh-starter-pack/health.svg)](https://phpackages.com/packages/nh-starter-pack)
```

PHPackages © 2026

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