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
4b4861f2
Commit
4b4861f2
authored
Apr 10, 2019
by
Dzulfqar Ridha
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
last
parent
eab15229
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
50 additions
and
1 deletion
+50
-1
UserController.php
app/Http/Controllers/UserController.php
+2
-1
UserCreatesRequest.php
app/Http/Request/UserCreatesRequest.php
+48
-0
No files found.
app/Http/Controllers/UserController.php
View file @
4b4861f2
...
...
@@ -10,6 +10,7 @@ namespace App\Http\Controllers;
use
App\Classes\MResponse
;
use
App\Htpp\Request\UserCreateRequest
;
use
App\Htpp\Request\UserCreatesRequest
;
use
App\Http\Request\UserGetByUsernameRequest
;
use
App\Http\Request\UserGetByIdRequest
;
use
App\Http\Request\UserUpdateRequest
;
...
...
@@ -73,7 +74,7 @@ class UserController extends BaseController
return
response
()
->
json
(
$mResponse
,
$statusCode
);
}
public
function
createUser
(
UserCreateRequest
$request
)
public
function
createUser
(
UserCreate
s
Request
$request
)
{
$mResponse
=
new
MResponse
();
$statusCode
=
200
;
...
...
app/Http/Request/UserCreatesRequest.php
0 → 100644
View file @
4b4861f2
<?php
/**
* Created by PhpStorm.
* User: gets
* Date: 4/4/2019
* Time: 3:45 PM
*/
namespace
App\Http\Request
;
class
UserCreatesRequest
extends
FormRequestErrors
{
protected
function
validationData
()
{
return
$this
->
all
();
}
/**
* Get the validation rules that apply to the request.
*
* @return array
*/
public
function
rules
()
{
return
[
'username'
=>
'required'
,
'email'
=>
'required'
,
'name'
=>
'required'
,
'password'
=>
'required'
];
}
/**
* Get custom messages for validator errors.
*
* @return array
*/
public
function
messages
()
{
return
[];
}
protected
function
modifyData
()
{
$data
=
$this
->
validationData
();
return
$data
;
}
}
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