Combination of initial files and some new code for login and user registration.

This commit is contained in:
James Cole
2014-06-29 22:12:33 +02:00
parent a3a30bd5e1
commit 5d430e7dad
72 changed files with 9779 additions and 913 deletions

View File

@@ -1,99 +1,14 @@
<?php
return array(
/*
|--------------------------------------------------------------------------
| 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.
|
*/
return [
'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' => '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' => 'D93oqmVsIARg23FC3cbsHuBGk0uXQc3r',
'cipher' => MCRYPT_RIJNDAEL_128,
/*
|--------------------------------------------------------------------------
| 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' => array(
'providers' => [
'Illuminate\Foundation\Providers\ArtisanServiceProvider',
'Illuminate\Auth\AuthServiceProvider',
@@ -123,35 +38,11 @@ return array(
'Illuminate\Workbench\WorkbenchServiceProvider',
'Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider',
'Barryvdh\Debugbar\ServiceProvider',
),
/*
|--------------------------------------------------------------------------
| Service Provider Manifest
|--------------------------------------------------------------------------
|
| The service provider manifest is used by Laravel to lazy load service
| providers which are not needed for each request, as well to keep a
| list of all of the services. Here, you may set its storage spot.
|
*/
'Firefly\Storage\StorageServiceProvider',
'Firefly\Helper\HelperServiceProvider',
],
'manifest' => storage_path() . '/meta',
/*
|--------------------------------------------------------------------------
| 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' => array(
'aliases' => [
'App' => 'Illuminate\Support\Facades\App',
'Artisan' => 'Illuminate\Support\Facades\Artisan',
@@ -192,6 +83,6 @@ return array(
'Validator' => 'Illuminate\Support\Facades\Validator',
'View' => 'Illuminate\Support\Facades\View',
),
],
);
];

View File

@@ -1,71 +1,16 @@
<?php
return array(
return [
'driver' => 'eloquent',
'model' => 'User',
'table' => 'users',
'reminder' => [
'email' => 'emails.auth.reminder',
'table' => 'password_reminders',
'expire' => 60,
],
'verify_mail' => true,
'verify_reset' => true,
'allow_register' => true
/*
|--------------------------------------------------------------------------
| Default Authentication Driver
|--------------------------------------------------------------------------
|
| This option controls the authentication driver that will be utilized.
| This driver manages the retrieval and authentication of the users
| attempting to get access to protected areas of your application.
|
| Supported: "database", "eloquent"
|
*/
'driver' => 'eloquent',
/*
|--------------------------------------------------------------------------
| Authentication Model
|--------------------------------------------------------------------------
|
| When using the "Eloquent" authentication driver, we need to know which
| Eloquent model should be used to retrieve your users. Of course, it
| is often just the "User" model but you may use whatever you like.
|
*/
'model' => 'User',
/*
|--------------------------------------------------------------------------
| Authentication Table
|--------------------------------------------------------------------------
|
| When using the "Database" authentication driver, we need to know which
| table should be used to retrieve your users. We have chosen a basic
| default value but you may easily change it to any table you like.
|
*/
'table' => 'users',
/*
|--------------------------------------------------------------------------
| Password Reminder Settings
|--------------------------------------------------------------------------
|
| Here you may set the settings for password reminders, including a view
| that should be used as your password reminder e-mail. You will also
| be able to set the name of the table that holds the reset tokens.
|
| The "expire" time is the number of minutes that the reminder 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.
|
*/
'reminder' => array(
'email' => 'emails.auth.reminder',
'table' => 'password_reminders',
'expire' => 60,
),
);
];

View File

@@ -1,89 +1,12 @@
<?php
return array(
/*
|--------------------------------------------------------------------------
| Default Cache Driver
|--------------------------------------------------------------------------
|
| This option controls the default cache "driver" that will be used when
| using the Caching library. Of course, you may use other drivers any
| time you wish. This is the default when another is not specified.
|
| Supported: "file", "database", "apc", "memcached", "redis", "array"
|
*/
'driver' => 'file',
/*
|--------------------------------------------------------------------------
| File Cache Location
|--------------------------------------------------------------------------
|
| When using the "file" cache driver, we need a location where the cache
| files may be stored. A sensible default has been specified, but you
| are free to change it to any other place on disk that you desire.
|
*/
'path' => storage_path().'/cache',
/*
|--------------------------------------------------------------------------
| Database Cache Connection
|--------------------------------------------------------------------------
|
| When using the "database" cache driver you may specify the connection
| that should be used to store the cached items. When this option is
| null the default database connection will be utilized for cache.
|
*/
'connection' => null,
/*
|--------------------------------------------------------------------------
| Database Cache Table
|--------------------------------------------------------------------------
|
| When using the "database" cache driver we need to know the table that
| should be used to store the cached items. A default table name has
| been provided but you're free to change it however you deem fit.
|
*/
'table' => 'cache',
/*
|--------------------------------------------------------------------------
| Memcached Servers
|--------------------------------------------------------------------------
|
| Now you may specify an array of your Memcached servers that should be
| used when utilizing the Memcached cache driver. All of the servers
| should contain a value for "host", "port", and "weight" options.
|
*/
'memcached' => array(
array('host' => '127.0.0.1', 'port' => 11211, 'weight' => 100),
),
/*
|--------------------------------------------------------------------------
| 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',
);
return [
'driver' => 'file',
'path' => storage_path() . '/cache',
'connection' => null,
'table' => 'cache',
'memcached' => [
['host' => '127.0.0.1', 'port' => 11211, 'weight' => 100],
],
'prefix' => 'laravel',
];

View File

@@ -1,18 +1,3 @@
<?php
return array(
/*
|--------------------------------------------------------------------------
| Additional Compiled Classes
|--------------------------------------------------------------------------
|
| Here you may specify additional classes to include in the compiled file
| generated by the `artisan optimize` command. These should be classes
| that are included on basically every request into the application.
|
*/
);
return [];

