forked from cydrobolt/polr
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement migrations within setup, reduce redundancy, 2016
- Loading branch information
Showing
12 changed files
with
118 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<?php | ||
namespace App\Factories; | ||
|
||
use Hash; | ||
use App\Models\User; | ||
use App\Helpers\CryptoHelper; | ||
class UserFactory { | ||
public static function createUser($username, $email, $password, $active=0, $ip='127.0.0.1') { | ||
$hashed_password = Hash::make($password); | ||
|
||
$recovery_key = CryptoHelper::generateRandomHex(50); | ||
$user = new User; | ||
$user->username = $username; | ||
$user->password = $hashed_password; | ||
$user->email = $email; | ||
$user->recovery_key = $recovery_key; | ||
$user->active = $active; | ||
$user->ip = $ip; | ||
$user->save(); | ||
|
||
return $user; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
@extends('layouts.minimal') | ||
|
||
@section('title') | ||
Setup Completed | ||
@endsection | ||
|
||
@section('css') | ||
<link rel='stylesheet' href='/css/default-bootstrap.min.css'> | ||
<link rel='stylesheet' href='/css/setup.css'> | ||
@endsection | ||
|
||
@section('content') | ||
<div class="navbar navbar-default navbar-fixed-top"> | ||
<a class="navbar-brand" href="/">Polr</a> | ||
</div> | ||
|
||
<div class='row'> | ||
<div class='col-md-3'></div> | ||
|
||
<div class='col-md-6 setup-body well'> | ||
<div class='setup-center'> | ||
<img class='setup-logo' src='/img/logo.png'> | ||
</div> | ||
<h2>Setup Complete</h2> | ||
<p>Your Polr setup is complete. To continue, you may <a href='{{route('login')}}'>login</a> or | ||
access your <a href='{{route('index')}}'>home page</a>. | ||
</p> | ||
<p>Consider taking a look at the <a href='http://docs.polr.me/'>docs</a> or <a href='//github.com/cydrobolt/polr'>README</a> | ||
for assistance. | ||
</p> | ||
<p>You may also join us on IRC at <a href='//webchat.freenode.net/?channels=#polr'><code>#polr</code></a> on freenode for assistance or questions.</p> | ||
|
||
<p>Thanks for using Polr!</p> | ||
</div> | ||
|
||
<div class='col-md-3'></div> | ||
</div> | ||
|
||
|
||
@endsection |