PHP code example of braunson / fatsecret-laravel

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

    

braunson / fatsecret-laravel example snippets


	# Add `FatSecretServiceProvider` to the `providers` array
	'providers' => [
		...
		Braunson\FatSecret\ServiceProvider::class,
	]

	# Add the FatSecret Facade to the `aliases` array
	'aliases' => [
		...
		'FatSecret' => Braunson\FatSecret\Facades\Facade::class,
	]
	

	php artisan vendor:publish --provider="Braunson\FatSecret\ServiceProvider"
	

use Fatsecret;

FatSecret::ProfileCreate($userID, &$token, &$secret);

FatSecret::searchIngredients($search_phrase, $page, $maxresults)

FatSecret::getIngredient($ingredient_id)

FatSecret::GetKey()

FatSecret::SetKey()

FatSecret::GetSecret()

FatSecret::SetSecret()

FatSecret::ProfileCreate($userID, $token, $secret)

FatSecret::ProfileGetAuth($userID, $token, $secret)

FatSecret::ProfileRequestScriptSessionKey($auth, $expires, $consumeWithin, $permittedReferrerRegex, $cookie, $sessionKey)