View File

@@ -1,124 +1,38 @@
<?php
return array(
return [
'fetch' => PDO::FETCH_CLASS,
'default' => 'mysql',
'connections' => [
/*
|--------------------------------------------------------------------------
| PDO Fetch Style
|--------------------------------------------------------------------------
|
| By default, database results will be returned as instances of the PHP
| stdClass object; however, you may desire to retrieve records in an
| array format for simplicity. Here you can tweak the fetch style.
|
*/
'sqlite' => [
'driver' => 'sqlite',
'database' => __DIR__ . '/../database/production.sqlite',
'prefix' => '',
],
'fetch' => PDO::FETCH_CLASS,
'mysql' => [
'driver' => 'mysql',
'host' => 'localhost',
'database' => 'forge',
'username' => 'forge',
'password' => '',
'charset' => 'utf8',
'collation' => 'utf8_unicode_ci',
'prefix' => '',
],
],
'migrations' => 'migrations',
'redis' => [
/*
|--------------------------------------------------------------------------
| 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.
|
*/
'cluster' => false,
'default' => 'mysql',
'default' => [
'host' => '127.0.0.1',
'port' => 6379,
'database' => 0,
],
/*
|--------------------------------------------------------------------------
| 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' => array(
'sqlite' => array(
'driver' => 'sqlite',
'database' => __DIR__.'/../database/production.sqlite',
'prefix' => '',
),
'mysql' => array(
'driver' => 'mysql',
'host' => 'localhost',
'database' => 'forge',
'username' => 'forge',
'password' => '',
'charset' => 'utf8',
'collation' => 'utf8_unicode_ci',
'prefix' => '',
),
'pgsql' => array(
'driver' => 'pgsql',
'host' => 'localhost',
'database' => 'forge',
'username' => 'forge',
'password' => '',
'charset' => 'utf8',
'prefix' => '',
'schema' => 'public',
),
'sqlsrv' => array(
'driver' => 'sqlsrv',
'host' => 'localhost',
'database' => 'database',
'username' => 'root',
'password' => '',
'prefix' => '',
),
),
/*
|--------------------------------------------------------------------------
| 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' => array(
'cluster' => false,
'default' => array(
'host' => '127.0.0.1',
'port' => 6379,
'database' => 0,
),
),
);
];

View File

@@ -1,124 +1,13 @@
<?php
return array(
/*
|--------------------------------------------------------------------------
| Mail Driver
|--------------------------------------------------------------------------
|
| Laravel supports both SMTP and PHP's "mail" function as drivers for the
| sending of e-mail. You may specify which one you're using throughout
| your application here. By default, Laravel is setup for SMTP mail.
|
| Supported: "smtp", "mail", "sendmail", "mailgun", "mandrill", "log"
|
*/
'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' => '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' => 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' => array('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' => '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' => null,
/*
|--------------------------------------------------------------------------
| 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' => null,
/*
|--------------------------------------------------------------------------
| 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',
/*
|--------------------------------------------------------------------------
| Mail "Pretend"
|--------------------------------------------------------------------------
|
| When this option is enabled, e-mail will not actually be sent over the
| web and will instead be written to your application's logs files so
| you may inspect the message. This is great for local development.
|
*/
'pretend' => false,
);
return [
'driver' => 'smtp',
'host' => 'smtp.gmail.com',
'port' => 587,
'from' => ['address' => 'nder.firefly@gmail.com', 'name' => 'Firefly V'],
'encryption' => 'tls',
'username' => 'nder.firefly@gmail.com',
'password' => 'bzQj252LqefJnorN28dLzph7oNclXNEV986mjX',
'sendmail' => '/usr/sbin/sendmail -bs',
'pretend' => false,
];

View File

@@ -1,85 +1,45 @@
<?php
return array(
return [
'default' => 'sync',
'connections' => [
/*
|--------------------------------------------------------------------------
| Default Queue Driver
|--------------------------------------------------------------------------
|
| The Laravel queue API supports a variety of back-ends via an unified
| API, giving you convenient access to each back-end using the same
| syntax for each one. Here you may set the default queue driver.
|
| Supported: "sync", "beanstalkd", "sqs", "iron", "redis"
|
*/
'sync' => [
'driver' => 'sync',
],
'default' => 'sync',
'beanstalkd' => [
'driver' => 'beanstalkd',
'host' => 'localhost',
'queue' => 'default',
'ttr' => 60,
],
/*
|--------------------------------------------------------------------------
| 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.
|
*/
'sqs' => [
'driver' => 'sqs',
'key' => 'your-public-key',
'secret' => 'your-secret-key',
'queue' => 'your-queue-url',
'region' => 'us-east-1',
],
'connections' => array(
'iron' => [
'driver' => 'iron',
'host' => 'mq-aws-us-east-1.iron.io',
'token' => 'your-token',
'project' => 'your-project-id',
'queue' => 'your-queue-name',
'encrypt' => true,
],
'sync' => array(
'driver' => 'sync',
),
'redis' => [
'driver' => 'redis',
'queue' => 'default',
],
'beanstalkd' => array(
'driver' => 'beanstalkd',
'host' => 'localhost',
'queue' => 'default',
'ttr' => 60,
),
],
'failed' => [
'database' => 'mysql', 'table' => 'failed_jobs',
],
'sqs' => array(
'driver' => 'sqs',
'key' => 'your-public-key',
'secret' => 'your-secret-key',
'queue' => 'your-queue-url',
'region' => 'us-east-1',
),
'iron' => array(
'driver' => 'iron',
'host' => 'mq-aws-us-east-1.iron.io',
'token' => 'your-token',
'project' => 'your-project-id',
'queue' => 'your-queue-name',
'encrypt' => true,
),
'redis' => array(
'driver' => 'redis',
'queue' => 'default',
),
),
/*
|--------------------------------------------------------------------------
| 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' => array(
'database' => 'mysql', 'table' => 'failed_jobs',
),
);
];

View File

@@ -1,59 +1,21 @@
<?php
return array(
return [
'default' => 'production',
'connections' => [
/*
|--------------------------------------------------------------------------
| Default Remote Connection Name
|--------------------------------------------------------------------------
|
| Here you may specify the default connection that will be used for SSH
| operations. This name should correspond to a connection name below
| in the server list. Each connection will be manually accessible.
|
*/
'production' => [
'host' => '',
'username' => '',
'password' => '',
'key' => '',
'keyphrase' => '',
'root' => '/var/www',
],
],
'groups' => [
'web' => ['production']
'default' => 'production',
],
/*
|--------------------------------------------------------------------------
| Remote Server Connections
|--------------------------------------------------------------------------
|
| These are the servers that will be accessible via the SSH task runner
| facilities of Laravel. This feature radically simplifies executing
| tasks on your servers, such as deploying out these applications.
|
*/
'connections' => array(
'production' => array(
'host' => '',
'username' => '',
'password' => '',
'key' => '',
'keyphrase' => '',
'root' => '/var/www',
),
),
/*
|--------------------------------------------------------------------------
| Remote Server Groups
|--------------------------------------------------------------------------
|
| Here you may list connections under a single group name, which allows
| you to easily access all of the servers at once using a short name
| that is extremely easy to remember, such as "web" or "database".
|
*/
'groups' => array(
'web' => array('production')
),
);
];

View File

@@ -1,31 +1,19 @@
<?php
return array(
return [
/*
|--------------------------------------------------------------------------
| Third Party Services
|--------------------------------------------------------------------------
|
| This file is for storing the credentials for third party services such
| as Stripe, Mailgun, Mandrill, and others. This file provides a sane
| default location for this type of information, allowing packages
| to have a conventional place to find your various credentials.
|
*/
'mailgun' => [
'domain' => '',
'secret' => '',
],
'mailgun' => array(
'domain' => '',
'secret' => '',
),
'mandrill' => [
'secret' => '',
],
'mandrill' => array(
'secret' => '',
),
'stripe' => [
'model' => 'User',
'secret' => '',
],
'stripe' => array(
'model' => 'User',
'secret' => '',
),
);
];

View File

@@ -1,140 +1,16 @@
<?php
return array(
return [
'driver' => 'file',
'lifetime' => 120,
'expire_on_close' => false,
'files' => storage_path() . '/sessions',
'connection' => null,
'table' => 'sessions',
'lottery' => array(2, 100),
'cookie' => 'laravel_session',
'path' => '/',
'domain' => null,
'secure' => false,
/*
|--------------------------------------------------------------------------
| Default Session Driver
|--------------------------------------------------------------------------
|
| This option controls the default session "driver" that will be used on
| requests. By default, we will use the lightweight native driver but
| you may specify any of the other wonderful drivers provided here.
|
| Supported: "file", "cookie", "database", "apc",
| "memcached", "redis", "array"
|
*/
'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 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().'/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' => array(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,
);
];

View File

@@ -1,31 +1,6 @@
<?php
return array(
/*
|--------------------------------------------------------------------------
| View Storage Paths
|--------------------------------------------------------------------------
|
| Most templating systems load templates from disk. Here you may specify
| an array of paths that should be checked for your views. Of course
| the usual Laravel view path has already been registered for you.
|
*/
'paths' => array(__DIR__.'/../views'),
/*
|--------------------------------------------------------------------------
| Pagination View
|--------------------------------------------------------------------------
|
| This view will be used to render the pagination link output, and can
| be easily customized here to show any view you like. A clean view
| compatible with Twitter's Bootstrap is given to you by default.
|
*/
'pagination' => 'pagination::slider-3',
);
return [
'paths' => array(__DIR__ . '/../views'),
'pagination' => 'pagination::slider-3',
];

View File

@@ -1,31 +1,6 @@
<?php
return array(
/*
|--------------------------------------------------------------------------
| Workbench Author Name
|--------------------------------------------------------------------------
|
| When you create new packages via the Artisan "workbench" command your
| name is needed to generate the composer.json file for your package.
| You may specify it now so it is used for all of your workbenches.
|
*/
'name' => '',
/*
|--------------------------------------------------------------------------
| Workbench Author E-Mail Address
|--------------------------------------------------------------------------
|
| Like the option above, your e-mail address is used when generating new
| workbench packages. The e-mail is placed in your composer.json file
| automatically after the package is created by the workbench tool.
|
*/
'email' => '',
);
return [
'name' => '',
'email' => '',
];

View File

@@ -0,0 +1,75 @@
<?php
class RemindersController extends Controller {
/**
* Display the password reminder view.
*
* @return Response
*/
public function getRemind()
{
return View::make('password.remind');
}
/**
* Handle a POST request to remind a user of their password.
*
* @return Response
*/
public function postRemind()
{
switch ($response = Password::remind(Input::only('email')))
{
case Password::INVALID_USER:
return Redirect::back()->with('error', Lang::get($response));
case Password::REMINDER_SENT:
return Redirect::back()->with('status', Lang::get($response));
}
}
/**
* Display the password reset view for the given token.
*
* @param string $token
* @return Response
*/
public function getReset($token = null)
{
if (is_null($token)) App::abort(404);
return View::make('password.reset')->with('token', $token);
}
/**
* Handle a POST request to reset a user's password.
*
* @return Response
*/
public function postReset()
{
$credentials = Input::only(
'email', 'password', 'password_confirmation', 'token'
);
$response = Password::reset($credentials, function($user, $password)
{
$user->password = Hash::make($password);
$user->save();
});
switch ($response)
{
case Password::INVALID_PASSWORD:
case Password::INVALID_TOKEN:
case Password::INVALID_USER:
return Redirect::back()->with('error', Lang::get($response));
case Password::PASSWORD_RESET:
return Redirect::to('/');
}
}
}

View File

@@ -0,0 +1,75 @@
<?php
use Firefly\Helper\Email\EmailHelperInterface as EHI;
use Firefly\Storage\User\UserRepositoryInterface as URI;
class UserController extends BaseController
{
public function __construct(URI $user, EHI $email)
{
$this->user = $user;
$this->email = $email;
}
public function login()
{
return View::make('user.login');
}
public function postLogin()
{
if (!$this->user->auth()) {
$rememberMe = Input::get('remember_me') == '1';
$result = [];
$data = [
'email' => Input::get('email'),
'password' => Input::get('password')
];
if (Auth::attempt($data, $rememberMe)) {
return Redirect::route('index');
}
}
Session::flash('error', 'No good!');
return View::make('user.login');
}
public function register()
{
if (Config::get('auth.allow_register') !== true) {
return App::abort(404);
}
return View::make('user.register');
}
public function postRegister()
{
if (Config::get('auth.allow_register') !== true) {
return App::abort(404);
}
$user = $this->user->register();
if ($user) {
if (Config::get('auth.verify_mail') === true) {
$this->email->sendVerificationMail($user);
return View::make('user.verification-pending');
}
$this->email->sendPasswordMail($user);
return View::make('user.registered');
}
return View::make('user.register');
}
public function verify($verification)
{
$user = $this->user->findByVerification($verification);
if ($user) {
$this->email->sendPasswordMail($user);
return View::make('user.registered');
}
return View::make('error')->with('message', 'Yo no hablo verification code!');
}
}

View File

@@ -0,0 +1,37 @@
<?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateUsersTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('users', function(Blueprint $table)
{
$table->increments('id');
$table->timestamps();
$table->string('email',100);
$table->string('password',60);
$table->string('verification',32);
$table->string('remember_token',255)->nullable();
$table->boolean('migrated');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('users');
}
}

View File

@@ -0,0 +1,35 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateAccountTypesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create(
'account_types', function (Blueprint $table) {
$table->increments('id');
$table->timestamps();
$table->string('description', 50);
}
);
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('account_types');
}
}

