PHP code example of amitavdevzone / foundation

1. Go to this page and download the library: Download amitavdevzone/foundation 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/ */

    

amitavdevzone / foundation example snippets


Inferno\Foundation\FoundationServiceProvider::class

php artisan vendor:publish --provider="Inferno\Foundation\FoundationServiceProvider" --force
php artisan vendor:publish --provider="Spatie\Permission\PermissionServiceProvider" --tag="migrations"

use Notifiable, PresentableTrait, HasRoles, HasApiTokens;

protected $presenter = UserPresenter::class;

protected $fillable = [
    'name', 'email', 'password', 'active'
];

public function profile()
{
    return $this->hasOne('Inferno\Foundation\Models\Profile');
}

public function token()
{
    return $this->hasMany('Inferno\Foundation\Models\\Token');
}

    Passport::routes();

    \Laravel\Passport\Http\Middleware\CreateFreshApiToken::class,

php artisan migrate
php artisan passport:install
php artisan inferno:install