Commit f78f34b8 authored by Viral Solani's avatar Viral Solani

init commit

parent 115f1de5

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.

* text=auto
*.css linguist-vendored
*.scss linguist-vendored
*.js linguist-vendored
CHANGELOG.md export-ignore
\ No newline at end of file
/node_modules
/public/storage
/public/hot
/storage/*.key
/vendor
.idea
Homestead.json
Homestead.yaml
.env
.DS_Store
Thumbs.db
*.sublime-project
*.sublime-workspace
.project
/nbproject
_ide_helper.php
composer.phar
error.log
Todo.rtf
.vagrant
/.vagrant
npm-debug.log
yarn-error.log
phpunit.txt
<?php
namespace App\Api\V1\Controllers;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use App\Repositories\Api\CmsPage\CmsPageRepository;
class CmsPageController extends Controller
{
public function __construct(CmsPageRepository $cmsgpage)
{
$this->cmsgpage=$cmsgpage;
}
public function showCmsPage($page_slug)
{
$result = $this->cmsgpage->findBySlug($page_slug);
return response()
->json([
'status' => 'ok',
'data' => $result
]);
}
}
<?php
namespace App\Api\V1\Controllers;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use Tymon\JWTAuth\JWTAuth;
use Symfony\Component\HttpKernel\Exception\HttpException;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
use App\Repositories\Api\User\UserRepository;
use App\Mail\ForgotPasswordMail;
use App\Api\V1\Requests\ForgotPasswordRequest;
use App\Repositories\Api\User\PasswordResetRepository;
use Illuminate\Support\Facades\Password;
use Carbon\Carbon;
/**
* Class ForgotPasswordController.
*/
class ForgotPasswordController extends Controller
{
/**
* @var UserRepository
*/
protected $user;
/**
* ForgotPasswordController constructor.
*
* @param UserRepository $user
*/
public function __construct(UserRepository $user,PasswordResetRepository $passwordreset)
{
$this->user = $user;
$this->passwordreset=$passwordreset;
}
/**
* Recovery password api.
*/
public function forgotpassword(ForgotPasswordRequest $request)
{
$check_user=$this->user->checkUser($request->get('email'));
if(!(empty($check_user)))
{
$otp=$this->user->generateOTP();
$attributes=array(
'email' => $request->get('email'),
'token' => $otp,
'created_at' => Carbon::now()
);
$check_reset=$this->passwordreset->getByEmail($request->get('email'));
if(empty($check_reset))
{
$token=$this->passwordreset->create($attributes);
}
else
{
$token=$this->passwordreset->update($attributes);
}
$forgot_mail=\Mail::to($request->get('email'))->send(new ForgotPasswordMail($otp));
return response()->json([
'status' => 'ok',
'data' => ['token' => $otp]
], 200);
}
throw new HttpException(500,trans('validation.api.forgotpassword.email_not_valid'));
}
}
\ No newline at end of file
<?php
namespace App\Api\V1\Controllers;
use Illuminate\Http\Request;
use App\Http\Requests;
use App\http\Controllers\Controller;
use Tymon\JWTAuth\JWTAuth;
use App\Api\V1\Requests\LoginRequest;
use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException;
use Tymon\JWTAuth\Exceptions\JWTException;
/**
* Class LoginController.
*/
class LoginController extends Controller
{
/*
* Login api for user
*/
public function login(LoginRequest $request, JWTAuth $JWTAuth)
{
$credentials=array(
'email' => $request->email,
'password' => $request->password
);
try {
/**
* check credentials valid or not
*/
$token = $JWTAuth->attempt($credentials);
if(!$token)
{
throw new AccessDeniedHttpException(trans('validation.api.login.username_password_didnt_match'));
}
}catch (JWTException $e) {
throw new HttpException(500);
}
return response()
->json([
'status' => 'ok',
'token' => $token
]);
}
}
\ No newline at end of file
<?php
namespace App\Api\V1\Controllers;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use App\Repositories\Api\User\UserRepository;
use App\Api\V1\Requests\RegisterRequest;
use App\Api\V1\Requests\ConfirmAccountRequest;
use Symfony\Component\HttpKernel\Exception\HttpException;
/**
* Class RegisterController.
*/
class RegisterController extends Controller
{
/**
* @var UserRepository
*/
protected $user;
/**
* RegisterController constructor.
*
* @param UserRepository $user
*/
public function __construct(UserRepository $user)
{
$this->user = $user;
}
/*
* Register api.
*/
public function Register(RegisterRequest $request)
{
$user=$this->user->create($request->all());
return response()
->json([
'status' => 'ok'
]);
}
/*
* Confirm account api
*/
public function confirmAccount(ConfirmAccountRequest $request)
{
$user=$this->user->checkUser($request->get('email'));
if(!(empty($user)))
{
if($user[0]['confirmation_code']!='')
{
if(md5($request->get('otp'))==$user[0]['confirmation_code'])
{
$checkconfirmation=$this->user->checkconfirmation($request->get('email'));
if($checkconfirmation[0]['confirmed']==0)
{
$confirmuser=$this->user->confirmUser($request->get('email'));
}
else
{
throw new HttpException(500,trans('validation.api.confirmaccount.already_confirmed'));
}
}
else
{
throw new HttpException(500,trans('validation.api.confirmaccount.invalid_otp'));
}
}
}
else
{
throw new HttpException(500,trans('validation.api.confirmaccount.invalid_email'));
}
return response()
->json([
'status' => 'ok'
]);
}
}
<?php
namespace App\Api\V1\Controllers;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use Tymon\JWTAuth\JWTAuth;
use Symfony\Component\HttpKernel\Exception\HttpException;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
use App\Repositories\Api\User\UserRepository;
use App\Repositories\Api\User\PasswordResetRepository;
use Illuminate\Support\Facades\Password;
use App\Api\V1\Requests\ResetPasswordRequest;
/**
* Class ResetPasswordController.
*/
class ResetPasswordController extends Controller
{
/**
* @var UserRepository
*/
protected $user;
/**
* ResetPasswordController constructor.
*
* @param UserRepository $user
*/
public function __construct(UserRepository $user,PasswordResetRepository $passwordreset)
{
$this->user = $user;
$this->passwordreset=$passwordreset;
}
/**
* Resetpassword api.
*/
public function resetpassword(ResetPasswordRequest $request)
{
$check_user=$this->user->checkUser($request->get('email'));
if(!(empty($check_user)))
{
$response = $this->passwordreset->checkUser($this->credentials($request));
if(!(empty($response)))
{
$resetpassword=$this->user->resetpassword($this->credentials($request));
$remove_token=$this->passwordreset->delete($this->credentials($request));
return response()
->json([
'status' => 'ok',
]);
}
throw new HttpException(500,trans('validation.api.resetpassword.token_not_valid'));
}
throw new HttpException(500,trans('validation.api.resetpassword.email_not_valid'));
}
/**
* Get the password reset credentials from the request.
*
* @param ResetPasswordRequest $request
* @return array
*/
protected function credentials(ResetPasswordRequest $request)
{
return $request->only(
'email', 'password', 'password_confirmation', 'token'
);
}
}
<?php
namespace App\Api\V1\Controllers;
use Illuminate\Http\Request;
use App\Http\Requests;
use App\http\Controllers\Controller;
use JWTAuth;
use Dingo\Api\Routing\Helpers;
use App\Repositories\Api\User\UserRepository;
/**
* Class UserDetailController.
*/
class UserDetailController extends Controller
{
use Helpers;
/**
* @var UserRepository
*/
protected $user;
/**
* ResetPasswordController constructor.
*
* @param UserRepository $user
*/
public function __construct(UserRepository $user)
{
$this->user = $user;
}
/*
* User details api
*/
public function userDetails(Request $request)
{
$currentUser = JWTAuth::parseToken()->authenticate();
$user=$this->user->getById($currentUser->id);
return response()
->json([
'status' => 'ok',
'data' => $user
]);
}
}
<?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'),
];
}
}
<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
use Illuminate\Filesystem\Filesystem;
use Illuminate\Support\Facades\Artisan;
use Illuminate\Console\DetectsApplicationNamespace;
class ModuleGenerator extends Command
{
use DetectsApplicationNamespace;
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = "generate:module {--model= : Model Name} {--controller= : Name of the controller} {--t= : If table Controller should be made} {--res : If the controller should be resourceful} {--table= : Name of the table} {--routes= : Route Name} {--route_controller= : Route Controller} {--views= : If the views should be made} {--el= : If events and listeners should be made} {--repo= : If Repository should be made}";
/**
* The console command description.
*
* @var string
*/
protected $description = 'It creates module\'s basic scaffolding like (Controllers, Model, Migration, Routes and Views)';
/**
* The filesystem instance.
*
* @var \Illuminate\Filesystem\Filesystem
*/
protected $files;
/**
* Create a new command instance.
*
* @return void
*/
public function __construct(Filesystem $files)
{
parent::__construct();
$this->files = $files;
}
/**
* Execute the console command.
*
* @return mixed
*/
public function handle()
{
//Making model
if( $this->option('model') ) {
$model = $this->parseModel($this->option('model'));
$a = Artisan::call("make:model", ["name" => $model]);
$this->line(Artisan::output());
}
//Making Controller
if( $this->option( 'controller' ) ) {
$controller = $this->parseModel($this->option('controller'));
Artisan::call("make:controller", ["name" => $controller, '--resource' => $this->option('res')]);
$this->line(Artisan::output());
//Making Table Controller
if( $this->option( 't' ) ) {
$tableController = $this->parseModel($this->option('t'));
Artisan::call("make:controller", ["name" => $tableController]);
$this->line("Table ".Artisan::output());
}
}
//Making Migration
if( $table = $this->option( 'table' ) ) {
Artisan::call("make:migration", [
"name" => 'create_'.$table.'_table',
"--create" => $table
]);
$this->line(Artisan::output());
}
//Making Events and Listeners
if( $this->option( 'el' ) ) {
$el = explode(',', $this->option( 'el' ) );
foreach($el as $e) {
$event = $this->parseModel($e);
Artisan::call('make:event', [
'name' => $event
]);
$this->line(Artisan::output());
Artisan::call('make:listener', [
'name' => $event.'Listener',
'--event' => $event
]);
$this->line(Artisan::output());
}
}
//Creating Routes
if( ( $route_name = $this->option( 'routes' ) ) && $this->option( 'route_controller' ) ) {
$base_path = base_path('routes/Backend');
$controller = class_basename( $this->option( 'controller' ) );
if( $this->option( 'model' ) ) {
$filename = class_basename( $this->option( 'model' ) );
} else {
$filename = ucfirst($route_name);
}
$this->checkAndCreateDir($base_path);
$file_content = $this->files->get( $this->getStub( $this->option( 'res' ) ? 'resource' : false ) );
$file_content = str_replace(
['dummy_name', 'DummyModel', 'DummyController'],
[$route_name, $filename, $controller],
$file_content
);
$this->files->put( $base_path.'/'.$filename.'.php', $file_content);
$this->line("Route File generated Successfully");
}
//Creating Views
if( $this->option( 'views' ) ) {
$view_folder_name = strtolower( $this->option( 'views' ) );
$base_path = resource_path('views/backend');
$path = $base_path.'/'.$view_folder_name;
$this->checkAndCreateDir($path);
$this->createViewFiles($path);
$this->line("View Files generated successfully");
}
//Creating Repository
if( $repo = $this->option( 'repo' ) ) {
$class_name = class_basename($repo);
$repo = str_replace($class_name, '', $repo);
$base_path = base_path('app/Repositories/'.$repo);
$this->checkAndCreateDir($base_path);
$this->createRepoFile($repo, $class_name);
$this->line("Repository generated successfully");
}
}
/**
* Creating REpository File
*
* @param string $path
* @param string $class
* @return none
*/
public function createRepoFile($path, $class)
{
$rootNamespace = $this->laravel->getNamespace().'Repositories\\';
$newPath = str_replace( '/', '\\', $path );
$namespace = trim( str_replace( '/', '\\', $rootNamespace.$newPath ), '\\' );
$file_contents = $this->files->get( __DIR__.'/Stubs/repository.stub' );
$file_contents = str_replace(
[ 'DummyNamespace', 'DummyClass' ],
[ $namespace, $class ],
$file_contents
);
$path = base_path( 'app/Repositories/'.$path.'/'.$class );
$this->files->put( $path, $file_contents );
}
/**
* Creating View Files (index, create, edit, form)
*
* @param string $path
* @return none
*/
public function createViewFiles($path)
{
$files = [ "/index.blade.php", "/create.blade.php", "/edit.blade.php", "/form.blade.php" ];
foreach($files as $file) {
$this->files->put( $path.$file, $this->files->get( $this->getStub( false, true ) ) );
}
}
/**
* Return Stub
*
* @param boolean $res
* @return file
*/
public function getStub($res = false, $view = false)
{
if($view) {
return __DIR__.'/Stubs/view.stub';
} else {
if( $res && $res == 'resource') {
return __DIR__.'/Stubs/resourceRoute.stub';
} else {
return __DIR__.'/Stubs/route.stub';
}
}
}
/**
* Creating Directory
*
* @param string $model
* @return string
*/
public function checkAndCreateDir($path)
{
if(is_dir($path))
{
return $path;
}
mkdir($path, 0777, true);
return $path;
}
/**
* Get the fully-qualified model class name.
*
* @param string $model
* @return string
*/
protected function parseModel($model)
{
if (preg_match('([^A-Za-z0-9_/\\\\])', $model)) {
throw new InvalidArgumentException('Name contains invalid characters.');
}
$model = trim(str_replace('/', '\\', $model), '\\');
return $model;
}
}
<?php
namespace AttributeNamespace;
/**
* Class AttributeClass.
*/
trait AttributeClass
{
// Make your attributes functions here
// Further, see the documentation : https://laravel.com/docs/5.4/eloquent-mutators#defining-an-accessor
/**
* Action Button Attribute to show in grid
* @return string
*/
public function getActionButtonsAttribute()
{
return '<div class="btn-group action-btn">'.
//call your attribute functions here
'</div>';
}
}
<?php
Breadcrumbs::register('admin.dummy_small_plural_model.index', function ($breadcrumbs) {
$breadcrumbs->parent('admin.dashboard');
$breadcrumbs->push(trans('menus.backend.dummy_small_plural_model.management'), route('admin.dummy_small_plural_model.index'));
});
Breadcrumbs::register('admin.dummy_small_plural_model.create', function ($breadcrumbs) {
$breadcrumbs->parent('admin.dummy_small_plural_model.index');
$breadcrumbs->push(trans('menus.backend.dummy_small_plural_model.create'), route('admin.dummy_small_plural_model.create'));
});
Breadcrumbs::register('admin.dummy_small_plural_model.edit', function ($breadcrumbs, $id) {
$breadcrumbs->parent('admin.dummy_small_plural_model.index');
$breadcrumbs->push(trans('menus.backend.dummy_small_plural_model.edit'), route('admin.dummy_small_plural_model.edit', $id));
});
<?php
namespace DummyNamespace;
use DummyModelNamespace;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use DummyRepositoryNamespace;
use DummyManageRequestNamespace;
@Namespaces
/**
* DummyController
*/
class DummyController extends Controller
{
/**
* variable to store the repository object
* @var dummy_repository
*/
protected $repository;
/**
* contructor to initialize repository object
* @param dummy_repository $repository;
*/
public function __construct(dummy_repository $repository)
{
$this->repository = $repository;
}
/**
* Display a listing of the resource.
*
* @param DummyManageRequestNamespace $request
* @return \Illuminate\Http\Response
*/
public function index(DummyManageRequest $request)
{
return view('backend.dummy_small_plural_model.index');
}
@startCreate/**
* Show the form for creating a new resource.
*
* @param DummyCreateRequestNamespace $request
* @return \Illuminate\Http\Response
*/
public function create(DummyCreateRequest $request)
{
return view('backend.dummy_small_plural_model.create');
}
/**
* Store a newly created resource in storage.
*
* @param DummyStoreRequestNamespace $request
* @return \Illuminate\Http\Response
*/
public function store(DummyStoreRequest $request)
{
//Input received from the request
$input = $request->except(['_token']);
//Create the model using repository create method
$this->repository->create($input);
//return with successfull message
return redirect()->route('admin.dummy_small_plural_model.index')->withFlashSuccess(trans('alerts.backend.dummy_small_plural_model.created'));
}
@endCreate@startEdit/**
* Show the form for editing the specified resource.
*
* @param DummyModelNamespace $DummyArgumentName
* @param DummyEditRequestNamespace $request
* @return \Illuminate\Http\Response
*/
public function edit(DummyModel $DummyArgumentName, DummyEditRequest $request)
{
return view('backend.dummy_small_plural_model.edit', compact('DummyArgumentName'));
}
/**
* Update the specified resource in storage.
*
* @param DummyUpdateRequestNamespace $request
* @param DummyModelNamespace $DummyArgumentName
* @return \Illuminate\Http\Response
*/
public function update(DummyUpdateRequest $request, DummyModel $DummyArgumentName)
{
//Input received from the request
$input = $request->except(['_token']);
//Update the model using repository update method
$this->repository->update( $DummyArgumentName, $input );
//return with successfull message
return redirect()->route('admin.dummy_small_plural_model.index')->withFlashSuccess(trans('alerts.backend.dummy_small_plural_model.updated'));
}
@endEdit@startDelete/**
* Remove the specified resource from storage.
*
* @param DummyDeleteRequestNamespace $request
* @param DummyModelNamespace $DummyArgumentName
* @return \Illuminate\Http\Response
*/
public function destroy(DummyModel $DummyArgumentName, DummyDeleteRequest $request)
{
//Calling the delete method on repository
$this->repository->delete($DummyArgumentName);
//returning with successfull message
return redirect()->route('admin.dummy_small_plural_model.index')->withFlashSuccess(trans('alerts.backend.dummy_small_plural_model.deleted'));
}
@endDelete
}
<?php
namespace DummyNamespace;
use Illuminate\Database\Eloquent\Model;
use DummyAttribute;
use DummyRelationship;
class DummyModel extends Model
{
use AttributeName,
RelationshipName;
/**
* NOTE : If you want to implement Soft Deletes in this model,
* then follow the steps here : https://laravel.com/docs/5.4/eloquent#soft-deleting
*/
/**
* The database table used by the model.
* @var string
*/
protected $table = 'table_name';
/**
* Mass Assignable fields of model
* @var array
*/
protected $fillable = [
];
/**
* Default values for model fields
* @var array
*/
protected $attributes = [
];
/**
* Dates
* @var array
*/
protected $dates = [
'created_at',
'updated_at'
];
/**
* Guarded fields of model
* @var array
*/
protected $guarded = [
'id'
];
/**
* Constructor of Model
* @param array $attributes
*/
public function __construct(array $attributes = [])
{
parent::__construct($attributes);
}
}
<?php
namespace RelationshipNamespace;
/**
* Class RelationshipClass
*/
trait RelationshipClass
{
/*
* put you model relationships here
* Take below example for reference
*/
/*
public function users() {
//Note that the below will only work if user is represented as user_id in your table
//otherwise you have to provide the column name as a parameter
//see the documentation here : https://laravel.com/docs/5.4/eloquent-relationships
$this->belongsTo(User::class);
}
*/
}
<?php
namespace DummyNamespace;
use DB;
use Carbon\Carbon;
use DummyModelNamespace;
use App\Exceptions\GeneralException;
use App\Repositories\BaseRepository;
use Illuminate\Database\Eloquent\Model;
/**
* Class DummyRepoName.
*/
class DummyRepoName extends BaseRepository
{
/**
* Associated Repository Model.
*/
const MODEL = dummy_model_name::class;
/**
* This method is used by Table Controller
* For getting the table data to show in
* the grid
* @return mixed
*/
public function getForDataTable()
{
return $this->query()
->select([
config('module.model_small_plural.table').'.id',
config('module.model_small_plural.table').'.created_at',
config('module.model_small_plural.table').'.updated_at',
]);
}
@startCreate
/**
* For Creating the respective model in storage
*
* @param array $input
* @throws GeneralException
* @return bool
*/
public function create(array $input)
{
$dummy_small_model_name = self::MODEL;
if ($dummy_small_model_name->save()) {
return true;
}
throw new GeneralException(trans('exceptions.backend.dummy_small_plural_model_name.create_error'));
}
@endCreate@startEdit
/**
* For updating the respective Model in storage
*
* @param dummy_model_name $dummy_small_model_name
* @param $input
* @throws GeneralException
* return bool
*/
public function update(dummy_model_name $dummy_small_model_name, array $input)
{
if ($dummy_small_model_name->update())
return true;
throw new GeneralException(trans('exceptions.backend.dummy_small_plural_model_name.update_error'));
}
@endEdit@startDelete
/**
* For deleting the respective model from storage
*
* @param dummy_model_name $dummy_small_model_name
* @throws GeneralException
* @return bool
*/
public function delete(dummy_model_name $dummy_small_model_name)
{
if ($dummy_small_model_name->delete()) {
return true;
}
throw new GeneralException(trans('exceptions.backend.dummy_small_plural_model_name.delete_error'));
}@endDelete
}
<?php
namespace DummyNamespace;
use Illuminate\Foundation\Http\FormRequest;
class DummyClass extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return access()->allow('permission');
}
/**
* Get the validation rules that apply to the request.
*
* @return array
*/
public function rules()
{
return [
//Put your rules for the request in here
//For Example : 'title' => 'required'
//Further, see the documentation : https://laravel.com/docs/5.4/validation#creating-form-requests
];
}
public function messages()
{
return [
//The Custom messages would go in here
//For Example : 'title.required' => 'You need to fill in the title field.'
//Further, see the documentation : https://laravel.com/docs/5.4/validation#customizing-the-error-messages
];
}
}
<?php
namespace DummyNamespace;
use Carbon\Carbon;
use App\Http\Controllers\Controller;
use Yajra\Datatables\Facades\Datatables;
use DummyRepositoryNamespace;
use DummyManageRequestNamespace;
/**
* Class DummyTableController.
*/
class DummyTableController extends Controller
{
/**
* variable to store the repository object
* @var dummy_repository
*/
protected $dummy_small_repo_name;
/**
* contructor to initialize repository object
* @param dummy_repository $dummy_small_repo_name;
*/
public function __construct(dummy_repository $dummy_small_repo_name)
{
$this->dummy_small_repo_name = $dummy_small_repo_name;
}
/**
* This method return the data of the model
* @param dummy_manage_request_name $request
*
* @return mixed
*/
public function __invoke(dummy_manage_request_name $request)
{
return Datatables::of($this->dummy_small_repo_name->getForDataTable())
->escapeColumns(['id'])
->addColumn('created_at', function ($dummy_small_repo_name) {
return Carbon::parse($dummy_small_repo_name->created_at)->toDateString();
})
->addColumn('actions', function ($dummy_small_repo_name) {
return $dummy_small_repo_name->action_buttons;
})
->make(true);
}
}
@extends ('backend.layouts.app')
@section ('title', trans('labels.backend.dummy_small_plural_model.management') . ' | ' . trans('labels.backend.dummy_small_plural_model.create'))
@section('page-header')
<h1>
{{ trans('labels.backend.dummy_small_plural_model.management') }}
<small>{{ trans('labels.backend.dummy_small_plural_model.create') }}</small>
</h1>
@endsection
@section('content')
{{ Form::open(['route' => 'admin.dummy_small_plural_model.store', 'class' => 'form-horizontal', 'role' => 'form', 'method' => 'post', 'id' => 'create-dummy_small_model']) }}
<div class="box box-success">
<div class="box-header with-border">
<h3 class="box-title">{{ trans('labels.backend.dummy_small_plural_model.create') }}</h3>
<div class="box-tools pull-right">
@include('backend.dummy_small_plural_model.partials.dummy_small_plural_model-header-buttons')
</div><!--box-tools pull-right-->
</div><!--box-header with-border-->
<div class="box-body">
<div class="form-group">
{{-- Including Form blade file --}}
@include("backend.dummy_small_plural_model.form")
<div class="edit-form-btn">
{{ link_to_route('admin.dummy_small_plural_model.index', trans('buttons.general.cancel'), [], ['class' => 'btn btn-danger btn-md']) }}
{{ Form::submit(trans('buttons.general.crud.create'), ['class' => 'btn btn-primary btn-md']) }}
<div class="clearfix"></div>
</div><!--edit-form-btn-->
</div><!-- form-group -->
</div><!--box-body-->
</div><!--box box-success-->
{{ Form::close() }}
@endsection
@extends ('backend.layouts.app')
@section ('title', trans('labels.backend.dummy_small_plural_model.management') . ' | ' . trans('labels.backend.dummy_small_plural_model.edit'))
@section('page-header')
<h1>
{{ trans('labels.backend.dummy_small_plural_model.management') }}
<small>{{ trans('labels.backend.dummy_small_plural_model.edit') }}</small>
</h1>
@endsection
@section('content')
{{ Form::model($dummy_small_model, ['route' => ['admin.dummy_small_plural_model.update', $dummy_small_model], 'class' => 'form-horizontal', 'role' => 'form', 'method' => 'PATCH', 'id' => 'edit-dummy_small_model']) }}
<div class="box box-success">
<div class="box-header with-border">
<h3 class="box-title">{{ trans('labels.backend.dummy_small_plural_model.edit') }}</h3>
<div class="box-tools pull-right">
@include('backend.dummy_small_plural_model.partials.dummy_small_plural_model-header-buttons')
</div><!--box-tools pull-right-->
</div><!--box-header with-border-->
<div class="box-body">
<div class="form-group">
{{-- Including Form blade file --}}
@include("backend.dummy_small_plural_model.form")
<div class="edit-form-btn">
{{ link_to_route('admin.dummy_small_plural_model.index', trans('buttons.general.cancel'), [], ['class' => 'btn btn-danger btn-md']) }}
{{ Form::submit(trans('buttons.general.crud.update'), ['class' => 'btn btn-primary btn-md']) }}
<div class="clearfix"></div>
</div><!--edit-form-btn-->
</div><!--form-group-->
</div><!--box-body-->
</div><!--box box-success -->
{{ Form::close() }}
@endsection
<div class="box-body">
<div class="form-group">
<!-- Create Your Field Label Here -->
<!-- Look Below Example for reference -->
{{-- {{ Form::label('name', trans('labels.backend.blogs.title'), ['class' => 'col-lg-2 control-label required']) }} --}}
<div class="col-lg-10">
<!-- Create Your Input Field Here -->
<!-- Look Below Example for reference -->
{{-- {{ Form::text('name', null, ['class' => 'form-control box-size', 'placeholder' => trans('labels.backend.blogs.title'), 'required' => 'required']) }} --}}
</div><!--col-lg-10-->
</div><!--form-group-->
</div><!--box-body-->
@section("after-scripts")
<script type="text/javascript">
//Put your javascript needs in here.
//Don't forget to put `@`parent exactly after `@`section("after-scripts"),
//if your create or edit blade contains javascript of its own
$( document ).ready( function() {
//Everything in here would execute after the DOM is ready to manipulated.
});
</script>
@endsection
<!--Action Button-->
@if( Active::checkUriPattern( 'admin/dummy_small_plural_model' ) )
<div class="btn-group">
<button type="button" class="btn btn-warning btn-flat dropdown-toggle" data-toggle="dropdown">Export
<span class="caret"></span>
<span class="sr-only">Toggle Dropdown</span>
</button>
<ul class="dropdown-menu" role="menu">
<li id="copyButton"><a href="#"><i class="fa fa-clone"></i> Copy</a></li>
<li id="csvButton"><a href="#"><i class="fa fa-file-text-o"></i> CSV</a></li>
<li id="excelButton"><a href="#"><i class="fa fa-file-excel-o"></i> Excel</a></li>
<li id="pdfButton"><a href="#"><i class="fa fa-file-pdf-o"></i> PDF</a></li>
<li id="printButton"><a href="#"><i class="fa fa-print"></i> Print</a></li>
</ul>
</div>
@endif
<!--Action Button-->
<div class="btn-group">
<button type="button" class="btn btn-primary btn-flat dropdown-toggle" data-toggle="dropdown">Action
<span class="caret"></span>
<span class="sr-only">Toggle Dropdown</span>
</button>
<ul class="dropdown-menu" role="menu">
<li>
<a href="{{ route( 'admin.dummy_small_plural_model.index' ) }}">
<i class="fa fa-list-ul"></i> {{ trans( 'menus.backend.dummy_small_plural_model.all' ) }}
</a>
</li>
@create@permission( 'create-dummy_small_model' )
<li>
<a href="{{ route( 'admin.dummy_small_plural_model.create' ) }}">
<i class="fa fa-plus"></i> {{ trans( 'menus.backend.dummy_small_plural_model.create' ) }}
</a>
</li>
@endauth@endCreate
</ul>
</div>
<div class="clearfix"></div>
@extends ('backend.layouts.app')
@section ('title', trans('labels.backend.dummy_small_plural_model.management'))
@section('after-styles')
{{ Html::style("css/backend/plugin/datatables/dataTables.bootstrap.min.css") }}
@endsection
@section('page-header')
<h1>{{ trans('labels.backend.dummy_small_plural_model.management') }}</h1>
@endsection
@section('content')
<div class="box box-success">
<div class="box-header with-border">
<h3 class="box-title">{{ trans('labels.backend.dummy_small_plural_model.management') }}</h3>
<div class="box-tools pull-right">
@include('backend.dummy_small_plural_model.partials.dummy_small_plural_model-header-buttons')
</div>
</div><!--box-header with-border-->
<div class="box-body">
<div class="table-responsive data-table-wrapper">
<table id="dummy_small_plural_model-table" class="table table-condensed table-hover table-bordered">
<thead>
<tr>
<th>{{ trans('labels.backend.dummy_small_plural_model.table.id') }}</th>
<th>{{ trans('labels.backend.dummy_small_plural_model.table.createdat') }}</th>
<th>{{ trans('labels.general.actions') }}</th>
</tr>
</thead>
<thead class="transparent-bg">
<tr>
<th></th>
<th></th>
<th></th>
</tr>
</thead>
</table>
</div><!--table-responsive-->
</div><!-- /.box-body -->
</div><!--box-->
@endsection
@section('after-scripts')
{{-- For DataTables --}}
@include('includes.datatables')
<script>
//Below written line is short form of writing $(document).ready(function() { })
$(function() {
var dataTable = $('#dummy_small_plural_model-table').dataTable({
processing: true,
serverSide: true,
ajax: {
url: '{{ route("admin.dummy_small_plural_model.get") }}',
type: 'post'
},
columns: [
{data: 'id', name: '{{config('module.dummy_small_plural_model.table')}}.id'},
{data: 'created_at', name: '{{config('module.dummy_small_plural_model.table')}}.created_at'},
{data: 'actions', name: 'actions', searchable: false, sortable: false}
],
order: [[0, "asc"]],
searchDelay: 500,
dom: 'lBfrtip',
buttons: {
buttons: [
{ extend: 'copy', className: 'copyButton', exportOptions: {columns: [ 0, 1 ] }},
{ extend: 'csv', className: 'csvButton', exportOptions: {columns: [ 0, 1 ] }},
{ extend: 'excel', className: 'excelButton', exportOptions: {columns: [ 0, 1 ] }},
{ extend: 'pdf', className: 'pdfButton', exportOptions: {columns: [ 0, 1 ] }},
{ extend: 'print', className: 'printButton', exportOptions: {columns: [ 0, 1 ] }}
]
}
});
FinBuilders.DataTableSearch.init(dataTable);
});
</script>
@endsection
<?php
/**
* DummyModuleName
*
*/
@startNamespace
Route::group( ['namespace' => 'DummyModel'], function () {
Route::resource('dummy_name', 'DummyController');
//For Datatable
Route::post('dummy_name/get', 'DummyTableController')->name('dummy_name.get');
});
@endNamespace@startWithoutNamespace
Route::resource('dummy_name', 'DummyController');
//For Datatable
Route::post('dummy_name/get', 'DummyTableController')->name('dummy_name.get');
@endWithoutNamespace
<?php
/**
* Routes for : DummyModuleName
*/
@startNamespace
Route::group( ['namespace' => 'DummyModel'], function () {
Route::get('dummy_name', 'DummyController@index')->name('dummy_name.index');
@startCreateRoute::get('dummy_name/create', 'DummyController@create')->name('dummy_name.create');
Route::post('dummy_name', 'DummyController@store')->name('dummy_name.store');@endCreate
@startEditRoute::get('dummy_name/{dummy_argument_name}/edit', 'DummyController@edit')->name('dummy_name.edit');
Route::patch('dummy_name/{dummy_argument_name}', 'DummyController@update')->name('dummy_name.update');@endEdit
@startDeleteRoute::delete('dummy_name/{dummy_argument_name}', 'DummyController@destroy')->name('dummy_name.destroy');@endDelete
//For Datatable
Route::post('dummy_name/get', 'DummyTableController')->name('dummy_name.get');
});
@endNamespace@startWithoutNamespace
Route::get('dummy_name', 'DummyController@index')->name('dummy_name.index');
@startCreateRoute::get('dummy_name/create', 'DummyController@create')->name('dummy_name.create');
Route::post('dummy_name', 'DummyController@store')->name('dummy_name.store');@endCreate
@startEditRoute::get('dummy_name/{dummy_argument_name}/edit', 'DummyController@edit')->name('dummy_name.edit');
Route::patch('dummy_name/{dummy_argument_name}', 'DummyController@update')->name('dummy_name.update');@endEdit
@startDeleteRoute::delete('dummy_name/{dummy_argument_name}', 'DummyController@destroy')->name('dummy_name.destroy');@endDelete
//For Datatable
Route::post('dummy_name/get', 'DummyTableController')->name('dummy_name.get');
@endWithoutNamespace
<?php
namespace App\Console;
use Illuminate\Console\Scheduling\Schedule;
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
class Kernel extends ConsoleKernel
{
/**
* The Artisan commands provided by your application.
*
* @var array
*/
protected $commands = [
'App\Console\Commands\ModuleGenerator'
];
/**
* Define the application's command schedule.
*
* @param \Illuminate\Console\Scheduling\Schedule $schedule
* @return void
*/
protected function schedule(Schedule $schedule)
{
// $schedule->command('inspire')
// ->hourly();
}
/**
* Register the Closure based commands for the application.
*
* @return void
*/
protected function commands()
{
require base_path('routes/console.php');
}
}
<?php
namespace App\Events\Backend\Access\Permission;
use Illuminate\Queue\SerializesModels;
/**
* Class PermissionCreated.
*/
class PermissionCreated
{
use SerializesModels;
/**
* @var
*/
public $permission;
/**
* @param $permission
*/
public function __construct($permission)
{
$this->permission = $permission;
}
}
<?php
namespace App\Events\Backend\Access\Permission;
use Illuminate\Queue\SerializesModels;
/**
* Class PermissionDeleted.
*/
class PermissionDeleted
{
use SerializesModels;
/**
* @var
*/
public $permission;
/**
* @param $permission
*/
public function __construct($permission)
{
$this->permission = $permission;
}
}
<?php
namespace App\Events\Backend\Access\Permission;
use Illuminate\Queue\SerializesModels;
/**
* Class PermissionUpdated.
*/
class PermissionUpdated
{
use SerializesModels;
/**
* @var
*/
public $permission;
/**
* @param $permission
*/
public function __construct($permission)
{
$this->permission = $permission;
}
}
<?php
namespace App\Events\Backend\Access\Role;
use Illuminate\Queue\SerializesModels;
/**
* Class RoleCreated.
*/
class RoleCreated
{
use SerializesModels;
/**
* @var
*/
public $role;
/**
* @param $role
*/
public function __construct($role)
{
$this->role = $role;
}
}
<?php
namespace App\Events\Backend\Access\Role;
use Illuminate\Queue\SerializesModels;
/**
* Class RoleDeleted.
*/
class RoleDeleted
{
use SerializesModels;
/**
* @var
*/
public $role;
/**
* @param $role
*/
public function __construct($role)
{
$this->role = $role;
}
}
<?php
namespace App\Events\Backend\Access\Role;
use Illuminate\Queue\SerializesModels;
/**
* Class RoleUpdated.
*/
class RoleUpdated
{
use SerializesModels;
/**
* @var
*/
public $role;
/**
* @param $role
*/
public function __construct($role)
{
$this->role = $role;
}
}
<?php
namespace App\Events\Backend\Access\User;
use Illuminate\Queue\SerializesModels;
/**
* Class UserCreated.
*/
class UserCreated
{
use SerializesModels;
/**
* @var
*/
public $user;
/**
* @param $user
*/
public function __construct($user)
{
$this->user = $user;
}
}
<?php
namespace App\Events\Backend\Access\User;
use Illuminate\Queue\SerializesModels;
/**
* Class UserDeactivated.
*/
class UserDeactivated
{
use SerializesModels;
/**
* @var
*/
public $user;
/**
* @param $user
*/
public function __construct($user)
{
$this->user = $user;
}
}
<?php
namespace App\Events\Backend\Access\User;
use Illuminate\Queue\SerializesModels;
/**
* Class UserDeleted.
*/
class UserDeleted
{
use SerializesModels;
/**
* @var
*/
public $user;
/**
* @param $user
*/
public function __construct($user)
{
$this->user = $user;
}
}
<?php
namespace App\Events\Backend\Access\User;
use Illuminate\Queue\SerializesModels;
/**
* Class UserPasswordChanged.
*/
class UserPasswordChanged
{
use SerializesModels;
/**
* @var
*/
public $user;
/**
* @param $user
*/
public function __construct($user)
{
$this->user = $user;
}
}
<?php
namespace App\Events\Backend\Access\User;
use Illuminate\Queue\SerializesModels;
/**
* Class UserPermanentlyDeleted.
*/
class UserPermanentlyDeleted
{
use SerializesModels;
/**
* @var
*/
public $user;
/**
* @param $user
*/
public function __construct($user)
{
$this->user = $user;
}
}
<?php
namespace App\Events\Backend\Access\User;
use Illuminate\Queue\SerializesModels;
/**
* Class UserReactivated.
*/
class UserReactivated
{
use SerializesModels;
/**
* @var
*/
public $user;
/**
* @param $user
*/
public function __construct($user)
{
$this->user = $user;
}
}
<?php
namespace App\Events\Backend\Access\User;
use Illuminate\Queue\SerializesModels;
/**
* Class UserRestored.
*/
class UserRestored
{
use SerializesModels;
/**
* @var
*/
public $user;
/**
* @param $user
*/
public function __construct($user)
{
$this->user = $user;
}
}
<?php
namespace App\Events\Backend\Access\User;
use Illuminate\Queue\SerializesModels;
/**
* Class UserUpdated.
*/
class UserUpdated
{
use SerializesModels;
/**
* @var
*/
public $user;
/**
* @param $user
*/
public function __construct($user)
{
$this->user = $user;
}
}
<?php
namespace App\Events\Backend\BlogCategories;
use Illuminate\Queue\SerializesModels;
/**
* Class BlogCategoryCreated.
*/
class BlogCategoryCreated
{
use SerializesModels;
/**
* @var
*/
public $blogcategories;
/**
* @param $blogcategories
*/
public function __construct($blogcategories)
{
$this->blogcategories = $blogcategories;
}
}
<?php
namespace App\Events\Backend\BlogCategories;
use Illuminate\Queue\SerializesModels;
/**
* Class BlogCategoryDeleted.
*/
class BlogCategoryDeleted
{
use SerializesModels;
/**
* @var
*/
public $blogcategories;
/**
* @param $blogcategories
*/
public function __construct($blogcategories)
{
$this->blogcategories = $blogcategories;
}
}
<?php
namespace App\Events\Backend\BlogCategories;
use Illuminate\Queue\SerializesModels;
/**
* Class BlogCategoryUpdated.
*/
class BlogCategoryUpdated
{
use SerializesModels;
/**
* @var
*/
public $blogcategories;
/**
* @param $blogcategories
*/
public function __construct($blogcategories)
{
$this->blogcategories = $blogcategories;
}
}
<?php
namespace App\Events\Backend\BlogTags;
use Illuminate\Queue\SerializesModels;
/**
* Class BlogTagCreated.
*/
class BlogTagCreated
{
use SerializesModels;
/**
* @var
*/
public $blogtags;
/**
* @param $blogtags
*/
public function __construct($blogtags)
{
$this->blogtags = $blogtags;
}
}
<?php
namespace App\Events\Backend\BlogTags;
use Illuminate\Queue\SerializesModels;
/**
* Class BlogTagDeleted.
*/
class BlogTagDeleted
{
use SerializesModels;
/**
* @var
*/
public $blogtags;
/**
* @param $blogtags
*/
public function __construct($blogtags)
{
$this->blogtags = $blogtags;
}
}
<?php
namespace App\Events\Backend\BlogTags;
use Illuminate\Queue\SerializesModels;
/**
* Class BlogTagUpdated.
*/
class BlogTagUpdated
{
use SerializesModels;
/**
* @var
*/
public $blogtags;
/**
* @param $blogtags
*/
public function __construct($blogtags)
{
$this->blogtags = $blogtags;
}
}
<?php
namespace App\Events\Backend\Blogs;
use Illuminate\Queue\SerializesModels;
/**
* Class BlogCreated.
*/
class BlogCreated
{
use SerializesModels;
/**
* @var
*/
public $blogs;
/**
* @param $blogs
*/
public function __construct($blogs)
{
$this->blogs = $blogs;
}
}
<?php
namespace App\Events\Backend\Blogs;
use Illuminate\Queue\SerializesModels;
/**
* Class BlogDeleted.
*/
class BlogDeleted
{
use SerializesModels;
/**
* @var
*/
public $blogs;
/**
* @param $blogs
*/
public function __construct($blogs)
{
$this->blogs = $blogs;
}
}
<?php
namespace App\Events\Backend\Blogs;
use Illuminate\Queue\SerializesModels;
/**
* Class BlogUpdated.
*/
class BlogUpdated
{
use SerializesModels;
/**
* @var
*/
public $blogs;
/**
* @param $blogs
*/
public function __construct($blogs)
{
$this->blogs = $blogs;
}
}
<?php
namespace App\Events\Backend\CMSPages;
use Illuminate\Queue\SerializesModels;
/**
* Class CMSPageCreated.
*/
class CMSPageCreated
{
use SerializesModels;
/**
* @var
*/
public $cmspages;
/**
* @param $cmspages
*/
public function __construct($cmspages)
{
$this->cmspages = $cmspages;
}
}
<?php
namespace App\Events\Backend\CMSPages;
use Illuminate\Queue\SerializesModels;
/**
* Class CMSPageDeleted.
*/
class CMSPageDeleted
{
use SerializesModels;
/**
* @var
*/
public $cmspages;
/**
* @param $cmspages
*/
public function __construct($cmspages)
{
$this->cmspages = $cmspages;
}
}
<?php
namespace App\Events\Backend\CMSPages;
use Illuminate\Queue\SerializesModels;
/**
* Class CMSPageUpdated.
*/
class CMSPageUpdated
{
use SerializesModels;
/**
* @var
*/
public $cmspages;
/**
* @param $cmspages
*/
public function __construct($cmspages)
{
$this->cmspages = $cmspages;
}
}
<?php
namespace App\Events\Backend\EmailTemplates;
use Illuminate\Queue\SerializesModels;
/**
* Class EmailTemplateDeleted.
*/
class EmailTemplateDeleted
{
use SerializesModels;
/**
* @var
*/
public $emailtemplates;
/**
* @param $emailtemplates
*/
public function __construct($emailtemplates)
{
$this->emailtemplates = $emailtemplates;
}
}
<?php
namespace App\Events\Backend\EmailTemplates;
use Illuminate\Queue\SerializesModels;
/**
* Class EmailTemplateUpdated.
*/
class EmailTemplateUpdated
{
use SerializesModels;
/**
* @var
*/
public $emailtemplates;
/**
* @param $emailtemplates
*/
public function __construct($emailtemplates)
{
$this->emailtemplates = $emailtemplates;
}
}
<?php
namespace App\Events\Frontend\Auth;
use Illuminate\Queue\SerializesModels;
/**
* Class UserConfirmed.
*/
class UserConfirmed
{
use SerializesModels;
/**
* @var
*/
public $user;
/**
* @param $user
*/
public function __construct($user)
{
$this->user = $user;
}
}
<?php
namespace App\Events\Frontend\Auth;
use Illuminate\Queue\SerializesModels;
/**
* Class UserLoggedIn.
*/
class UserLoggedIn
{
use SerializesModels;
/**
* @var
*/
public $user;
/**
* @param $user
*/
public function __construct($user)
{
$this->user = $user;
}
}
<?php
namespace App\Events\Frontend\Auth;
use Illuminate\Queue\SerializesModels;
/**
* Class UserLoggedOut.
*/
class UserLoggedOut
{
use SerializesModels;
/**
* @var
*/
public $user;
/**
* @param $user
*/
public function __construct($user)
{
$this->user = $user;
}
}
<?php
namespace App\Events\Frontend\Auth;
use Illuminate\Queue\SerializesModels;
/**
* Class UserRegistered.
*/
class UserRegistered
{
use SerializesModels;
/**
* @var
*/
public $user;
/**
* @param $user
*/
public function __construct($user)
{
$this->user = $user;
}
}
<?php
namespace App\Exceptions;
use Exception;
/**
* Class GeneralException.
*/
class GeneralException extends Exception
{
}
<?php
namespace App\Exceptions;
use Exception;
use Illuminate\Auth\AuthenticationException;
use Illuminate\Session\TokenMismatchException;
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
class Handler extends ExceptionHandler
{
/**
* A list of the exception types that should not be reported.
*
* @var array
*/
protected $dontReport = [
\Illuminate\Auth\AuthenticationException::class,
\Illuminate\Auth\Access\AuthorizationException::class,
\Symfony\Component\HttpKernel\Exception\HttpException::class,
\Illuminate\Database\Eloquent\ModelNotFoundException::class,
\Illuminate\Session\TokenMismatchException::class,
\Illuminate\Validation\ValidationException::class,
];
/**
* Report or log an exception.
*
* This is a great spot to send exceptions to Sentry, Bugsnag, etc.
*
* @param \Exception $exception
* @return void
*/
public function report(Exception $exception)
{
parent::report($exception);
}
/**
* Render an exception into an HTTP response.
*
* @param \Illuminate\Http\Request $request
* @param \Exception $exception
* @return \Illuminate\Http\Response
*/
public function render($request, Exception $exception)
{
/*
* Redirect if token mismatch error
* Usually because user stayed on the same screen too long and their session expired
*/
if ($exception instanceof TokenMismatchException) {
return redirect()->route('frontend.auth.login');
}
/*
* All instances of GeneralException redirect back with a flash message to show a bootstrap alert-error
*/
if ($exception instanceof GeneralException) {
return redirect()->back()->withInput()->withFlashDanger($exception->getMessage());
}
return parent::render($request, $exception);
}
/**
* Convert an authentication exception into an unauthenticated response.
*
* @param \Illuminate\Http\Request $request
* @param \Illuminate\Auth\AuthenticationException $exception
* @return \Illuminate\Http\Response
*/
protected function unauthenticated($request, AuthenticationException $exception)
{
if ($request->expectsJson()) {
return response()->json(['error' => 'Unauthenticated.'], 401);
}
return redirect()->guest(route('frontend.auth.login'));
}
}
<?php
namespace App\Helpers\Auth;
/**
* Class Auth.
*/
class Auth
{
/**
* Remove old session variables from admin logging in as user.
*/
public function flushTempSession()
{
// Remove any old session variables
session()->forget('admin_user_id');
session()->forget('admin_user_name');
session()->forget('temp_user_id');
}
}
<?php
namespace App\Helpers\Frontend\Auth;
/**
* Class Socialite.
*/
class Socialite
{
/**
* Generates social login links based on what is enabled.
*
* @return string
*/
public function getSocialLinks()
{
$socialite_enable = [];
$socialite_links = '';
if (strlen(getenv('BITBUCKET_CLIENT_ID'))) {
$socialite_enable[] = link_to_route('frontend.auth.social.login', trans('labels.frontend.auth.login_with', ['social_media' => 'Bit Bucket']), 'bitbucket');
}
if (strlen(getenv('FACEBOOK_CLIENT_ID'))) {
$socialite_enable[] = link_to_route('frontend.auth.social.login', trans('labels.frontend.auth.login_with', ['social_media' => 'Facebook']), 'facebook');
}
if (strlen(getenv('GOOGLE_CLIENT_ID'))) {
$socialite_enable[] = link_to_route('frontend.auth.social.login', trans('labels.frontend.auth.login_with', ['social_media' => 'Google']), 'google');
}
if (strlen(getenv('GITHUB_CLIENT_ID'))) {
$socialite_enable[] = link_to_route('frontend.auth.social.login', trans('labels.frontend.auth.login_with', ['social_media' => 'Github']), 'github');
}
if (strlen(getenv('LINKEDIN_CLIENT_ID'))) {
$socialite_enable[] = link_to_route('frontend.auth.social.login', trans('labels.frontend.auth.login_with', ['social_media' => 'Linked In']), 'linkedin');
}
if (strlen(getenv('TWITTER_CLIENT_ID'))) {
$socialite_enable[] = link_to_route('frontend.auth.social.login', trans('labels.frontend.auth.login_with', ['social_media' => 'Twitter']), 'twitter');
}
for ($i = 0; $i < count($socialite_enable); $i++) {
$socialite_links .= ($socialite_links != '' ? '&nbsp;|&nbsp;' : '').$socialite_enable[$i];
}
return $socialite_links;
}
/**
* List of the accepted third party provider types to login with.
*
* @return array
*/
public function getAcceptedProviders()
{
return [
'bitbucket',
'facebook',
'google',
'github',
'linkedin',
'twitter',
];
}
}
<?php
namespace App\Helpers\Macros;
use Collective\Html\FormBuilder;
use App\Helpers\Macros\Traits\Dropdowns;
/**
* Class Macros.
*/
class Macros extends FormBuilder
{
use Dropdowns;
}
This diff is collapsed.
<?php
Breadcrumbs::register('admin.access.permission.index', function ($breadcrumbs) {
$breadcrumbs->parent('admin.dashboard');
$breadcrumbs->push(trans('menus.backend.access.permissions.management'), route('admin.access.permission.index'));
});
Breadcrumbs::register('admin.access.permission.create', function ($breadcrumbs) {
$breadcrumbs->parent('admin.access.permission.index');
$breadcrumbs->push(trans('menus.backend.access.permissions.create'), route('admin.access.permission.create'));
});
Breadcrumbs::register('admin.access.permission.edit', function ($breadcrumbs, $id) {
$breadcrumbs->parent('admin.access.permission.index');
$breadcrumbs->push(trans('menus.backend.access.permissions.edit'), route('admin.access.permission.edit', $id));
});
<?php
Breadcrumbs::register('admin.access.role.index', function ($breadcrumbs) {
$breadcrumbs->parent('admin.dashboard');
$breadcrumbs->push(trans('menus.backend.access.roles.management'), route('admin.access.role.index'));
});
Breadcrumbs::register('admin.access.role.create', function ($breadcrumbs) {
$breadcrumbs->parent('admin.access.role.index');
$breadcrumbs->push(trans('menus.backend.access.roles.create'), route('admin.access.role.create'));
});
Breadcrumbs::register('admin.access.role.edit', function ($breadcrumbs, $id) {
$breadcrumbs->parent('admin.access.role.index');
$breadcrumbs->push(trans('menus.backend.access.roles.edit'), route('admin.access.role.edit', $id));
});
<?php
Breadcrumbs::register('admin.access.user.index', function ($breadcrumbs) {
$breadcrumbs->parent('admin.dashboard');
$breadcrumbs->push(trans('labels.backend.access.users.management'), route('admin.access.user.index'));
});
Breadcrumbs::register('admin.access.user.deactivated', function ($breadcrumbs) {
$breadcrumbs->parent('admin.access.user.index');
$breadcrumbs->push(trans('menus.backend.access.users.deactivated'), route('admin.access.user.deactivated'));
});
Breadcrumbs::register('admin.access.user.deleted', function ($breadcrumbs) {
$breadcrumbs->parent('admin.access.user.index');
$breadcrumbs->push(trans('menus.backend.access.users.deleted'), route('admin.access.user.deleted'));
});
Breadcrumbs::register('admin.access.user.create', function ($breadcrumbs) {
$breadcrumbs->parent('admin.access.user.index');
$breadcrumbs->push(trans('menus.backend.access.users.create'), route('admin.access.user.create'));
});
Breadcrumbs::register('admin.access.user.show', function ($breadcrumbs, $id) {
$breadcrumbs->parent('admin.access.user.index');
$breadcrumbs->push(trans('menus.backend.access.users.view'), route('admin.access.user.show', $id));
});
Breadcrumbs::register('admin.access.user.edit', function ($breadcrumbs, $id) {
$breadcrumbs->parent('admin.access.user.index');
$breadcrumbs->push(trans('menus.backend.access.users.edit'), route('admin.access.user.edit', $id));
});
Breadcrumbs::register('admin.access.user.change-password', function ($breadcrumbs, $id) {
$breadcrumbs->parent('admin.access.user.index');
$breadcrumbs->push(trans('menus.backend.access.users.change-password'), route('admin.access.user.change-password', $id));
});
<?php
Breadcrumbs::register('admin.dashboard', function ($breadcrumbs) {
$breadcrumbs->push('Dashboard', route('admin.dashboard'));
});
require __DIR__.'/Search.php';
require __DIR__.'/Access/User.php';
require __DIR__.'/Access/Role.php';
require __DIR__.'/Access/Permission.php';
require __DIR__.'/CMS_Page.php';
require __DIR__.'/Email_Template.php';
require __DIR__.'/Setting.php';
require __DIR__.'/Blog_Category.php';
require __DIR__.'/Blog_Tag.php';
require __DIR__.'/Blog_Management.php';
require __DIR__.'/Faqs.php';
require __DIR__.'/Module.php';
require __DIR__.'/LogViewer.php';
\ No newline at end of file
<?php
Breadcrumbs::register('admin.blogcategories.index', function ($breadcrumbs) {
$breadcrumbs->parent('admin.dashboard');
$breadcrumbs->push(trans('menus.backend.blog_management.management'), route('admin.blogcategories.index'));
});
Breadcrumbs::register('admin.blogcategories.create', function ($breadcrumbs) {
$breadcrumbs->parent('admin.blogcategories.index');
$breadcrumbs->push(trans('menus.backend.blog_management.create'), route('admin.blogcategories.create'));
});
Breadcrumbs::register('admin.blogcategories.edit', function ($breadcrumbs, $id) {
$breadcrumbs->parent('admin.blogcategories.index');
$breadcrumbs->push(trans('menus.backend.blog_management.edit'), route('admin.blogcategories.edit', $id));
});
<?php
Breadcrumbs::register('admin.blogcategories.index', function ($breadcrumbs) {
$breadcrumbs->parent('admin.dashboard');
$breadcrumbs->push(trans('menus.backend.blogcategories.management'), route('admin.blogcategories.index'));
});
Breadcrumbs::register('admin.blogcategories.create', function ($breadcrumbs) {
$breadcrumbs->parent('admin.blogcategories.index');
$breadcrumbs->push(trans('menus.backend.blogcategories.create'), route('admin.blogcategories.create'));
});
Breadcrumbs::register('admin.blogcategories.edit', function ($breadcrumbs, $id) {
$breadcrumbs->parent('admin.blogcategories.index');
$breadcrumbs->push(trans('menus.backend.blogcategories.edit'), route('admin.blogcategories.edit', $id));
});
<?php
Breadcrumbs::register('admin.blogs.index', function ($breadcrumbs) {
$breadcrumbs->parent('admin.dashboard');
$breadcrumbs->push(trans('menus.backend.blogs.management'), route('admin.blogs.index'));
});
Breadcrumbs::register('admin.blogs.create', function ($breadcrumbs) {
$breadcrumbs->parent('admin.blogs.index');
$breadcrumbs->push(trans('menus.backend.blogs.create'), route('admin.blogs.create'));
});
Breadcrumbs::register('admin.blogs.edit', function ($breadcrumbs, $id) {
$breadcrumbs->parent('admin.blogs.index');
$breadcrumbs->push(trans('menus.backend.blogs.edit'), route('admin.blogs.edit', $id));
});
<?php
Breadcrumbs::register('admin.blogtags.index', function ($breadcrumbs) {
$breadcrumbs->parent('admin.dashboard');
$breadcrumbs->push(trans('menus.backend.blogtags.management'), route('admin.blogtags.index'));
});
Breadcrumbs::register('admin.blogtags.create', function ($breadcrumbs) {
$breadcrumbs->parent('admin.blogtags.index');
$breadcrumbs->push(trans('menus.backend.blogtags.create'), route('admin.blogtags.create'));
});
Breadcrumbs::register('admin.blogtags.edit', function ($breadcrumbs, $id) {
$breadcrumbs->parent('admin.blogtags.index');
$breadcrumbs->push(trans('menus.backend.blogtags.edit'), route('admin.blogtags.edit', $id));
});
<?php
Breadcrumbs::register('admin.cmspages.index', function ($breadcrumbs) {
$breadcrumbs->parent('admin.dashboard');
$breadcrumbs->push(trans('menus.backend.cmspages.management'), route('admin.cmspages.index'));
});
Breadcrumbs::register('admin.cmspages.create', function ($breadcrumbs) {
$breadcrumbs->parent('admin.cmspages.index');
$breadcrumbs->push(trans('menus.backend.cmspages.create'), route('admin.cmspages.create'));
});
Breadcrumbs::register('admin.cmspages.edit', function ($breadcrumbs, $id) {
$breadcrumbs->parent('admin.cmspages.index');
$breadcrumbs->push(trans('menus.backend.cmspages.edit'), route('admin.cmspages.edit', $id));
});
<?php
Breadcrumbs::register('admin.emailtemplates.index', function ($breadcrumbs) {
$breadcrumbs->parent('admin.dashboard');
$breadcrumbs->push(trans('menus.backend.emailtemplates.management'), route('admin.emailtemplates.index'));
});
Breadcrumbs::register('admin.emailtemplates.create', function ($breadcrumbs) {
$breadcrumbs->parent('admin.emailtemplates.index');
$breadcrumbs->push(trans('menus.backend.emailtemplates.create'), route('admin.emailtemplates.create'));
});
Breadcrumbs::register('admin.emailtemplates.edit', function ($breadcrumbs, $id) {
$breadcrumbs->parent('admin.emailtemplates.index');
$breadcrumbs->push(trans('menus.backend.emailtemplates.edit'), route('admin.emailtemplates.edit', $id));
});
<?php
Breadcrumbs::register('admin.faqs.index', function ($breadcrumbs) {
$breadcrumbs->parent('admin.dashboard');
$breadcrumbs->push(trans('menus.backend.faqs.management'), route('admin.faqs.index'));
});
Breadcrumbs::register('admin.faqs.create', function ($breadcrumbs) {
$breadcrumbs->parent('admin.faqs.index');
$breadcrumbs->push(trans('menus.backend.faqs.create'), route('admin.faqs.create'));
});
Breadcrumbs::register('admin.faqs.edit', function ($breadcrumbs, $id) {
$breadcrumbs->parent('admin.faqs.index');
$breadcrumbs->push(trans('menus.backend.faqs.edit'), route('admin.faqs.edit', $id));
});
<?php
Breadcrumbs::register('log-viewer::dashboard', function ($breadcrumbs) {
$breadcrumbs->parent('admin.dashboard');
$breadcrumbs->push(trans('menus.backend.log-viewer.main'), url('admin/log-viewer'));
});
Breadcrumbs::register('log-viewer::logs.list', function ($breadcrumbs) {
$breadcrumbs->parent('log-viewer::dashboard');
$breadcrumbs->push(trans('menus.backend.log-viewer.logs'), url('admin/log-viewer/logs'));
});
Breadcrumbs::register('log-viewer::logs.show', function ($breadcrumbs, $date) {
$breadcrumbs->parent('log-viewer::logs.list');
$breadcrumbs->push($date, url('admin/log-viewer/'.$date));
});
Breadcrumbs::register('log-viewer::logs.filter', function ($breadcrumbs, $date, $filter) {
$breadcrumbs->parent('log-viewer::logs.show', $date);
$breadcrumbs->push(ucfirst($filter), url('admin/log-viewer/'.$date.'/'.$filter));
});
<?php
Breadcrumbs::register('admin.modules.index', function ($breadcrumbs) {
$breadcrumbs->parent('admin.dashboard');
$breadcrumbs->push(trans('menus.backend.modules.management'), route('admin.modules.index'));
});
Breadcrumbs::register('admin.modules.create', function ($breadcrumbs) {
$breadcrumbs->parent('admin.modules.index');
$breadcrumbs->push(trans('menus.backend.modules.create'), route('admin.modules.create'));
});
Breadcrumbs::register('admin.modules.edit', function ($breadcrumbs, $id) {
$breadcrumbs->parent('admin.modules.index');
$breadcrumbs->push(trans('menus.backend.modules.edit'), route('admin.modules.edit', $id));
});
<?php
Breadcrumbs::register('admin.search.index', function ($breadcrumbs) {
$breadcrumbs->parent('admin.dashboard');
$breadcrumbs->push(trans('strings.backend.search.title'), route('admin.search.index'));
});
<?php
Breadcrumbs::register('admin.settings.edit', function ($breadcrumbs, $id) {
$breadcrumbs->parent('admin.dashboard');
$breadcrumbs->push(trans('menus.backend.settings.edit'), route('admin.settings.edit', $id));
});
<?php
namespace App\Http\Composers;
use Illuminate\View\View;
/**
* Class GlobalComposer.
*/
class GlobalComposer
{
/**
* Bind data to the view.
*
* @param View $view
*
* @return void
*/
public function compose(View $view)
{
$view->with('logged_in_user', access()->user());
}
}
<?php
namespace App\Http\Controllers\Backend\Access\Permission;
use App\Models\Access\Permission\Permission;
use App\Http\Controllers\Controller;
use Yajra\Datatables\Facades\Datatables;
use App\Repositories\Backend\Access\Permission\PermissionRepository;
use App\Http\Requests\Backend\Access\Permission\StorePermissionRequest;
use App\Http\Requests\Backend\Access\Permission\ManagePermissionRequest;
use App\Http\Requests\Backend\Access\Permission\CreatePermissionRequest;
use App\Http\Requests\Backend\Access\Permission\EditPermissionRequest;
use App\Http\Requests\Backend\Access\Permission\DeletePermissionRequest;
use App\Http\Requests\Backend\Access\Permission\UpdatePermissionRequest;
/**
* Class PermissionController.
*/
class PermissionController extends Controller
{
/**
* @var PermissionRepository
*/
protected $permissions;
/**
* @param PermissionRepository $permissions
*/
public function __construct(PermissionRepository $permissions)
{
$this->permissions = $permissions;
}
/**
* @param ManagePermissionRequest $request
*
* @return mixed
*/
public function index(ManagePermissionRequest $request)
{
return view('backend.access.permissions.index');
}
/**
* @param CreatePermissionRequest $request
*
* @return mixed
*/
public function create(CreatePermissionRequest $request)
{
return view('backend.access.permissions.create')
->withPermissionCount($this->permissions->getCount());
}
/**
* @param StorePermissionRequest $request
*
* @return mixed
*/
public function store(StorePermissionRequest $request)
{
$this->permissions->create($request->all());
return redirect()->route('admin.access.permission.index')->withFlashSuccess(trans('alerts.backend.permissions.created'));
}
/**
* @param Permission $permission
* @param EditPermissionRequest $request
*
* @return mixed
*/
public function edit(Permission $permission, EditPermissionRequest $request)
{
return view('backend.access.permissions.edit')
->withPermission($permission);
}
/**
* @param Permission $permission
* @param UpdatePermissionRequest $request
*
* @return mixed
*/
public function update(Permission $permission, UpdatePermissionRequest $request)
{
$this->permissions->update($permission, $request->all());
return redirect()->route('admin.access.permission.index')->withFlashSuccess(trans('alerts.backend.permissions.updated'));
}
/**
* @param Permission $permission
* @param DeletePermissionRequest $request
*
* @return mixed
*/
public function destroy(Permission $permission, DeletePermissionRequest $request)
{
$this->permissions->delete($permission);
return redirect()->route('admin.access.permission.index')->withFlashSuccess(trans('alerts.backend.permissions.deleted'));
}
}
<?php
namespace App\Http\Controllers\Backend\Access\Permission;
use App\Http\Controllers\Controller;
use Yajra\Datatables\Facades\Datatables;
use App\Repositories\Backend\Access\Permission\PermissionRepository;
use App\Http\Requests\Backend\Access\Permission\ManagePermissionRequest;
/**
* Class PermissionTableController.
*/
class PermissionTableController extends Controller
{
/**
* @var PermissionRepository
*/
protected $permissions;
/**
* @param PermissionRepository $permissions
*/
public function __construct(PermissionRepository $permissions)
{
$this->permissions = $permissions;
}
/**
* @param ManagePermissionRequest $request
*
* @return mixed
*/
public function __invoke(ManagePermissionRequest $request)
{
return Datatables::of($this->permissions->getForDataTable())
->escapeColumns(['name', 'sort'])
->addColumn('permissions', function ($permission) {
if ($permission->all) {
return '<span class="label label-success">'.trans('labels.general.all').'</span>';
}
})
->addColumn('actions', function ($permission) {
return $permission->action_buttons;
})
->make(true);
}
}
<?php
namespace App\Http\Controllers\Backend\Access\Role;
use App\Models\Access\Role\Role;
use App\Http\Controllers\Controller;
use App\Repositories\Backend\Access\Role\RoleRepository;
use App\Http\Requests\Backend\Access\Role\StoreRoleRequest;
use App\Http\Requests\Backend\Access\Role\ManageRoleRequest;
use App\Http\Requests\Backend\Access\Role\CreateRoleRequest;
use App\Http\Requests\Backend\Access\Role\EditRoleRequest;
use App\Http\Requests\Backend\Access\Role\UpdateRoleRequest;
use App\Http\Requests\Backend\Access\Role\DeleteRoleRequest;
use App\Repositories\Backend\Access\Permission\PermissionRepository;
/**
* Class RoleController.
*/
class RoleController extends Controller
{
/**
* @var RoleRepository
*/
protected $roles;
/**
* @var PermissionRepository
*/
protected $permissions;
/**
* @param RoleRepository $roles
* @param PermissionRepository $permissions
*/
public function __construct(RoleRepository $roles, PermissionRepository $permissions)
{
$this->roles = $roles;
$this->permissions = $permissions;
}
/**
* @param ManageRoleRequest $request
*
* @return mixed
*/
public function index(ManageRoleRequest $request)
{
return view('backend.access.roles.index');
}
/**
* @param CreateRoleRequest $request
*
* @return mixed
*/
public function create(CreateRoleRequest $request)
{
return view('backend.access.roles.create')
->withPermissions($this->permissions->getAll())
->withRoleCount($this->roles->getCount());
}
/**
* @param StoreRoleRequest $request
*
* @return mixed
*/
public function store(StoreRoleRequest $request)
{
$this->roles->create($request->all());
return redirect()->route('admin.access.role.index')->withFlashSuccess(trans('alerts.backend.roles.created'));
}
/**
* @param Role $role
* @param EditRoleRequest $request
*
* @return mixed
*/
public function edit(Role $role, EditRoleRequest $request)
{
return view('backend.access.roles.edit')
->withRole($role)
->withRolePermissions($role->permissions->pluck('id')->all())
->withPermissions($this->permissions->getAll());
}
/**
* @param Role $role
* @param UpdateRoleRequest $request
*
* @return mixed
*/
public function update(Role $role, UpdateRoleRequest $request)
{
$this->roles->update($role, $request->all());
return redirect()->route('admin.access.role.index')->withFlashSuccess(trans('alerts.backend.roles.updated'));
}
/**
* @param Role $role
* @param DeleteRoleRequest $request
*
* @return mixed
*/
public function destroy(Role $role, DeleteRoleRequest $request)
{
$this->roles->delete($role);
return redirect()->route('admin.access.role.index')->withFlashSuccess(trans('alerts.backend.roles.deleted'));
}
}
<?php
namespace App\Http\Controllers\Backend\Access\Role;
use App\Http\Controllers\Controller;
use Yajra\Datatables\Facades\Datatables;
use App\Repositories\Backend\Access\Role\RoleRepository;
use App\Http\Requests\Backend\Access\Role\ManageRoleRequest;
/**
* Class RoleTableController.
*/
class RoleTableController extends Controller
{
/**
* @var RoleRepository
*/
protected $roles;
/**
* @param RoleRepository $roles
*/
public function __construct(RoleRepository $roles)
{
$this->roles = $roles;
}
/**
* @param ManageRoleRequest $request
*
* @return mixed
*/
public function __invoke(ManageRoleRequest $request)
{
return Datatables::of($this->roles->getForDataTable())
->escapeColumns(['name', 'sort'])
->addColumn('permissions', function ($role) {
if ($role->all) {
return '<span class="label label-success">'.trans('labels.general.all').'</span>';
}
return $role->permission_name;
})
->addColumn('users', function ($role) {
return $role->userCount;
})
->addColumn('actions', function ($role) {
return $role->action_buttons;
})
->make(true);
}
}
<?php
namespace App\Http\Controllers\Backend\Access\User;
use App\Helpers\Auth\Auth;
use App\Models\Access\User\User;
use App\Exceptions\GeneralException;
use App\Http\Controllers\Controller;
use App\Http\Requests\Backend\Access\User\ManageUserRequest;
/**
* Class UserAccessController.
*/
class UserAccessController extends Controller
{
/**
* @param User $user
* @param ManageUserRequest $request
*
* @throws GeneralException
*
* @return \Illuminate\Http\RedirectResponse
*/
public function loginAs(User $user, ManageUserRequest $request)
{
// Overwrite who we're logging in as, if we're already logged in as someone else.
if (session()->has('admin_user_id') && session()->has('temp_user_id')) {
// Let's not try to login as ourselves.
if (access()->id() == $user->id || session()->get('admin_user_id') == $user->id) {
throw new GeneralException('Do not try to login as yourself.');
}
// Overwrite temp user ID.
session(['temp_user_id' => $user->id]);
// Login.
access()->loginUsingId($user->id);
// Redirect.
return redirect()->route('frontend.index');
}
app()->make(Auth::class)->flushTempSession();
// Won't break, but don't let them "Login As" themselves
if (access()->id() == $user->id) {
throw new GeneralException('Do not try to login as yourself.');
}
// Add new session variables
session(['admin_user_id' => access()->id()]);
session(['admin_user_name' => access()->user()->first_name]);
session(['temp_user_id' => $user->id]);
// Login user
access()->loginUsingId($user->id);
// Redirect to frontend
return redirect()->route('frontend.index');
}
}
<?php
namespace App\Http\Controllers\Backend\Access\User;
use App\Models\Access\User\User;
use App\Http\Controllers\Controller;
use App\Notifications\Frontend\Auth\UserNeedsConfirmation;
use App\Http\Requests\Backend\Access\User\ManageUserRequest;
/**
* Class UserConfirmationController.
*/
class UserConfirmationController extends Controller
{
/**
* @param User $user
* @param ManageUserRequest $request
*
* @return mixed
*/
public function sendConfirmationEmail(User $user, ManageUserRequest $request)
{
$user->notify(new UserNeedsConfirmation($user->confirmation_code));
return redirect()->back()->withFlashSuccess(trans('alerts.backend.users.confirmation_email'));
}
}
<?php
namespace App\Http\Controllers\Backend\Access\User;
use App\Models\Access\User\User;
use App\Http\Controllers\Controller;
use App\Repositories\Backend\Access\Role\RoleRepository;
use App\Repositories\Backend\Access\User\UserRepository;
use App\Http\Requests\Backend\Access\User\StoreUserRequest;
use App\Http\Requests\Backend\Access\User\ManageUserRequest;
use App\Http\Requests\Backend\Access\User\CreateUserRequest;
use App\Http\Requests\Backend\Access\User\EditUserRequest;
use App\Http\Requests\Backend\Access\User\ShowUserRequest;
use App\Http\Requests\Backend\Access\User\DeleteUserRequest;
use App\Http\Requests\Backend\Access\User\UpdateUserRequest;
use Illuminate\Support\Facades\DB;
/**
* Class UserController.
*/
class UserController extends Controller
{
/**
* @var UserRepository
*/
protected $users;
/**
* @var RoleRepository
*/
protected $roles;
/**
* @param UserRepository $users
* @param RoleRepository $roles
*/
public function __construct(UserRepository $users, RoleRepository $roles)
{
$this->users = $users;
$this->roles = $roles;
}
/**
* @param ManageUserRequest $request
*
* @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
*/
public function index(ManageUserRequest $request)
{
return view('backend.access.index');
}
/**
* @param CreateUserRequest $request
*
* @return mixed
*/
public function create(CreateUserRequest $request)
{
return view('backend.access.create')
->withRoles($this->roles->getAll());
}
/**
* @param StoreUserRequest $request
*
* @return mixed
*/
public function store(StoreUserRequest $request)
{
$this->users->create(['data' => $request->except('assignees_roles'), 'roles' => $request->only('assignees_roles')]);
return redirect()->route('admin.access.user.index')->withFlashSuccess(trans('alerts.backend.users.created'));
}
/**
* @param User $user
* @param ShowUserRequest $request
*
* @return mixed
*/
public function show(User $user, ShowUserRequest $request)
{
return view('backend.access.show')
->withUser($user);
}
/**
* @param User $user
* @param EditUserRequest $request
*
* @return mixed
*/
public function edit(User $user, EditUserRequest $request)
{
$userPermissions = DB::table('permission_user')->where('user_id', $user->id)->pluck('permission_id', 'permission_id')->toArray();
$permissions = DB::table('permissions')->pluck('display_name', 'id')->toArray();
ksort($userPermissions);
ksort($permissions);
return view('backend.access.edit', compact('userPermissions', 'permissions'))
->withUser($user)
->withUserRoles($user->roles->pluck('id')->all())
->withRoles($this->roles->getAll());
}
/**
* @param User $user
* @param UpdateUserRequest $request
*
* @return mixed
*/
public function update(User $user, UpdateUserRequest $request)
{
$this->users->update($user, ['data' => $request->except('assignees_roles'), 'roles' => $request->only('assignees_roles')]);
return redirect()->route('admin.access.user.index')->withFlashSuccess(trans('alerts.backend.users.updated'));
}
/**
* @param User $user
* @param DeleteUserRequest $request
*
* @return mixed
*/
public function destroy(User $user, DeleteUserRequest $request)
{
$this->users->delete($user);
return redirect()->route('admin.access.user.deleted')->withFlashSuccess(trans('alerts.backend.users.deleted'));
}
}
<?php
namespace App\Http\Controllers\Backend\Access\User;
use App\Models\Access\User\User;
use App\Http\Controllers\Controller;
use App\Repositories\Backend\Access\User\UserRepository;
use App\Http\Requests\Backend\Access\User\ManageUserRequest;
use App\Http\Requests\Backend\Access\User\UpdateUserPasswordRequest;
/**
* Class UserPasswordController.
*/
class UserPasswordController extends Controller
{
/**
* @var UserRepository
*/
protected $users;
/**
* @param UserRepository $users
*/
public function __construct(UserRepository $users)
{
$this->users = $users;
}
/**
* @param User $user
* @param ManageUserRequest $request
*
* @return mixed
*/
public function edit(User $user, ManageUserRequest $request)
{
return view('backend.access.change-password')
->withUser($user);
}
/**
* @param User $user
* @param UpdateUserPasswordRequest $request
*
* @return mixed
*/
public function update(User $user, UpdateUserPasswordRequest $request)
{
$this->users->updatePassword($user, $request->all());
return redirect()->route('admin.access.user.change-password',access()->user()->id)->withFlashSuccess(trans('alerts.backend.users.updated_password'));
}
}
<?php
namespace App\Http\Controllers\Backend\Access\User;
use App\Models\Access\User\User;
use App\Http\Controllers\Controller;
use App\Http\Requests\Backend\Access\User\ManageUserRequest;
use App\Repositories\Backend\Access\User\UserSessionRepository;
/**
* Class UserSessionController.
*/
class UserSessionController extends Controller
{
/**
* @param User $user
* @param ManageUserRequest $request
* @param UserSessionRepository $userSessionRepository
*
* @return mixed
*/
public function clearSession(User $user, ManageUserRequest $request, UserSessionRepository $userSessionRepository)
{
$userSessionRepository->clearSession($user);
return redirect()->back()->withFlashSuccess(trans('alerts.backend.users.session_cleared'));
}
}
<?php
namespace App\Http\Controllers\Backend\Access\User;
use App\Models\Access\User\User;
use App\Http\Controllers\Controller;
use App\Repositories\Backend\Access\User\UserRepository;
use App\Http\Requests\Backend\Access\User\EditUserRequest;
use App\Http\Requests\Backend\Access\User\DeleteUserRequest;
use App\Http\Requests\Backend\Access\User\ManageDeletedRequest;
use App\Http\Requests\Backend\Access\User\ManageDeactivatedRequest;
/**
* Class UserStatusController.
*/
class UserStatusController extends Controller
{
/**
* @var UserRepository
*/
protected $users;
/**
* @param UserRepository $users
*/
public function __construct(UserRepository $users)
{
$this->users = $users;
}
/**
* @param ManageDeactivatedRequest $request
*
* @return mixed
*/
public function getDeactivated(ManageDeactivatedRequest $request)
{
return view('backend.access.deactivated');
}
/**
* @param ManageDeletedRequest $request
*
* @return mixed
*/
public function getDeleted(ManageDeletedRequest $request)
{
return view('backend.access.deleted');
}
/**
* @param User $user
* @param $status
* @param ManageUserRequest $request
*
* @return mixed
*/
public function mark(User $user, $status, EditUserRequest $request)
{
$this->users->mark($user, $status);
return redirect()->route($status == 1 ? 'admin.access.user.index' : 'admin.access.user.deactivated')->withFlashSuccess(trans('alerts.backend.users.updated'));
}
/**
* @param User $deletedUser
* @param DeleteUserRequest $request
*
* @return mixed
*/
public function delete(User $deletedUser, DeleteUserRequest $request)
{
$this->users->forceDelete($deletedUser);
return redirect()->route('admin.access.user.deleted')->withFlashSuccess(trans('alerts.backend.users.deleted_permanently'));
}
/**
* @param User $deletedUser
* @param DeleteUserRequest $request
*
* @return mixed
*/
public function restore(User $deletedUser, DeleteUserRequest $request)
{
$this->users->restore($deletedUser);
return redirect()->route('admin.access.user.index')->withFlashSuccess(trans('alerts.backend.users.restored'));
}
}
<?php
namespace App\Http\Controllers\Backend\Access\User;
use App\Http\Controllers\Controller;
use Yajra\Datatables\Facades\Datatables;
use App\Repositories\Backend\Access\User\UserRepository;
use App\Http\Requests\Backend\Access\User\ManageUserRequest;
use Carbon\Carbon;
/**
* Class UserTableController.
*/
class UserTableController extends Controller
{
/**
* @var UserRepository
*/
protected $users;
/**
* @param UserRepository $users
*/
public function __construct(UserRepository $users)
{
$this->users = $users;
}
/**
* @param ManageUserRequest $request
*
* @return mixed
*/
public function __invoke(ManageUserRequest $request)
{
return Datatables::of($this->users->getForDataTable($request->get('status'), $request->get('trashed')))
->escapeColumns(['first_name', 'email'])
->editColumn('confirmed', function ($user) {
return $user->confirmed_label;
})
->addColumn('roles', function ($user) {
return $user->roles;
})
->addColumn('created_at', function ($user) {
return Carbon::parse($user->created_at)->toDateString();
})
->addColumn('updated_at', function ($user) {
return Carbon::parse($user->updated_at)->toDateString();
})
->addColumn('actions', function ($user) {
return $user->action_buttons;
})
->withTrashed()
->make(true);
}
}
<?php
namespace App\Http\Controllers\Backend\BlogCategories;
use App\Models\BlogCategories\BlogCategory;
use App\Http\Controllers\Controller;
use Yajra\Datatables\Facades\Datatables;
use App\Repositories\Backend\BlogCategories\BlogCategoriesRepository;
use App\Http\Requests\Backend\BlogCategories\StoreBlogCategoriesRequest;
use App\Http\Requests\Backend\BlogCategories\ManageBlogCategoriesRequest;
use App\Http\Requests\Backend\BlogCategories\EditBlogCategoriesRequest;
use App\Http\Requests\Backend\BlogCategories\CreateBlogCategoriesRequest;
use App\Http\Requests\Backend\BlogCategories\DeleteBlogCategoriesRequest;
use App\Http\Requests\Backend\BlogCategories\UpdateBlogCategoriesRequest;
/**
* Class BlogCategoriesController.
*/
class BlogCategoriesController extends Controller
{
/**
* @var BlogCategoriesRepository
*/
protected $blogcategories;
/**
* @param BlogCategoriesRepository $blogcategories
*/
public function __construct(BlogCategoriesRepository $blogcategories)
{
$this->blogcategories = $blogcategories;
}
/**
* @param ManageBlogCategoriesRequest $request
*
* @return mixed
*/
public function index(ManageBlogCategoriesRequest $request)
{
return view('backend.blogcategories.index');
}
/**
* @param CreateBlogCategoriesRequest $request
*
* @return mixed
*/
public function create(CreateBlogCategoriesRequest $request)
{
return view('backend.blogcategories.create');
}
/**
* @param StoreBlogCategoriesRequest $request
*
* @return mixed
*/
public function store(StoreBlogCategoriesRequest $request)
{
$this->blogcategories->create($request->all());
return redirect()->route('admin.blogcategories.index')->withFlashSuccess(trans('alerts.backend.blogcategories.created'));
}
/**
* @param BlogCategory $blogcategory
* @param EditBlogCategoriesRequest $request
*
* @return mixed
*/
public function edit(BlogCategory $blogcategory, EditBlogCategoriesRequest $request)
{
return view('backend.blogcategories.edit')
->withBlogcategory($blogcategory);
}
/**
* @param BlogCategory $blogcategory
* @param UpdateBlogCategoriesRequest $request
*
* @return mixed
*/
public function update(BlogCategory $blogcategory, UpdateBlogCategoriesRequest $request)
{
$this->blogcategories->update($blogcategory, $request->all());
return redirect()->route('admin.blogcategories.index')->withFlashSuccess(trans('alerts.backend.blogcategories.updated'));
}
/**
* @param BlogCategory $blogcategory
* @param DeleteBlogCategoriesRequest $request
*
* @return mixed
*/
public function destroy(BlogCategory $blogcategory, DeleteBlogCategoriesRequest $request)
{
$this->blogcategories->delete($blogcategory);
return redirect()->route('admin.blogcategories.index')->withFlashSuccess(trans('alerts.backend.blogcategories.deleted'));
}
}
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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