View File

@@ -0,0 +1,46 @@
<?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateAccountsTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('accounts', function(Blueprint $table)
{
$table->increments('id');
$table->timestamps();
$table->integer('user_id')->unsigned();
$table->integer('account_type_id')->unsigned();
$table->string('name',100);
$table->boolean('active');
// connect accounts to users
$table->foreign('user_id')
->references('id')->on('users')
->onDelete('cascade');
// connect accounts to account_types
$table->foreign('account_type_id')
->references('id')->on('account_types')
->onDelete('cascade');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('accounts');
}
}

View File

@@ -0,0 +1,33 @@
<?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateComponentTypesTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('component_types', function(Blueprint $table)
{
$table->increments('id');
$table->timestamps();
$table->string('type',50);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('component_types');
}
}

View File

@@ -0,0 +1,45 @@
<?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateComponentsTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('components', function(Blueprint $table)
{
$table->increments('id');
$table->timestamps();
$table->string('name',50);
$table->integer('user_id')->unsigned();
$table->integer('component_type_id')->unsigned();
// connect components to users
$table->foreign('user_id')
->references('id')->on('users')
->onDelete('cascade');
// connect components to component types
$table->foreign('component_type_id')
->references('id')->on('component_types')
->onDelete('cascade');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('components');
}
}

