PHP code example of instance-code / repository

1. Go to this page and download the library: Download instance-code/repository 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/ */

    

instance-code / repository example snippets

 bash
 //bootstrap\app.php
 Add : $app->register(InstanceCode\Repository\Providers\RepositoryServiceProvider::class);
 bash
  //config\app.php
 'providers' => [
	...
	InstanceCode\Repository\Providers\RepositoryServiceProvider::class,
 ],

 'aliases' => [
	...
	'Repository' => InstanceCode\Repository\Facades\Repository::class,
 ],
 
	php artisan vendor:publish --tag=repository

use InstanceCode\Repository\Facades\Repository as Response;
/**
 * $data: String | Object | Array
 * response interface: $data['status'] | $data['messages'] | $data['body']
*/
return Response::response($data);