PHP code example of madeweb / eloquent-api

1. Go to this page and download the library: Download madeweb/eloquent-api 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/ */

    

madeweb / eloquent-api example snippets

sh
php artisan make:model-api Model --api=API\\NameOfAPI 
sh
php artisan make:model-api Model --api=API\\NameOfAPI --auth
sh
    public function user()
    {
        return $this->relationship(User::class, 'user', $this->user_uuid, 'find');
    }
sh
    public function find($uuid)
    {
        $response = $this->connection->showPerson($uuid);
        return $this->prepareResponse($response);
    }