View File

@@ -0,0 +1,33 @@
<?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateTransactionCurrenciesTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('transaction_currencies', function(Blueprint $table)
{
$table->increments('id');
$table->timestamps();
$table->string('code',3);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('transaction_currencies');
}
}

View File

@@ -0,0 +1,33 @@
<?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateTransactionTypesTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('transaction_types', function(Blueprint $table)
{
$table->increments('id');
$table->timestamps();
$table->string('type',50);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('transaction_types');
}
}

View File

@@ -0,0 +1,46 @@
<?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateTransactionJournalsTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('transaction_journals', function(Blueprint $table)
{
$table->increments('id');
$table->timestamps();
$table->integer('transaction_type_id')->unsigned();
$table->integer('transaction_currency_id')->unsigned();
$table->string('description',255)->nullable();
$table->date('date');
// connect transaction journals to transaction types
$table->foreign('transaction_type_id')
->references('id')->on('transaction_types')
->onDelete('cascade');
// connect transaction journals to transaction currencies
$table->foreign('transaction_currency_id')
->references('id')->on('transaction_currencies')
->onDelete('cascade');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('transaction_journals');
}
}

View File

@@ -0,0 +1,42 @@
<?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateTransactionsTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('transactions', function(Blueprint $table)
{
$table->increments('id');
$table->timestamps();
$table->integer('account_id')->integer();
$table->integer('transaction_journal_id')->integer()->unsigned();
$table->string('description',255)->nullable();
$table->decimal('amount',10,2);
// connect transactions to transaction journals
$table->foreign('transaction_journal_id')
->references('id')->on('transaction_journals')
->onDelete('cascade');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('transactions');
}
}

