PHP code example of idoneo / humano-core

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

    

idoneo / humano-core example snippets


// Automatically registered by other Humano packages
$modules = \Idoneo\HumanoCore\Models\Module::active()->get();

use Idoneo\HumanoCore\Models\Category;

$category = Category::create([
    'name' => 'Important Contacts',
    'description' => 'High priority contacts',
    'module_key' => 'crm',
    'color' => '#dc3545',
    'icon' => 'ti ti-star',
    'team_id' => auth()->user()->currentTeam->id,
]);

use Idoneo\HumanoCore\Models\Note;

// Add note to any model
$contact = Contact::find(1);
$note = $contact->notes()->create([
    'content' => 'Important follow-up needed',
    'user_id' => auth()->id(),
    'team_id' => auth()->user()->currentTeam->id,
]);

return [
    'dashboard' => [
        'default_route' => 'dashboard.analytics',
        'show_analytics' => true,
    ],
    'teams' => [
        'allow_team_creation' => true,
        'max_teams_per_user' => 5,
    ],
    'modules' => [
        'enabled_modules' => ['crm', 'billing', 'communications', 'hosting'],
    ],
];
bash
php artisan vendor:publish --tag="humano-core-migrations"
php artisan migrate
bash
php artisan humano:install
bash
# Install specific modules
php artisan humano:install --modules=crm,billing

# Interactive installation
php artisan humano:install