PHP code example of martanto / magma-trait

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

    

martanto / magma-trait example snippets


return [
    /*
    |--------------------------------------------------------------------------
    | User Providers
    |--------------------------------------------------------------------------
    |
    | All authentication drivers have a user provider. This defines how the
    | users are actually retrieved out of your database or other storage
    | mechanisms used by this application to persist your user's data.
    |
    */
    'model' => config('auth.providers.users.model'),

    /*
    |--------------------------------------------------------------------------
    | MAGMA API url
    |--------------------------------------------------------------------------
    |
    | This one define where the MAGMA API url located
    |
    */
    'api_url' => 'https://magma.esdm.go.id/api',
];

use AuthenticatesUsers;
use ByteConverter;
use ColorPalettesTrait;
use GenerateSlug;
use GenerateUUID;
use JsonFromFileTrait;
use LoginWithMagma;
use ThrottlesLogins;
bash
php artisan vendor:publish --tag="magma-trait-config"