View File

@@ -0,0 +1,44 @@
<?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateComponentTransactionTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('component_transaction', function(Blueprint $table)
{
$table->increments('id');
$table->timestamps();
$table->integer('component_id')->unsigned();
$table->integer('transaction_id')->unsigned();
// connect to components
$table->foreign('component_id')
->references('id')->on('components')
->onDelete('cascade');
// connect to transactions
$table->foreign('transaction_id')
->references('id')->on('transactions')
->onDelete('cascade');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('component_transaction');
}
}

View File

@@ -0,0 +1,33 @@
<?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreatePasswordRemindersTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('password_reminders', function(Blueprint $table)
{
$table->string('email')->index();
$table->string('token')->index();
$table->timestamp('created_at');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('password_reminders');
}
}

View File

@@ -0,0 +1,25 @@
<?php
class AccountTypeSeeder extends Seeder
{
public function run()
{
DB::table('account_types')->delete();
AccountType::create(
['description' => 'Default account']
);
AccountType::create(
['description' => 'Cash account']
);
AccountType::create(
['description' => 'Initial balance account']
);
AccountType::create(
['description' => 'Beneficiary account']
);
}
}

View File

@@ -0,0 +1,16 @@
<?php
class ComponentTypeSeeder extends Seeder
{
public function run()
{
DB::table('component_types')->delete();
ComponentType::create(['type' => 'category']);
ComponentType::create(['type' => 'budget']);
}
}

View File

@@ -1,17 +1,21 @@
<?php
class DatabaseSeeder extends Seeder {
class DatabaseSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
Eloquent::unguard();
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
Eloquent::unguard();
// $this->call('UserTableSeeder');
}
$this->call('AccountTypeSeeder');
$this->call('TransactionCurrencySeeder');
$this->call('TransactionTypeSeeder');
$this->call('ComponentTypeSeeder');
}
}

View File

