Skip to content

Commit 966f930

Browse files
author
jeremykenedy
committed
clear random added user, what was that?
1 parent dffbe8d commit 966f930

20 files changed

+300
-375
lines changed

Diff for: .env.example

+3-3
Original file line numberDiff line numberDiff line change
@@ -50,17 +50,17 @@ YOUTUBE_REDIRECT_URI=https://larablog.io/social/handle/youtube
5050
# http://www.twitch.tv/kraken/oauth2/clients/new
5151
TWITCH_KEY=YOURKEYHERE
5252
TWITCH_SECRET=YOURSECRETHERE
53-
TWITCH_REDIRECT_URI=http://laravel-admin.local/social/handle/twitch
53+
TWITCH_REDIRECT_URI=http://laravel-authentication.local/social/handle/twitch
5454

5555
# https://instagram.com/developer/register/
5656
INSTAGRAM_KEY=YOURKEYHERE
5757
INSTAGRAM_SECRET=YOURSECRETHERE
58-
INSTAGRAM_REDIRECT_URI=http://laravel-admin.local/social/handle/instagram
58+
INSTAGRAM_REDIRECT_URI=http://laravel-authentication.local/social/handle/instagram
5959

6060
# https://basecamp.com/
6161
# https://github.com/basecamp/basecamp-classic-api
6262
37SIGNALS_KEY=YOURKEYHERE
6363
37SIGNALS_SECRET=YOURSECRETHERE
64-
37SIGNALS_REDIRECT_URI=http://laravel-admin.local/social/handle/37signals
64+
37SIGNALS_REDIRECT_URI=http://laravel-authentication.local/social/handle/37signals
6565

6666

Diff for: README.md

