Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
M
MP-Tsel
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Dzulfiqar Ridha
MP-Tsel
Commits
1d9c6dfa
Commit
1d9c6dfa
authored
Apr 10, 2019
by
Dzulfqar Ridha
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
minor update
parent
8c8baa05
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
17 additions
and
15 deletions
+17
-15
UserController.php
app/Http/Controllers/UserController.php
+8
-8
CreateRequest.php
app/Http/Request/User/CreateRequest.php
+3
-1
GetByIdRequest.php
app/Http/Request/User/GetByIdRequest.php
+1
-1
GetByUsernameRequest.php
app/Http/Request/User/GetByUsernameRequest.php
+1
-1
UpdateRequest.php
app/Http/Request/User/UpdateRequest.php
+1
-1
web.php
routes/web.php
+3
-3
No files found.
app/Http/Controllers/UserController.php
View file @
1d9c6dfa
...
...
@@ -9,14 +9,14 @@
namespace
App\Http\Controllers
;
use
App\Classes\MResponse
;
use
App\Ht
tp\Request\User\UserByUsernam
eRequest
;
use
App\Http\Request\User\
CreateUser
Request
;
use
App\Http\Request\User\
User
ByIdRequest
;
use
App\Http\Request\User\Update
User
Request
;
use
App\Ht
pp\Request\User\Creat
eRequest
;
use
App\Http\Request\User\
GetByUsername
Request
;
use
App\Http\Request\User\
Get
ByIdRequest
;
use
App\Http\Request\User\UpdateRequest
;
class
UserController
extends
BaseController
{
public
function
getByUsername
(
User
ByUsernameRequest
$request
)
public
function
getByUsername
(
Get
ByUsernameRequest
$request
)
{
$mResponse
=
new
MResponse
();
$statusCode
=
200
;
...
...
@@ -46,7 +46,7 @@ class UserController extends BaseController
return
response
()
->
json
(
$mResponse
,
$statusCode
);
}
public
function
getById
(
User
ByIdRequest
$request
){
public
function
getById
(
Get
ByIdRequest
$request
){
$mResponse
=
new
MResponse
();
$statusCode
=
200
;
...
...
@@ -73,7 +73,7 @@ class UserController extends BaseController
return
response
()
->
json
(
$mResponse
,
$statusCode
);
}
public
function
createUser
(
Create
User
Request
$request
)
public
function
createUser
(
CreateRequest
$request
)
{
$mResponse
=
new
MResponse
();
$statusCode
=
200
;
...
...
@@ -108,7 +108,7 @@ class UserController extends BaseController
return
response
()
->
json
(
$mResponse
,
$statusCode
);
}
public
function
updateUser
(
Update
User
Request
$request
){
public
function
updateUser
(
UpdateRequest
$request
){
$mResponse
=
new
MResponse
();
$statusCode
=
200
;
...
...
app/Http/Request/User/Create
User
Request.php
→
app/Http/Request/User/CreateRequest.php
View file @
1d9c6dfa
...
...
@@ -8,7 +8,9 @@
namespace
App\Http\Request
;
class
CreateUserRequest
extends
FormRequestErrors
use
App\Htpp\Request\FormRequestErrors
;
class
CreateRequest
extends
FormRequestErrors
{
protected
function
validationData
()
{
...
...
app/Http/Request/User/
User
ByIdRequest.php
→
app/Http/Request/User/
Get
ByIdRequest.php
View file @
1d9c6dfa
...
...
@@ -8,7 +8,7 @@
namespace
App\Http\Request
;
class
User
ByIdRequest
extends
FormRequestErrors
class
Get
ByIdRequest
extends
FormRequestErrors
{
protected
function
validationData
()
{
...
...
app/Http/Request/User/
User
ByUsernameRequest.php
→
app/Http/Request/User/
Get
ByUsernameRequest.php
View file @
1d9c6dfa
...
...
@@ -8,7 +8,7 @@
namespace
App\Http\Request
;
class
User
ByUsernameRequest
extends
FormRequestErrors
class
Get
ByUsernameRequest
extends
FormRequestErrors
{
protected
function
validationData
()
{
...
...
app/Http/Request/User/Update
User
Request.php
→
app/Http/Request/User/UpdateRequest.php
View file @
1d9c6dfa
...
...
@@ -8,7 +8,7 @@
namespace
App\Http\Request
;
class
Update
User
Request
extends
FormRequestErrors
class
UpdateRequest
extends
FormRequestErrors
{
protected
function
validationData
()
{
...
...
routes/web.php
View file @
1d9c6dfa
...
...
@@ -17,7 +17,7 @@ $router->get('/', function () use ($router) {
$router
->
group
([
'prefix'
=>
'mashery'
],
function
()
use
(
$router
)
{
//mashery/token
$router
->
ge
t
(
'token'
,
'MasheryController@getToken'
);
$router
->
pos
t
(
'token'
,
'MasheryController@getToken'
);
});
$router
->
group
([
'middleware'
=>
'client.auth'
],
function
()
use
(
$router
)
{
...
...
@@ -31,7 +31,7 @@ $router->group(['middleware' => 'client.auth'], function () use ($router) {
$router
->
group
([
'prefix'
=>
'application'
],
function
()
use
(
$router
)
{
$router
->
post
(
'create'
,
'ApplicationController@create'
);
$router
->
put
(
'update'
,
'ApplicationController@update'
);
$router
->
del
(
'delete'
,
'ApplicationController@delete'
);
$router
->
del
ete
(
'delete'
,
'ApplicationController@delete'
);
$router
->
get
(
'by-userid'
,
'ApplicationController@getByUserId'
);
$router
->
get
(
'by-appid'
,
'ApplicationController@getByAppId'
);
});
...
...
@@ -46,7 +46,7 @@ $router->group(['middleware' => 'client.auth'], function () use ($router) {
$router
->
post
(
'create'
,
'PackageKeyController@create'
);
$router
->
put
(
'activate'
,
'PackageKeyController@activate'
);
$router
->
put
(
'disable'
,
'PackageKeyController@disable'
);
$router
->
del
(
'delete'
,
'PackageKeyController@delete'
);
$router
->
del
ete
(
'delete'
,
'PackageKeyController@delete'
);
$router
->
get
(
'by-username'
,
'PackageKeyController@getByUser'
);
$router
->
put
(
'update-plan'
,
'PackageKeyController@updatePlan'
);
});
...
...
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