@@ -0,0 +1,15 @@
<?php
class TransactionCurrencySeeder extends Seeder
{
public function run()
{
DB::table('transaction_currencies')->delete();
TransactionCurrency::create(
['code' => 'EUR']
);
}
}

View File

@@ -0,0 +1,17 @@
<?php
class TransactionTypeSeeder extends Seeder
{
public function run()
{
DB::table('transaction_types')->delete();
TransactionType::create(['type' => 'Withdrawal']);
TransactionType::create(['type' => 'Deposit']);
TransactionType::create(['type' => 'Transfer']);
TransactionType::create(['type' => 'Opening balance']);
}
}

View File

@@ -0,0 +1,40 @@
<?php
namespace Firefly\Helper\Email;
class EmailHelper implements EmailHelperInterface
{
public function sendVerificationMail(\User $user)
{
$verification = \Str::random(32);
$user->verification = $verification;
$user->save();
$email = $user->email;
$data = ['verification' => $verification];
\Mail::send(
['emails.user.verify-html', 'emails.user.verify-text'], $data, function ($message) use ($email) {
$message->to($email, $email)->subject('Verify your e-mail address.');
}
);
}
public function sendPasswordMail(\User $user)
{
$password = \Str::random(12);
$user->password = \Hash::make($password);
$user->verification = \Str::random(32); // new one.
$user->save();
$email = $user->email;
$data = ['password' => $password];
\Mail::send(
['emails.user.register-html', 'emails.user.register-text'], $data, function ($message) use ($email) {
$message->to($email, $email)->subject('Welcome to Firefly!');
}
);
}
}

View File

@@ -0,0 +1,10 @@
<?php
namespace Firefly\Helper\Email;
interface EmailHelperInterface {
public function sendVerificationMail(\User $user);
public function sendPasswordMail(\User $user);
}

View File

@@ -0,0 +1,20 @@
<?php
namespace Firefly\Helper;
use Illuminate\Support\ServiceProvider;
class HelperServiceProvider extends ServiceProvider
{
// Triggered automatically by Laravel
public function register()
{
// mail:
$this->app->bind(
'Firefly\Helper\Email\EmailHelperInterface',
'Firefly\Helper\Email\EmailHelper'
);
}
}

View File

@@ -0,0 +1,20 @@
<?php
namespace Firefly\Storage;
use Illuminate\Support\ServiceProvider;
class StorageServiceProvider extends ServiceProvider
{
// Triggered automatically by Laravel
public function register()
{
// storage:
$this->app->bind(
'Firefly\Storage\User\UserRepositoryInterface',
'Firefly\Storage\User\EloquentUserRepository'
);
}
}

View File

@@ -0,0 +1,44 @@
<?php
namespace Firefly\Storage\User;
class EloquentUserRepository implements UserRepositoryInterface
{
public function __construct()
{
}
public function register()
{
$user = new \User;
$user->email = \Input::get('email');
$user->migrated = 0;
$user->verification = \Str::random(32);
$user->password = \Hash::make(\Str::random(12));
if (!$user->isValid()) {
\Log::error('Invalid user');
\Session::flash('error', 'Input invalid, please try again.');
return false;
}
$user->save();
return $user;
}
public function auth()
{
$user = \User::where('email', \Input::get('email'))->first();
if (!is_null($user)) {
if (\Hash::check(\Input::get('password'), $user->password)) {
}
}
return false;
}
public function findByVerification($verification)
{
return \User::where('verification', $verification)->first();
}
}

View File

@@ -0,0 +1,15 @@
<?php
namespace Firefly\Storage\User;
interface UserRepositoryInterface
{
public function register();
public function auth();
public function findByVerification($verification);
}

36
app/models/Account.php Normal file
View File

@@ -0,0 +1,36 @@
<?php
class Account extends Eloquent
{
public function accountType()
{
return $this->belongsTo('AccountType');
}
public function transactions()
{
return $this->hasMany('Transaction');
}
public function user()
{
return $this->belongsTo('User');
}
/**
* Get an accounts current balance.
*
* @param \Carbon\Carbon $date
*
* @return float
*/
public function balance(\Carbon\Carbon $date = null)
{
$date = is_null($date) ? new \Carbon\Carbon : $date;
return floatval($this->transactions()->sum('amount'));
}
}

View File

@@ -0,0 +1,10 @@
<?php
class AccountType extends Eloquent {
public function accounts() {
return $this->hasMany('Account');
}
}

21
app/models/Component.php Normal file
View File

@@ -0,0 +1,21 @@
<?php
class Component extends Eloquent
{
public function componentType()
{
return $this->belongsTo('ComponentType');
}
public function transactions()
{
return $this->belongsToMany('Transaction');
}
public function user()
{
return $this->belongsTo('User');
}
}

View File

@@ -0,0 +1,11 @@
<?php
class ComponentType extends Eloquent
{
public function components()
{
return $this->hasMany('Component');
}
}