+105-73
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ And thats it with the caveat of setting up and configuring your development envi
9797
'client_id' => env('TWITCH_KEY'),
9898
'client_secret' => env('TWITCH_SECRET'),
9999
'redirect' => env('TWITCH_REDIRECT_URI'),
100-
],
100+
],
101101
```
102102
5. Add the API credentials to ``` /.env ```
103103
* Example:
@@ -111,15 +111,15 @@ And thats it with the caveat of setting up and configuring your development envi
111111
In file ```/resources/views/auth/login.blade.php``` add ONE of the following:
112112
* Conventional HTML:
113113
```
114-
114+
115115
<a href="{{ route('social.redirect', ['provider' => 'twitch']) }}" class="btn btn-lg btn-primary btn-block twitch">Twitch</a>
116-
117-
```
116+
117+
```
118118
* Use Laravel HTML Facade (recommended)
119119
```
120-
120+
121121
{!! HTML::link(route('social.redirect', ['provider' => 'twitch']), 'Twitch', array('class' => 'btn btn-lg btn-primary btn-block twitch')) !!}
122-
122+
123123
```
124124
125125
--
@@ -154,7 +154,7 @@ Bootstrap is a sleek, intuitive, and powerful front-end framework for faster and
154154
155155
[Bootstrap](http://getbootstrap.com)'s documentation, included in this repo in the root directory, is built with [Jekyll](http://jekyllrb.com) and publicly hosted on GitHub Pages at [<http://getbootstrap.com>](http://getbootstrap.com).
156156
157-
## laravel-admin
157+
## laravel-auth
158158
159159
[![Build Status](https://img.shields.io/travis/twbs/bootstrap/master.svg)](https://travis-ci.org/twbs/bootstrap)
160160
[![License](https://poser.pugx.org/laravel/framework/license.svg)](https://packagist.org/packages/laravel/framework)
@@ -203,7 +203,7 @@ GOOGLE_REDIRECT=http://yourwebsiteURLhere.com/social/handle/google
203203
204204
### File Structure
205205
```
206-
laravel-admin/
206+
laravel-auth/
207207
├── .bowerrc
208208
├── .env
209209
├── bower.json
@@ -216,25 +216,48 @@ laravel-admin/
216216
├── README.md
217217
├── server.php
218218
├── app/
219-
│ ├── User.php
220-
│ └── Http/
221-
│ ├── kernal.php
222-
│ ├── routes.php
223-
│ ├── Controllers/
224-
│ │ ├── Auth/
225-
│ │ │ ├── AuthController.php
226-
│ │ │ └── PasswordController.php
227-
│ │ ├── adminController.php
228-
│ │ ├── Controller.php
229-
│ │ ├── UsersController.php
230-
│ │ └── WelcomeController.php
231-
│ ├── Middleware/
232-
│ │ ├── Authenticate.php
233-
│ │ ├── EncryptCookies.php
234-
│ │ ├── RedirectAuthenticated.php
235-
│ │ └── VerifyCsrfToken.php
236-
│ └── Requests/
237-
│ └── Request.php
219+
│ ├── Http/
220+
│ │ ├── kernal.php
221+
│ │ ├── routes.php
222+
│ │ ├── Controllers/
223+
│ │ │ ├── Auth/
224+
│ │ │ │ ├── AuthController.php
225+
│ │ │ │ └── PasswordController.php
226+
│ │ │ ├── Controller.php
227+
│ │ │ ├── HomeController.php
228+
│ │ │ ├── ProfilesController.php
229+
│ │ │ ├── UserController.php
230+
│ │ │ └── WelcomeController.php
231+
│ │ ├── Middleware/
232+
│ │ │ ├── Authenticate.php
233+
│ │ │ ├── CheckCurrentUser.php
234+
│ │ │ ├── EncryptCookies.php
235+
│ │ │ ├── RedirectAuthenticated.php
236+
│ │ │ └── VerifyCsrfToken.php
237+
│ │ └── Requests/
238+
│ │ └── Request.php
239+
│ ├── Logic/
240+
│ │ ├── Mailers/
241+
│ │ │ ├── Mailer.php
242+
│ │ │ └── UserMailer.php
243+
│ │ └── User/
244+
│ │ └── UserRepository.php
245+
│ ├── Models/
246+
│ │ ├── Password.php
247+
│ │ ├── Profile.php
248+
│ │ ├── Role.php
249+
│ │ ├── Social.php
250+
│ │ └── User.php
251+
│ ├── Providers/
252+
│ │ ├── AppServiceProvider.php
253+
│ │ ├── BusServiceProvider.php
254+
│ │ ├── ConfigServiceProvider.php
255+
│ │ ├── EventServiceProvider.php
256+
│ │ └── RouteServiceProvider.php
257+
│ ├── Services/
258+
│ │ └── Registrar.php
259+
│ └── Traits/
260+
│ └── CaptchaTrait.php
238261
├── config/
239262
│ ├── app.php
240263
│ ├── auth.php
@@ -249,49 +272,66 @@ laravel-admin/
249272
│ └── view.php
250273
├── database/
251274
│ ├── migrations/
252-
│ │ ├──
253-
│ │ ├──
254-
│ │ └──
275+
│ │ ├── 2014_10_12_000000_create_users_table.php
276+
│ │ ├── 2014_10_12_100000_create_password_resets_table.php
277+
│ │ ├── 2015_05_15_124334_update_users_table.php
278+
│ │ ├── 2015_10_21_173121_create_users_roles.php
279+
│ │ ├── 2015_10_21_173333_create_user_role.php
280+
│ │ ├── 2015_10_21_173520_create_social_logins.php
281+
│ │ └── 2015_11_02_004932_create_profiles_table.php
255282
│ └── seeds/
256-
│ ├──
257-
│ ├──
258-
│ └── DatabaseSeeder.php
283+
│ ├── DatabaseSeeder.php
284+
│ └── SeedRoles.php
259285
├── public/
260286
│ ├── .htaccess
261287
│ ├── index.php
262288
│ └── assets/
263289
│ ├── css/
264-
│ ├── fonts
265-
│ └── js
266-
└── resources/
267-
├── assets/
268-
├── lang/
269-
└── views/
270-
├── app.blade.php
271-
├── app.home.php //TODO[maybe.. :)~ ]: TO BE REMOVED AFTER CAN SAFELY CONFIRM OK
272-
├── emails/
273-
│ ├── activateAccount.blade.php
274-
│ └── password.blade.php
275-
├── auth/
276-
│ ├── activateAccount.blade.php
277-
│ ├── guest_activate.blade.php
278-
│ ├── login.blade.php
279-
│ ├── password.blade.php
280-
│ ├── register.blade.php
281-
│ ├── reset.blade.php
282-
│ └── tooManyEmails.blade.php
283-
├── emails/
284-
│ ├── activateAccount.blade.php
285-
│ └── password.blade.php
286-
├── errors/
287-
│ ├── 403.blade.php
288-
│ ├── 404.blade.php
289-
│ └── 503.blade.php
290-
├── pages/
291-
│ ├── home.blade.php
292-
│ └── status.blade.php
293-
└── vendor/
294-
290+
│ ├── fonts/
291+
│ └── ~~js/~~
292+
├── resources/
293+
│ ├── assets/
294+
│ │ └── Less/
295+
│ │ ├── bootstrap/
296+
│ │ └── app.less
297+
│ ├── lang/
298+
│ │ └── en/
299+
│ │ ├── auth.php
300+
│ │ ├── email.php
301+
│ │ ├── pagination.php
302+
│ │ ├── passwords.php
303+
│ │ ├── profile.php
304+
│ │ ├── titles.php
305+
│ │ └── validation.php
306+
│ └── views/
307+
│ ├── app.blade.php
308+
│ ├── welcome.blade.php
309+
│ ├── auth/
310+
│ │ ├── activateAccount.blade.php
311+
│ │ ├── guest_activate.blade.php
312+
│ │ ├── login.blade.php
313+
│ │ ├── password.blade.php
314+
│ │ ├── register.blade.php
315+
│ │ ├── reset.blade.php
316+
│ │ └── tooManyEmails.blade.php
317+
│ ├── emails/
318+
│ │ ├── activateAccount.blade.php
319+
│ │ └── password.blade.php
320+
│ ├── errors/
321+
│ │ ├── 403.blade.php
322+
│ │ ├── 404.blade.php
323+
│ │ └── 503.blade.php
324+
│ ├── pages/
325+
│ │ ├── home.blade.php
326+
│ │ └── status.blade.php
327+
│ ├── partials
328+
│ │ └── nav.blade.php
329+
│ └── profiles
330+
│ ├── edit.blade.php
331+
│ └── show.blade.php
332+
├── storage/
333+
├── tests/
334+
└── vendor/
295335
```
296336
297337
#### Laravel Developement Packages Used References
@@ -331,7 +371,6 @@ laravel-admin/
331371
| ```sudo ssh [email protected] -p 222``` | Access Vagrant VM via SSH. Password is ``` vagrant ``` |
332372
| ```mysql -u homestead -psecret``` | Access Vagrant VM MySQL. Password is ``` vagrant ``` |
333373
334-
For reference AdminLTE can be installed into projects using Bower.
335374
If you do not have Bower, it can be installed using Node Package Manager (NPM).
336375
If you do not have NPM, it can be installed using NODE JS.
337376
@@ -378,13 +417,6 @@ sudo brew tap homebrew/php
378417
sudo brew install composer
379418
```
380419
381-
###Install AdminLTE
382-
####AdminLTE can be installed using the following command:
383-
Note: Run from projects public folder
384-
```
385-
sudo git clone https://github.com/jeremykenedy/AdminLTE.git admin
386-
```
387-
388420
#### Very Helpful Aliases
389421
You can edit/or create your systems (MAC OS X) alias file with the follwing command:
390422
```
@@ -691,7 +723,7 @@ Note: Replace examples URI used in Vargrant/Homestead configuration file and use
691723
##
692724
127.0.0.1 localhost
693725
255.255.255.255 broadcasthost
694-
192.168.10.10 laravel-admin.local
726+
192.168.10.10 laravel-authentication.local
695727
```
696728
697729
---

Diff for: app/Http/Controllers/Auth/AuthController.php

+9-2
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,12 @@
22

33
use App\Http\Controllers\Controller;
44
use Illuminate\Foundation\Auth\AuthenticatesAndRegistersUsers;
5+
use Illuminate\Foundation\Auth\ThrottlesLogins;
56
use Illuminate\Contracts\Auth\Guard;
67
use Illuminate\Http\Request;
78
use Illuminate\Support\Facades;
89
use App\Logic\User\UserRepository;
9-
use App\User;
10+
use App\Models\User;
1011
use App\Models\Social;
1112
use App\Models\Role;
1213
use App\Models\Profile;
@@ -27,8 +28,14 @@ class AuthController extends Controller {
2728
|
2829
*/
2930

31+
32+
use AuthenticatesAndRegistersUsers
33+
{
34+
getLogout as authLogout;
35+
}
3036
use CaptchaTrait;
31-
use AuthenticatesAndRegistersUsers;
37+
use ThrottlesLogins;
38+
3239
protected $auth;
3340
protected $userRepository;
3441

Diff for: app/Http/Controllers/ProfilesController.php

+1-6
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,12 @@
88
use Illuminate\Database\Eloquent\ModelNotFoundException;
99
use App\Logic\User\UserRepository;
1010
use App\Models\Profile;
11-
use App\User;
11+
use App\Models\User;
1212
use Validator;
1313
use Input;
1414

1515
class ProfilesController extends Controller {
1616

17-
//use AuthenticatesAndRegistersUsers;
1817
protected $auth;
1918
protected $userRepository;
2019

@@ -81,13 +80,11 @@ public function edit($username)
8180
{
8281
try {
8382
$user = $this->getUserByUsername($username);
84-
//dd($user->toArray());
8583
} catch (ModelNotFoundException $e) {
8684
return view('pages.status')
8785
->with('error',\Lang::get('profile.notYourProfile'))
8886
->with('error_title',\Lang::get('profile.notYourProfileTitle'));
8987
}
90-
//dd($user->toArray());
9188
return view('profiles.edit')->withUser($user);
9289
}
9390

@@ -101,9 +98,7 @@ public function edit($username)
10198
public function update($username, Request $request)
10299
{
103100
$user = $this->getUserByUsername($username);
104-
105101
$input = Input::only('location', 'bio', 'twitter_username', 'github_username');
106-
107102
$profile_validator = $this->profile_validator($request->all());
108103

109104
if ($profile_validator->fails()) {

0 commit comments

Comments
 (0)