0.1.4 2014-10-14 15:40 UTC


Latest Stable Version Total Downloads

Laravel Seeclickfix API is a simple laravel 4 service provider (wrapper) for seeclickfix/seeclickfix-php-sdk which provides API support in PHP 5.3+


Add laravel-seeclickfix-api to your composer.json file:

"require": {
  "seeclickfix/laravel-seeclickfix-api": "dev-master"

Use composer to install this package.

$ composer update

Create configuration file using artisan

$ php artisan config:publish seeclickfix/laravel-seeclickfix-api


Registering the Package

Add an alias to the bottom of app/config/app.php

'SeeClickFix' => 'SeeClickFix\API\Facade\API',

and register this service provider at the bottom of the $providers array:



Add your credentials to app/config/packages/seeclickfix/laravel-seeclickfix-api/config.php

return array( 
	 | Settings

    'location'	     => 'default',
    'sandbox_mode'	 => false,

	 | Keys

	 'client_id'      => '',
	 'client_secret'  => '',
	 'redirect_uri'   => '', // Relative path


When developing your application set sandbox_mode to true. This will allow you to test out features on our test server.


Basic usage

SeeClickFix::getAuthorizationUri() -This will redirect the user to the SeeClickFix authorization page.

SeeClickFix::getAccessToken() - Gets access token and validates it.

SeeClickFix::check() - Determine if the user is logged in.

SeeClickFix::getUserId( $id ) - Returns a single user by id.

SeeClickFix::logout() - Log current user out.

For a full list of API calls check the seeclickfix/seeclickfix-php-sdk wiki.

Usage examples

In your Controller use the following code:

 * Login user with SeeClickFix
 * @return void

public function loginWithSeeClickFix() {
	// get data from input
	$code = Input::get( 'code' );
	// check if code is valid
	if ( !empty( $code ) ) 
		// Try to log the user in
        SeeClickFix::getAccessToken( $code );

		return Redirect::route("/")->with("success", "You have successfully logged in.");
	// if not ask for permission first
	else {
		// get SeeClickFix authorization URL
		$url = SeeClickFix::getAuthorizationUri();
		// return to SeeClickFix login url
		return Response::make()->header( 'Location', (string)$url );


In your Blade Views use the following code:

@if (SeeClickFix::check())
	<li><a href="{{ route('logout') }}" class="external">Logout</a></li>
	<li><a href="{{ route('login') }}" class="external">Login/Sign-up</a></li>


Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright 2013-2015 SeeClickFix