Skip to content

Instantly share code, notes, and snippets.

'use strict';
angular.module('kcaApp')
.controller('VoteCtrl', function ($scope, $http, $timeout, $rootScope, $compile, $routeParams, $location, localStorageService, JSONService, nextCategoryService) {
////////////////////////////////////////////////////////////////////////////////////////////
//
// Configuration
//
<?php
namespace Scheduler\Appointment;
interface AppointmentInterface {
/**
* Get all appointments for a user
* @param int $userID
* @return Appointments Object
<?php namespace Scheduler\Appointment;
use \Ardent;
class EloquentAppointmentRepository extends Ardent implements AppointmentRepositoryInterface {
// public $account_id = Auth::user()->account_id;
protected $table = 'appointments';
<?php
use Scheduler\Appointment\AppointmentRepositoryInterface as Appointment;
class AppointmentsController extends \BaseController {
protected $appointment;
public function __construct(Appointment $appointment)
<?php namespace Scheduler\Appointment;
class EloquentAppointmentRepository implements AppointmentRepositoryInterface {
// public $account_id = Auth::user()->account_id;
public static function create(array $data)
{
<?php namespace Scheduler\Repositories;
use \Ardent;
use Carbon;
class EloquentAppointmentRepository extends Ardent implements AppointmentRepositoryInterface {
// public $account_id = Auth::user()->account_id;
protected $table = 'appointments';
<?php namespace Scheduler\Repositories;
interface AppointmentRepositoryInterface {
/**
* Create appointment
* @param array $input
* @return Appointment Object
*/
<?php namespace Scheduler\Repositories;
use Illuminate\Database\Eloquent\Model;
class EloquentAppointmentRepository implements AppointmentRepositoryInterface {
protected $appointment;
public function __construct(Model $appointment)
{
public static function createOrUpdate($id = null, array $data)
{
$user = new User;
$user->account_id = $data['account_id'];
$user->role = $data['role'];
$user->email = $data['email'];
$user->username = $data['username'];
$user->password = $data['password'];
public function store()
{
$input = Input::all();
$input['account_id'] = 1;
$input['role'] = 2;
$registered = $this->user->createOrUpdate(null, $input);
if (gettype($registered) == 'array')
{