PHP code example of simonbowen / laravel-isams

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

    

simonbowen / laravel-isams example snippets

 artisan vendor:publish



return [
  'isams' => [
    'driver' => 'xml', // Set to db to use MSSQL connection,
    'xml' => [
      'url' => 'http://url/for/isams/xml',
      'cache' => null, // Set cache time for XML file (defaults to 60 minutes)
    ],
    'db' => [
      'connection' => 'sqlsrv', // Specify the database connection you wish to use from the database.php config file
    ]
  ]
];


use SimonBowen\IsamsDrivers\Repositories\Contracts\StaffRepository;

class DemoController extends Controller {
  
  protected $repository;
  
  public function __construct(StaffRepository $repository)
  {
    $this->repository = $repository;
  }
  
  public function index()
  {
    $staff = $this->repository->all();
    dd($staff);
  }
  
}