PHP code example of jsefton / laravel-resourceable

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

    

jsefton / laravel-resourceable example snippets


App\Post::204

// If we have an App\Post instance with record ID 204 loaded.
$resource = $post->resourceReference();
// returns App\Post::204

$post->uuid;

$postt->uuid('<string>');

$post = Resource::load('App\Post::1');
// returns an instance of App\Post with record ID 1 loaded.