Commit e2e155d7 authored by Viral Solani's avatar Viral Solani Committed by GitHub

Merge pull request #5 from viralsolani/viral

Resolve Misc. Issues
parents 49789455 29e8d9c7
<?php
namespace App\Api\V1\Requests;
use Config;
use Dingo\Api\Http\FormRequest;
class ConfirmAccountRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return true;
}
/**
* Get the validation rules that apply to the request.
*
* @return array
*/
public function rules()
{
return Config::get('api_validation.confirmaccount.rules');
}
}
<?php
namespace App\Api\V1\Requests;
use Config;
use Dingo\Api\Http\FormRequest;
class ForgotPasswordRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return true;
}
/**
* Get the validation rules that apply to the request.
*
* @return array
*/
public function rules()
{
return Config::get('api_validation.forgotpassword.rules');
}
/**
* Get the messages for validation rules.
*
* @return array
*/
public function messages()
{
return[
'email.required' => trans('validation.api.login.email_required'),
'email.email' => trans('validation.api.login.valid_email'),
];
}
}
<?php
namespace App\Api\V1\Requests;
use Config;
use Dingo\Api\Http\FormRequest;
class LoginRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return true;
}
/**
* Get the validation rules that apply to the request.
*
* @return array
*/
public function rules()
{
return Config::get('api_validation.login.rules');
}
/**
* Get the messages for validation rules.
*
* @return array
*/
public function messages()
{
return[
'email.required' => trans('validation.api.login.email_required'),
'email.email' => trans('validation.api.login.valid_email'),
'password.required' => trans('validation.api.login.password_required'),
];
}
}
<?php
namespace App\Api\V1\Requests;
use Config;
use Dingo\Api\Http\FormRequest;
class RegisterRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return true;
}
/**
* Get the validation rules that apply to the request.
*
* @return array
*/
public function rules()
{
return Config::get('api_validation.register.rules');
}
/**
* Get the validation massages that apply to the rules.
*
* @return array
*/
public function messages()
{
return [
'state_id.required' => trans('validation.api.register.state_required'),
'city_id.required' => trans('validation.api.register.city_required'),
];
}
}
<?php
namespace App\Api\V1\Requests;
use Config;
use Dingo\Api\Http\FormRequest;
class ResetPasswordRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return true;
}
/**
* Get the validation rules that apply to the request.
*
* @return array
*/
public function rules()
{
return Config::get('api_validation.resetpassword.rules');
}
/**
* Get the messages for validation rules.
*
* @return array
*/
public function messages()
{
return[
'email.required' => trans('validation.api.resetpassword.email_required'),
'email.email' => trans('validation.api.resetpassword.valid_email'),
'password.required' => trans('validation.api.resetpassword.password_required'),
'password.confirmed' => trans('validation.api.resetpassword.password_confirmed'),
'token.required' => trans('validation.api.resetpassword.token_required'),
'password_confirmation.required' => trans('validation.api.resetpassword.confirm_password_required'),
];
}
}
......@@ -5,7 +5,7 @@ namespace App\Listeners\Backend\Access\Permission;
/**
* Class PermissionEventListener.
*/
class PermissionEventListner
class PermissionEventListener
{
/**
* @var string
......
......@@ -5,7 +5,7 @@ namespace App\Listeners\Backend\BlogCategories;
/**
* Class BlogCategoryEventListener.
*/
class BlogCategoryEventListner
class BlogCategoryEventListener
{
/**
* @var string
......
......@@ -5,7 +5,7 @@ namespace App\Listeners\Backend\BlogTags;
/**
* Class BlogTagEventListener.
*/
class BlogTagEventListner
class BlogTagEventListener
{
/**
* @var string
......
......@@ -5,7 +5,7 @@ namespace App\Listeners\Backend\Blogs;
/**
* Class BlogEventListener.
*/
class BlogEventListner
class BlogEventListener
{
/**
* @var string
......
......@@ -5,7 +5,7 @@ namespace App\Listeners\Backend\CMSPages;
/**
* Class CMSPageEventListener.
*/
class CMSPageEventListner
class CMSPageEventListener
{
/**
* @var string
......
......@@ -5,7 +5,7 @@ namespace App\Listeners\Backend\EmailTemplates;
/**
* Class EmailTemplateEventListener.
*/
class EmailTemplateEventListner
class EmailTemplateEventListener
{
/**
* @var string
......
......@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"This file is @generated automatically"
],
"content-hash": "b23e2b970e66371f50158d77fc4e8264",
"content-hash": "3ac44cf6055afa0caf4b5fed56f6ce1c",
"packages": [
{
"name": "arcanedev/log-viewer",
......@@ -295,136 +295,6 @@
],
"time": "2017-09-14T08:23:50+00:00"
},
{
"name": "dingo/api",
"version": "v1.0.0-beta8",
"source": {
"type": "git",
"url": "https://github.com/dingo/api.git",
"reference": "46cffad61942caa094dd876155e503b6819c5095"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/dingo/api/zipball/46cffad61942caa094dd876155e503b6819c5095",
"reference": "46cffad61942caa094dd876155e503b6819c5095",
"shasum": ""
},
"require": {
"dingo/blueprint": "0.2.*",
"illuminate/routing": "^5.1",
"illuminate/support": "^5.1",
"league/fractal": ">=0.12.0",
"php": "^5.5.9 || ^7.0"
},
"require-dev": {
"illuminate/auth": "^5.1",
"illuminate/cache": "^5.1",
"illuminate/console": "^5.1",
"illuminate/database": "^5.1",
"illuminate/events": "^5.1",
"illuminate/filesystem": "^5.1",
"illuminate/log": "^5.1",
"illuminate/pagination": "^5.1",
"laravel/lumen-framework": "5.1.* || 5.2.*",
"lucadegasperi/oauth2-server-laravel": "5.0.*",
"mockery/mockery": "~0.9",
"phpunit/phpunit": "^4.8 || ^5.0",
"squizlabs/php_codesniffer": "~2.0",
"tymon/jwt-auth": "1.0.*"
},
"suggest": {
"lucadegasperi/oauth2-server-laravel": "Protect your API with OAuth 2.0.",
"tymon/jwt-auth": "Protect your API with JSON Web Tokens."
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.0-dev"
}
},
"autoload": {
"psr-4": {
"Dingo\\Api\\": "src/"
},
"files": [
"src/helpers.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Jason Lewis",
"email": "jason.lewis1991@gmail.com"
}
],
"description": "A RESTful API package for the Laravel and Lumen frameworks.",
"keywords": [
"api",
"dingo",
"laravel",
"restful"
],
"time": "2017-02-10T00:56:04+00:00"
},
{
"name": "dingo/blueprint",
"version": "v0.2.3",
"source": {
"type": "git",
"url": "https://github.com/dingo/blueprint.git",
"reference": "ffeb6bcafdd27c68b7ec2eee8c6a8671f1d43939"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/dingo/blueprint/zipball/ffeb6bcafdd27c68b7ec2eee8c6a8671f1d43939",
"reference": "ffeb6bcafdd27c68b7ec2eee8c6a8671f1d43939",
"shasum": ""
},
"require": {
"doctrine/annotations": "~1.2",
"illuminate/filesystem": "^5.1",
"illuminate/support": "^5.1",
"php": ">=5.5.9",
"phpdocumentor/reflection-docblock": "^3.1"
},
"require-dev": {
"phpunit/phpunit": "~4.0",
"squizlabs/php_codesniffer": "~2.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "0.2-dev"
}
},
"autoload": {
"psr-4": {
"Dingo\\Blueprint\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Jason Lewis",
"email": "jason.lewis1991@gmail.com"
}
],
"description": "API Blueprint documentation generator.",
"keywords": [
"api",
"blueprint",
"dingo",
"docs",
"laravel"
],
"time": "2017-09-20T13:50:06+00:00"
},
{
"name": "dnoegel/php-xdg-base-dir",
"version": "0.1",
......@@ -1826,70 +1696,6 @@
],
"time": "2017-08-06T17:41:04+00:00"
},
{
"name": "league/fractal",
"version": "0.17.0",
"source": {
"type": "git",
"url": "https://github.com/thephpleague/fractal.git",
"reference": "a0b350824f22fc2fdde2500ce9d6851a3f275b0e"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/thephpleague/fractal/zipball/a0b350824f22fc2fdde2500ce9d6851a3f275b0e",
"reference": "a0b350824f22fc2fdde2500ce9d6851a3f275b0e",
"shasum": ""
},
"require": {
"php": ">=5.4"
},
"require-dev": {
"doctrine/orm": "^2.5",
"illuminate/contracts": "~5.0",
"mockery/mockery": "~0.9",
"pagerfanta/pagerfanta": "~1.0.0",
"phpunit/phpunit": "~4.0",
"squizlabs/php_codesniffer": "~1.5",
"zendframework/zend-paginator": "~2.3"
},
"suggest": {
"illuminate/pagination": "The Illuminate Pagination component.",
"pagerfanta/pagerfanta": "Pagerfanta Paginator",
"zendframework/zend-paginator": "Zend Framework Paginator"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "0.13-dev"
}
},
"autoload": {
"psr-4": {
"League\\Fractal\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Phil Sturgeon",
"email": "me@philsturgeon.uk",
"homepage": "http://philsturgeon.uk/",
"role": "Developer"
}
],
"description": "Handle the output of complex data structures ready for API output.",
"homepage": "http://fractal.thephpleague.com/",
"keywords": [
"api",
"json",
"league",
"rest"
],
"time": "2017-06-12T11:04:56+00:00"
},
{
"name": "league/oauth1-client",
"version": "1.7.0",
......@@ -2290,152 +2096,6 @@
],
"time": "2017-09-27T21:40:39+00:00"
},
{
"name": "phpdocumentor/reflection-common",
"version": "1.0.1",
"source": {
"type": "git",
"url": "https://github.com/phpDocumentor/ReflectionCommon.git",
"reference": "21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6",
"reference": "21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6",
"shasum": ""
},
"require": {
"php": ">=5.5"
},
"require-dev": {
"phpunit/phpunit": "^4.6"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.0.x-dev"
}
},
"autoload": {
"psr-4": {
"phpDocumentor\\Reflection\\": [
"src"
]
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Jaap van Otterdijk",
"email": "opensource@ijaap.nl"
}
],
"description": "Common reflection classes used by phpdocumentor to reflect the code structure",
"homepage": "http://www.phpdoc.org",
"keywords": [
"FQSEN",
"phpDocumentor",
"phpdoc",
"reflection",
"static analysis"
],
"time": "2017-09-11T18:02:19+00:00"
},
{
"name": "phpdocumentor/reflection-docblock",
"version": "3.3.0",
"source": {
"type": "git",
"url": "https://github.com/phpDocumentor/ReflectionDocBlock.git",
"reference": "48eb1f629d55621f03ca72195fe04d05d463b807"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/48eb1f629d55621f03ca72195fe04d05d463b807",
"reference": "48eb1f629d55621f03ca72195fe04d05d463b807",
"shasum": ""
},
"require": {
"php": "^7.0",
"phpdocumentor/reflection-common": "^1.0.0",
"phpdocumentor/type-resolver": "^0.4.0",
"webmozart/assert": "^1.0"
},
"require-dev": {
"mockery/mockery": "^0.9.4",
"phpunit/phpunit": "^4.4"
},
"type": "library",
"autoload": {
"psr-4": {
"phpDocumentor\\Reflection\\": [
"src/"
]
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Mike van Riel",
"email": "me@mikevanriel.com"
}
],
"description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.",
"time": "2017-09-11T18:06:56+00:00"
},
{
"name": "phpdocumentor/type-resolver",
"version": "0.4.0",
"source": {
"type": "git",
"url": "https://github.com/phpDocumentor/TypeResolver.git",
"reference": "9c977708995954784726e25d0cd1dddf4e65b0f7"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/9c977708995954784726e25d0cd1dddf4e65b0f7",
"reference": "9c977708995954784726e25d0cd1dddf4e65b0f7",
"shasum": ""
},
"require": {
"php": "^5.5 || ^7.0",
"phpdocumentor/reflection-common": "^1.0"
},
"require-dev": {
"mockery/mockery": "^0.9.4",
"phpunit/phpunit": "^5.2||^4.8.24"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.0.x-dev"
}
},
"autoload": {
"psr-4": {
"phpDocumentor\\Reflection\\": [
"src/"
]
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Mike van Riel",
"email": "me@mikevanriel.com"
}
],
"time": "2017-07-14T14:27:02+00:00"
},
{
"name": "psr/container",
"version": "1.0.0",
......@@ -3855,56 +3515,6 @@
],
"time": "2016-09-01T10:05:43+00:00"
},
{
"name": "webmozart/assert",
"version": "1.2.0",
"source": {
"type": "git",
"url": "https://github.com/webmozart/assert.git",
"reference": "2db61e59ff05fe5126d152bd0655c9ea113e550f"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/webmozart/assert/zipball/2db61e59ff05fe5126d152bd0655c9ea113e550f",
"reference": "2db61e59ff05fe5126d152bd0655c9ea113e550f",
"shasum": ""
},
"require": {
"php": "^5.3.3 || ^7.0"
},
"require-dev": {
"phpunit/phpunit": "^4.6",
"sebastian/version": "^1.0.1"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.3-dev"
}
},
"autoload": {
"psr-4": {
"Webmozart\\Assert\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Bernhard Schussek",
"email": "bschussek@gmail.com"
}
],
"description": "Assertions to validate method input/output with nice error messages.",
"keywords": [
"assert",
"check",
"validate"
],
"time": "2016-11-23T20:04:58+00:00"
},
{
"name": "yajra/laravel-datatables-oracle",
"version": "v8.0.3",
......@@ -4572,6 +4182,152 @@
"description": "Library for handling version information and constraints",
"time": "2017-03-05T17:38:23+00:00"
},
{
"name": "phpdocumentor/reflection-common",
"version": "1.0.1",
"source": {
"type": "git",
"url": "https://github.com/phpDocumentor/ReflectionCommon.git",
"reference": "21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6",
"reference": "21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6",
"shasum": ""
},
"require": {
"php": ">=5.5"
},
"require-dev": {
"phpunit/phpunit": "^4.6"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.0.x-dev"
}
},
"autoload": {
"psr-4": {
"phpDocumentor\\Reflection\\": [
"src"
]
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Jaap van Otterdijk",
"email": "opensource@ijaap.nl"
}
],
"description": "Common reflection classes used by phpdocumentor to reflect the code structure",
"homepage": "http://www.phpdoc.org",
"keywords": [
"FQSEN",
"phpDocumentor",
"phpdoc",
"reflection",
"static analysis"
],
"time": "2017-09-11T18:02:19+00:00"
},
{
"name": "phpdocumentor/reflection-docblock",
"version": "4.1.1",
"source": {
"type": "git",
"url": "https://github.com/phpDocumentor/ReflectionDocBlock.git",
"reference": "2d3d238c433cf69caeb4842e97a3223a116f94b2"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/2d3d238c433cf69caeb4842e97a3223a116f94b2",
"reference": "2d3d238c433cf69caeb4842e97a3223a116f94b2",
"shasum": ""
},
"require": {
"php": "^7.0",
"phpdocumentor/reflection-common": "^1.0@dev",
"phpdocumentor/type-resolver": "^0.4.0",
"webmozart/assert": "^1.0"
},
"require-dev": {
"mockery/mockery": "^0.9.4",
"phpunit/phpunit": "^4.4"
},
"type": "library",
"autoload": {
"psr-4": {
"phpDocumentor\\Reflection\\": [
"src/"
]
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Mike van Riel",
"email": "me@mikevanriel.com"
}
],
"description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.",
"time": "2017-08-30T18:51:59+00:00"
},
{
"name": "phpdocumentor/type-resolver",
"version": "0.4.0",
"source": {
"type": "git",
"url": "https://github.com/phpDocumentor/TypeResolver.git",
"reference": "9c977708995954784726e25d0cd1dddf4e65b0f7"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/9c977708995954784726e25d0cd1dddf4e65b0f7",
"reference": "9c977708995954784726e25d0cd1dddf4e65b0f7",
"shasum": ""
},
"require": {
"php": "^5.5 || ^7.0",
"phpdocumentor/reflection-common": "^1.0"
},
"require-dev": {
"mockery/mockery": "^0.9.4",
"phpunit/phpunit": "^5.2||^4.8.24"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.0.x-dev"
}
},
"autoload": {
"psr-4": {
"phpDocumentor\\Reflection\\": [
"src/"
]
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Mike van Riel",
"email": "me@mikevanriel.com"
}
],
"time": "2017-07-14T14:27:02+00:00"
},
{
"name": "phpspec/prophecy",
"version": "v1.7.2",
......@@ -5682,13 +5438,61 @@
],
"description": "A small library for converting tokenized PHP source code into XML and potentially other formats",
"time": "2017-04-07T12:08:54+00:00"
},
{
"name": "webmozart/assert",
"version": "1.2.0",
"source": {
"type": "git",
"url": "https://github.com/webmozart/assert.git",
"reference": "2db61e59ff05fe5126d152bd0655c9ea113e550f"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/webmozart/assert/zipball/2db61e59ff05fe5126d152bd0655c9ea113e550f",
"reference": "2db61e59ff05fe5126d152bd0655c9ea113e550f",
"shasum": ""
},
"require": {
"php": "^5.3.3 || ^7.0"
},
"require-dev": {
"phpunit/phpunit": "^4.6",
"sebastian/version": "^1.0.1"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.3-dev"
}
},
"autoload": {
"psr-4": {
"Webmozart\\Assert\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Bernhard Schussek",
"email": "bschussek@gmail.com"
}
],
"description": "Assertions to validate method input/output with nice error messages.",
"keywords": [
"assert",
"check",
"validate"
],
"time": "2016-11-23T20:04:58+00:00"
}
],
"aliases": [],
"minimum-stability": "stable",
"stability-flags": {
"dingo/api": 10
},
"stability-flags": [],
"prefer-stable": false,
"prefer-lowest": false,
"platform": {
......
......@@ -201,8 +201,6 @@ return [
App\Providers\MacroServiceProvider::class,
App\Providers\RouteServiceProvider::class,
Tymon\JWTAuth\Providers\JWTAuthServiceProvider::class,
Dingo\Api\Provider\LaravelServiceProvider::class,
],
/*
......
<?php
use Dingo\Api\Routing\Router;
/** @var Router $api */
/*
|--------------------------------------------------------------------------
| API Routes
|--------------------------------------------------------------------------
|
| Here is where you can register API routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| is assigned the "api" middleware group. Enjoy building your API!
|
*/
$api = app(Router::class);
$api->version('v1', function (Router $api) {
$api->group(['prefix' => 'auth'], function (Router $api) {
/*
* Register api
*/
$api->post('register', 'App\\Api\\V1\\Controllers\\RegisterController@Register');
/*
* Login api
*/
$api->post('login', 'App\\Api\\V1\\Controllers\\LoginController@login');
/*
* Recovery password api
*/
$api->post('recovery', 'App\\Api\\V1\\Controllers\\ForgotPasswordController@forgotpassword');
/*
* Reset password api
*/
$api->post('reset', 'App\\Api\\V1\\Controllers\\ResetPasswordController@resetpassword');
/*
* Confirm account api
*/
$api->post('confirm', 'App\\Api\\V1\\Controllers\\RegisterController@confirmAccount');
});
$api->group(['middleware' => 'api.auth'], function ($api) {
$api->get('userdetails', 'App\Api\V1\Controllers\UserDetailController@userDetails');
});
$api->get('cmspage/{page_slug}', 'App\Api\V1\Controllers\CmsPageController@showCmsPage');
});
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment