PHP code example of rijosh / podio-auth
1. Go to this page and download the library: Download rijosh/podio-auth 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/ */
rijosh / podio-auth example snippets
* php artisan podio:init
namespace App\Http\Controllers;
use PodioAuth\Controllers\PodioAuth;
use PodioAuth\Repositories\Podio;
class TestController extends Controller
{
public function getTest()
{
PodioAuth::podioUserAuth(); // username-password authentication
PodioAuth::podioAppAuth(12344); // App authentication
PodioAuth::podioAppAuthWithName("name"); // Authenticate app with name specified in config/podio.php
Podio::PodioApp_get(123456); // Get Podio app details
}
}
public function processHook($id) // table row id
{
$request = PodioRequest::whereId($id)->first();
if ($request) {
$appId = $request->app_id;
$hook = $request->request;
/**
* Start processing hook.
*/
$request->is_processing = 1;
$request->save();
/**
* Your code
*/
/**
* Finished processing hook.
*/
$request->is_processing = 0;
$request->is_processed = 1;
$request->save();
}
}