PHP code example of tequilarapido / diskstore

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

    

tequilarapido / diskstore example snippets



    'disks' => [
    
        // ...
        
        'tweets' => ['driver' => 'local', 'root' => storage_path('/documents/locations')],
        
        // ...
     ],



 if(FollowerLocation::exists($twitter_id)) {
   //...
 }



FollowerLocation::fromArray([
    'twitter_id' => $follower->twitter_id,
    'location' => $location,
])->store();



FollowerLocation::for($twitter_id)->setLocation($location)->store();


    FollowerLocation::find($follower->twitter_id);

    FollowerLocation::findOrNew($twitter_id)->setLocation($location)->store();


class FollowerLocation extends StorableObject
{
    // ...

    public function toArray() {
       return [
            'twitter_id' => '@requried! (uid)',
            // ... 
       ];
    }
}