PHP code example of nikolag / laravel-square

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

    

nikolag / laravel-square example snippets


php artisan vendor:publish --tag=nikolag_config

php artisan migrate

...
use Nikolag\Square\Traits\HasCustomers;

class User extends Model {
  use HasCustomers;
  ...
}

...
use Nikolag\Square\Traits\HasProducts;

class Order extends Model {
  use HasProducts;
  ...

  /**
   * The table associated with the model.
   *
   * @var string
   */
  protected $table = '<TABLE_NAME>';
  ...
}