PHP code example of maestro-module / accounts

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

    

maestro-module / accounts example snippets



$typeName = 'App/Models/User'

$isAuthenticable = true;

Accounts::type()->create($typeName, $isAuthenticable); // Retorna Type

$user = new User();

Accounts::type()->create($user, true); // Retorna Type

Accounts::type()->all(); // Retorna Collection

Accounts::type()->find(1); // Retorna Type

Accounts::type()->find('App/User'); // Retorna Type

$user = new User();

Accounts::type()->find($user); // Retorna Collection

Accounts::type()->findOrCreate('App/Models/User'); // Retorna Type

Accounts::type()->isExists('App/Models/User'); // Retorna Collection

Accounts::relation()->relate($childObjectWithAccount, $parentObjectWithAccount);

Accounts::type()->factory(); // Retorna Type