Package Data | |
---|---|
Maintainer Username: | faytzel |
Maintainer Contact: | jmgomez0101@gmail.com (Faytzel) |
Package Create Date: | 2014-05-05 |
Package Last Update: | 2015-02-23 |
Home Page: | http://faytzel.github.io/laravel-latch/ |
Language: | PHP |
License: | MIT |
Last Refreshed: | 2024-12-15 15:16:04 |
Package Statistics | |
---|---|
Total Downloads: | 759 |
Monthly Downloads: | 0 |
Daily Downloads: | 0 |
Total Stars: | 4 |
Total Watchers: | 0 |
Total Forks: | 0 |
Total Open Issues: | 1 |
Require this package in your composer.json and run composer update:
"faytzel/laravel-latch": "1.*"
After updating composer, add the Service Provider to the providers array in config/app.php
'Faytzel\LaravelLatch\LaravelLatchServiceProvider',
You add config files.
php artisan vendor:publish
If you want to use the facade, add this to your facades in config/app.php
'Latch' => 'Faytzel\LaravelLatch\Facades\LaravelLatch',
Require this package in your composer.json and run composer update:
"faytzel/laravel-latch": "0.*"
After updating composer, add the Service Provider to the providers array in app/config/app.php
'Faytzel\LaravelLatch\LaravelLatchServiceProvider',
You add config files.
php artisan config:publish faytzel/laravel-latch
If you want to use the facade, add this to your facades in app/config/app.php
'Latch' => 'Faytzel\LaravelLatch\Facades\LaravelLatch',
$token = Input::get('token');
if ($accountId = Latch::pair($token))
{
// Add account id latch to user table
}
else
{
echo Latch::error();
}
$accountId = 'latch_account_id';
if ( ! Latch::locked($accountId))
{
// Auth user
}
$accountId = 'latch_account_id';
if (Latch::unlocked($accountId))
{
// Auth user
}
$accountId = 'latch_account_id';
if (Latch::unpair($accountId))
{
// Delete account id latch in user table
}
else
{
echo Latch::error();
}