15
app/models/Elegant.php Normal file
View File

@@ -0,0 +1,15 @@
<?php
class Elegant extends Eloquent
{
public static $rules = [];
public function isValid()
{
return Validator::make(
$this->toArray(),
$this::$rules
)->passes();
}
}

View File

@@ -0,0 +1,21 @@
<?php
class Transaction extends Eloquent
{
public function account()
{
return $this->belongsTo('Account');
}
public function transactionJournal()
{
return $this->belongsTo('TransactionJournal');
}
public function components()
{
return $this->belongsToMany('Component');
}
}

View File

@@ -0,0 +1,10 @@
<?php
class TransactionCurrency extends Eloquent {
public function transactionJournals() {
return $this->hasMany('TransactionJournal');
}
}

View File

@@ -0,0 +1,17 @@
<?php
class TransactionJournal extends Eloquent {
public function transactionType() {
return $this->belongsTo('TransactionType');
}
public function transactionCurrency() {
return $this->belongsTo('TransactionCurrency');
}
public function transactions() {
return $this->hasMany('Transaction');
}
}

View File

@@ -0,0 +1,9 @@
<?php
class TransactionType extends Eloquent {
public function transactionJournals() {
return $this->hasMany('TransactionJournal');
}
}

View File

@@ -5,22 +5,32 @@ use Illuminate\Auth\UserInterface;
use Illuminate\Auth\Reminders\RemindableTrait;
use Illuminate\Auth\Reminders\RemindableInterface;
class User extends Eloquent implements UserInterface, RemindableInterface {
class User extends Elegant implements UserInterface, RemindableInterface
{
use UserTrait, RemindableTrait;
use UserTrait, RemindableTrait;
/**
* The database table used by the model.
*
* @var string
*/
protected $table = 'users';
/**
* The attributes excluded from the model's JSON form.
*
* @var array
*/
protected $hidden = array('password', 'remember_token');
/**
* The database table used by the model.
*
* @var string
*/
protected $table = 'users';
public static $rules
= [
'email' => 'email|unique:users,email',
'migrated' => 'numeric|between:0,1',
'password' => 'between:60,60',
'verification' => 'between:32,32',
];
/**
* The attributes excluded from the model's JSON form.
*
* @var array
*/
protected $hidden = array('password', 'remember_token');
}

View File

@@ -1,14 +1,10 @@
<?php
Route::get('/', ['uses' => 'HomeController@index','as' => 'index','before' => 'auth']);
/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the Closure to execute when that URI is requested.
|
*/
// login, register, logout:
Route::get('/login',['uses' => 'UserController@login','as' => 'login','before' => 'guest']);
Route::get('/register',['uses' => 'UserController@register','as' => 'register','before' => 'guest']);
Route::get('/verify/{verification}',['uses' => 'UserController@verify','as' => 'verify','before' => 'guest']);
Route::get('/', ['uses' => 'HomeController@index','as' => 'index']);
Route::post('/login',['uses' => 'UserController@postLogin','before' => 'csrf|guest']);
Route::post('/register',['uses' => 'UserController@postRegister','before' => 'csrf|guest']);

View File

@@ -0,0 +1,19 @@
<html>
<head>
<style type="text/css">
* {font-size:Arial;}
</style>
</head>
<body>
<p>
Hi!
</p>
<p>
Here's the password you need to login at Firefly: <strong>{{$password}}</strong>
</p>
<p>
Cya!
</p>
</body>
</html>

View File

@@ -0,0 +1,5 @@
Hi!
Here's the password you need to login at Firefly: {{$password}}
Cya!

View File

@@ -0,0 +1,19 @@
<html>
<head>
<style type="text/css">
* {font-size:Arial;}
</style>
</head>
<body>
<p>
Hi!
</p>
<p>
To verify your registration, please <a href="{{route('verify',$verification)}}">verify your e-mail address</a>.
</p>
<p>
Cya!
</p>
</body>
</html>

View File

@@ -0,0 +1,7 @@
Hi!
To verify your registration, please verify your e-mail address:
{{route('verify',$verification)}}
Cya!

16
app/views/error.blade.php Normal file
View File

@@ -0,0 +1,16 @@
@extends('layouts.guest')
@section('content')
<div class="row">
<div class="col-lg-12 col-md-12 col-sm-12">
<h1 class="text-danger">Firefly<br/>
<small>Error</small>
</h1>
</div>
</div>
<div class="row">
<div class="col-lg-12 col-md-12 col-sm-12">
{{$message or 'General unknown errror'}}
</div>
</div>
@stop

View File

@@ -3,6 +3,9 @@
<title>Bla bla</title>
</head>
<body>
Bla bla
{{App::environment()}}
@if(Auth::check())
logged in!
@endif
</body>
</html>

View File

@@ -0,0 +1,30 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<base href="{{url::to('/')}}">
<title>Firefly</title>
<!-- Bootstrap -->
<link href="assets/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div class="container">
@yield('content')
</div>
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<!-- Include all compiled plugins (below), or include individual files as needed -->
<script src="assets/bootstrap/js/bootstrap.min.js"></script>
</body>
</html>

View File

@@ -0,0 +1,31 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<base href="{{URL::route('index')}}/">
<title>Firefly</title>
<!-- Bootstrap -->
<link href="assets/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div class="container">
@include('partials.flashes')
@yield('content')
</div>
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<!-- Include all compiled plugins (below), or include individual files as needed -->
<script src="assets/bootstrap/js/bootstrap.min.js"></script>
</body>
</html>

View File

@@ -0,0 +1,27 @@
@if(Session::has('success'))
<div class="alert alert-success alert-dismissible" role="alert">
<button type="button" class="close" data-dismiss="alert"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
<strong>Success!</strong> {{{Session::get('success')}}}
</div>
@endif
@if(Session::has('info'))
<div class="alert alert-info alert-dismissible" role="alert">
<button type="button" class="close" data-dismiss="alert"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
<strong>Info:</strong> {{{Session::get('info')}}}
</div>
@endif
@if(Session::has('warning'))
<div class="alert alert-warning alert-dismissible" role="alert">
<button type="button" class="close" data-dismiss="alert"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
<strong>Warning!</strong> {{{Session::get('warning')}}}
</div>
@endif
@if(Session::has('error'))
<div class="alert alert-danger alert-dismissible" role="alert">
<button type="button" class="close" data-dismiss="alert"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
<strong>Error!</strong> {{{Session::get('error')}}}
</div>
@endif

View File

@@ -0,0 +1,53 @@
@extends('layouts.guest')
@section('content')
<div class="row">
<div class="col-lg-12 col-md-12 col-sm-12">
<h1>Firefly<br/>
<small>Login</small>
</h1>
</div>
</div>
<div class="row">
<div class="col-lg-12 col-md-12 col-sm-12">
</div>
</div>
<div class="row">
<div class="col-lg-4 col-md-4 col-sm-12">
{{Form::open()}}
<div class="form-group">
<label for="inputEmail">Email address</label>
<input type="email" class="form-control" id="inputEmail" name="email" placeholder="Enter email">
</div>
<div class="form-group">
<label for="inputPassword">Password</label>
<input type="password" class="form-control" id="inputPassword" name="password" placeholder="Password">
</div>
<div class="checkbox">
<label>
<input type="checkbox" name="remember_me" value="1"> Remember login
</label>
</div>
<button type="submit" class="btn btn-info">Submit</button>
{{Form::close()}}
</div>
</div>
<div class="row">
<div class="col-lg-4 col-md-4 col-sm-12">
<p>
&nbsp;
</p>
@if(Config::get('auth.allow_register') === true)
<p>
<a href="{{route('register')}}" class="btn btn-default">Register a new account</a>
</p>
@endif
<p>
<a href="#" class="btn btn-default">Reset password</a>
</p>
</div>
</div>
@stop

View File

@@ -0,0 +1,42 @@
@extends('layouts.guest')
@section('content')
<div class="row">
<div class="col-lg-12 col-md-12 col-sm-12">
<h1>Firefly<br/>
<small>Register a new account</small>
</h1>
</div>
</div>
<div class="row">
<div class="col-lg-12 col-md-12 col-sm-12">
</div>
</div>
<div class="row">
<div class="col-lg-4 col-md-4 col-sm-12">
{{Form::open()}}
<div class="form-group">
<label for="inputEmail">Email address</label>
<input type="email" class="form-control" id="inputEmail" name="email" placeholder="Enter email">
</div>
<button type="submit" class="btn btn-info">Submit</button>
{{Form::close()}}
</div>
</div>
<div class="row">
<div class="col-lg-4 col-md-4 col-sm-12">
<p>
&nbsp;
</p>
<p>
<a href="{{route('login')}}" class="btn btn-default">Back to login form</a>
</p>
<p>
<a href="#" class="btn btn-default">Reset password</a>
</p>
</div>
</div>
@stop

View File

@@ -0,0 +1,19 @@
@extends('layouts.guest')
@section('content')
<div class="row">
<div class="col-lg-12 col-md-12 col-sm-12">
<h1>Firefly<br/>
<small>Registered!</small>
</h1>
</div>
</div>
<div class="row">
<div class="col-lg-12 col-md-12 col-sm-12">
<p>
You're about to get an e-mail. Use the contents to <a href="{{route('login')}}">log in</a>.
</p>
</div>
</div>
@stop

View File

@@ -0,0 +1,19 @@
@extends('layouts.guest')
@section('content')
<div class="row">
<div class="col-lg-12 col-md-12 col-sm-12">
<h1>Firefly<br/>
<small>Verification pending</small>
</h1>
</div>
</div>
<div class="row">
<div class="col-lg-12 col-md-12 col-sm-12">
<p>
You're about to get an e-mail. Please follow its instructions.
</p>
</div>
</div>
@stop