diff --git a/.env.example b/.env.example
new file mode 100644
index 0000000..9a9d0dc
--- /dev/null
+++ b/.env.example
@@ -0,0 +1,26 @@
+APP_ENV=local
+APP_DEBUG=true
+APP_KEY=SomeRandomString
+APP_URL=http://localhost
+
+DB_CONNECTION=mysql
+DB_HOST=127.0.0.1
+DB_PORT=3306
+DB_DATABASE=homestead
+DB_USERNAME=homestead
+DB_PASSWORD=secret
+
+CACHE_DRIVER=file
+SESSION_DRIVER=file
+QUEUE_DRIVER=sync
+
+REDIS_HOST=127.0.0.1
+REDIS_PASSWORD=null
+REDIS_PORT=6379
+
+MAIL_DRIVER=smtp
+MAIL_HOST=mailtrap.io
+MAIL_PORT=2525
+MAIL_USERNAME=null
+MAIL_PASSWORD=null
+MAIL_ENCRYPTION=null
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..573a158
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,6 @@
+/vendor
+/node_modules
+/storage
+Homestead.yaml
+Homestead.json
+.env
diff --git a/.htaccess b/.htaccess
new file mode 100644
index 0000000..903f639
--- /dev/null
+++ b/.htaccess
@@ -0,0 +1,20 @@
+
+
+ Options -MultiViews
+
+
+ RewriteEngine On
+
+ # Redirect Trailing Slashes If Not A Folder...
+ RewriteCond %{REQUEST_FILENAME} !-d
+ RewriteRule ^(.*)/$ /$1 [L,R=301]
+
+ # Handle Front Controller...
+ RewriteCond %{REQUEST_FILENAME} !-d
+ RewriteCond %{REQUEST_FILENAME} !-f
+ RewriteRule ^ index.php [L]
+
+ # Handle Authorization Header
+ RewriteCond %{HTTP:Authorization} .
+ RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
+
diff --git a/README.md b/README.md
index 91d2b57..cafa196 100644
--- a/README.md
+++ b/README.md
@@ -4,23 +4,15 @@ A simple test for PHP / JavaScript Developers
## Instructions
-1. Fork this repo
-2. Import the CSV file located in `data/customers.csv` into a database (MySQL or Mongo is preferred)
-3. Create a basic PHP web service that serves the data from the database as JSON
-4. Create a basic web page that loads the JSON into a list or table when you click a button
-5. Create a Pull Request
+Requirements:
+Apache2
+Composer
+Mysql
-### Guidelines
-
-1. Your repo needs to include at minimum anything required to get the app working. Detailed instructions should be provided in the `README.md` file to setup and run the app.
-2. If a structured schema migration tool is not used then a setup script must be supplied to create any data tables etc
-3. Try not spend more than 2 hours on it
-
-### Bonus Points
-
-* Make it Pretty
-* Make it as OO as possible
-* Consume dependencies with tools like Composer, Bower and NPM
-* Use patterns like MVC, ORM
-* Compile any front end assets with a build tool like gulp
-* Unit tests
+To set up the application:
+1. Install a LAMP stack/use an existing LAMP stack
+2. Install composer https://getcomposer.org/doc/00-intro.md
+3. Run "composer install" to import dependencies and set up files
+4. Set the database settings in the .env file that is in the root of the app.
+5. Visit the path /install on the host to import the CSV document
+6. Visit the path / on the host to view the app running
diff --git a/TODO.txt b/TODO.txt
new file mode 100644
index 0000000..719ba1e
--- /dev/null
+++ b/TODO.txt
@@ -0,0 +1,3 @@
+Standardise the coding conventions to use either tabs or spaces in the project
+Change the HTML table to be a CSS class based table instead of an HTML table
+Convert CSS to use LESS
diff --git a/app/Company.php b/app/Company.php
new file mode 100644
index 0000000..344e142
--- /dev/null
+++ b/app/Company.php
@@ -0,0 +1,19 @@
+hasMany('App\Profile');
+ }
+
+}
diff --git a/app/Console/Commands/Inspire.php b/app/Console/Commands/Inspire.php
new file mode 100644
index 0000000..db9ab85
--- /dev/null
+++ b/app/Console/Commands/Inspire.php
@@ -0,0 +1,33 @@
+comment(PHP_EOL.Inspiring::quote().PHP_EOL);
+ }
+}
diff --git a/app/Console/Kernel.php b/app/Console/Kernel.php
new file mode 100644
index 0000000..71c519d
--- /dev/null
+++ b/app/Console/Kernel.php
@@ -0,0 +1,30 @@
+command('inspire')
+ // ->hourly();
+ }
+}
diff --git a/app/Events/Event.php b/app/Events/Event.php
new file mode 100644
index 0000000..ba2f888
--- /dev/null
+++ b/app/Events/Event.php
@@ -0,0 +1,8 @@
+middleware($this->guestMiddleware(), ['except' => 'logout']);
+ }
+
+ /**
+ * Get a validator for an incoming registration request.
+ *
+ * @param array $data
+ * @return \Illuminate\Contracts\Validation\Validator
+ */
+ protected function validator(array $data)
+ {
+ return Validator::make($data, [
+ 'name' => 'required|max:255',
+ 'email' => 'required|email|max:255|unique:users',
+ 'password' => 'required|min:6|confirmed',
+ ]);
+ }
+
+ /**
+ * Create a new user instance after a valid registration.
+ *
+ * @param array $data
+ * @return User
+ */
+ protected function create(array $data)
+ {
+ return User::create([
+ 'name' => $data['name'],
+ 'email' => $data['email'],
+ 'password' => bcrypt($data['password']),
+ ]);
+ }
+}
diff --git a/app/Http/Controllers/Auth/PasswordController.php b/app/Http/Controllers/Auth/PasswordController.php
new file mode 100644
index 0000000..1ceed97
--- /dev/null
+++ b/app/Http/Controllers/Auth/PasswordController.php
@@ -0,0 +1,32 @@
+middleware('guest');
+ }
+}
diff --git a/app/Http/Controllers/Controller.php b/app/Http/Controllers/Controller.php
new file mode 100644
index 0000000..d492e0b
--- /dev/null
+++ b/app/Http/Controllers/Controller.php
@@ -0,0 +1,14 @@
+first();
+ if(is_null($profile)){
+ $profile = new Profile;
+ }
+ $profile->externalid = $line[0];
+ $profile->first_name = $line[1];
+ $profile->last_name = $line[2];
+ $profile->email = $line[3];
+ //save gender
+ $gender = '';
+ switch($line[4]){
+ case 'Male':
+ $gender = 'Male';
+ break;
+ case 'Female':
+ $gender = 'Female';
+ break;
+ default:
+ $gender = 'Other';
+ }
+ $profile->gender = $gender;
+ $profile->ip_address = $line[5];
+
+ //get/save company
+ $companyName = $line[6];
+ //Safe as Laravel uses PDO for non raw queries
+ $company = Company::where('name', $companyName)->first();
+ if(is_null($company)){
+ $company = new Company;
+ $company->name = $companyName;
+ $company->save();
+ } else {
+ //echo gettype($company) . ' T ' . get_class($company) ; die;
+ //$company = $company->company;
+ //get_class($company) . ' T ' ; die;
+ }
+ $profile->company()->associate($company);
+ $profile->city = $line[7];
+ $profile->title = $line[8];
+ $profile->website = $line[9];
+ $profile->save();
+ }
+ //die;
+ return view('install.showinstall');
+ }
+
+
+}
diff --git a/app/Http/Controllers/ProfileController.php b/app/Http/Controllers/ProfileController.php
new file mode 100644
index 0000000..b847ed5
--- /dev/null
+++ b/app/Http/Controllers/ProfileController.php
@@ -0,0 +1,47 @@
+ $profile->name,
+ 'externalid' => $profile->externalid,
+ 'firstname' => $profile->first_name,
+ 'lastname' => $profile->last_name,
+ 'email' => $profile->email,
+ 'gender' => $profile->gender,
+ 'ip_address' => $profile->ip_address,
+ 'company' => $profile->company->name,
+ 'city' => $profile->city,
+ 'title' => $profile->title,
+ 'website' => $profile->website
+ );
+ }
+ return json_encode($profilesArray);
+ }
+
+}
diff --git a/app/Http/Kernel.php b/app/Http/Kernel.php
new file mode 100644
index 0000000..bffcfd9
--- /dev/null
+++ b/app/Http/Kernel.php
@@ -0,0 +1,53 @@
+ [
+ \App\Http\Middleware\EncryptCookies::class,
+ \Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
+ \Illuminate\Session\Middleware\StartSession::class,
+ \Illuminate\View\Middleware\ShareErrorsFromSession::class,
+ \App\Http\Middleware\VerifyCsrfToken::class,
+ ],
+
+ 'api' => [
+ 'throttle:60,1',
+ ],
+ ];
+
+ /**
+ * The application's route middleware.
+ *
+ * These middleware may be assigned to groups or used individually.
+ *
+ * @var array
+ */
+ protected $routeMiddleware = [
+ 'auth' => \App\Http\Middleware\Authenticate::class,
+ 'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class,
+ 'can' => \Illuminate\Foundation\Http\Middleware\Authorize::class,
+ 'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class,
+ 'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class,
+ ];
+}
diff --git a/app/Http/Middleware/Authenticate.php b/app/Http/Middleware/Authenticate.php
new file mode 100644
index 0000000..67abcae
--- /dev/null
+++ b/app/Http/Middleware/Authenticate.php
@@ -0,0 +1,30 @@
+guest()) {
+ if ($request->ajax() || $request->wantsJson()) {
+ return response('Unauthorized.', 401);
+ } else {
+ return redirect()->guest('login');
+ }
+ }
+
+ return $next($request);
+ }
+}
diff --git a/app/Http/Middleware/EncryptCookies.php b/app/Http/Middleware/EncryptCookies.php
new file mode 100644
index 0000000..3aa15f8
--- /dev/null
+++ b/app/Http/Middleware/EncryptCookies.php
@@ -0,0 +1,17 @@
+check()) {
+ return redirect('/');
+ }
+
+ return $next($request);
+ }
+}
diff --git a/app/Http/Middleware/VerifyCsrfToken.php b/app/Http/Middleware/VerifyCsrfToken.php
new file mode 100644
index 0000000..a2c3541
--- /dev/null
+++ b/app/Http/Middleware/VerifyCsrfToken.php
@@ -0,0 +1,17 @@
+belongsTo('App\Company');
+ }
+
+}
diff --git a/app/Providers/AppServiceProvider.php b/app/Providers/AppServiceProvider.php
new file mode 100644
index 0000000..35471f6
--- /dev/null
+++ b/app/Providers/AppServiceProvider.php
@@ -0,0 +1,28 @@
+ 'App\Policies\ModelPolicy',
+ ];
+
+ /**
+ * Register any application authentication / authorization services.
+ *
+ * @param \Illuminate\Contracts\Auth\Access\Gate $gate
+ * @return void
+ */
+ public function boot(GateContract $gate)
+ {
+ $this->registerPolicies($gate);
+
+ //
+ }
+}
diff --git a/app/Providers/EventServiceProvider.php b/app/Providers/EventServiceProvider.php
new file mode 100644
index 0000000..58ce962
--- /dev/null
+++ b/app/Providers/EventServiceProvider.php
@@ -0,0 +1,33 @@
+ [
+ 'App\Listeners\EventListener',
+ ],
+ ];
+
+ /**
+ * Register any other events for your application.
+ *
+ * @param \Illuminate\Contracts\Events\Dispatcher $events
+ * @return void
+ */
+ public function boot(DispatcherContract $events)
+ {
+ parent::boot($events);
+
+ //
+ }
+}
diff --git a/app/Providers/RouteServiceProvider.php b/app/Providers/RouteServiceProvider.php
new file mode 100644
index 0000000..bde0881
--- /dev/null
+++ b/app/Providers/RouteServiceProvider.php
@@ -0,0 +1,61 @@
+mapWebRoutes($router);
+
+ //
+ }
+
+ /**
+ * Define the "web" routes for the application.
+ *
+ * These routes all receive session state, CSRF protection, etc.
+ *
+ * @param \Illuminate\Routing\Router $router
+ * @return void
+ */
+ protected function mapWebRoutes(Router $router)
+ {
+ $router->group([
+ 'namespace' => $this->namespace, 'middleware' => 'web',
+ ], function ($router) {
+ require app_path('Http/routes.php');
+ });
+ }
+}
diff --git a/app/User.php b/app/User.php
new file mode 100644
index 0000000..75741ae
--- /dev/null
+++ b/app/User.php
@@ -0,0 +1,26 @@
+make(Illuminate\Contracts\Console\Kernel::class);
+
+$status = $kernel->handle(
+ $input = new Symfony\Component\Console\Input\ArgvInput,
+ new Symfony\Component\Console\Output\ConsoleOutput
+);
+
+/*
+|--------------------------------------------------------------------------
+| Shutdown The Application
+|--------------------------------------------------------------------------
+|
+| Once Artisan has finished running. We will fire off the shutdown events
+| so that any final work may be done by the application before we shut
+| down the process. This is the last thing to happen to the request.
+|
+*/
+
+$kernel->terminate($input, $status);
+
+exit($status);
diff --git a/bootstrap/app.php b/bootstrap/app.php
new file mode 100644
index 0000000..f2801ad
--- /dev/null
+++ b/bootstrap/app.php
@@ -0,0 +1,55 @@
+singleton(
+ Illuminate\Contracts\Http\Kernel::class,
+ App\Http\Kernel::class
+);
+
+$app->singleton(
+ Illuminate\Contracts\Console\Kernel::class,
+ App\Console\Kernel::class
+);
+
+$app->singleton(
+ Illuminate\Contracts\Debug\ExceptionHandler::class,
+ App\Exceptions\Handler::class
+);
+
+/*
+|--------------------------------------------------------------------------
+| Return The Application
+|--------------------------------------------------------------------------
+|
+| This script returns the application instance. The instance is given to
+| the calling script so we can separate the building of the instances
+| from the actual running of the application and sending responses.
+|
+*/
+
+return $app;
diff --git a/bootstrap/autoload.php b/bootstrap/autoload.php
new file mode 100644
index 0000000..3830137
--- /dev/null
+++ b/bootstrap/autoload.php
@@ -0,0 +1,34 @@
+=5.5.9",
+ "laravel/framework": "5.2.*",
+ "twbs/bootstrap": "^3.3"
+ },
+ "require-dev": {
+ "fzaninotto/faker": "~1.4",
+ "mockery/mockery": "0.9.*",
+ "phpunit/phpunit": "~4.0",
+ "symfony/css-selector": "2.8.*|3.0.*",
+ "symfony/dom-crawler": "2.8.*|3.0.*"
+ },
+ "autoload": {
+ "classmap": [
+ "database"
+ ],
+ "psr-4": {
+ "App\\": "app/"
+ }
+ },
+ "autoload-dev": {
+ "classmap": [
+ "tests/TestCase.php"
+ ]
+ },
+ "scripts": {
+ "post-root-package-install": [
+ "php -r \"copy('.env.example', '.env');\""
+ ],
+ "post-create-project-cmd": [
+ "php artisan key:generate"
+ ],
+ "post-install-cmd": [
+ "Illuminate\\Foundation\\ComposerScripts::postInstall",
+ "php -r \"copy('.env.example', '.env');\"",
+ "php artisan key:generate",
+ "php artisan optimize"
+ ],
+ "post-update-cmd": [
+ "Illuminate\\Foundation\\ComposerScripts::postUpdate",
+ "php artisan optimize"
+ ]
+ },
+ "config": {
+ "preferred-install": "dist"
+ }
+}
diff --git a/config/app.php b/config/app.php
new file mode 100644
index 0000000..4fc7a63
--- /dev/null
+++ b/config/app.php
@@ -0,0 +1,207 @@
+ env('APP_ENV', 'production'),
+
+ /*
+ |--------------------------------------------------------------------------
+ | Application Debug Mode
+ |--------------------------------------------------------------------------
+ |
+ | When your application is in debug mode, detailed error messages with
+ | stack traces will be shown on every error that occurs within your
+ | application. If disabled, a simple generic error page is shown.
+ |
+ */
+
+ 'debug' => env('APP_DEBUG', false),
+
+ /*
+ |--------------------------------------------------------------------------
+ | Application URL
+ |--------------------------------------------------------------------------
+ |
+ | This URL is used by the console to properly generate URLs when using
+ | the Artisan command line tool. You should set this to the root of
+ | your application so that it is used when running Artisan tasks.
+ |
+ */
+
+ 'url' => env('APP_URL', 'http://localhost'),
+
+ /*
+ |--------------------------------------------------------------------------
+ | Application Timezone
+ |--------------------------------------------------------------------------
+ |
+ | Here you may specify the default timezone for your application, which
+ | will be used by the PHP date and date-time functions. We have gone
+ | ahead and set this to a sensible default for you out of the box.
+ |
+ */
+
+ 'timezone' => 'UTC',
+
+ /*
+ |--------------------------------------------------------------------------
+ | Application Locale Configuration
+ |--------------------------------------------------------------------------
+ |
+ | The application locale determines the default locale that will be used
+ | by the translation service provider. You are free to set this value
+ | to any of the locales which will be supported by the application.
+ |
+ */
+
+ 'locale' => 'en',
+
+ /*
+ |--------------------------------------------------------------------------
+ | Application Fallback Locale
+ |--------------------------------------------------------------------------
+ |
+ | The fallback locale determines the locale to use when the current one
+ | is not available. You may change the value to correspond to any of
+ | the language folders that are provided through your application.
+ |
+ */
+
+ 'fallback_locale' => 'en',
+
+ /*
+ |--------------------------------------------------------------------------
+ | Encryption Key
+ |--------------------------------------------------------------------------
+ |
+ | This key is used by the Illuminate encrypter service and should be set
+ | to a random, 32 character string, otherwise these encrypted strings
+ | will not be safe. Please do this before deploying an application!
+ |
+ */
+
+ 'key' => env('APP_KEY'),
+
+ 'cipher' => 'AES-256-CBC',
+
+ /*
+ |--------------------------------------------------------------------------
+ | Logging Configuration
+ |--------------------------------------------------------------------------
+ |
+ | Here you may configure the log settings for your application. Out of
+ | the box, Laravel uses the Monolog PHP logging library. This gives
+ | you a variety of powerful log handlers / formatters to utilize.
+ |
+ | Available Settings: "single", "daily", "syslog", "errorlog"
+ |
+ */
+
+ 'log' => env('APP_LOG', 'single'),
+
+ /*
+ |--------------------------------------------------------------------------
+ | Autoloaded Service Providers
+ |--------------------------------------------------------------------------
+ |
+ | The service providers listed here will be automatically loaded on the
+ | request to your application. Feel free to add your own services to
+ | this array to grant expanded functionality to your applications.
+ |
+ */
+
+ 'providers' => [
+
+ /*
+ * Laravel Framework Service Providers...
+ */
+ Illuminate\Auth\AuthServiceProvider::class,
+ Illuminate\Broadcasting\BroadcastServiceProvider::class,
+ Illuminate\Bus\BusServiceProvider::class,
+ Illuminate\Cache\CacheServiceProvider::class,
+ Illuminate\Foundation\Providers\ConsoleSupportServiceProvider::class,
+ Illuminate\Cookie\CookieServiceProvider::class,
+ Illuminate\Database\DatabaseServiceProvider::class,
+ Illuminate\Encryption\EncryptionServiceProvider::class,
+ Illuminate\Filesystem\FilesystemServiceProvider::class,
+ Illuminate\Foundation\Providers\FoundationServiceProvider::class,
+ Illuminate\Hashing\HashServiceProvider::class,
+ Illuminate\Mail\MailServiceProvider::class,
+ Illuminate\Pagination\PaginationServiceProvider::class,
+ Illuminate\Pipeline\PipelineServiceProvider::class,
+ Illuminate\Queue\QueueServiceProvider::class,
+ Illuminate\Redis\RedisServiceProvider::class,
+ Illuminate\Auth\Passwords\PasswordResetServiceProvider::class,
+ Illuminate\Session\SessionServiceProvider::class,
+ Illuminate\Translation\TranslationServiceProvider::class,
+ Illuminate\Validation\ValidationServiceProvider::class,
+ Illuminate\View\ViewServiceProvider::class,
+
+ /*
+ * Application Service Providers...
+ */
+ App\Providers\AppServiceProvider::class,
+ App\Providers\AuthServiceProvider::class,
+ App\Providers\EventServiceProvider::class,
+ App\Providers\RouteServiceProvider::class,
+
+ ],
+
+ /*
+ |--------------------------------------------------------------------------
+ | Class Aliases
+ |--------------------------------------------------------------------------
+ |
+ | This array of class aliases will be registered when this application
+ | is started. However, feel free to register as many as you wish as
+ | the aliases are "lazy" loaded so they don't hinder performance.
+ |
+ */
+
+ 'aliases' => [
+
+ 'App' => Illuminate\Support\Facades\App::class,
+ 'Artisan' => Illuminate\Support\Facades\Artisan::class,
+ 'Auth' => Illuminate\Support\Facades\Auth::class,
+ 'Blade' => Illuminate\Support\Facades\Blade::class,
+ 'Cache' => Illuminate\Support\Facades\Cache::class,
+ 'Config' => Illuminate\Support\Facades\Config::class,
+ 'Cookie' => Illuminate\Support\Facades\Cookie::class,
+ 'Crypt' => Illuminate\Support\Facades\Crypt::class,
+ 'DB' => Illuminate\Support\Facades\DB::class,
+ 'Eloquent' => Illuminate\Database\Eloquent\Model::class,
+ 'Event' => Illuminate\Support\Facades\Event::class,
+ 'File' => Illuminate\Support\Facades\File::class,
+ 'Gate' => Illuminate\Support\Facades\Gate::class,
+ 'Hash' => Illuminate\Support\Facades\Hash::class,
+ 'Lang' => Illuminate\Support\Facades\Lang::class,
+ 'Log' => Illuminate\Support\Facades\Log::class,
+ 'Mail' => Illuminate\Support\Facades\Mail::class,
+ 'Password' => Illuminate\Support\Facades\Password::class,
+ 'Queue' => Illuminate\Support\Facades\Queue::class,
+ 'Redirect' => Illuminate\Support\Facades\Redirect::class,
+ 'Redis' => Illuminate\Support\Facades\Redis::class,
+ 'Request' => Illuminate\Support\Facades\Request::class,
+ 'Response' => Illuminate\Support\Facades\Response::class,
+ 'Route' => Illuminate\Support\Facades\Route::class,
+ 'Schema' => Illuminate\Support\Facades\Schema::class,
+ 'Session' => Illuminate\Support\Facades\Session::class,
+ 'Storage' => Illuminate\Support\Facades\Storage::class,
+ 'URL' => Illuminate\Support\Facades\URL::class,
+ 'Validator' => Illuminate\Support\Facades\Validator::class,
+ 'View' => Illuminate\Support\Facades\View::class,
+
+ ],
+
+];
diff --git a/config/auth.php b/config/auth.php
new file mode 100644
index 0000000..3fa7f49
--- /dev/null
+++ b/config/auth.php
@@ -0,0 +1,107 @@
+ [
+ 'guard' => 'web',
+ 'passwords' => 'users',
+ ],
+
+ /*
+ |--------------------------------------------------------------------------
+ | Authentication Guards
+ |--------------------------------------------------------------------------
+ |
+ | Next, you may define every authentication guard for your application.
+ | Of course, a great default configuration has been defined for you
+ | here which uses session storage and the Eloquent user provider.
+ |
+ | All authentication drivers have a user provider. This defines how the
+ | users are actually retrieved out of your database or other storage
+ | mechanisms used by this application to persist your user's data.
+ |
+ | Supported: "session", "token"
+ |
+ */
+
+ 'guards' => [
+ 'web' => [
+ 'driver' => 'session',
+ 'provider' => 'users',
+ ],
+
+ 'api' => [
+ 'driver' => 'token',
+ 'provider' => 'users',
+ ],
+ ],
+
+ /*
+ |--------------------------------------------------------------------------
+ | User Providers
+ |--------------------------------------------------------------------------
+ |
+ | All authentication drivers have a user provider. This defines how the
+ | users are actually retrieved out of your database or other storage
+ | mechanisms used by this application to persist your user's data.
+ |
+ | If you have multiple user tables or models you may configure multiple
+ | sources which represent each model / table. These sources may then
+ | be assigned to any extra authentication guards you have defined.
+ |
+ | Supported: "database", "eloquent"
+ |
+ */
+
+ 'providers' => [
+ 'users' => [
+ 'driver' => 'eloquent',
+ 'model' => App\User::class,
+ ],
+
+ // 'users' => [
+ // 'driver' => 'database',
+ // 'table' => 'users',
+ // ],
+ ],
+
+ /*
+ |--------------------------------------------------------------------------
+ | Resetting Passwords
+ |--------------------------------------------------------------------------
+ |
+ | Here you may set the options for resetting passwords including the view
+ | that is your password reset e-mail. You may also set the name of the
+ | table that maintains all of the reset tokens for your application.
+ |
+ | You may specify multiple password reset configurations if you have more
+ | than one user table or model in the application and you want to have
+ | separate password reset settings based on the specific user types.
+ |
+ | The expire time is the number of minutes that the reset token should be
+ | considered valid. This security feature keeps tokens short-lived so
+ | they have less time to be guessed. You may change this as needed.
+ |
+ */
+
+ 'passwords' => [
+ 'users' => [
+ 'provider' => 'users',
+ 'email' => 'auth.emails.password',
+ 'table' => 'password_resets',
+ 'expire' => 60,
+ ],
+ ],
+
+];
diff --git a/config/broadcasting.php b/config/broadcasting.php
new file mode 100644
index 0000000..abaaac3
--- /dev/null
+++ b/config/broadcasting.php
@@ -0,0 +1,52 @@
+ env('BROADCAST_DRIVER', 'pusher'),
+
+ /*
+ |--------------------------------------------------------------------------
+ | Broadcast Connections
+ |--------------------------------------------------------------------------
+ |
+ | Here you may define all of the broadcast connections that will be used
+ | to broadcast events to other systems or over websockets. Samples of
+ | each available type of connection are provided inside this array.
+ |
+ */
+
+ 'connections' => [
+
+ 'pusher' => [
+ 'driver' => 'pusher',
+ 'key' => env('PUSHER_KEY'),
+ 'secret' => env('PUSHER_SECRET'),
+ 'app_id' => env('PUSHER_APP_ID'),
+ 'options' => [
+ //
+ ],
+ ],
+
+ 'redis' => [
+ 'driver' => 'redis',
+ 'connection' => 'default',
+ ],
+
+ 'log' => [
+ 'driver' => 'log',
+ ],
+
+ ],
+
+];
diff --git a/config/cache.php b/config/cache.php
new file mode 100644
index 0000000..3ffa840
--- /dev/null
+++ b/config/cache.php
@@ -0,0 +1,81 @@
+ env('CACHE_DRIVER', 'file'),
+
+ /*
+ |--------------------------------------------------------------------------
+ | Cache Stores
+ |--------------------------------------------------------------------------
+ |
+ | Here you may define all of the cache "stores" for your application as
+ | well as their drivers. You may even define multiple stores for the
+ | same cache driver to group types of items stored in your caches.
+ |
+ */
+
+ 'stores' => [
+
+ 'apc' => [
+ 'driver' => 'apc',
+ ],
+
+ 'array' => [
+ 'driver' => 'array',
+ ],
+
+ 'database' => [
+ 'driver' => 'database',
+ 'table' => 'cache',
+ 'connection' => null,
+ ],
+
+ 'file' => [
+ 'driver' => 'file',
+ 'path' => storage_path('framework/cache'),
+ ],
+
+ 'memcached' => [
+ 'driver' => 'memcached',
+ 'servers' => [
+ [
+ 'host' => env('MEMCACHED_HOST', '127.0.0.1'),
+ 'port' => env('MEMCACHED_PORT', 11211),
+ 'weight' => 100,
+ ],
+ ],
+ ],
+
+ 'redis' => [
+ 'driver' => 'redis',
+ 'connection' => 'default',
+ ],
+
+ ],
+
+ /*
+ |--------------------------------------------------------------------------
+ | Cache Key Prefix
+ |--------------------------------------------------------------------------
+ |
+ | When utilizing a RAM based store such as APC or Memcached, there might
+ | be other applications utilizing the same cache. So, we'll specify a
+ | value to get prefixed to all our keys so we can avoid collisions.
+ |
+ */
+
+ 'prefix' => 'laravel',
+
+];
diff --git a/config/compile.php b/config/compile.php
new file mode 100644
index 0000000..04807ea
--- /dev/null
+++ b/config/compile.php
@@ -0,0 +1,35 @@
+ [
+ //
+ ],
+
+ /*
+ |--------------------------------------------------------------------------
+ | Compiled File Providers
+ |--------------------------------------------------------------------------
+ |
+ | Here you may list service providers which define a "compiles" function
+ | that returns additional files that should be compiled, providing an
+ | easy way to get common files from any packages you are utilizing.
+ |
+ */
+
+ 'providers' => [
+ //
+ ],
+
+];
diff --git a/config/database.php b/config/database.php
new file mode 100644
index 0000000..d3931f9
--- /dev/null
+++ b/config/database.php
@@ -0,0 +1,120 @@
+ PDO::FETCH_CLASS,
+
+ /*
+ |--------------------------------------------------------------------------
+ | Default Database Connection Name
+ |--------------------------------------------------------------------------
+ |
+ | Here you may specify which of the database connections below you wish
+ | to use as your default connection for all database work. Of course
+ | you may use many connections at once using the Database library.
+ |
+ */
+
+ 'default' => env('DB_CONNECTION', 'mysql'),
+
+ /*
+ |--------------------------------------------------------------------------
+ | Database Connections
+ |--------------------------------------------------------------------------
+ |
+ | Here are each of the database connections setup for your application.
+ | Of course, examples of configuring each database platform that is
+ | supported by Laravel is shown below to make development simple.
+ |
+ |
+ | All database work in Laravel is done through the PHP PDO facilities
+ | so make sure you have the driver for your particular database of
+ | choice installed on your machine before you begin development.
+ |
+ */
+
+ 'connections' => [
+
+ 'sqlite' => [
+ 'driver' => 'sqlite',
+ 'database' => env('DB_DATABASE', database_path('database.sqlite')),
+ 'prefix' => '',
+ ],
+
+ 'mysql' => [
+ 'driver' => 'mysql',
+ 'host' => env('DB_HOST', ''),
+ 'port' => env('DB_PORT', '3306'),
+ 'database' => env('DB_DATABASE', ''),
+ 'username' => env('DB_USERNAME', ''),
+ 'password' => env('DB_PASSWORD', ''),
+ 'charset' => 'utf8',
+ 'collation' => 'utf8_unicode_ci',
+ 'prefix' => '',
+ 'strict' => false,
+ 'engine' => null,
+ ],
+
+ 'pgsql' => [
+ 'driver' => 'pgsql',
+ 'host' => env('DB_HOST', 'localhost'),
+ 'port' => env('DB_PORT', '5432'),
+ 'database' => env('DB_DATABASE', 'forge'),
+ 'username' => env('DB_USERNAME', 'forge'),
+ 'password' => env('DB_PASSWORD', ''),
+ 'charset' => 'utf8',
+ 'prefix' => '',
+ 'schema' => 'public',
+ ],
+
+ ],
+
+ /*
+ |--------------------------------------------------------------------------
+ | Migration Repository Table
+ |--------------------------------------------------------------------------
+ |
+ | This table keeps track of all the migrations that have already run for
+ | your application. Using this information, we can determine which of
+ | the migrations on disk haven't actually been run in the database.
+ |
+ */
+
+ 'migrations' => 'migrations',
+
+ /*
+ |--------------------------------------------------------------------------
+ | Redis Databases
+ |--------------------------------------------------------------------------
+ |
+ | Redis is an open source, fast, and advanced key-value store that also
+ | provides a richer set of commands than a typical key-value systems
+ | such as APC or Memcached. Laravel makes it easy to dig right in.
+ |
+ */
+
+ 'redis' => [
+
+ 'cluster' => false,
+
+ 'default' => [
+ 'host' => env('REDIS_HOST', 'localhost'),
+ 'password' => env('REDIS_PASSWORD', null),
+ 'port' => env('REDIS_PORT', 6379),
+ 'database' => 0,
+ ],
+
+ ],
+
+];
diff --git a/config/filesystems.php b/config/filesystems.php
new file mode 100644
index 0000000..75b5002
--- /dev/null
+++ b/config/filesystems.php
@@ -0,0 +1,67 @@
+ 'local',
+
+ /*
+ |--------------------------------------------------------------------------
+ | Default Cloud Filesystem Disk
+ |--------------------------------------------------------------------------
+ |
+ | Many applications store files both locally and in the cloud. For this
+ | reason, you may specify a default "cloud" driver here. This driver
+ | will be bound as the Cloud disk implementation in the container.
+ |
+ */
+
+ 'cloud' => 's3',
+
+ /*
+ |--------------------------------------------------------------------------
+ | Filesystem Disks
+ |--------------------------------------------------------------------------
+ |
+ | Here you may configure as many filesystem "disks" as you wish, and you
+ | may even configure multiple disks of the same driver. Defaults have
+ | been setup for each driver as an example of the required options.
+ |
+ */
+
+ 'disks' => [
+
+ 'local' => [
+ 'driver' => 'local',
+ 'root' => storage_path('app'),
+ ],
+
+ 'public' => [
+ 'driver' => 'local',
+ 'root' => storage_path('app/public'),
+ 'visibility' => 'public',
+ ],
+
+ 's3' => [
+ 'driver' => 's3',
+ 'key' => 'your-key',
+ 'secret' => 'your-secret',
+ 'region' => 'your-region',
+ 'bucket' => 'your-bucket',
+ ],
+
+ ],
+
+];
diff --git a/config/mail.php b/config/mail.php
new file mode 100644
index 0000000..a076588
--- /dev/null
+++ b/config/mail.php
@@ -0,0 +1,112 @@
+ env('MAIL_DRIVER', 'smtp'),
+
+ /*
+ |--------------------------------------------------------------------------
+ | SMTP Host Address
+ |--------------------------------------------------------------------------
+ |
+ | Here you may provide the host address of the SMTP server used by your
+ | applications. A default option is provided that is compatible with
+ | the Mailgun mail service which will provide reliable deliveries.
+ |
+ */
+
+ 'host' => env('MAIL_HOST', 'smtp.mailgun.org'),
+
+ /*
+ |--------------------------------------------------------------------------
+ | SMTP Host Port
+ |--------------------------------------------------------------------------
+ |
+ | This is the SMTP port used by your application to deliver e-mails to
+ | users of the application. Like the host we have set this value to
+ | stay compatible with the Mailgun e-mail application by default.
+ |
+ */
+
+ 'port' => env('MAIL_PORT', 587),
+
+ /*
+ |--------------------------------------------------------------------------
+ | Global "From" Address
+ |--------------------------------------------------------------------------
+ |
+ | You may wish for all e-mails sent by your application to be sent from
+ | the same address. Here, you may specify a name and address that is
+ | used globally for all e-mails that are sent by your application.
+ |
+ */
+
+ 'from' => ['address' => null, 'name' => null],
+
+ /*
+ |--------------------------------------------------------------------------
+ | E-Mail Encryption Protocol
+ |--------------------------------------------------------------------------
+ |
+ | Here you may specify the encryption protocol that should be used when
+ | the application send e-mail messages. A sensible default using the
+ | transport layer security protocol should provide great security.
+ |
+ */
+
+ 'encryption' => env('MAIL_ENCRYPTION', 'tls'),
+
+ /*
+ |--------------------------------------------------------------------------
+ | SMTP Server Username
+ |--------------------------------------------------------------------------
+ |
+ | If your SMTP server requires a username for authentication, you should
+ | set it here. This will get used to authenticate with your server on
+ | connection. You may also set the "password" value below this one.
+ |
+ */
+
+ 'username' => env('MAIL_USERNAME'),
+
+ /*
+ |--------------------------------------------------------------------------
+ | SMTP Server Password
+ |--------------------------------------------------------------------------
+ |
+ | Here you may set the password required by your SMTP server to send out
+ | messages from your application. This will be given to the server on
+ | connection so that the application will be able to send messages.
+ |
+ */
+
+ 'password' => env('MAIL_PASSWORD'),
+
+ /*
+ |--------------------------------------------------------------------------
+ | Sendmail System Path
+ |--------------------------------------------------------------------------
+ |
+ | When using the "sendmail" driver to send e-mails, we will need to know
+ | the path to where Sendmail lives on this server. A default path has
+ | been provided here, which will work well on most of your systems.
+ |
+ */
+
+ 'sendmail' => '/usr/sbin/sendmail -bs',
+
+];
diff --git a/config/queue.php b/config/queue.php
new file mode 100644
index 0000000..d0f732a
--- /dev/null
+++ b/config/queue.php
@@ -0,0 +1,85 @@
+ env('QUEUE_DRIVER', 'sync'),
+
+ /*
+ |--------------------------------------------------------------------------
+ | Queue Connections
+ |--------------------------------------------------------------------------
+ |
+ | Here you may configure the connection information for each server that
+ | is used by your application. A default configuration has been added
+ | for each back-end shipped with Laravel. You are free to add more.
+ |
+ */
+
+ 'connections' => [
+
+ 'sync' => [
+ 'driver' => 'sync',
+ ],
+
+ 'database' => [
+ 'driver' => 'database',
+ 'table' => 'jobs',
+ 'queue' => 'default',
+ 'expire' => 60,
+ ],
+
+ 'beanstalkd' => [
+ 'driver' => 'beanstalkd',
+ 'host' => 'localhost',
+ 'queue' => 'default',
+ 'ttr' => 60,
+ ],
+
+ 'sqs' => [
+ 'driver' => 'sqs',
+ 'key' => 'your-public-key',
+ 'secret' => 'your-secret-key',
+ 'prefix' => 'https://sqs.us-east-1.amazonaws.com/your-account-id',
+ 'queue' => 'your-queue-name',
+ 'region' => 'us-east-1',
+ ],
+
+ 'redis' => [
+ 'driver' => 'redis',
+ 'connection' => 'default',
+ 'queue' => 'default',
+ 'expire' => 60,
+ ],
+
+ ],
+
+ /*
+ |--------------------------------------------------------------------------
+ | Failed Queue Jobs
+ |--------------------------------------------------------------------------
+ |
+ | These options configure the behavior of failed queue job logging so you
+ | can control which database and table are used to store the jobs that
+ | have failed. You may change them to any database / table you wish.
+ |
+ */
+
+ 'failed' => [
+ 'database' => env('DB_CONNECTION', 'mysql'),
+ 'table' => 'failed_jobs',
+ ],
+
+];
diff --git a/config/services.php b/config/services.php
new file mode 100644
index 0000000..287b118
--- /dev/null
+++ b/config/services.php
@@ -0,0 +1,38 @@
+ [
+ 'domain' => env('MAILGUN_DOMAIN'),
+ 'secret' => env('MAILGUN_SECRET'),
+ ],
+
+ 'ses' => [
+ 'key' => env('SES_KEY'),
+ 'secret' => env('SES_SECRET'),
+ 'region' => 'us-east-1',
+ ],
+
+ 'sparkpost' => [
+ 'secret' => env('SPARKPOST_SECRET'),
+ ],
+
+ 'stripe' => [
+ 'model' => App\User::class,
+ 'key' => env('STRIPE_KEY'),
+ 'secret' => env('STRIPE_SECRET'),
+ ],
+
+];
diff --git a/config/session.php b/config/session.php
new file mode 100644
index 0000000..b501055
--- /dev/null
+++ b/config/session.php
@@ -0,0 +1,166 @@
+ env('SESSION_DRIVER', 'file'),
+
+ /*
+ |--------------------------------------------------------------------------
+ | Session Lifetime
+ |--------------------------------------------------------------------------
+ |
+ | Here you may specify the number of minutes that you wish the session
+ | to be allowed to remain idle before it expires. If you want them
+ | to immediately expire on the browser closing, set that option.
+ |
+ */
+
+ 'lifetime' => 120,
+
+ 'expire_on_close' => false,
+
+ /*
+ |--------------------------------------------------------------------------
+ | Session Encryption
+ |--------------------------------------------------------------------------
+ |
+ | This option allows you to easily specify that all of your session data
+ | should be encrypted before it is stored. All encryption will be run
+ | automatically by Laravel and you can use the Session like normal.
+ |
+ */
+
+ 'encrypt' => false,
+
+ /*
+ |--------------------------------------------------------------------------
+ | Session File Location
+ |--------------------------------------------------------------------------
+ |
+ | When using the native session driver, we need a location where session
+ | files may be stored. A default has been set for you but a different
+ | location may be specified. This is only needed for file sessions.
+ |
+ */
+
+ 'files' => storage_path('framework/sessions'),
+
+ /*
+ |--------------------------------------------------------------------------
+ | Session Database Connection
+ |--------------------------------------------------------------------------
+ |
+ | When using the "database" or "redis" session drivers, you may specify a
+ | connection that should be used to manage these sessions. This should
+ | correspond to a connection in your database configuration options.
+ |
+ */
+
+ 'connection' => null,
+
+ /*
+ |--------------------------------------------------------------------------
+ | Session Database Table
+ |--------------------------------------------------------------------------
+ |
+ | When using the "database" session driver, you may specify the table we
+ | should use to manage the sessions. Of course, a sensible default is
+ | provided for you; however, you are free to change this as needed.
+ |
+ */
+
+ 'table' => 'sessions',
+
+ /*
+ |--------------------------------------------------------------------------
+ | Session Sweeping Lottery
+ |--------------------------------------------------------------------------
+ |
+ | Some session drivers must manually sweep their storage location to get
+ | rid of old sessions from storage. Here are the chances that it will
+ | happen on a given request. By default, the odds are 2 out of 100.
+ |
+ */
+
+ 'lottery' => [2, 100],
+
+ /*
+ |--------------------------------------------------------------------------
+ | Session Cookie Name
+ |--------------------------------------------------------------------------
+ |
+ | Here you may change the name of the cookie used to identify a session
+ | instance by ID. The name specified here will get used every time a
+ | new session cookie is created by the framework for every driver.
+ |
+ */
+
+ 'cookie' => 'laravel_session',
+
+ /*
+ |--------------------------------------------------------------------------
+ | Session Cookie Path
+ |--------------------------------------------------------------------------
+ |
+ | The session cookie path determines the path for which the cookie will
+ | be regarded as available. Typically, this will be the root path of
+ | your application but you are free to change this when necessary.
+ |
+ */
+
+ 'path' => '/',
+
+ /*
+ |--------------------------------------------------------------------------
+ | Session Cookie Domain
+ |--------------------------------------------------------------------------
+ |
+ | Here you may change the domain of the cookie used to identify a session
+ | in your application. This will determine which domains the cookie is
+ | available to in your application. A sensible default has been set.
+ |
+ */
+
+ 'domain' => null,
+
+ /*
+ |--------------------------------------------------------------------------
+ | HTTPS Only Cookies
+ |--------------------------------------------------------------------------
+ |
+ | By setting this option to true, session cookies will only be sent back
+ | to the server if the browser has a HTTPS connection. This will keep
+ | the cookie from being sent to you if it can not be done securely.
+ |
+ */
+
+ 'secure' => false,
+
+ /*
+ |--------------------------------------------------------------------------
+ | HTTP Access Only
+ |--------------------------------------------------------------------------
+ |
+ | Setting this value to true will prevent JavaScript from accessing the
+ | value of the cookie and the cookie will only be accessible through
+ | the HTTP protocol. You are free to modify this option if needed.
+ |
+ */
+
+ 'http_only' => true,
+
+];
diff --git a/config/view.php b/config/view.php
new file mode 100644
index 0000000..e193ab6
--- /dev/null
+++ b/config/view.php
@@ -0,0 +1,33 @@
+ [
+ realpath(base_path('resources/views')),
+ ],
+
+ /*
+ |--------------------------------------------------------------------------
+ | Compiled View Path
+ |--------------------------------------------------------------------------
+ |
+ | This option determines where all the compiled Blade templates will be
+ | stored for your application. Typically, this is within the storage
+ | directory. However, as usual, you are free to change this value.
+ |
+ */
+
+ 'compiled' => realpath(storage_path('framework/views')),
+
+];
diff --git a/database/.gitignore b/database/.gitignore
new file mode 100644
index 0000000..9b1dffd
--- /dev/null
+++ b/database/.gitignore
@@ -0,0 +1 @@
+*.sqlite
diff --git a/database/factories/ModelFactory.php b/database/factories/ModelFactory.php
new file mode 100644
index 0000000..f596d0b
--- /dev/null
+++ b/database/factories/ModelFactory.php
@@ -0,0 +1,21 @@
+define(App\User::class, function (Faker\Generator $faker) {
+ return [
+ 'name' => $faker->name,
+ 'email' => $faker->safeEmail,
+ 'password' => bcrypt(str_random(10)),
+ 'remember_token' => str_random(10),
+ ];
+});
diff --git a/database/migrations/.gitkeep b/database/migrations/.gitkeep
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/database/migrations/.gitkeep
@@ -0,0 +1 @@
+
diff --git a/database/migrations/2014_10_12_000000_create_users_table.php b/database/migrations/2014_10_12_000000_create_users_table.php
new file mode 100644
index 0000000..59aa01a
--- /dev/null
+++ b/database/migrations/2014_10_12_000000_create_users_table.php
@@ -0,0 +1,34 @@
+increments('id');
+ $table->string('name');
+ $table->string('email')->unique();
+ $table->string('password');
+ $table->rememberToken();
+ $table->timestamps();
+ });
+ }
+
+ /**
+ * Reverse the migrations.
+ *
+ * @return void
+ */
+ public function down()
+ {
+ Schema::drop('users');
+ }
+}
diff --git a/database/migrations/2014_10_12_100000_create_password_resets_table.php b/database/migrations/2014_10_12_100000_create_password_resets_table.php
new file mode 100644
index 0000000..00057f9
--- /dev/null
+++ b/database/migrations/2014_10_12_100000_create_password_resets_table.php
@@ -0,0 +1,31 @@
+string('email')->index();
+ $table->string('token')->index();
+ $table->timestamp('created_at');
+ });
+ }
+
+ /**
+ * Reverse the migrations.
+ *
+ * @return void
+ */
+ public function down()
+ {
+ Schema::drop('password_resets');
+ }
+}
diff --git a/database/migrations/2016_06_08_114159_catchmigration.php b/database/migrations/2016_06_08_114159_catchmigration.php
new file mode 100644
index 0000000..7a1dd97
--- /dev/null
+++ b/database/migrations/2016_06_08_114159_catchmigration.php
@@ -0,0 +1,48 @@
+increments('id');
+ $table->unsignedMediumInteger('externalid');
+ $table->string('first_name');
+ $table->string('last_name');
+ $table->string('email');
+ $table->enum('gender', ['Male', 'Female', 'Other']);
+ $table->string('ip_address');
+ $table->integer('company_id')->unsigned()->nullable();
+ $table->string('city');
+ $table->string('title');
+ $table->string('website');
+ $table->timestamps();
+
+ $table->foreign('company_id')->references('id')->on('profiles');
+ });
+ Schema::create('companies', function (Blueprint $table) {
+ $table->increments('id');
+ $table->string('name');
+ $table->timestamps();
+ });
+ //
+ }
+
+ /**
+ * Reverse the migrations.
+ *
+ * @return void
+ */
+ public function down()
+ {
+ //
+ }
+}
diff --git a/database/seeds/.gitkeep b/database/seeds/.gitkeep
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/database/seeds/.gitkeep
@@ -0,0 +1 @@
+
diff --git a/database/seeds/DatabaseSeeder.php b/database/seeds/DatabaseSeeder.php
new file mode 100644
index 0000000..e119db6
--- /dev/null
+++ b/database/seeds/DatabaseSeeder.php
@@ -0,0 +1,16 @@
+call(UsersTableSeeder::class);
+ }
+}
diff --git a/gulpfile.js b/gulpfile.js
new file mode 100644
index 0000000..dc6f1eb
--- /dev/null
+++ b/gulpfile.js
@@ -0,0 +1,16 @@
+var elixir = require('laravel-elixir');
+
+/*
+ |--------------------------------------------------------------------------
+ | Elixir Asset Management
+ |--------------------------------------------------------------------------
+ |
+ | Elixir provides a clean, fluent API for defining some basic Gulp tasks
+ | for your Laravel application. By default, we are compiling the Sass
+ | file for our application, as well as publishing vendor resources.
+ |
+ */
+
+elixir(function(mix) {
+ mix.sass('app.scss');
+});
diff --git a/index.php b/index.php
new file mode 100644
index 0000000..376c289
--- /dev/null
+++ b/index.php
@@ -0,0 +1,4 @@
+
+
+
+
+ ./tests
+
+
+
+
+ ./app
+
+ ./app/Http/routes.php
+
+
+
+
+
+
+
+
+
+
diff --git a/public/.htaccess b/public/.htaccess
new file mode 100644
index 0000000..903f639
--- /dev/null
+++ b/public/.htaccess
@@ -0,0 +1,20 @@
+
+
+ Options -MultiViews
+
+
+ RewriteEngine On
+
+ # Redirect Trailing Slashes If Not A Folder...
+ RewriteCond %{REQUEST_FILENAME} !-d
+ RewriteRule ^(.*)/$ /$1 [L,R=301]
+
+ # Handle Front Controller...
+ RewriteCond %{REQUEST_FILENAME} !-d
+ RewriteCond %{REQUEST_FILENAME} !-f
+ RewriteRule ^ index.php [L]
+
+ # Handle Authorization Header
+ RewriteCond %{HTTP:Authorization} .
+ RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
+
diff --git a/public/app.js b/public/app.js
new file mode 100644
index 0000000..5e89c14
--- /dev/null
+++ b/public/app.js
@@ -0,0 +1,27 @@
+jQuery(document).ready(function(){
+
+ jQuery.ajax({
+ url: "loadprofiles",
+ dataType: "json"
+ }).done(function(data){
+ var datalength = data.length;
+ var tablebody = jQuery("#profile-table-body");
+ for(var i = 0; i < datalength; i++){
+ //Depending on future functionality develop a 'class' for profile client side
+ var tablerow = '
' +
+ '
' + data[i].externalid + '
' +
+ '
' + data[i].firstname + '
' +
+ '
' + data[i].lastname + '
' +
+ '
' + data[i].email + '
' +
+ '
' + data[i].gender + '
' +
+ '
' + data[i].ip_address + '
' +
+ '
' + data[i].company + '
' +
+ '
' + data[i].city + '
' +
+ '
' + data[i].title + '
' +
+ '
' + data[i].website + '
' +
+ '
';
+ tablebody.append(tablerow);
+ }
+ });
+
+});
diff --git a/public/favicon.ico b/public/favicon.ico
new file mode 100644
index 0000000..e69de29
diff --git a/public/index.php b/public/index.php
new file mode 100644
index 0000000..c582053
--- /dev/null
+++ b/public/index.php
@@ -0,0 +1,58 @@
+
+ */
+
+/*
+|--------------------------------------------------------------------------
+| Register The Auto Loader
+|--------------------------------------------------------------------------
+|
+| Composer provides a convenient, automatically generated class loader for
+| our application. We just need to utilize it! We'll simply require it
+| into the script here so that we don't have to worry about manual
+| loading any of our classes later on. It feels nice to relax.
+|
+*/
+
+require __DIR__.'/../bootstrap/autoload.php';
+
+/*
+|--------------------------------------------------------------------------
+| Turn On The Lights
+|--------------------------------------------------------------------------
+|
+| We need to illuminate PHP development, so let us turn on the lights.
+| This bootstraps the framework and gets it ready for use, then it
+| will load up this application so that we can run it and send
+| the responses back to the browser and delight our users.
+|
+*/
+
+$app = require_once __DIR__.'/../bootstrap/app.php';
+
+/*
+|--------------------------------------------------------------------------
+| Run The Application
+|--------------------------------------------------------------------------
+|
+| Once we have the application, we can handle the incoming request
+| through the kernel, and send the associated response back to
+| the client's browser allowing them to enjoy the creative
+| and wonderful application we have prepared for them.
+|
+*/
+
+$kernel = $app->make(Illuminate\Contracts\Http\Kernel::class);
+
+$response = $kernel->handle(
+ $request = Illuminate\Http\Request::capture()
+);
+
+$response->send();
+
+$kernel->terminate($request, $response);
diff --git a/public/main.css b/public/main.css
new file mode 100644
index 0000000..20d2fc0
--- /dev/null
+++ b/public/main.css
@@ -0,0 +1,38 @@
+#profile-table {
+ width: 1170px;
+ max-width:1170px;
+}
+td {
+ word-break: break-all;
+}
+
+td:nth-child(1), th:nth-child(1) {
+ width: 4%;
+}
+td:nth-child(2), th:nth-child(2) {
+ width: 8%;
+}
+td:nth-child(3), th:nth-child(3) {
+ width: 8%;
+}
+td:nth-child(4), th:nth-child(4) {
+ width: 12%;
+}
+td:nth-child(5), th:nth-child(5) {
+ width: 10%;
+}
+td:nth-child(6), th:nth-child(6) {
+ width: 12%;
+}
+td:nth-child(7), th:nth-child(7) {
+ width: 8%;
+}
+td:nth-child(8), th:nth-child(8) {
+ width: 8%;
+}
+td:nth-child(9), th:nth-child(9) {
+ width: 10%;
+}
+td:nth-child(10), th:nth-child(10) {
+ width: 20%;
+}
diff --git a/public/robots.txt b/public/robots.txt
new file mode 100644
index 0000000..eb05362
--- /dev/null
+++ b/public/robots.txt
@@ -0,0 +1,2 @@
+User-agent: *
+Disallow:
diff --git a/public/web.config b/public/web.config
new file mode 100644
index 0000000..624c176
--- /dev/null
+++ b/public/web.config
@@ -0,0 +1,23 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/resources/assets/sass/app.scss b/resources/assets/sass/app.scss
new file mode 100644
index 0000000..bb76e29
--- /dev/null
+++ b/resources/assets/sass/app.scss
@@ -0,0 +1,2 @@
+// @import "node_modules/bootstrap-sass/assets/stylesheets/bootstrap";
+
diff --git a/resources/lang/en/auth.php b/resources/lang/en/auth.php
new file mode 100644
index 0000000..e5506df
--- /dev/null
+++ b/resources/lang/en/auth.php
@@ -0,0 +1,19 @@
+ 'These credentials do not match our records.',
+ 'throttle' => 'Too many login attempts. Please try again in :seconds seconds.',
+
+];
diff --git a/resources/lang/en/pagination.php b/resources/lang/en/pagination.php
new file mode 100644
index 0000000..fcab34b
--- /dev/null
+++ b/resources/lang/en/pagination.php
@@ -0,0 +1,19 @@
+ '« Previous',
+ 'next' => 'Next »',
+
+];
diff --git a/resources/lang/en/passwords.php b/resources/lang/en/passwords.php
new file mode 100644
index 0000000..e5544d2
--- /dev/null
+++ b/resources/lang/en/passwords.php
@@ -0,0 +1,22 @@
+ 'Passwords must be at least six characters and match the confirmation.',
+ 'reset' => 'Your password has been reset!',
+ 'sent' => 'We have e-mailed your password reset link!',
+ 'token' => 'This password reset token is invalid.',
+ 'user' => "We can't find a user with that e-mail address.",
+
+];
diff --git a/resources/lang/en/validation.php b/resources/lang/en/validation.php
new file mode 100644
index 0000000..b1e6120
--- /dev/null
+++ b/resources/lang/en/validation.php
@@ -0,0 +1,113 @@
+ 'The :attribute must be accepted.',
+ 'active_url' => 'The :attribute is not a valid URL.',
+ 'after' => 'The :attribute must be a date after :date.',
+ 'alpha' => 'The :attribute may only contain letters.',
+ 'alpha_dash' => 'The :attribute may only contain letters, numbers, and dashes.',
+ 'alpha_num' => 'The :attribute may only contain letters and numbers.',
+ 'array' => 'The :attribute must be an array.',
+ 'before' => 'The :attribute must be a date before :date.',
+ 'between' => [
+ 'numeric' => 'The :attribute must be between :min and :max.',
+ 'file' => 'The :attribute must be between :min and :max kilobytes.',
+ 'string' => 'The :attribute must be between :min and :max characters.',
+ 'array' => 'The :attribute must have between :min and :max items.',
+ ],
+ 'boolean' => 'The :attribute field must be true or false.',
+ 'confirmed' => 'The :attribute confirmation does not match.',
+ 'date' => 'The :attribute is not a valid date.',
+ 'date_format' => 'The :attribute does not match the format :format.',
+ 'different' => 'The :attribute and :other must be different.',
+ 'digits' => 'The :attribute must be :digits digits.',
+ 'digits_between' => 'The :attribute must be between :min and :max digits.',
+ 'distinct' => 'The :attribute field has a duplicate value.',
+ 'email' => 'The :attribute must be a valid email address.',
+ 'exists' => 'The selected :attribute is invalid.',
+ 'filled' => 'The :attribute field is required.',
+ 'image' => 'The :attribute must be an image.',
+ 'in' => 'The selected :attribute is invalid.',
+ 'in_array' => 'The :attribute field does not exist in :other.',
+ 'integer' => 'The :attribute must be an integer.',
+ 'ip' => 'The :attribute must be a valid IP address.',
+ 'json' => 'The :attribute must be a valid JSON string.',
+ 'max' => [
+ 'numeric' => 'The :attribute may not be greater than :max.',
+ 'file' => 'The :attribute may not be greater than :max kilobytes.',
+ 'string' => 'The :attribute may not be greater than :max characters.',
+ 'array' => 'The :attribute may not have more than :max items.',
+ ],
+ 'mimes' => 'The :attribute must be a file of type: :values.',
+ 'min' => [
+ 'numeric' => 'The :attribute must be at least :min.',
+ 'file' => 'The :attribute must be at least :min kilobytes.',
+ 'string' => 'The :attribute must be at least :min characters.',
+ 'array' => 'The :attribute must have at least :min items.',
+ ],
+ 'not_in' => 'The selected :attribute is invalid.',
+ 'numeric' => 'The :attribute must be a number.',
+ 'present' => 'The :attribute field must be present.',
+ 'regex' => 'The :attribute format is invalid.',
+ 'required' => 'The :attribute field is required.',
+ 'required_if' => 'The :attribute field is required when :other is :value.',
+ 'required_unless' => 'The :attribute field is required unless :other is in :values.',
+ 'required_with' => 'The :attribute field is required when :values is present.',
+ 'required_with_all' => 'The :attribute field is required when :values is present.',
+ 'required_without' => 'The :attribute field is required when :values is not present.',
+ 'required_without_all' => 'The :attribute field is required when none of :values are present.',
+ 'same' => 'The :attribute and :other must match.',
+ 'size' => [
+ 'numeric' => 'The :attribute must be :size.',
+ 'file' => 'The :attribute must be :size kilobytes.',
+ 'string' => 'The :attribute must be :size characters.',
+ 'array' => 'The :attribute must contain :size items.',
+ ],
+ 'string' => 'The :attribute must be a string.',
+ 'timezone' => 'The :attribute must be a valid zone.',
+ 'unique' => 'The :attribute has already been taken.',
+ 'url' => 'The :attribute format is invalid.',
+
+ /*
+ |--------------------------------------------------------------------------
+ | Custom Validation Language Lines
+ |--------------------------------------------------------------------------
+ |
+ | Here you may specify custom validation messages for attributes using the
+ | convention "attribute.rule" to name the lines. This makes it quick to
+ | specify a specific custom language line for a given attribute rule.
+ |
+ */
+
+ 'custom' => [
+ 'attribute-name' => [
+ 'rule-name' => 'custom-message',
+ ],
+ ],
+
+ /*
+ |--------------------------------------------------------------------------
+ | Custom Validation Attributes
+ |--------------------------------------------------------------------------
+ |
+ | The following language lines are used to swap attribute place-holders
+ | with something more reader friendly such as E-Mail Address instead
+ | of "email". This simply helps us make messages a little cleaner.
+ |
+ */
+
+ 'attributes' => [],
+
+];
diff --git a/resources/views/errors/503.blade.php b/resources/views/errors/503.blade.php
new file mode 100644
index 0000000..4a41505
--- /dev/null
+++ b/resources/views/errors/503.blade.php
@@ -0,0 +1,47 @@
+
+
+
+ Be right back.
+
+
+
+
+
+
+