PHP code example of nh / starter-pack

1. Go to this page and download the library: Download nh/starter-pack library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

nh / starter-pack example snippets


php artisan preset:sp

composer dump-autoload

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

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());
});

php artisan migrate
php artisan db:seed

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

php artisan user:new

php artisan content:new

php artisan migrate

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

<x-sp-history title="My history" type="global" :items="$tracks" />

$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