Commit 29e8d9c7 authored by Viral Solani's avatar Viral Solani

Resolve Misc. Issues

Remove Dingo API Package
parent 1588679c
<?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; ...@@ -5,7 +5,7 @@ namespace App\Listeners\Backend\Access\Permission;
/** /**
* Class PermissionEventListener. * Class PermissionEventListener.
*/ */
class PermissionEventListner class PermissionEventListener
{ {
/** /**
* @var string * @var string
......
...@@ -5,7 +5,7 @@ namespace App\Listeners\Backend\BlogCategories; ...@@ -5,7 +5,7 @@ namespace App\Listeners\Backend\BlogCategories;
/** /**
* Class BlogCategoryEventListener. * Class BlogCategoryEventListener.
*/ */
class BlogCategoryEventListner class BlogCategoryEventListener
{ {
/** /**
* @var string * @var string
......
...@@ -5,7 +5,7 @@ namespace App\Listeners\Backend\BlogTags; ...@@ -5,7 +5,7 @@ namespace App\Listeners\Backend\BlogTags;
/** /**
* Class BlogTagEventListener. * Class BlogTagEventListener.
*/ */
class BlogTagEventListner class BlogTagEventListener
{ {
/** /**
* @var string * @var string
......
...@@ -5,7 +5,7 @@ namespace App\Listeners\Backend\Blogs; ...@@ -5,7 +5,7 @@ namespace App\Listeners\Backend\Blogs;
/** /**
* Class BlogEventListener. * Class BlogEventListener.
*/ */
class BlogEventListner class BlogEventListener
{ {
/** /**
* @var string * @var string
......
...@@ -5,7 +5,7 @@ namespace App\Listeners\Backend\CMSPages; ...@@ -5,7 +5,7 @@ namespace App\Listeners\Backend\CMSPages;
/** /**
* Class CMSPageEventListener. * Class CMSPageEventListener.
*/ */
class CMSPageEventListner class CMSPageEventListener
{ {
/** /**
* @var string * @var string
......
...@@ -5,7 +5,7 @@ namespace App\Listeners\Backend\EmailTemplates; ...@@ -5,7 +5,7 @@ namespace App\Listeners\Backend\EmailTemplates;
/** /**
* Class EmailTemplateEventListener. * Class EmailTemplateEventListener.
*/ */
class EmailTemplateEventListner class EmailTemplateEventListener
{ {
/** /**
* @var string * @var string
......
This diff is collapsed.
...@@ -201,8 +201,6 @@ return [ ...@@ -201,8 +201,6 @@ return [
App\Providers\MacroServiceProvider::class, App\Providers\MacroServiceProvider::class,
App\Providers\RouteServiceProvider::class, App\Providers\RouteServiceProvider::class,
Tymon\JWTAuth\Providers\JWTAuthServiceProvider::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