PHP code example of eeappdev / laravel-external-id
1. Go to this page and download the library: Download eeappdev/laravel-external-id 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/ */
eeappdev / laravel-external-id example snippets
// Store (update or create) the external id
$model->addExternalId('external_unique_id');
// Remove/unlink an external ID
$model->removeExternalId();
// Get the external ID
$model->getExternalID();
// Get all external information
$model->external()
use Eeappdev\ExternalId\HasExternalId;
class Client extends Model
{
use HasExternalId;
bash
php artisan vendor:publish --provider="Eeappdev\ExternalId\ExternalIdServiceProvider" --tag="migrations"
bash
php artisan migrate