Download the PHP package nh/starter-pack without Composer
On this page you can find all versions of the php package nh/starter-pack. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download nh/starter-pack
More information about nh/starter-pack
Files in nh/starter-pack
Package starter-pack
Short Description Starter pack presets (Frontend/Backend)
License MIT
Informations about the package starter-pack
Installation
Install the package via composer:
Preset
Install the preset:
Dumb the composer autoload:
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.
Laravel/Fortify
Install fortify via composer:
Publish the vendor:
Add the provider in your config/app.php
Add in boot() of app/Providers/FortifyServiceProvider.php:
Change the Password Rule in Actions/Fortify/PasswordValidationRules.php
Update the file config/fortify.php
Database
If Mysql is lower than v5.7.7 add in the file app/Providers/AppServiceProvider.php
And in the config/database.php change to UTF8
Migrate the basic databases and seed the default roles/permissions:
Design
Add the NPM packages in your package.json:
Install the NPM packages and run the default js/scss:
Commandes
Maintenance
You can put the website in maintenance mode
Users
You can create a new user:
Contents
You can create a new content:
The commande will copy the default files that you needed. You can change them and then do:
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
And enjoy !
Rules
Lowercase
Check that the field is lowercase.
WithoutSpace
Check that the field is without space.
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 ).
Slug
Check that the field is lowercase, without space and without accent.
Without HTML Tag
Check that the field as no HTML tags
Without Url
Check that the field as no url in it
Components
History
Get the history (App\Track) global, for a model or for a user.
Attribute | Type | Default |
---|---|---|
title | string | null |
type | string | 'global' |
items | array | null |
value | string | null |
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
Get a listing of collection with pagination and default layout.
Attribute | Type | Default |
---|---|---|
model | string | |
route | string | |
header | string | |
items | array | |
show-id | boolean | false |
show-dates | string | null |
folder | string | null |
sortable | boolean | false |
sortable-order | string | asc |
with-children | boolean | false |
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
More settings on package nh/bs-component !
Attribute | Type | Default |
---|---|---|
formats | string | null |
size | string | null |
width | string | null |
height | string | null |
weight | string | null |
has-name | boolean | false |
has-preview | boolean | false |
has-download | boolean | false |
Media Listing
Get a listing of the media from the package nh/mediable.
Attribute | Type | Default |
---|---|---|
items | array | |
show-dates | boolean | false |
has-preview | boolean | false |
has-download | boolean | false |
sortable | boolean | false |
listing | string | sp::components.media-listing |
Search
Display a search bar using the package nh/searchable.
Attribute | Type | Default |
---|---|---|
key | string | |
model | string | |
route | string | |
folder | string | null |
is-advanced | boolean | false |
sortable | string | null |
sortable-order | string | asc |
collapse-id | string | collapseSearch |
If there is no folder it will take the route attribute. You can separate the sortable fields with pipes.
Statistic
Display a statistic block.
Attribute | Type | Default |
---|---|---|
title | string | |
value | string | null |
unit | string | null |
icon | string | icon-rocket |
color | string | primary |
url | string | null |
Toast
Display a toast notification.
Attribute | Type | Default |
---|---|---|
message | string | |
color | string | success |
icon | string | null |
delay | int | 10000 |
The default icon is defined by the color.
Helpers
The package come with some helpers.
Nofification
Return a translated sentence for notification: Exemple: Page has been added with success !
RequestClean
Return a clean request value. Exemple: [0 => 'foo',1 => false,2 => -1,3 => null,4 => '',5 => '0', 6 => 0] will return [0 => 'foo',2 => -1]
Sync
Check if a sync is clean or dirty, and get the event.
All versions of starter-pack with dependencies
nh/access-control Version 1.5.*
nh/mediable Version 1.6.*
nh/sortable Version 1.3.*
nh/searchable Version 1.1.*
nh/trackable Version 1.7.*