mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Working on users in L5
This commit is contained in:
parent
768f04e3a9
commit
78502f74e4
@ -1,7 +1,6 @@
|
|||||||
<?php namespace App\Http\Controllers;
|
<?php namespace App\Http\Controllers;
|
||||||
|
|
||||||
use Auth;
|
use Auth;
|
||||||
use Confide;
|
|
||||||
use Input;
|
use Input;
|
||||||
use Redirect;
|
use Redirect;
|
||||||
use Session;
|
use Session;
|
||||||
@ -741,7 +740,7 @@ class AccountController extends BaseController
|
|||||||
$account = Auth::user()->account;
|
$account = Auth::user()->account;
|
||||||
$account->forceDelete();
|
$account->forceDelete();
|
||||||
|
|
||||||
Confide::logout();
|
Auth::logout();
|
||||||
|
|
||||||
return Redirect::to('/')->with('clearGuestKey', true);
|
return Redirect::to('/')->with('clearGuestKey', true);
|
||||||
}
|
}
|
||||||
|
@ -94,28 +94,17 @@ class AppController extends BaseController
|
|||||||
// Artisan::call('migrate:rollback', array('--force' => true)); // Debug Purposes
|
// Artisan::call('migrate:rollback', array('--force' => true)); // Debug Purposes
|
||||||
Artisan::call('migrate', array('--force' => true));
|
Artisan::call('migrate', array('--force' => true));
|
||||||
Artisan::call('db:seed', array('--force' => true));
|
Artisan::call('db:seed', array('--force' => true));
|
||||||
|
|
||||||
$account = $this->accountRepo->create();
|
|
||||||
|
|
||||||
// Create User
|
|
||||||
$user = new User;
|
|
||||||
$user->first_name = trim(Input::get('first_name'));
|
|
||||||
$user->last_name = trim(Input::get('last_name'));
|
|
||||||
$user->email = trim(strtolower(Input::get('email')));
|
|
||||||
|
|
||||||
// Username getting the error: "The username may only contain letters, numbers, and dashes."
|
$firstName = trim(Input::get('first_name'));
|
||||||
// Not sure where this validation comes from?
|
$lastName = trim(Input::get('last_name'));
|
||||||
$user->username = 'test'; //$user->email;
|
$email = trim(strtolower(Input::get('email')));
|
||||||
|
$password = trim(Input::get('password'));
|
||||||
|
$account = $this->accountRepo->create($firstName, $lastName, $email, $password);
|
||||||
|
$user = $account->users()->first();
|
||||||
|
|
||||||
$user->password = trim(Input::get('password'));
|
//Auth::login($user, true);
|
||||||
$user->password_confirmation = trim(Input::get('password'));
|
|
||||||
$user->registered = true;
|
|
||||||
$user->account()->associate($account);
|
|
||||||
$user->save();
|
|
||||||
|
|
||||||
Auth::login($user, true);
|
return Redirect::to('/login');
|
||||||
|
|
||||||
return Redirect::to('/dashboard');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private function testDatabase($database)
|
private function testDatabase($database)
|
||||||
|
@ -20,6 +20,9 @@ class AuthController extends Controller {
|
|||||||
|
|
||||||
use AuthenticatesAndRegistersUsers;
|
use AuthenticatesAndRegistersUsers;
|
||||||
|
|
||||||
|
protected $loginPath = '/login';
|
||||||
|
protected $redirectTo = '/dashboard';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new authentication controller instance.
|
* Create a new authentication controller instance.
|
||||||
*
|
*
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
<?php namespace App\Http\Controllers;
|
<?php namespace App\Http\Controllers;
|
||||||
|
|
||||||
use Auth;
|
use Auth;
|
||||||
use Confide;
|
|
||||||
use Config;
|
use Config;
|
||||||
use Event;
|
use Event;
|
||||||
use Input;
|
use Input;
|
||||||
@ -257,6 +256,7 @@ class UserController extends BaseController
|
|||||||
* Displays the login form
|
* Displays the login form
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
/*
|
||||||
public function login()
|
public function login()
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -272,11 +272,13 @@ class UserController extends BaseController
|
|||||||
|
|
||||||
return Redirect::to('/dashboard');
|
return Redirect::to('/dashboard');
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Attempt to do login
|
* Attempt to do login
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
/*
|
||||||
public function do_login()
|
public function do_login()
|
||||||
{
|
{
|
||||||
$input = array(
|
$input = array(
|
||||||
@ -313,12 +315,14 @@ class UserController extends BaseController
|
|||||||
->with('error', $err_msg);
|
->with('error', $err_msg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Attempt to confirm account with code
|
* Attempt to confirm account with code
|
||||||
*
|
*
|
||||||
* @param string $code
|
* @param string $code
|
||||||
*/
|
*/
|
||||||
|
/*
|
||||||
public function confirm($code)
|
public function confirm($code)
|
||||||
{
|
{
|
||||||
if (Confide::confirm($code)) {
|
if (Confide::confirm($code)) {
|
||||||
@ -348,20 +352,24 @@ class UserController extends BaseController
|
|||||||
return Redirect::action('UserController@login')->with('error', $error_msg);
|
return Redirect::action('UserController@login')->with('error', $error_msg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Displays the forgot password form
|
* Displays the forgot password form
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
/*
|
||||||
public function forgot_password()
|
public function forgot_password()
|
||||||
{
|
{
|
||||||
return View::make(Config::get('confide.forgot_password_form'));
|
return View::make(Config::get('confide.forgot_password_form'));
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Attempt to send change password link to the given email
|
* Attempt to send change password link to the given email
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
/*
|
||||||
public function do_forgot_password()
|
public function do_forgot_password()
|
||||||
{
|
{
|
||||||
Confide::forgotPassword(Input::get('email'));
|
Confide::forgotPassword(Input::get('email'));
|
||||||
@ -371,21 +379,25 @@ class UserController extends BaseController
|
|||||||
return Redirect::action('UserController@login')
|
return Redirect::action('UserController@login')
|
||||||
->with('message', $notice_msg);
|
->with('message', $notice_msg);
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Shows the change password form with the given token
|
* Shows the change password form with the given token
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
/*
|
||||||
public function reset_password($token = false)
|
public function reset_password($token = false)
|
||||||
{
|
{
|
||||||
return View::make(Config::get('confide::reset_password_form'))
|
return View::make(Config::get('confide::reset_password_form'))
|
||||||
->with('token', $token);
|
->with('token', $token);
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Attempt change password of the user
|
* Attempt change password of the user
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
/*
|
||||||
public function do_reset_password()
|
public function do_reset_password()
|
||||||
{
|
{
|
||||||
if (Auth::check()) {
|
if (Auth::check()) {
|
||||||
@ -428,6 +440,7 @@ class UserController extends BaseController
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Log the user out of the application.
|
* Log the user out of the application.
|
||||||
@ -445,7 +458,7 @@ class UserController extends BaseController
|
|||||||
Session::forget('news_feed_id');
|
Session::forget('news_feed_id');
|
||||||
Session::forget('news_feed_message');
|
Session::forget('news_feed_message');
|
||||||
|
|
||||||
Confide::logout();
|
Auth::logout();
|
||||||
|
|
||||||
return Redirect::to('/')->with('clearGuestKey', true);
|
return Redirect::to('/')->with('clearGuestKey', true);
|
||||||
}
|
}
|
||||||
|
@ -35,7 +35,7 @@ class RedirectIfAuthenticated {
|
|||||||
{
|
{
|
||||||
if ($this->auth->check())
|
if ($this->auth->check())
|
||||||
{
|
{
|
||||||
return new RedirectResponse(url('/home'));
|
return new RedirectResponse(url('/'));
|
||||||
}
|
}
|
||||||
|
|
||||||
return $next($request);
|
return $next($request);
|
||||||
|
@ -54,6 +54,22 @@ Route::get('claim_license', 'PaymentController@claim_license');
|
|||||||
Route::post('signup/validate', 'AccountController@checkEmail');
|
Route::post('signup/validate', 'AccountController@checkEmail');
|
||||||
Route::post('signup/submit', 'AccountController@submitSignup');
|
Route::post('signup/submit', 'AccountController@submitSignup');
|
||||||
|
|
||||||
|
|
||||||
|
// Laravel auth routes
|
||||||
|
Route::controllers([
|
||||||
|
'auth' => 'Auth\AuthController',
|
||||||
|
'password' => 'Auth\PasswordController',
|
||||||
|
]);
|
||||||
|
|
||||||
|
get('/signup', array('as' => 'signup', 'uses' => 'Auth\AuthController@getRegister'));
|
||||||
|
post('/signup', array('as' => 'signup', 'uses' => 'Auth\AuthController@postRegister'));
|
||||||
|
get('/login', array('as' => 'login', 'uses' => 'Auth\AuthController@getLogin'));
|
||||||
|
post('/login', array('as' => 'login', 'uses' => 'Auth\AuthController@postLogin'));
|
||||||
|
get('/logout', array('as' => 'logout', 'uses' => 'Auth\AuthController@getLogout'));
|
||||||
|
get('/forgot', array('as' => 'forgot', 'uses' => 'Auth\AuthController@getLogin'));
|
||||||
|
post('/forgot', array('as' => 'forgot', 'uses' => 'Auth\AuthController@postLogin'));
|
||||||
|
|
||||||
|
/*
|
||||||
// Confide routes
|
// Confide routes
|
||||||
Route::get('login', 'UserController@login');
|
Route::get('login', 'UserController@login');
|
||||||
Route::post('login', 'UserController@do_login');
|
Route::post('login', 'UserController@do_login');
|
||||||
@ -63,6 +79,7 @@ Route::post('forgot_password', 'UserController@do_forgot_password');
|
|||||||
Route::get('user/reset/{token?}', 'UserController@reset_password');
|
Route::get('user/reset/{token?}', 'UserController@reset_password');
|
||||||
Route::post('user/reset', 'UserController@do_reset_password');
|
Route::post('user/reset', 'UserController@do_reset_password');
|
||||||
Route::get('logout', 'UserController@logout');
|
Route::get('logout', 'UserController@logout');
|
||||||
|
*/
|
||||||
|
|
||||||
if (\App\Libraries\Utils::isNinja()) {
|
if (\App\Libraries\Utils::isNinja()) {
|
||||||
Route::post('/signup/register', 'AccountController@doRegister');
|
Route::post('/signup/register', 'AccountController@doRegister');
|
||||||
|
@ -1,15 +1,15 @@
|
|||||||
<?php namespace App\Models;
|
<?php namespace App\Models;
|
||||||
|
|
||||||
use Eloquent;
|
use App\Libraries\Utils;
|
||||||
use Utils;
|
use Illuminate\Auth\Authenticatable;
|
||||||
use Zizaco\Confide\ConfideUser;
|
use Illuminate\Database\Eloquent\Model;
|
||||||
use Zizaco\Confide\ConfideUserInterface;
|
use Illuminate\Auth\Passwords\CanResetPassword;
|
||||||
|
use Illuminate\Contracts\Auth\Authenticatable as AuthenticatableContract;
|
||||||
|
use Illuminate\Contracts\Auth\CanResetPassword as CanResetPasswordContract;
|
||||||
|
|
||||||
class User extends Eloquent implements ConfideUserInterface {
|
class User extends Model implements AuthenticatableContract, CanResetPasswordContract {
|
||||||
|
|
||||||
use ConfideUser;
|
use Authenticatable, CanResetPassword;
|
||||||
|
|
||||||
protected $softDelete = true;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The database table used by the model.
|
* The database table used by the model.
|
||||||
@ -18,13 +18,12 @@ class User extends Eloquent implements ConfideUserInterface {
|
|||||||
*/
|
*/
|
||||||
protected $table = 'users';
|
protected $table = 'users';
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The attributes that are mass assignable.
|
* The attributes that are mass assignable.
|
||||||
*
|
*
|
||||||
* @var array
|
* @var array
|
||||||
*/
|
*/
|
||||||
protected $fillable = ['email', 'password','agency_id'];
|
protected $fillable = ['name', 'email', 'password'];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The attributes excluded from the model's JSON form.
|
* The attributes excluded from the model's JSON form.
|
||||||
@ -33,6 +32,8 @@ class User extends Eloquent implements ConfideUserInterface {
|
|||||||
*/
|
*/
|
||||||
protected $hidden = ['password', 'remember_token'];
|
protected $hidden = ['password', 'remember_token'];
|
||||||
|
|
||||||
|
protected $softDelete = true;
|
||||||
|
|
||||||
|
|
||||||
public function account()
|
public function account()
|
||||||
{
|
{
|
||||||
|
@ -17,7 +17,7 @@ use App\Models\User;
|
|||||||
|
|
||||||
class AccountRepository
|
class AccountRepository
|
||||||
{
|
{
|
||||||
public function create()
|
public function create($firstName = '', $lastName = '', $email = '', $password = '')
|
||||||
{
|
{
|
||||||
$account = new Account();
|
$account = new Account();
|
||||||
$account->ip = Request::getClientIp();
|
$account->ip = Request::getClientIp();
|
||||||
@ -32,16 +32,21 @@ class AccountRepository
|
|||||||
|
|
||||||
$account->save();
|
$account->save();
|
||||||
|
|
||||||
/* $random = str_random(RANDOM_KEY_LENGTH);
|
|
||||||
|
|
||||||
// I don't like how this is done with regards to init setup. I think it needs a refresh.
|
|
||||||
$user = new User();
|
$user = new User();
|
||||||
$user->password = $random;
|
if (!$firstName && !$lastName && !$email && !$password) {
|
||||||
$user->password_confirmation = $random;
|
$user->password = str_random(RANDOM_KEY_LENGTH);
|
||||||
$user->email = 'test@test.com';
|
$user->email = $user->username = str_random(RANDOM_KEY_LENGTH);
|
||||||
$user->username = $random;
|
} else {
|
||||||
|
$user->first_name = $firstName;
|
||||||
|
$user->last_name = $lastName;
|
||||||
|
$user->email = $user->username = $email;
|
||||||
|
$user->password = bcrypt($password);
|
||||||
|
}
|
||||||
|
|
||||||
$user->confirmed = !Utils::isNinja();
|
$user->confirmed = !Utils::isNinja();
|
||||||
$account->users()->save($user, []);*/
|
$user->registered = !Utils::isNinja();
|
||||||
|
|
||||||
|
$account->users()->save($user);
|
||||||
|
|
||||||
return $account;
|
return $account;
|
||||||
}
|
}
|
||||||
|
@ -13,35 +13,8 @@
|
|||||||
"email": "jeramy.n.simpson@gmail.com"
|
"email": "jeramy.n.simpson@gmail.com"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"repositories": [
|
|
||||||
{
|
|
||||||
"type": "package",
|
|
||||||
"package": {
|
|
||||||
"name": "calvinfroedge/PHP-Payments",
|
|
||||||
"version": "dev-master",
|
|
||||||
"source": {
|
|
||||||
"url": "https://github.com/calvinfroedge/PHP-Payments",
|
|
||||||
"type": "git",
|
|
||||||
"reference": "origin/master"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "package",
|
|
||||||
"package": {
|
|
||||||
"name": "impleri/confide",
|
|
||||||
"version": "dev-master",
|
|
||||||
"source": {
|
|
||||||
"url": "https://github.com/impleri/confide",
|
|
||||||
"type": "git",
|
|
||||||
"reference": "origin/master"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"require": {
|
"require": {
|
||||||
"laravel/framework": "5.0.*",
|
"laravel/framework": "5.0.*",
|
||||||
"impleri/confide": "dev-master",
|
|
||||||
"patricktalmadge/bootstrapper": "5.5.x",
|
"patricktalmadge/bootstrapper": "5.5.x",
|
||||||
"anahkiasen/former": "4.0.*@dev",
|
"anahkiasen/former": "4.0.*@dev",
|
||||||
"barryvdh/laravel-debugbar": "~2.0.2",
|
"barryvdh/laravel-debugbar": "~2.0.2",
|
||||||
@ -75,8 +48,6 @@
|
|||||||
"app/Models",
|
"app/Models",
|
||||||
"app/Ninja",
|
"app/Ninja",
|
||||||
"app/Ninja/Repositories",
|
"app/Ninja/Repositories",
|
||||||
"vendor/calvinfroedge/PHP-Payments/lib",
|
|
||||||
"vendor/impleri/confide/src",
|
|
||||||
"database"
|
"database"
|
||||||
],
|
],
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
|
75
composer.lock
generated
75
composer.lock
generated
@ -4,7 +4,7 @@
|
|||||||
"Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
|
"Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
|
||||||
"This file is @generated automatically"
|
"This file is @generated automatically"
|
||||||
],
|
],
|
||||||
"hash": "016ceb374b7f3029826cdcf32ce6b1bf",
|
"hash": "97252a7d44a5d0588faa1b3a3c4888d3",
|
||||||
"packages": [
|
"packages": [
|
||||||
{
|
{
|
||||||
"name": "alfaproject/omnipay-neteller",
|
"name": "alfaproject/omnipay-neteller",
|
||||||
@ -346,12 +346,12 @@
|
|||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/Chumper/Datatable.git",
|
"url": "https://github.com/Chumper/Datatable.git",
|
||||||
"reference": "3b251b9c6d7d266d6af37d3096034cf69c6b50a8"
|
"reference": "899f5530f98f766eca3a66afba9127ddf239d5c1"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/Chumper/Datatable/zipball/3b251b9c6d7d266d6af37d3096034cf69c6b50a8",
|
"url": "https://api.github.com/repos/Chumper/Datatable/zipball/899f5530f98f766eca3a66afba9127ddf239d5c1",
|
||||||
"reference": "3b251b9c6d7d266d6af37d3096034cf69c6b50a8",
|
"reference": "899f5530f98f766eca3a66afba9127ddf239d5c1",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@ -391,7 +391,7 @@
|
|||||||
"jquery",
|
"jquery",
|
||||||
"laravel"
|
"laravel"
|
||||||
],
|
],
|
||||||
"time": "2015-03-08 23:17:58"
|
"time": "2015-03-27 12:52:09"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "classpreloader/classpreloader",
|
"name": "classpreloader/classpreloader",
|
||||||
@ -1491,17 +1491,6 @@
|
|||||||
],
|
],
|
||||||
"time": "2015-01-01 16:31:18"
|
"time": "2015-01-01 16:31:18"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"name": "impleri/confide",
|
|
||||||
"version": "dev-master",
|
|
||||||
"source": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "https://github.com/impleri/confide",
|
|
||||||
"reference": "origin/master"
|
|
||||||
},
|
|
||||||
"type": "library",
|
|
||||||
"time": "2015-03-18 03:04:38"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"name": "intervention/image",
|
"name": "intervention/image",
|
||||||
"version": "dev-master",
|
"version": "dev-master",
|
||||||
@ -1786,16 +1775,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "laravel/framework",
|
"name": "laravel/framework",
|
||||||
"version": "v5.0.20",
|
"version": "v5.0.23",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/laravel/framework.git",
|
"url": "https://github.com/laravel/framework.git",
|
||||||
"reference": "419d3f485ce7946cace4325ef19a30e1d5543951"
|
"reference": "59219f7afb60be05d74ce01fcb5d2440f7a1b13d"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/laravel/framework/zipball/419d3f485ce7946cace4325ef19a30e1d5543951",
|
"url": "https://api.github.com/repos/laravel/framework/zipball/59219f7afb60be05d74ce01fcb5d2440f7a1b13d",
|
||||||
"reference": "419d3f485ce7946cace4325ef19a30e1d5543951",
|
"reference": "59219f7afb60be05d74ce01fcb5d2440f7a1b13d",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@ -1908,7 +1897,7 @@
|
|||||||
"framework",
|
"framework",
|
||||||
"laravel"
|
"laravel"
|
||||||
],
|
],
|
||||||
"time": "2015-03-24 13:36:37"
|
"time": "2015-03-28 16:56:59"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "league/flysystem",
|
"name": "league/flysystem",
|
||||||
@ -4181,16 +4170,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "psy/psysh",
|
"name": "psy/psysh",
|
||||||
"version": "v0.4.3",
|
"version": "v0.4.4",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/bobthecow/psysh.git",
|
"url": "https://github.com/bobthecow/psysh.git",
|
||||||
"reference": "b5dd7660c0ef38e96cd8cd8fa924b6be0e53906a"
|
"reference": "489816db71649bd95b416e3ed9062d40528ab0ac"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/bobthecow/psysh/zipball/b5dd7660c0ef38e96cd8cd8fa924b6be0e53906a",
|
"url": "https://api.github.com/repos/bobthecow/psysh/zipball/489816db71649bd95b416e3ed9062d40528ab0ac",
|
||||||
"reference": "b5dd7660c0ef38e96cd8cd8fa924b6be0e53906a",
|
"reference": "489816db71649bd95b416e3ed9062d40528ab0ac",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@ -4248,7 +4237,7 @@
|
|||||||
"interactive",
|
"interactive",
|
||||||
"shell"
|
"shell"
|
||||||
],
|
],
|
||||||
"time": "2015-03-17 15:17:33"
|
"time": "2015-03-26 18:43:54"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "swiftmailer/swiftmailer",
|
"name": "swiftmailer/swiftmailer",
|
||||||
@ -5387,21 +5376,22 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "phpspec/prophecy",
|
"name": "phpspec/prophecy",
|
||||||
"version": "v1.3.1",
|
"version": "1.4.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/phpspec/prophecy.git",
|
"url": "https://github.com/phpspec/prophecy.git",
|
||||||
"reference": "9ca52329bcdd1500de24427542577ebf3fc2f1c9"
|
"reference": "8724cd239f8ef4c046f55a3b18b4d91cc7f3e4c5"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/phpspec/prophecy/zipball/9ca52329bcdd1500de24427542577ebf3fc2f1c9",
|
"url": "https://api.github.com/repos/phpspec/prophecy/zipball/8724cd239f8ef4c046f55a3b18b4d91cc7f3e4c5",
|
||||||
"reference": "9ca52329bcdd1500de24427542577ebf3fc2f1c9",
|
"reference": "8724cd239f8ef4c046f55a3b18b4d91cc7f3e4c5",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"doctrine/instantiator": "~1.0,>=1.0.2",
|
"doctrine/instantiator": "^1.0.2",
|
||||||
"phpdocumentor/reflection-docblock": "~2.0"
|
"phpdocumentor/reflection-docblock": "~2.0",
|
||||||
|
"sebastian/comparator": "~1.1"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"phpspec/phpspec": "~2.0"
|
"phpspec/phpspec": "~2.0"
|
||||||
@ -5409,7 +5399,7 @@
|
|||||||
"type": "library",
|
"type": "library",
|
||||||
"extra": {
|
"extra": {
|
||||||
"branch-alias": {
|
"branch-alias": {
|
||||||
"dev-master": "1.2.x-dev"
|
"dev-master": "1.4.x-dev"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
@ -5433,7 +5423,7 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"description": "Highly opinionated mocking framework for PHP 5.3+",
|
"description": "Highly opinionated mocking framework for PHP 5.3+",
|
||||||
"homepage": "http://phpspec.org",
|
"homepage": "https://github.com/phpspec/prophecy",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"Double",
|
"Double",
|
||||||
"Dummy",
|
"Dummy",
|
||||||
@ -5442,7 +5432,7 @@
|
|||||||
"spy",
|
"spy",
|
||||||
"stub"
|
"stub"
|
||||||
],
|
],
|
||||||
"time": "2014-11-17 16:23:49"
|
"time": "2015-03-27 19:31:25"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "phpunit/php-code-coverage",
|
"name": "phpunit/php-code-coverage",
|
||||||
@ -5690,16 +5680,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "phpunit/phpunit",
|
"name": "phpunit/phpunit",
|
||||||
"version": "4.5.0",
|
"version": "4.5.1",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/sebastianbergmann/phpunit.git",
|
"url": "https://github.com/sebastianbergmann/phpunit.git",
|
||||||
"reference": "5b578d3865a9128b9c209b011fda6539ec06e7a5"
|
"reference": "d6429b0995b24a2d9dfe5587ee3a7071c1161af4"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/5b578d3865a9128b9c209b011fda6539ec06e7a5",
|
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/d6429b0995b24a2d9dfe5587ee3a7071c1161af4",
|
||||||
"reference": "5b578d3865a9128b9c209b011fda6539ec06e7a5",
|
"reference": "d6429b0995b24a2d9dfe5587ee3a7071c1161af4",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@ -5709,8 +5699,8 @@
|
|||||||
"ext-reflection": "*",
|
"ext-reflection": "*",
|
||||||
"ext-spl": "*",
|
"ext-spl": "*",
|
||||||
"php": ">=5.3.3",
|
"php": ">=5.3.3",
|
||||||
"phpspec/prophecy": "~1.3.1",
|
"phpspec/prophecy": "~1.3,>=1.3.1",
|
||||||
"phpunit/php-code-coverage": "~2.0",
|
"phpunit/php-code-coverage": "~2.0,>=2.0.11",
|
||||||
"phpunit/php-file-iterator": "~1.3.2",
|
"phpunit/php-file-iterator": "~1.3.2",
|
||||||
"phpunit/php-text-template": "~1.2",
|
"phpunit/php-text-template": "~1.2",
|
||||||
"phpunit/php-timer": "~1.0.2",
|
"phpunit/php-timer": "~1.0.2",
|
||||||
@ -5758,7 +5748,7 @@
|
|||||||
"testing",
|
"testing",
|
||||||
"xunit"
|
"xunit"
|
||||||
],
|
],
|
||||||
"time": "2015-02-05 15:51:19"
|
"time": "2015-03-29 09:24:05"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "phpunit/phpunit-mock-objects",
|
"name": "phpunit/phpunit-mock-objects",
|
||||||
@ -6240,7 +6230,6 @@
|
|||||||
"aliases": [],
|
"aliases": [],
|
||||||
"minimum-stability": "stable",
|
"minimum-stability": "stable",
|
||||||
"stability-flags": {
|
"stability-flags": {
|
||||||
"impleri/confide": 20,
|
|
||||||
"anahkiasen/former": 20,
|
"anahkiasen/former": 20,
|
||||||
"chumper/datatable": 20,
|
"chumper/datatable": 20,
|
||||||
"intervention/image": 20,
|
"intervention/image": 20,
|
||||||
|
@ -139,8 +139,6 @@ return [
|
|||||||
/*
|
/*
|
||||||
* Additional Providers
|
* Additional Providers
|
||||||
*/
|
*/
|
||||||
'Zizaco\Confide\ServiceProvider', // Confide to be replaced
|
|
||||||
|
|
||||||
'Bootstrapper\BootstrapperL5ServiceProvider',
|
'Bootstrapper\BootstrapperL5ServiceProvider',
|
||||||
'Former\FormerServiceProvider',
|
'Former\FormerServiceProvider',
|
||||||
'Barryvdh\Debugbar\ServiceProvider',
|
'Barryvdh\Debugbar\ServiceProvider',
|
||||||
@ -280,7 +278,6 @@ return [
|
|||||||
'Countries' => 'Webpatser\Countries\CountriesFacade',
|
'Countries' => 'Webpatser\Countries\CountriesFacade',
|
||||||
'Carbon' => 'Carbon\Carbon',
|
'Carbon' => 'Carbon\Carbon',
|
||||||
'Rocketeer' => 'Rocketeer\Facades\Rocketeer',
|
'Rocketeer' => 'Rocketeer\Facades\Rocketeer',
|
||||||
'Confide' => 'Zizaco\Confide\Facade',// Confide to be replaced
|
|
||||||
|
|
||||||
],
|
],
|
||||||
|
|
||||||
|
125
resources/views/auth/login.blade.php
Normal file
125
resources/views/auth/login.blade.php
Normal file
@ -0,0 +1,125 @@
|
|||||||
|
@extends('master')
|
||||||
|
|
||||||
|
@section('head')
|
||||||
|
|
||||||
|
<link href="{{ asset('css/bootstrap.min.css') }}" rel="stylesheet" type="text/css"/>
|
||||||
|
<link href="{{ asset('css/style.css') }}" rel="stylesheet" type="text/css"/>
|
||||||
|
|
||||||
|
<style type="text/css">
|
||||||
|
body {
|
||||||
|
padding-top: 40px;
|
||||||
|
padding-bottom: 40px;
|
||||||
|
}
|
||||||
|
.modal-header {
|
||||||
|
border-top-left-radius: 3px;
|
||||||
|
border-top-right-radius: 3px;
|
||||||
|
}
|
||||||
|
.modal-header h4 {
|
||||||
|
margin:0;
|
||||||
|
}
|
||||||
|
.modal-header img {
|
||||||
|
float: left;
|
||||||
|
margin-right: 20px;
|
||||||
|
}
|
||||||
|
.form-signin {
|
||||||
|
max-width: 400px;
|
||||||
|
margin: 0 auto;
|
||||||
|
background: #fff;
|
||||||
|
}
|
||||||
|
p.link a {
|
||||||
|
font-size: 11px;
|
||||||
|
}
|
||||||
|
.form-signin .inner {
|
||||||
|
padding: 20px;
|
||||||
|
border-bottom-right-radius: 3px;
|
||||||
|
border-bottom-left-radius: 3px;
|
||||||
|
border-left: 1px solid #ddd;
|
||||||
|
border-right: 1px solid #ddd;
|
||||||
|
border-bottom: 1px solid #ddd;
|
||||||
|
}
|
||||||
|
.form-signin .checkbox {
|
||||||
|
font-weight: normal;
|
||||||
|
}
|
||||||
|
.form-signin .form-control {
|
||||||
|
margin-bottom: 17px !important;
|
||||||
|
}
|
||||||
|
.form-signin .form-control:focus {
|
||||||
|
z-index: 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
||||||
|
|
||||||
|
@endsection
|
||||||
|
|
||||||
|
@section('body')
|
||||||
|
<div class="container">
|
||||||
|
|
||||||
|
|
||||||
|
{!! Former::open('login')->rules(['email' => 'required|email', 'password' => 'required'])->addClass('form-signin') !!}
|
||||||
|
<div class="modal-header">
|
||||||
|
<img src="{{ asset('images/icon-login.png') }}" />
|
||||||
|
<h4>Invoice Ninja | {{ trans('texts.account_login') }}</h4></div>
|
||||||
|
<div class="inner">
|
||||||
|
<p>
|
||||||
|
{!! Former::text('email')->placeholder(trans('texts.email_address'))->raw() !!}
|
||||||
|
{!! Former::password('password')->placeholder(trans('texts.password'))->raw() !!}
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p>{!! Button::primary(trans('texts.lets_go'))->withAttributes(array('class' => 'btn-lg'))->submit()->block() !!}</p>
|
||||||
|
|
||||||
|
<p class="link">
|
||||||
|
{!! link_to('forgot_password', trans('texts.forgot_password')) !!}
|
||||||
|
</p>
|
||||||
|
|
||||||
|
|
||||||
|
@if (count($errors->all()))
|
||||||
|
<div class="alert alert-danger">
|
||||||
|
@foreach ($errors->all() as $error)
|
||||||
|
<li>{{ $error }}</li>
|
||||||
|
@endforeach
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
|
|
||||||
|
@if (Session::has('warning'))
|
||||||
|
<div class="alert alert-warning">{{ Session::get('warning') }}</div>
|
||||||
|
@endif
|
||||||
|
|
||||||
|
@if (Session::has('message'))
|
||||||
|
<div class="alert alert-info">{{ Session::get('message') }}</div>
|
||||||
|
@endif
|
||||||
|
|
||||||
|
@if (Session::has('error'))
|
||||||
|
<div class="alert alert-danger">{{ Session::get('error') }}</div>
|
||||||
|
@endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{!! Former::close() !!}
|
||||||
|
|
||||||
|
@if (!Utils::isNinja())
|
||||||
|
<p/>
|
||||||
|
<center>
|
||||||
|
<div id="fb-root"></div>
|
||||||
|
<script>(function(d, s, id) {
|
||||||
|
var js, fjs = d.getElementsByTagName(s)[0];
|
||||||
|
if (d.getElementById(id)) return;
|
||||||
|
js = d.createElement(s); js.id = id;
|
||||||
|
js.src = "//connect.facebook.net/en_US/all.js#xfbml=1&appId=635126583203143";
|
||||||
|
fjs.parentNode.insertBefore(js, fjs);
|
||||||
|
}(document, 'script', 'facebook-jssdk'));</script>
|
||||||
|
|
||||||
|
<div class="fb-follow" data-href="https://www.facebook.com/invoiceninja" data-colorscheme="light" data-layout="button" data-show-faces="false"></div>
|
||||||
|
|
||||||
|
<a href="https://twitter.com/invoiceninja" class="twitter-follow-button" data-show-count="false" data-related="hillelcoren" data-size="medium">Follow @invoiceninja</a>
|
||||||
|
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
|
||||||
|
|
||||||
|
<iframe src="https://ghbtns.com/github-btn.html?user=hillelcoren&repo=invoice-ninja&type=star&count=false" frameborder="0" scrolling="0" width="50px" height="20px"></iframe>
|
||||||
|
</center>
|
||||||
|
@endif
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
@endsection
|
Loading…
x
Reference in New Issue
Block a user