Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
laravel-adminpanel
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
laravel-adminpanel
Commits
325291d3
Commit
325291d3
authored
Nov 30, 2017
by
Viral Solani
Committed by
StyleCI Bot
Nov 30, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Apply fixes from StyleCI
parent
0fc48c64
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
18 additions
and
20 deletions
+18
-20
ForgotPasswordController.php
app/Http/Controllers/Api/V1/ForgotPasswordController.php
+7
-9
RegisterController.php
app/Http/Controllers/Api/V1/RegisterController.php
+4
-4
UsersController.php
app/Http/Controllers/Api/V1/UsersController.php
+3
-3
Kernel.php
app/Http/Kernel.php
+2
-2
User.php
app/Models/Access/User/User.php
+1
-1
api.php
resources/lang/en/api.php
+1
-1
No files found.
app/Http/Controllers/Api/V1/ForgotPasswordController.php
View file @
325291d3
...
...
@@ -2,18 +2,15 @@
namespace
App\Http\Controllers\Api\V1
;
use
Validator
;
use
App\Models\User\User
;
use
Illuminate\Http\Request
;
use
App\Http\Controllers\Controller
;
use
App\Repositories\UserRepository
;
use
Illuminate\Support\Facades\Password
;
use
App\Notifications\UserNeedsPasswordReset
;
use
App\Repositories\UserRepository
;
use
Illuminate\Http\Request
;
use
Validator
;
class
ForgotPasswordController
extends
APIController
{
/**
/**
* __construct.
*
* @param $repository
...
...
@@ -26,7 +23,8 @@ class ForgotPasswordController extends APIController
/**
* Send a reset link to the given user.
*
* @param \Illuminate\Http\Request $request
* @param \Illuminate\Http\Request $request
*
* @return \Illuminate\Http\JsonResponse
*/
public
function
sendResetLinkEmail
(
Request
$request
)
...
...
@@ -41,7 +39,7 @@ class ForgotPasswordController extends APIController
$user
=
$this
->
repository
->
getUserByEmail
(
$request
);
if
(
!
$user
)
{
if
(
!
$user
)
{
return
$this
->
respondNotFound
(
trans
(
'api.messages.forgot_password.validation.email_not_found'
));
}
...
...
app/Http/Controllers/Api/V1/RegisterController.php
View file @
325291d3
...
...
@@ -2,12 +2,12 @@
namespace
App\Http\Controllers\Api\V1
;
use
App\Models\User\User
;
use
App\Repositories\Frontend\Access\User\UserRepository
;
use
Config
;
use
Illuminate\Http\Request
;
use
JWTAuth
;
use
Validator
;
use
App\Models\User\User
;
use
Illuminate\Http\Request
;
use
App\Repositories\Frontend\Access\User\UserRepository
;
class
RegisterController
extends
APIController
{
...
...
@@ -38,7 +38,7 @@ class RegisterController extends APIController
'email'
=>
'required|email|unique:users'
,
'password'
=>
'required|min:4'
,
'password_confirmation'
=>
'required|same:password'
,
'is_term_accept'
=>
'required'
'is_term_accept'
=>
'required'
,
]);
if
(
$validation
->
fails
())
{
...
...
app/Http/Controllers/Api/V1/UsersController.php
View file @
325291d3
...
...
@@ -2,11 +2,11 @@
namespace
App\Http\Controllers\Api\V1
;
use
Validator
;
use
App\Models\User\User
;
use
Illuminate\Http\Request
;
use
App\Http\Resources\UserResource
;
use
App\Models\User\User
;
use
App\Repositories\Backend\Access\User\UserRepository
;
use
Illuminate\Http\Request
;
use
Validator
;
class
UsersController
extends
APIController
{
...
...
app/Http/Kernel.php
View file @
325291d3
...
...
@@ -75,7 +75,7 @@ class Kernel extends HttpKernel
*/
'access.routeNeedsRole'
=>
\App\Http\Middleware\RouteNeedsRole
::
class
,
'access.routeNeedsPermission'
=>
\App\Http\Middleware\RouteNeedsPermission
::
class
,
'jwt.auth'
=>
GetUserFromToken
::
class
,
'jwt.refresh'
=>
RefreshToken
::
class
,
'jwt.auth'
=>
GetUserFromToken
::
class
,
'jwt.refresh'
=>
RefreshToken
::
class
,
];
}
app/Models/Access/User/User.php
View file @
325291d3
...
...
@@ -9,8 +9,8 @@ use App\Models\Access\User\Traits\UserAccess;
use
App\Models\Access\User\Traits\UserSendPasswordReset
;
use
Illuminate\Database\Eloquent\SoftDeletes
;
use
Illuminate\Foundation\Auth\User
as
Authenticatable
;
use
Tymon\JWTAuth\Contracts\JWTSubject
;
use
Illuminate\Notifications\Notifiable
;
use
Tymon\JWTAuth\Contracts\JWTSubject
;
/**
* Class User.
...
...
resources/lang/en/api.php
View file @
325291d3
...
...
@@ -14,7 +14,7 @@ return [
'success'
=>
'Successfully logged out.'
,
],
'forgot_password'
=>
[
'success'
=>
'We have sent email with reset password link. Please check your inbox!.'
,
'success'
=>
'We have sent email with reset password link. Please check your inbox!.'
,
'validation'
=>
[
'email_not_found'
=>
'This email address is not registered.'
,
],
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment