first commit, after modifying client section
This commit is contained in:
5
.gitattributes
vendored
Executable file
5
.gitattributes
vendored
Executable file
@@ -0,0 +1,5 @@
|
|||||||
|
* text=auto
|
||||||
|
*.css linguist-vendored
|
||||||
|
*.scss linguist-vendored
|
||||||
|
*.js linguist-vendored
|
||||||
|
CHANGELOG.md export-ignore
|
||||||
12
.gitignore
vendored
Executable file
12
.gitignore
vendored
Executable file
@@ -0,0 +1,12 @@
|
|||||||
|
/node_modules
|
||||||
|
/public/hot
|
||||||
|
/public/storage
|
||||||
|
/storage/*.key
|
||||||
|
/vendor
|
||||||
|
/.idea
|
||||||
|
/.vagrant
|
||||||
|
Homestead.json
|
||||||
|
Homestead.yaml
|
||||||
|
npm-debug.log
|
||||||
|
yarn-error.log
|
||||||
|
.env
|
||||||
26
.htaccess
Executable file
26
.htaccess
Executable file
@@ -0,0 +1,26 @@
|
|||||||
|
<IfModule mod_rewrite.c>
|
||||||
|
<IfModule mod_negotiation.c>
|
||||||
|
Options -MultiViews -Indexes
|
||||||
|
</IfModule>
|
||||||
|
|
||||||
|
RewriteEngine On
|
||||||
|
|
||||||
|
# Handle Authorization Header
|
||||||
|
RewriteCond %{HTTP:Authorization} .
|
||||||
|
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
|
||||||
|
|
||||||
|
# Redirect Trailing Slashes If Not A Folder...
|
||||||
|
RewriteCond %{REQUEST_FILENAME} !-d
|
||||||
|
RewriteCond %{REQUEST_URI} (.+)/$
|
||||||
|
RewriteRule ^ %1 [L,R=301]
|
||||||
|
|
||||||
|
# Handle Front Controller...
|
||||||
|
RewriteCond %{REQUEST_FILENAME} !-d
|
||||||
|
RewriteCond %{REQUEST_FILENAME} !-f
|
||||||
|
RewriteRule ^ index.php [L]
|
||||||
|
</IfModule>
|
||||||
|
<Files ~ "^.*\.([Ee][Nn][Vv])">
|
||||||
|
order allow,deny
|
||||||
|
deny from all
|
||||||
|
satisfy all
|
||||||
|
</Files>
|
||||||
32
accounts.md
Executable file
32
accounts.md
Executable file
@@ -0,0 +1,32 @@
|
|||||||
|
# URL
|
||||||
|
- http://206.225.84.201/general/team_tracker
|
||||||
|
## Accounts
|
||||||
|
- charity
|
||||||
|
- char5009
|
||||||
|
|
||||||
|
- david
|
||||||
|
- king3009
|
||||||
|
|
||||||
|
- martha
|
||||||
|
- zambezi7009
|
||||||
|
|
||||||
|
- sam
|
||||||
|
- samuel4009
|
||||||
|
|
||||||
|
- kopano
|
||||||
|
- victorydance
|
||||||
|
|
||||||
|
- hilary
|
||||||
|
- nairobi3005
|
||||||
|
|
||||||
|
- fanny
|
||||||
|
- windfall2009
|
||||||
|
|
||||||
|
- mphatso
|
||||||
|
- orchid1009
|
||||||
|
|
||||||
|
- diana@click-mobile.com
|
||||||
|
- flowers500
|
||||||
|
|
||||||
|
- effie@click-mobile.com
|
||||||
|
- fridays@800
|
||||||
283
aliases
Executable file
283
aliases
Executable file
@@ -0,0 +1,283 @@
|
|||||||
|
alias ..="cd .."
|
||||||
|
alias ...="cd ../.."
|
||||||
|
|
||||||
|
alias h='cd ~'
|
||||||
|
alias c='clear'
|
||||||
|
alias art=artisan
|
||||||
|
|
||||||
|
alias codecept='vendor/bin/codecept'
|
||||||
|
alias phpspec='vendor/bin/phpspec'
|
||||||
|
alias phpunit='vendor/bin/phpunit'
|
||||||
|
alias serve=serve-laravel
|
||||||
|
|
||||||
|
alias xoff='sudo phpdismod -s cli xdebug'
|
||||||
|
alias xon='sudo phpenmod -s cli xdebug'
|
||||||
|
|
||||||
|
function artisan() {
|
||||||
|
php artisan "$@"
|
||||||
|
}
|
||||||
|
|
||||||
|
function dusk() {
|
||||||
|
pids=$(pidof /usr/bin/Xvfb)
|
||||||
|
|
||||||
|
if [ ! -n "$pids" ]; then
|
||||||
|
Xvfb :0 -screen 0 1280x960x24 &
|
||||||
|
fi
|
||||||
|
|
||||||
|
php artisan dusk --filter "$@"
|
||||||
|
}
|
||||||
|
|
||||||
|
function php56() {
|
||||||
|
sudo update-alternatives --set php /usr/bin/php5.6
|
||||||
|
sudo update-alternatives --set php-config /usr/bin/php-config5.6
|
||||||
|
sudo update-alternatives --set phpize /usr/bin/phpize5.6
|
||||||
|
}
|
||||||
|
|
||||||
|
function php70() {
|
||||||
|
sudo update-alternatives --set php /usr/bin/php7.0
|
||||||
|
sudo update-alternatives --set php-config /usr/bin/php-config7.0
|
||||||
|
sudo update-alternatives --set phpize /usr/bin/phpize7.0
|
||||||
|
}
|
||||||
|
|
||||||
|
function php71() {
|
||||||
|
sudo update-alternatives --set php /usr/bin/php7.1
|
||||||
|
sudo update-alternatives --set php-config /usr/bin/php-config7.1
|
||||||
|
sudo update-alternatives --set phpize /usr/bin/phpize7.1
|
||||||
|
}
|
||||||
|
|
||||||
|
function php72() {
|
||||||
|
sudo update-alternatives --set php /usr/bin/php7.2
|
||||||
|
sudo update-alternatives --set php-config /usr/bin/php-config7.2
|
||||||
|
sudo update-alternatives --set phpize /usr/bin/phpize7.2
|
||||||
|
}
|
||||||
|
|
||||||
|
function php73() {
|
||||||
|
sudo update-alternatives --set php /usr/bin/php7.3
|
||||||
|
sudo update-alternatives --set php-config /usr/bin/php-config7.3
|
||||||
|
sudo update-alternatives --set phpize /usr/bin/phpize7.3
|
||||||
|
}
|
||||||
|
|
||||||
|
function php74() {
|
||||||
|
sudo update-alternatives --set php /usr/bin/php7.4
|
||||||
|
sudo update-alternatives --set php-config /usr/bin/php-config7.4
|
||||||
|
sudo update-alternatives --set phpize /usr/bin/phpize7.4
|
||||||
|
}
|
||||||
|
|
||||||
|
function serve-apache() {
|
||||||
|
if [[ "$1" && "$2" ]]
|
||||||
|
then
|
||||||
|
sudo bash /vagrant/vendor/laravel/homestead/scripts/create-certificate.sh "$1"
|
||||||
|
sudo dos2unix /vagrant/vendor/laravel/homestead/scripts/site-types/apache.sh
|
||||||
|
sudo bash /vagrant/vendor/laravel/homestead/scripts/site-types/apache.sh "$1" "$2" 80 443 "${3:-7.4}"
|
||||||
|
else
|
||||||
|
echo "Error: missing required parameters."
|
||||||
|
echo "Usage: "
|
||||||
|
echo " serve-apache domain path"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
function serve-laravel() {
|
||||||
|
if [[ "$1" && "$2" ]]
|
||||||
|
then
|
||||||
|
sudo bash /vagrant/vendor/laravel/homestead/scripts/create-certificate.sh "$1"
|
||||||
|
sudo dos2unix /vagrant/vendor/laravel/homestead/scripts/site-types/laravel.sh
|
||||||
|
sudo bash /vagrant/vendor/laravel/homestead/scripts/site-types/laravel.sh "$1" "$2" 80 443 "${3:-7.4}"
|
||||||
|
else
|
||||||
|
echo "Error: missing required parameters."
|
||||||
|
echo "Usage: "
|
||||||
|
echo " serve domain path"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
function serve-proxy() {
|
||||||
|
if [[ "$1" && "$2" ]]
|
||||||
|
then
|
||||||
|
sudo dos2unix /vagrant/vendor/laravel/homestead/scripts/site-types/proxy.sh
|
||||||
|
sudo bash /vagrant/vendor/laravel/homestead/scripts/site-types/proxy.sh "$1" "$2" 80 443 "${3:-7.4}"
|
||||||
|
else
|
||||||
|
echo "Error: missing required parameters."
|
||||||
|
echo "Usage: "
|
||||||
|
echo " serve-proxy domain port"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
function serve-silverstripe() {
|
||||||
|
if [[ "$1" && "$2" ]]
|
||||||
|
then
|
||||||
|
sudo bash /vagrant/vendor/laravel/homestead/scripts/create-certificate.sh "$1"
|
||||||
|
sudo dos2unix /vagrant/vendor/laravel/homestead/scripts/site-types/silverstripe.sh
|
||||||
|
sudo bash /vagrant/vendor/laravel/homestead/scripts/site-types/silverstripe.sh "$1" "$2" 80 443 "${3:-7.4}"
|
||||||
|
else
|
||||||
|
echo "Error: missing required parameters."
|
||||||
|
echo "Usage: "
|
||||||
|
echo " serve-silverstripe domain path"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
function serve-spa() {
|
||||||
|
if [[ "$1" && "$2" ]]
|
||||||
|
then
|
||||||
|
sudo bash /vagrant/vendor/laravel/homestead/scripts/create-certificate.sh "$1"
|
||||||
|
sudo dos2unix /vagrant/vendor/laravel/homestead/scripts/site-types/spa.sh
|
||||||
|
sudo bash /vagrant/vendor/laravel/homestead/scripts/site-types/spa.sh "$1" "$2" 80 443 "${3:-7.4}"
|
||||||
|
else
|
||||||
|
echo "Error: missing required parameters."
|
||||||
|
echo "Usage: "
|
||||||
|
echo " serve-spa domain path"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
function serve-statamic() {
|
||||||
|
if [[ "$1" && "$2" ]]
|
||||||
|
then
|
||||||
|
sudo bash /vagrant/vendor/laravel/homestead/scripts/create-certificate.sh "$1"
|
||||||
|
sudo dos2unix /vagrant/vendor/laravel/homestead/scripts/site-types/statamic.sh
|
||||||
|
sudo bash /vagrant/vendor/laravel/homestead/scripts/site-types/statamic.sh "$1" "$2" 80 443 "${3:-7.4}"
|
||||||
|
else
|
||||||
|
echo "Error: missing required parameters."
|
||||||
|
echo "Usage: "
|
||||||
|
echo " serve-statamic domain path"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
function serve-symfony2() {
|
||||||
|
if [[ "$1" && "$2" ]]
|
||||||
|
then
|
||||||
|
sudo bash /vagrant/vendor/laravel/homestead/scripts/create-certificate.sh "$1"
|
||||||
|
sudo dos2unix /vagrant/vendor/laravel/homestead/scripts/site-types/symfony2.sh
|
||||||
|
sudo bash /vagrant/vendor/laravel/homestead/scripts/site-types/symfony2.sh "$1" "$2" 80 443 "${3:-7.4}"
|
||||||
|
else
|
||||||
|
echo "Error: missing required parameters."
|
||||||
|
echo "Usage: "
|
||||||
|
echo " serve-symfony2 domain path"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
function serve-symfony4() {
|
||||||
|
if [[ "$1" && "$2" ]]
|
||||||
|
then
|
||||||
|
sudo bash /vagrant/vendor/laravel/homestead/scripts/create-certificate.sh "$1"
|
||||||
|
sudo dos2unix /vagrant/vendor/laravel/homestead/scripts/site-types/symfony4.sh
|
||||||
|
sudo bash /vagrant/vendor/laravel/homestead/scripts/site-types/symfony4.sh "$1" "$2" 80 443 "${3:-7.4}"
|
||||||
|
else
|
||||||
|
echo "Error: missing required parameters."
|
||||||
|
echo "Usage: "
|
||||||
|
echo " serve-symfony4 domain path"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
function serve-pimcore() {
|
||||||
|
if [[ "$1" && "$2" ]]
|
||||||
|
then
|
||||||
|
sudo bash /vagrant/vendor/laravel/homestead/scripts/create-certificate.sh "$1"
|
||||||
|
sudo dos2unix /vagrant/vendor/laravel/homestead/scripts/site-types/pimcore.sh
|
||||||
|
sudo bash /vagrant/vendor/laravel/homestead/scripts/site-types/pimcore.sh "$1" "$2" 80 443 "${3:-7.4}"
|
||||||
|
else
|
||||||
|
echo "Error: missing required parameters."
|
||||||
|
echo "Usage: "
|
||||||
|
echo " serve-pimcore domain path"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
function share() {
|
||||||
|
if [[ "$1" ]]
|
||||||
|
then
|
||||||
|
ngrok http ${@:2} -host-header="$1" 80
|
||||||
|
else
|
||||||
|
echo "Error: missing required parameters."
|
||||||
|
echo "Usage: "
|
||||||
|
echo " share domain"
|
||||||
|
echo "Invocation with extra params passed directly to ngrok"
|
||||||
|
echo " share domain -region=eu -subdomain=test1234"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
function flip() {
|
||||||
|
sudo bash /vagrant/vendor/laravel/homestead/scripts/flip-webserver.sh
|
||||||
|
}
|
||||||
|
|
||||||
|
function __has_pv() {
|
||||||
|
$(hash pv 2>/dev/null);
|
||||||
|
|
||||||
|
return $?
|
||||||
|
}
|
||||||
|
|
||||||
|
function __pv_install_message() {
|
||||||
|
if ! __has_pv; then
|
||||||
|
echo $1
|
||||||
|
echo "Install pv with \`sudo apt-get install -y pv\` then run this command again."
|
||||||
|
echo ""
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
function dbexport() {
|
||||||
|
FILE=${1:-/vagrant/mysqldump.sql.gz}
|
||||||
|
|
||||||
|
# This gives an estimate of the size of the SQL file
|
||||||
|
# It appears that 80% is a good approximation of
|
||||||
|
# the ratio of estimated size to actual size
|
||||||
|
SIZE_QUERY="select ceil(sum(data_length) * 0.8) as size from information_schema.TABLES"
|
||||||
|
|
||||||
|
__pv_install_message "Want to see export progress?"
|
||||||
|
|
||||||
|
echo "Exporting databases to '$FILE'"
|
||||||
|
|
||||||
|
if __has_pv; then
|
||||||
|
ADJUSTED_SIZE=$(mysql --vertical -uhomestead -psecret -e "$SIZE_QUERY" 2>/dev/null | grep 'size' | awk '{print $2}')
|
||||||
|
HUMAN_READABLE_SIZE=$(numfmt --to=iec-i --suffix=B --format="%.3f" $ADJUSTED_SIZE)
|
||||||
|
|
||||||
|
echo "Estimated uncompressed size: $HUMAN_READABLE_SIZE"
|
||||||
|
mysqldump -uhomestead -psecret --all-databases --skip-lock-tables --routines 2>/dev/null | pv --size=$ADJUSTED_SIZE | gzip > "$FILE"
|
||||||
|
else
|
||||||
|
mysqldump -uhomestead -psecret --all-databases --skip-lock-tables --routines 2>/dev/null | gzip > "$FILE"
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Done."
|
||||||
|
}
|
||||||
|
|
||||||
|
function dbimport() {
|
||||||
|
FILE=${1:-/vagrant/mysqldump.sql.gz}
|
||||||
|
|
||||||
|
__pv_install_message "Want to see import progress?"
|
||||||
|
|
||||||
|
echo "Importing databases from '$FILE'"
|
||||||
|
|
||||||
|
if __has_pv; then
|
||||||
|
pv "$FILE" --progress --eta | zcat | mysql -uhomestead -psecret 2>/dev/null
|
||||||
|
else
|
||||||
|
cat "$FILE" | zcat | mysql -uhomestead -psecret 2>/dev/null
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Done."
|
||||||
|
}
|
||||||
|
|
||||||
|
function xphp() {
|
||||||
|
(php -m | grep -q xdebug)
|
||||||
|
if [[ $? -eq 0 ]]
|
||||||
|
then
|
||||||
|
XDEBUG_ENABLED=true
|
||||||
|
else
|
||||||
|
XDEBUG_ENABLED=false
|
||||||
|
fi
|
||||||
|
|
||||||
|
if ! $XDEBUG_ENABLED; then xon; fi
|
||||||
|
|
||||||
|
php \
|
||||||
|
-dxdebug.remote_host=192.168.10.1 \
|
||||||
|
-dxdebug.remote_autostart=1 \
|
||||||
|
"$@"
|
||||||
|
|
||||||
|
if ! $XDEBUG_ENABLED; then xoff; fi
|
||||||
|
}
|
||||||
|
|
||||||
|
function update-socket-wrench() {
|
||||||
|
cd /var/www/socket-wrench
|
||||||
|
git pull origin release
|
||||||
|
composer install
|
||||||
|
php artisan migrate --force
|
||||||
|
}
|
||||||
|
|
||||||
|
function seed-socket-wrench() {
|
||||||
|
cd /var/www/socket-wrench
|
||||||
|
php artisan db:seed
|
||||||
|
}
|
||||||
42
app/Console/Kernel.php
Executable file
42
app/Console/Kernel.php
Executable file
@@ -0,0 +1,42 @@
|
|||||||
|
<?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 = [
|
||||||
|
//
|
||||||
|
];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 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 commands for the application.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
protected function commands()
|
||||||
|
{
|
||||||
|
$this->load(__DIR__.'/Commands');
|
||||||
|
|
||||||
|
require base_path('routes/console.php');
|
||||||
|
}
|
||||||
|
}
|
||||||
53
app/Exceptions/Handler.php
Executable file
53
app/Exceptions/Handler.php
Executable file
@@ -0,0 +1,53 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Exceptions;
|
||||||
|
|
||||||
|
use Exception;
|
||||||
|
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
|
||||||
|
|
||||||
|
class Handler extends ExceptionHandler
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* A list of the exception types that are not reported.
|
||||||
|
*
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
|
protected $dontReport = [
|
||||||
|
//
|
||||||
|
];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A list of the inputs that are never flashed for validation exceptions.
|
||||||
|
*
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
|
protected $dontFlash = [
|
||||||
|
'password',
|
||||||
|
'password_confirmation',
|
||||||
|
];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 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)
|
||||||
|
{
|
||||||
|
return parent::render($request, $exception);
|
||||||
|
}
|
||||||
|
}
|
||||||
32
app/Http/Controllers/Auth/ForgotPasswordController.php
Executable file
32
app/Http/Controllers/Auth/ForgotPasswordController.php
Executable file
@@ -0,0 +1,32 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Controllers\Auth;
|
||||||
|
|
||||||
|
use App\Http\Controllers\Controller;
|
||||||
|
use Illuminate\Foundation\Auth\SendsPasswordResetEmails;
|
||||||
|
|
||||||
|
class ForgotPasswordController extends Controller
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Password Reset Controller
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This controller is responsible for handling password reset emails and
|
||||||
|
| includes a trait which assists in sending these notifications from
|
||||||
|
| your application to your users. Feel free to explore this trait.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
use SendsPasswordResetEmails;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a new controller instance.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
$this->middleware('guest');
|
||||||
|
}
|
||||||
|
}
|
||||||
39
app/Http/Controllers/Auth/LoginController.php
Executable file
39
app/Http/Controllers/Auth/LoginController.php
Executable file
@@ -0,0 +1,39 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Controllers\Auth;
|
||||||
|
|
||||||
|
use App\Http\Controllers\Controller;
|
||||||
|
use Illuminate\Foundation\Auth\AuthenticatesUsers;
|
||||||
|
|
||||||
|
class LoginController extends Controller
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Login Controller
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This controller handles authenticating users for the application and
|
||||||
|
| redirecting them to your home screen. The controller uses a trait
|
||||||
|
| to conveniently provide its functionality to your applications.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
use AuthenticatesUsers;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Where to redirect users after login.
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
protected $redirectTo = '/home';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a new controller instance.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
$this->middleware('guest')->except('logout');
|
||||||
|
}
|
||||||
|
}
|
||||||
71
app/Http/Controllers/Auth/RegisterController.php
Executable file
71
app/Http/Controllers/Auth/RegisterController.php
Executable file
@@ -0,0 +1,71 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Controllers\Auth;
|
||||||
|
|
||||||
|
use App\User;
|
||||||
|
use App\Http\Controllers\Controller;
|
||||||
|
use Illuminate\Support\Facades\Validator;
|
||||||
|
use Illuminate\Foundation\Auth\RegistersUsers;
|
||||||
|
|
||||||
|
class RegisterController extends Controller
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Register Controller
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This controller handles the registration of new users as well as their
|
||||||
|
| validation and creation. By default this controller uses a trait to
|
||||||
|
| provide this functionality without requiring any additional code.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
use RegistersUsers;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Where to redirect users after registration.
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
protected $redirectTo = '/home';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a new controller instance.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
$this->middleware('guest');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get a validator for an incoming registration request.
|
||||||
|
*
|
||||||
|
* @param array $data
|
||||||
|
* @return \Illuminate\Contracts\Validation\Validator
|
||||||
|
*/
|
||||||
|
protected function validator(array $data)
|
||||||
|
{
|
||||||
|
return Validator::make($data, [
|
||||||
|
'name' => 'required|string|max:255',
|
||||||
|
'email' => 'required|string|email|max:255|unique:users',
|
||||||
|
'password' => 'required|string|min:6|confirmed',
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a new user instance after a valid registration.
|
||||||
|
*
|
||||||
|
* @param array $data
|
||||||
|
* @return \App\User
|
||||||
|
*/
|
||||||
|
protected function create(array $data)
|
||||||
|
{
|
||||||
|
return User::create([
|
||||||
|
'name' => $data['name'],
|
||||||
|
'email' => $data['email'],
|
||||||
|
'password' => bcrypt($data['password']),
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
}
|
||||||
39
app/Http/Controllers/Auth/ResetPasswordController.php
Executable file
39
app/Http/Controllers/Auth/ResetPasswordController.php
Executable file
@@ -0,0 +1,39 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Controllers\Auth;
|
||||||
|
|
||||||
|
use App\Http\Controllers\Controller;
|
||||||
|
use Illuminate\Foundation\Auth\ResetsPasswords;
|
||||||
|
|
||||||
|
class ResetPasswordController extends Controller
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Password Reset Controller
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This controller is responsible for handling password reset requests
|
||||||
|
| and uses a simple trait to include this behavior. You're free to
|
||||||
|
| explore this trait and override any methods you wish to tweak.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
use ResetsPasswords;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Where to redirect users after resetting their password.
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
protected $redirectTo = '/home';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a new controller instance.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
$this->middleware('guest');
|
||||||
|
}
|
||||||
|
}
|
||||||
166
app/Http/Controllers/ClickAppsController.php
Executable file
166
app/Http/Controllers/ClickAppsController.php
Executable file
@@ -0,0 +1,166 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Controllers;
|
||||||
|
|
||||||
|
use App\Models;
|
||||||
|
use Illuminate\Http\Request;
|
||||||
|
use Session;
|
||||||
|
use DB;
|
||||||
|
|
||||||
|
|
||||||
|
class ClickAppsController extends Controller
|
||||||
|
{
|
||||||
|
public function index(Request $request)
|
||||||
|
{
|
||||||
|
$click_apps = DB::table('apps');
|
||||||
|
$columns = [
|
||||||
|
'app_name' => 'App Name',
|
||||||
|
'operator' => 'Operator',
|
||||||
|
'country' => 'Counry',
|
||||||
|
'status' => 'Status'
|
||||||
|
];
|
||||||
|
if (!empty($request->filter) && !empty($request->keyword)) {
|
||||||
|
$click_apps = $this->resolveAppQuery($click_apps, $request);
|
||||||
|
}
|
||||||
|
|
||||||
|
$click_apps = $click_apps->orderBy('apps.created_at', 'DESC')->paginate(20);
|
||||||
|
|
||||||
|
$data = [
|
||||||
|
'page_title' => 'Click Apps',
|
||||||
|
'click_apps' => $click_apps,
|
||||||
|
'columns' => $columns
|
||||||
|
];
|
||||||
|
|
||||||
|
return view('click_apps.index', $data);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function create()
|
||||||
|
{
|
||||||
|
$data = $this->crudData();
|
||||||
|
return view('click_apps.create', $data);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function store(Request $request)
|
||||||
|
{
|
||||||
|
$request->validate($this->valdtePrams());
|
||||||
|
DB::transaction(function () use ($request) {
|
||||||
|
Models\ClickApps::create($request->only($this->whiteListCrudParams()));
|
||||||
|
});
|
||||||
|
Session::flash('success_message', 'App record created successfully');
|
||||||
|
return redirect(url('clickapps/create'));
|
||||||
|
}
|
||||||
|
|
||||||
|
public function edit($id)
|
||||||
|
{
|
||||||
|
$clickapp = Models\ClickApps::find($id);
|
||||||
|
if (!$clickapp) {
|
||||||
|
Session::flash('error_message', "Record with ID: {$id} not found");
|
||||||
|
return redirect(url('clickapps'));
|
||||||
|
}
|
||||||
|
$data = $this->crudData();
|
||||||
|
return view('click_apps.edit', array_merge($data, [
|
||||||
|
'clickapp' => $clickapp
|
||||||
|
]));
|
||||||
|
}
|
||||||
|
|
||||||
|
public function update(Request $request, $id)
|
||||||
|
{
|
||||||
|
$clickapp = Models\ClickApps::find($id);
|
||||||
|
if (!$clickapp) {
|
||||||
|
Session::flash('error_message', "Record with ID: {$id} not found");
|
||||||
|
return redirect(url('clickapps'));
|
||||||
|
}
|
||||||
|
$request->validate($this->valdtePrams());
|
||||||
|
DB::transaction(function () use ($request, $clickapp) {
|
||||||
|
$clickapp->update($request->only($this->whiteListCrudParams()));
|
||||||
|
});
|
||||||
|
Session::flash('success_message', 'App record updated successfully');
|
||||||
|
return redirect(url('clickapps'));
|
||||||
|
}
|
||||||
|
|
||||||
|
public function destroy($id)
|
||||||
|
{
|
||||||
|
Models\ClickApps::destroy($id);
|
||||||
|
if (request()->ajax()) {
|
||||||
|
$res = ['code' => 1];
|
||||||
|
return response()->json($res);
|
||||||
|
}
|
||||||
|
Session::flash('success_message', 'App successfully deleted!');
|
||||||
|
return redirect(url('clickapps'));
|
||||||
|
}
|
||||||
|
|
||||||
|
private function crudData()
|
||||||
|
{
|
||||||
|
$click_apps = Models\ClickApps::get();
|
||||||
|
$countries = Models\Country::pluck('en_short_name', 'alpha_2_code');
|
||||||
|
$net_ops = Models\NetworkOps::pluck('name', 'name');
|
||||||
|
$toll_types = ['YES' => 'YES', 'NO' => 'NO'];
|
||||||
|
$status_types = ['ACTIVE' => 'ACTIVE', 'PENDING' => 'PENDING', 'CANCELLED' => 'CANCELLED', 'FINISHED' => 'FINISHED'];
|
||||||
|
return [
|
||||||
|
'page_title' => 'Click Apps',
|
||||||
|
'click_apps' => $click_apps,
|
||||||
|
'countries' => $countries,
|
||||||
|
'net_ops' => $net_ops,
|
||||||
|
'toll_types' => $toll_types,
|
||||||
|
'status_types' => $status_types
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
private function valdtePrams()
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
'app_name' => 'required',
|
||||||
|
'app_type' => 'required',
|
||||||
|
'client' => 'required',
|
||||||
|
'code' => 'required',
|
||||||
|
'country' => 'required',
|
||||||
|
'operator' => 'required',
|
||||||
|
'tollfree' => 'required',
|
||||||
|
'app_path' => 'required',
|
||||||
|
'launch_date' => 'required',
|
||||||
|
'status' => 'required',
|
||||||
|
'other_info' => 'required',
|
||||||
|
];
|
||||||
|
}
|
||||||
|
private function whiteListCrudParams()
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
'app_name',
|
||||||
|
'app_type',
|
||||||
|
'client',
|
||||||
|
'code',
|
||||||
|
'country',
|
||||||
|
'operator',
|
||||||
|
'tollfree',
|
||||||
|
'app_path',
|
||||||
|
'launch_date',
|
||||||
|
'status',
|
||||||
|
'other_info',
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
function resolveAppQuery($clients, $request)
|
||||||
|
{
|
||||||
|
switch ($request->filter) {
|
||||||
|
case 'app_name':
|
||||||
|
return $clients
|
||||||
|
->where('app_name', 'like', "%$request->keyword%");
|
||||||
|
break;
|
||||||
|
case 'operator':
|
||||||
|
return $clients
|
||||||
|
->where('operator', 'like', "%$request->keyword%");
|
||||||
|
break;
|
||||||
|
case 'country':
|
||||||
|
return $clients
|
||||||
|
->where('country', 'like', "%$request->keyword%");
|
||||||
|
break;
|
||||||
|
case 'status':
|
||||||
|
return $clients
|
||||||
|
->where('status', 'like', "%$request->keyword%");
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
# code...
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
200
app/Http/Controllers/ClickInfrastructureController.php
Executable file
200
app/Http/Controllers/ClickInfrastructureController.php
Executable file
@@ -0,0 +1,200 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Controllers;
|
||||||
|
|
||||||
|
use Illuminate\Http\Request;
|
||||||
|
use App\Models;
|
||||||
|
use Session;
|
||||||
|
|
||||||
|
class ClickInfrastructureController extends Controller
|
||||||
|
{
|
||||||
|
|
||||||
|
public function servers(){
|
||||||
|
// dd(session('current_user'));
|
||||||
|
// die;
|
||||||
|
$servers = Models\ClickServer::with('direct_connections_info', 'credentials_info')->get();
|
||||||
|
$data = [
|
||||||
|
'page_title' => 'Servers',
|
||||||
|
'servers' => $servers
|
||||||
|
];
|
||||||
|
return view('infrastructure.index', $data);
|
||||||
|
|
||||||
|
}
|
||||||
|
public function domains(){
|
||||||
|
|
||||||
|
}
|
||||||
|
public function create_direct($id)
|
||||||
|
{
|
||||||
|
|
||||||
|
$server = Models\ClickServer::find($id);
|
||||||
|
$data = [
|
||||||
|
'page_title' => 'Servers',
|
||||||
|
'server' => $server,
|
||||||
|
'connection_types' => ['vpn' => 'VPN', 'fqdn' => 'FQDN' ]
|
||||||
|
];
|
||||||
|
return view('infrastructure.create_direct_connection', $data);
|
||||||
|
}
|
||||||
|
public function store_direct(Request $request){
|
||||||
|
// dd($request->all());
|
||||||
|
|
||||||
|
$request->validate([
|
||||||
|
'direct_partner' => 'required',
|
||||||
|
'server_id' => 'required',
|
||||||
|
'connection_type' => 'required',
|
||||||
|
'port' => 'required_with:main_ip_address,domain_name',
|
||||||
|
'main_ip_address' => 'sometimes|nullable|ip',
|
||||||
|
'private_ip_address' => 'sometimes|nullable|ip',
|
||||||
|
'domain_name' => 'required_if:connection_type,fqdn|nullable|regex:/^([a-zA-Z0-9][a-zA-Z0-9-_]*\.)*[a-zA-Z0-9]*[a-zA-Z0-9-_]*[[a-zA-Z0-9]+$/',
|
||||||
|
'vpn_peer_ip' => 'required_if:connection_type,vpn|nullable|ip',
|
||||||
|
'connection_form' => 'sometimes|nullable|max:2000|mimes:doc,docx,xlx,xlsx,png,jpg,jpeg,bmp,pdf',
|
||||||
|
]);
|
||||||
|
// dd($request->all());
|
||||||
|
if ($request->main_ip_address == null && $request->domain_name == null ) {
|
||||||
|
return redirect()->back()->withInput()->withErrors(['You need either an IP address or a Domain name']);
|
||||||
|
}
|
||||||
|
$direct_arr = $request->except('_token');
|
||||||
|
$direct_arr['last_modified_by'] = session('current_user.id');
|
||||||
|
|
||||||
|
if ($request->hasFile('connection_form')) {
|
||||||
|
if ($request->file('connection_form')->isValid()) {
|
||||||
|
$filename = "connection_document_" . time() . "." . $request->connection_form->extension();
|
||||||
|
$request->connection_form->storeAs('connection_files', $filename, 'public');
|
||||||
|
$direct_arr['connection_document'] = $filename;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// dd($direct_arr);
|
||||||
|
|
||||||
|
$result = Models\DirectConnection::create($direct_arr);
|
||||||
|
Session::flash('success_message', 'Direct connection successfully added');
|
||||||
|
return redirect(url('infrastructure/servers'));
|
||||||
|
}
|
||||||
|
|
||||||
|
public function edit_direct($id)
|
||||||
|
{
|
||||||
|
|
||||||
|
$direct_connection = Models\DirectConnection::find($id);
|
||||||
|
// dump($direct_connection);
|
||||||
|
// TNM_CLICKB_NOSIR_NEW_SMSC
|
||||||
|
$server = Models\ClickServer::find($direct_connection->server_id);
|
||||||
|
// dd($server);
|
||||||
|
$data = [
|
||||||
|
'page_title' => 'Servers',
|
||||||
|
'server' => $server,
|
||||||
|
'direct_connection' => $direct_connection,
|
||||||
|
'connection_types' => ['vpn' => 'VPN', 'fqdn' => 'FQDN' ]
|
||||||
|
];
|
||||||
|
return view('infrastructure.edit_direct_connection', $data);
|
||||||
|
}
|
||||||
|
public function update_direct(Request $request){
|
||||||
|
|
||||||
|
$request->validate([
|
||||||
|
'direct_partner' => 'required',
|
||||||
|
'server_id' => 'required',
|
||||||
|
'connection_type' => 'required',
|
||||||
|
'port' => 'required_with:main_ip_address,domain_name',
|
||||||
|
'main_ip_address' => 'sometimes|nullable|ip',
|
||||||
|
'private_ip_address' => 'sometimes|nullable|ip',
|
||||||
|
'domain_name' => 'sometimes|nullable|regex:/^([a-zA-Z0-9][a-zA-Z0-9-_]*\.)*[a-zA-Z0-9]*[a-zA-Z0-9-_]*[[a-zA-Z0-9]+$/',
|
||||||
|
'vpn_peer_ip' => 'required_if:connection_type,vpn|nullable|ip',
|
||||||
|
'connection_form' => 'sometimes|nullable|max:2000|mimes:doc,docx,xlx,xlsx,png,jpg,jpeg,bmp',
|
||||||
|
]);
|
||||||
|
if ($request->direct_id == null) {
|
||||||
|
return redirect()->back()->withInput()->withErrors(['Your request could not be handled at this time. Try again!']);
|
||||||
|
}
|
||||||
|
$direct_connection = Models\DirectConnection::find($request->direct_id);
|
||||||
|
|
||||||
|
if ($request->main_ip_address == null && $request->domain_name == null ) {
|
||||||
|
return redirect()->back()->withInput()->withErrors(['You need either an IP address or a Domain name']);
|
||||||
|
}
|
||||||
|
$direct_arr = $request->except('_token');
|
||||||
|
$direct_arr['last_modified_by'] = session('current_user.id');
|
||||||
|
// dd($direct_arr);
|
||||||
|
|
||||||
|
if ($request->hasFile('connection_form')) {
|
||||||
|
if ($request->file('connection_form')->isValid()) {
|
||||||
|
$filename = "connection_document_" . time() . "." . $request->connection_form->extension();
|
||||||
|
$request->connection_form->storeAs('connection_files', $filename, 'public');
|
||||||
|
$direct_arr['connection_document'] = $filename;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$result = $direct_connection->update($direct_arr);
|
||||||
|
Session::flash('success_message', 'Direct connection successfully updated');
|
||||||
|
return redirect(url('infrastructure/servers'));
|
||||||
|
}
|
||||||
|
public function server_list(){
|
||||||
|
|
||||||
|
$servers = Models\ClickServer::with('credentials_info')->get();
|
||||||
|
// dd($servers[0]->credentials_info->where('username', 'root')->first());
|
||||||
|
$data = [
|
||||||
|
'page_title' => 'Servers',
|
||||||
|
'servers' => $servers
|
||||||
|
];
|
||||||
|
return view('infrastructure.server_list', $data);
|
||||||
|
|
||||||
|
}
|
||||||
|
public function edit_server($id)
|
||||||
|
{
|
||||||
|
$server = Models\ClickServer::find($id);
|
||||||
|
$credentials = Models\ServerCredential::where('username', 'root')->where('server_id', $server->id) ->first();
|
||||||
|
|
||||||
|
$data = [
|
||||||
|
'page_title' => 'Servers',
|
||||||
|
'server' => $server,
|
||||||
|
'credentials' => $credentials
|
||||||
|
];
|
||||||
|
return view('infrastructure.edit_server', $data);
|
||||||
|
}
|
||||||
|
public function updateserver(Request $request){
|
||||||
|
$request->validate([
|
||||||
|
'friendly_name' => 'required',
|
||||||
|
'server_id' => 'required',
|
||||||
|
'public_ip_address' => 'sometimes|ip',
|
||||||
|
'private_ip_address' => 'sometimes|nullable|ip',
|
||||||
|
'main_use' => 'required',
|
||||||
|
'remarks' => 'nullable',
|
||||||
|
'password' => 'nullable',
|
||||||
|
]);
|
||||||
|
$server = Models\ClickServer::findOrFail($request->server_id);
|
||||||
|
$server_arr = $request->except('_token', 'password', 'server_id');
|
||||||
|
$server_arr['last_modified_by'] = session('current_user.id');
|
||||||
|
if ($request->password !== null) {
|
||||||
|
// dd('foo bar');
|
||||||
|
$credentials_arr = [
|
||||||
|
'server_id' => $request->server_id,
|
||||||
|
'username' => 'root',
|
||||||
|
'password' => encrypt($request->password),
|
||||||
|
'last_modified_by' => session('current_user.id')
|
||||||
|
];
|
||||||
|
$retval = Models\ServerCredential::find($request->server_id);
|
||||||
|
if ($retval) {
|
||||||
|
$retval->update($credentials_arr);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$result = Models\ServerCredential::create($credentials_arr);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$result = $server->update($server_arr);
|
||||||
|
Session::flash('success_message', 'Server Details successfully updated');
|
||||||
|
return redirect(url('infrastructure/server-list'));
|
||||||
|
}
|
||||||
|
public function reveal_password($id){
|
||||||
|
$server = Models\ClickServer::find($id);
|
||||||
|
if ($server) {
|
||||||
|
$response_arr = [
|
||||||
|
'code' => 1,
|
||||||
|
'password' => decrypt($server->root_password)
|
||||||
|
];
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$response_arr = [
|
||||||
|
'code' => 3,
|
||||||
|
'msg' => 'not found'
|
||||||
|
];
|
||||||
|
}
|
||||||
|
return response()->json($response_arr);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//LJ School Location
|
||||||
|
//5.637192,-0.158916
|
||||||
|
//5.637093,-0.159269
|
||||||
515
app/Http/Controllers/ClientsController.php
Executable file
515
app/Http/Controllers/ClientsController.php
Executable file
@@ -0,0 +1,515 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Controllers;
|
||||||
|
|
||||||
|
use Illuminate\Http\Request;
|
||||||
|
use App\Models;
|
||||||
|
use Session;
|
||||||
|
use Illuminate\Support\Arr;
|
||||||
|
use App\Jobs\SendNewUssdClientEmail;
|
||||||
|
use App\Jobs\SendUssdClientActiveEmail;
|
||||||
|
|
||||||
|
|
||||||
|
class ClientsController extends Controller
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Display a listing of the resource.
|
||||||
|
*
|
||||||
|
* @return \Illuminate\Http\Response
|
||||||
|
*/
|
||||||
|
public function index()
|
||||||
|
{
|
||||||
|
|
||||||
|
$client_arr = new Models\Client;
|
||||||
|
$client_arr = $client_arr->with('auth_user_info','country_info', 'created_by_info')->orderBy('name', 'ASC')->paginate(10);
|
||||||
|
|
||||||
|
$data = [
|
||||||
|
'page_title' => 'Clients',
|
||||||
|
'client_arr' => $client_arr,
|
||||||
|
'current_user' => session('current_user')
|
||||||
|
];
|
||||||
|
return view('client.index-tabulator', $data);
|
||||||
|
}
|
||||||
|
public function indexBak(){
|
||||||
|
$client_arr = new Models\Client;
|
||||||
|
$client_arr = $client_arr->with('auth_user_info','country_info', 'created_by_info')->orderBy('name', 'ASC')->paginate(10);
|
||||||
|
$data = [
|
||||||
|
'page_title' => 'Clients',
|
||||||
|
'current_user' => session('current_user')
|
||||||
|
];
|
||||||
|
return view('client.index-rawjs', $data);
|
||||||
|
}
|
||||||
|
public function getClientJson(Request $request)
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
$client_arr = new Models\Client;
|
||||||
|
$client_arr = $client_arr->with('auth_user_info','country_info', 'created_by_info', 'modified_by_info')->orderBy('name', 'ASC')->paginate(20);
|
||||||
|
|
||||||
|
dump($request->all());
|
||||||
|
$client_arr = $client_arr->with('auth_user_info','country_info', 'created_by_info', 'modified_by_info')
|
||||||
|
->orderBy('name', 'ASC')->paginate(20);
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
$client_arr = \DB::table('clients')
|
||||||
|
->join('auth_users AS aumngr', 'aumngr.id', '=', 'clients.auth_user_id')
|
||||||
|
->join('auth_users AS aumodify', 'aumodify.id', '=', 'clients.last_modified_by')
|
||||||
|
->select('clients.id', 'clients.name', 'clients.status', 'clients.country', 'aumngr.name As accountMgr', 'aumodify.name AS modifiedBy')
|
||||||
|
->paginate(15);
|
||||||
|
|
||||||
|
if($request->has('keyword')){ // != ''
|
||||||
|
$keyword = $request->keyword;
|
||||||
|
$client_arr = \DB::table('clients')
|
||||||
|
->join('auth_users AS aumngr', 'aumngr.id', '=', 'clients.auth_user_id')
|
||||||
|
->join('auth_users AS aumodify', 'aumodify.id', '=', 'clients.last_modified_by')
|
||||||
|
->select('clients.id','clients.name', 'clients.status', 'clients.country', 'aumngr.name As accountMgr', 'aumodify.name AS modifiedBy')
|
||||||
|
->whereRaw("clients.name like '%$keyword%' or clients.status like '%$keyword%' OR clients.country like '%$keyword%' OR aumngr.name like '%$keyword%' OR aumodify.name like '%$keyword%'")
|
||||||
|
->paginate(15);
|
||||||
|
}
|
||||||
|
|
||||||
|
return response()->json($client_arr);
|
||||||
|
}
|
||||||
|
public function getClientJsonRawJs(Request $request){
|
||||||
|
#$client_arr = new Models\Client;
|
||||||
|
#$client_arr = $client_arr->with('auth_user_info','country_info', 'created_by_info', 'modified_by_info')->orderBy('name', 'ASC')->paginate(20);
|
||||||
|
|
||||||
|
$client_arr = \DB::table('clients')
|
||||||
|
->join('auth_users AS aumngr', 'aumngr.id', '=', 'clients.auth_user_id')
|
||||||
|
->join('auth_users AS aumodify', 'aumodify.id', '=', 'clients.last_modified_by')
|
||||||
|
->select('clients.id', 'clients.name', 'clients.status', 'clients.country', 'aumngr.name As accountMgr', 'aumodify.name AS modifiedBy')
|
||||||
|
->paginate(10);
|
||||||
|
|
||||||
|
if($request->has('keyword')){ // != ''
|
||||||
|
$keyword = $request->keyword;
|
||||||
|
$client_arr = \DB::table('clients')
|
||||||
|
->join('auth_users AS aumngr', 'aumngr.id', '=', 'clients.auth_user_id')
|
||||||
|
->join('auth_users AS aumodify', 'aumodify.id', '=', 'clients.last_modified_by')
|
||||||
|
->select('clients.id','clients.name', 'clients.status', 'clients.country', 'aumngr.name As accountMgr', 'aumodify.name AS modifiedBy')
|
||||||
|
->whereRaw("clients.name like '%$keyword%' or clients.status like '%$keyword%' OR clients.country like '%$keyword%' OR aumngr.name like '%$keyword%' OR aumodify.name like '%$keyword%'")
|
||||||
|
->paginate(10);
|
||||||
|
}
|
||||||
|
return response()->json($client_arr);
|
||||||
|
}
|
||||||
|
public function indexOriginal()
|
||||||
|
{
|
||||||
|
|
||||||
|
$client_arr = new Models\Client;
|
||||||
|
$table_columns = \DB::select(\DB::raw("show full columns from clients"));
|
||||||
|
$exclude_arr = [
|
||||||
|
'updated_at', 'id', 'auth_user_id', 'pay_mode', 'type', 'created_at', 'currency'
|
||||||
|
];
|
||||||
|
$columns = [];
|
||||||
|
$queries = [];
|
||||||
|
foreach ($table_columns as $key) {
|
||||||
|
$columns[$key->Field] = $key->Field;
|
||||||
|
}
|
||||||
|
foreach ($columns as $col) {
|
||||||
|
if (request('filter') == $col) {
|
||||||
|
$filter = request('filter');
|
||||||
|
$keyword = request('keyword');
|
||||||
|
$table_arr = ['staff_id', 'pay_mode'];
|
||||||
|
// dump($col);
|
||||||
|
// dump(in_array($col, $table_arr));
|
||||||
|
if (in_array($col, $table_arr)) {
|
||||||
|
$key = $this->get_filter_ids($filter, $keyword);
|
||||||
|
if (!empty($key)) {
|
||||||
|
$keyword = $key;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$client_arr = $client_arr->where($col, 'like', '%'.$keyword.'%');
|
||||||
|
$queries[$col] = request('keyword');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$client_arr = $client_arr->with('payment_type_info', 'service_info', 'auth_user_info', 'created_by_info')->orderBy('name', 'ASC')->paginate(10)->appends($queries);
|
||||||
|
$columns = Arr::except($columns, $exclude_arr);
|
||||||
|
$columns['pay_mode'] = 'Payment Mode';
|
||||||
|
$data = [
|
||||||
|
'page_title' => 'Clients',
|
||||||
|
'columns' => $columns,
|
||||||
|
'client_arr' => $client_arr,
|
||||||
|
'current_user' => session('current_user')
|
||||||
|
];
|
||||||
|
return view('client.index', $data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Show the form for creating a new resource.
|
||||||
|
*
|
||||||
|
* @return \Illuminate\Http\Response
|
||||||
|
*/
|
||||||
|
public function create()
|
||||||
|
{
|
||||||
|
$countries = Models\Country::pluck('en_short_name','alpha_2_code');
|
||||||
|
$service_type = Models\Service::pluck('name', 'id');
|
||||||
|
$payment_type = Models\PaymentType::pluck('name', 'id');
|
||||||
|
$auth_users = Models\Account::pluck('name', 'id');
|
||||||
|
$status = ['Live' => 'Live', 'inactive' => 'Inactive', 'Prospective' => 'Prospective'];
|
||||||
|
$currency = Models\Currency::pluck('name','name');
|
||||||
|
|
||||||
|
$data = [
|
||||||
|
'page_title' => 'Create Client',
|
||||||
|
'countries' => $countries,
|
||||||
|
'service_type' => $service_type,
|
||||||
|
'status' => $status,
|
||||||
|
'currency' => $currency,
|
||||||
|
'auth_users' => $auth_users,
|
||||||
|
'payment_type' => $payment_type
|
||||||
|
];
|
||||||
|
|
||||||
|
return view('client.create', $data);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Store a newly created resource in storage.
|
||||||
|
*
|
||||||
|
* @param \Illuminate\Http\Request $request
|
||||||
|
* @return \Illuminate\Http\Response
|
||||||
|
*/
|
||||||
|
public function store(Request $request)
|
||||||
|
{
|
||||||
|
$request->validate([
|
||||||
|
'name' => 'required|unique:clients,name',
|
||||||
|
'email' => 'required|email',
|
||||||
|
'services' => 'required',
|
||||||
|
'country' => 'required',
|
||||||
|
'status' => 'required',
|
||||||
|
'payment_mode' => 'required',
|
||||||
|
'currency' => 'required',
|
||||||
|
'auth_user_id' => 'required', // account manager
|
||||||
|
]);
|
||||||
|
|
||||||
|
|
||||||
|
// dd($request->all());
|
||||||
|
//'email' => 'unique:users,email_address'
|
||||||
|
$client_arr = [
|
||||||
|
'name' => $request->name,
|
||||||
|
'email' => $request->email,
|
||||||
|
'country' => $request->country,
|
||||||
|
'status' => $request->status,
|
||||||
|
'pay_mode' => $request->payment_mode,
|
||||||
|
'currency' => $request->currency,
|
||||||
|
'auth_user_id' => $request->auth_user_id, // account manager
|
||||||
|
'created_by' => session('current_user.id'),
|
||||||
|
'last_modified_by' => session('current_user.id')
|
||||||
|
];
|
||||||
|
if ($request->notes) {
|
||||||
|
$client_arr['notes'] = $request->notes;
|
||||||
|
}
|
||||||
|
if ($request->skype_name) {
|
||||||
|
$client_arr['skype_name'] = $request->skype_name;
|
||||||
|
}
|
||||||
|
if ($request->linkedin_name) {
|
||||||
|
$client_arr['linkedin_name'] = $request->linkedin_name;
|
||||||
|
}
|
||||||
|
|
||||||
|
$result = Models\Client::create($client_arr);
|
||||||
|
|
||||||
|
if (in_array('3', $request->services)) {
|
||||||
|
\Log::info('ussd client detected');
|
||||||
|
$ussd_client_payment_arr = [
|
||||||
|
'client_id' => $result->id,
|
||||||
|
'last_modified_by_id' => session('current_user.id')
|
||||||
|
];
|
||||||
|
$retval = Models\UssdClientPayment::create($ussd_client_payment_arr);
|
||||||
|
//TODO send an email to jim/priscilla about new USSD client,
|
||||||
|
#dispatch(new SendNewUssdClientEmail($result));
|
||||||
|
}
|
||||||
|
$retval = $this->store_services($request->services, $result->id);
|
||||||
|
|
||||||
|
Session::flash('success_message', 'Client successfully added');
|
||||||
|
return redirect(url('clients'));
|
||||||
|
}
|
||||||
|
public function notesStore(Request $request)
|
||||||
|
{
|
||||||
|
$request->validate([
|
||||||
|
'client_id' => 'required',
|
||||||
|
'notes_body' => 'required'
|
||||||
|
]);
|
||||||
|
$auth_user = session('current_user');
|
||||||
|
|
||||||
|
// dd($request->all());
|
||||||
|
//'email' => 'unique:users,email_address'
|
||||||
|
$notes_arr = [
|
||||||
|
'notes_body' => $request->notes_body,
|
||||||
|
'services' => implode(',', $request->services),
|
||||||
|
'auth_user_id' => $auth_user['id'],
|
||||||
|
'client_id' => $request->client_id
|
||||||
|
];
|
||||||
|
|
||||||
|
//todo : send emails
|
||||||
|
//dd($notes_arr);
|
||||||
|
$result = Models\ClientNote::create($notes_arr);
|
||||||
|
if ($result) {
|
||||||
|
$data = ['code' => 1, 'msg' => 'Notes successfully added'];
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$data = ['code' => 3, 'msg' => 'Your request could not be handled at this time'];
|
||||||
|
}
|
||||||
|
return response()->json($data, 200);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Display the specified resource.
|
||||||
|
*
|
||||||
|
* @param int $id
|
||||||
|
* @return \Illuminate\Http\Response
|
||||||
|
*/
|
||||||
|
public function show($id)
|
||||||
|
{
|
||||||
|
|
||||||
|
$showclient = Models\Client::with('service_info', 'country_info', 'auth_user_info')->find($id);
|
||||||
|
$service_type = Models\Service::pluck('name', 'id');
|
||||||
|
$service_type_names = Models\Service::pluck('name', 'name');
|
||||||
|
$show_services = Models\ClientCategory::where('client_id', $id)->get();
|
||||||
|
$show_notes = Models\ClientNote::with('created_by_info', 'client_info')->where('client_id', $id)->orderBy('id', 'DESC')->get()->take(20);
|
||||||
|
|
||||||
|
|
||||||
|
$data = [
|
||||||
|
'page_title' => 'Show Client',
|
||||||
|
'showclient' => $showclient,
|
||||||
|
'show_services' => $show_services,
|
||||||
|
'service_type' => $service_type,
|
||||||
|
'service_type_names' => $service_type_names,
|
||||||
|
'show_notes' => $show_notes
|
||||||
|
];
|
||||||
|
|
||||||
|
return view('client.show', $data);
|
||||||
|
}
|
||||||
|
public function showservices($id)
|
||||||
|
{
|
||||||
|
$show_services = Models\ClientCategory::where('client_id', $id)->get();
|
||||||
|
dd($show_services);
|
||||||
|
$data = [
|
||||||
|
'page_title' => 'Show Services',
|
||||||
|
'show_services' => $show_services
|
||||||
|
];
|
||||||
|
|
||||||
|
return view('client.services', $data);
|
||||||
|
}
|
||||||
|
public function editservice($id)
|
||||||
|
{
|
||||||
|
$service = Models\ClientCategory::find($id);
|
||||||
|
dd($service);
|
||||||
|
$data = [
|
||||||
|
'page_title' => 'Show Services',
|
||||||
|
'service' => $service
|
||||||
|
];
|
||||||
|
return view('client.service-edit', $data);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Show the form for editing the specified resource.
|
||||||
|
*
|
||||||
|
* @param int $id
|
||||||
|
* @return \Illuminate\Http\Response
|
||||||
|
*/
|
||||||
|
public function edit($id)
|
||||||
|
{
|
||||||
|
$client = Models\Client::find($id);
|
||||||
|
|
||||||
|
|
||||||
|
$service_type = Models\Service::pluck('name', 'id');
|
||||||
|
// $payment_type = Models\PaymentType::pluck('name', 'id');
|
||||||
|
|
||||||
|
$countries = Models\Country::pluck('en_short_name','alpha_2_code');
|
||||||
|
|
||||||
|
$payment_type = [1 => 'Prepaid', 2 => 'Postpaid']; // Models\PaymentType::pluck('name', 'id')->toArray();
|
||||||
|
$status = ['Live' => 'Live', 'inactive' => 'Inactive', 'Prospective' => 'Prospective'];
|
||||||
|
$currency = Models\Currency::pluck('name', 'name'); //
|
||||||
|
// dd($currency);
|
||||||
|
$auth_users = Models\Account::pluck('name', 'id');
|
||||||
|
|
||||||
|
// dump(array_flatten($client->client_services));
|
||||||
|
$data = [
|
||||||
|
'client' => $client,
|
||||||
|
'countries' => $countries,
|
||||||
|
'service_type' => $service_type->toArray(),
|
||||||
|
'payment_type' => $payment_type,
|
||||||
|
'status' => $status,
|
||||||
|
'auth_users' => $auth_users,
|
||||||
|
'currency' => $currency
|
||||||
|
];
|
||||||
|
// dd($service_type->toArray());
|
||||||
|
return view('client.edit', $data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Update the specified resource in storage.
|
||||||
|
*
|
||||||
|
* @param \Illuminate\Http\Request $request
|
||||||
|
* @param int $id
|
||||||
|
* @return \Illuminate\Http\Response
|
||||||
|
*/
|
||||||
|
public function update(Request $request, $id)
|
||||||
|
{
|
||||||
|
|
||||||
|
$request->validate([
|
||||||
|
'name' => 'required',
|
||||||
|
// 'email' => 'required|email',
|
||||||
|
// 'services' => 'required',
|
||||||
|
'country' => 'required',
|
||||||
|
'status' => 'required',
|
||||||
|
// 'payment_mode' => 'required',
|
||||||
|
'currency' => 'required',
|
||||||
|
]);
|
||||||
|
$client_update = Models\Client::find($id);
|
||||||
|
|
||||||
|
//dd($request->all());
|
||||||
|
$client_update->name = $request->name;
|
||||||
|
$client_update->email = $request->email;
|
||||||
|
$client_update->contact_person = $request->contact_person;
|
||||||
|
$client_update->status = $request->status;
|
||||||
|
$client_update->pay_mode = $request->payment_mode;
|
||||||
|
$client_update->country = $request->country;
|
||||||
|
$client_update->currency = $request->currency;
|
||||||
|
$client_update->notes = $request->notes;
|
||||||
|
$client_update->skype_name = $request->skype_name;
|
||||||
|
$client_update->linkedin_name = $request->linkedin_name;
|
||||||
|
$client_update->created_by = session('current_user.id');
|
||||||
|
$client_update->last_modified_by = session('current_user.id');
|
||||||
|
|
||||||
|
$result = $client_update->save();
|
||||||
|
|
||||||
|
$client = Models\Client::find($id);
|
||||||
|
/*
|
||||||
|
if (in_array('3', $request->services)) {
|
||||||
|
if ($request->status == 'active' && $client_update->status !== 'active') {
|
||||||
|
\log::info('ussd client active detected');
|
||||||
|
#dispatch(new SendUssdClientActiveEmail($client));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (in_array('3', $request->services)) {
|
||||||
|
\Log::info('ussd client detected');
|
||||||
|
$ussd_client_payment_arr = [
|
||||||
|
'client_id' => $client_update->id,
|
||||||
|
'last_modified_by_id' => session('current_user.id')
|
||||||
|
];
|
||||||
|
$retval = Models\UssdClientPayment::create($ussd_client_payment_arr);
|
||||||
|
//TODO send an email to jim/priscilla about new USSD client,
|
||||||
|
#dispatch(new SendNewUssdClientEmail($client_update));
|
||||||
|
}
|
||||||
|
$retval = $this->update_services($request->services, $client_update->id);
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Session::flash('success_message', 'Client successfully Updated');
|
||||||
|
return redirect(url('clients'));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Remove the specified resource from storage.
|
||||||
|
*
|
||||||
|
* @param int $id
|
||||||
|
* @return \Illuminate\Http\Response
|
||||||
|
*/
|
||||||
|
public function destroy($id)
|
||||||
|
{
|
||||||
|
$result = Models\Client::destroy($id);
|
||||||
|
if (request()->ajax()) {
|
||||||
|
$result_arr = ['code' => 1];
|
||||||
|
return response()->json($result_arr);
|
||||||
|
}
|
||||||
|
Session::flash('success_message', 'Client successfully deleted!');
|
||||||
|
return redirect(route('client.index'));
|
||||||
|
}
|
||||||
|
|
||||||
|
public function store_services($services_arr, $client_id){
|
||||||
|
foreach ($services_arr as $id) {
|
||||||
|
$client_arr = [
|
||||||
|
'client_id' => $client_id,
|
||||||
|
'category_id' => $id
|
||||||
|
];
|
||||||
|
$result = Models\ClientCategory::create($client_arr);
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
public function update_services($services_arr, $client_id){
|
||||||
|
// remove and add will think of a better approach later
|
||||||
|
$result = Models\ClientCategory::where('client_id', $client_id)->delete();
|
||||||
|
|
||||||
|
foreach ($services_arr as $id) {
|
||||||
|
$client_arr = [
|
||||||
|
'client_id' => $client_id,
|
||||||
|
'category_id' => $id
|
||||||
|
];
|
||||||
|
$result = Models\ClientCategory::create($client_arr);
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function get_filter_ids($filter, $keyword)
|
||||||
|
{
|
||||||
|
switch ($filter) {
|
||||||
|
case 'status':
|
||||||
|
$id = Models\Client::where('status', 'like', "%$keyword%")->get(['id']);
|
||||||
|
if ($id->isEmpty()) {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
$step = json_decode($id);
|
||||||
|
$the_id = $step[0]->id;
|
||||||
|
return (count($step) > 0 ) ? $step[0]->id : "";
|
||||||
|
break;
|
||||||
|
case 'type':
|
||||||
|
$id = Models\Client::where('type', 'like', "%$keyword%")->get(['id']);
|
||||||
|
if ($id->isEmpty()) {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
$step = json_decode($id);
|
||||||
|
$the_id = $step[0]->id;
|
||||||
|
return (count($step) > 0 ) ? $step[0]->id : "";
|
||||||
|
break;
|
||||||
|
case 'country':
|
||||||
|
$id = Models\Country::where('alpha_2_code', 'like', "%$keyword%")->orWhere('alpha_3_code', 'like', "%$keyword%")->orWhere('en_short_name', 'like', "%$keyword%")->get(['id']);
|
||||||
|
if ($id->isEmpty()) {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
$step = json_decode($id);
|
||||||
|
$the_id = $step[0]->id;
|
||||||
|
return (count($step) > 0 ) ? $step[0]->id : "";
|
||||||
|
break;
|
||||||
|
case 'currency':
|
||||||
|
$id = Models\Client::where('currency', 'like', "%$keyword%")->get(['id']);
|
||||||
|
if ($id->isEmpty()) {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
$step = json_decode($id);
|
||||||
|
$the_id = $step[0]->id;
|
||||||
|
return (count($step) > 0 ) ? $step[0]->id : "";
|
||||||
|
break;
|
||||||
|
case 'auth_user_id':
|
||||||
|
$id = Models\SystemUser::where('name', 'like', "%$keyword%")->get(['id']);
|
||||||
|
if ($id->isEmpty()) {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
$step = json_decode($id);
|
||||||
|
$the_id = $step[0]->id;
|
||||||
|
return (count($step) > 0 ) ? $step[0]->id : "";
|
||||||
|
break;
|
||||||
|
case 'name':
|
||||||
|
// $this->log_query();
|
||||||
|
$id = Models\Client::where('name', 'like', "%$keyword%")->get(['id']);
|
||||||
|
if ($id->isEmpty()) {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
$step = json_decode($id);
|
||||||
|
return (count($step) > 0 ) ? $step[0]->id : "";
|
||||||
|
break;
|
||||||
|
case 'pay_mode':
|
||||||
|
// $this->log_query();
|
||||||
|
$id = Models\PaymentType::where('name', 'like', "%$keyword%")->get(['id']);
|
||||||
|
if ($id->isEmpty()) {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
$step = json_decode($id);
|
||||||
|
return (count($step) > 0 ) ? $step[0]->id : "";
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
return '';
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
19
app/Http/Controllers/Controller.php
Executable file
19
app/Http/Controllers/Controller.php
Executable file
@@ -0,0 +1,19 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Controllers;
|
||||||
|
|
||||||
|
use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
|
||||||
|
use Illuminate\Foundation\Bus\DispatchesJobs;
|
||||||
|
use Illuminate\Foundation\Validation\ValidatesRequests;
|
||||||
|
use Illuminate\Routing\Controller as BaseController;
|
||||||
|
|
||||||
|
class Controller extends BaseController
|
||||||
|
{
|
||||||
|
use AuthorizesRequests, DispatchesJobs, ValidatesRequests;
|
||||||
|
public function log_query() {
|
||||||
|
\DB::listen(function ($sql) {
|
||||||
|
\Log::info('showing query', array('sql' => $sql));
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
15
app/Http/Controllers/DashboardController.php
Executable file
15
app/Http/Controllers/DashboardController.php
Executable file
@@ -0,0 +1,15 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Controllers;
|
||||||
|
|
||||||
|
use Illuminate\Http\Request;
|
||||||
|
|
||||||
|
class DashboardController extends Controller
|
||||||
|
{
|
||||||
|
public function index(){
|
||||||
|
$data = [
|
||||||
|
'page_title' => 'Dashboard'
|
||||||
|
];
|
||||||
|
return view('dashboard.index', $data);
|
||||||
|
}
|
||||||
|
}
|
||||||
20
app/Http/Controllers/FilesController.php
Executable file
20
app/Http/Controllers/FilesController.php
Executable file
@@ -0,0 +1,20 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Controllers;
|
||||||
|
|
||||||
|
use Illuminate\Http\Request;
|
||||||
|
|
||||||
|
class FilesController extends Controller
|
||||||
|
{
|
||||||
|
public function index(){
|
||||||
|
// dd(session('current_user'));
|
||||||
|
// die;
|
||||||
|
$files = Models\ClickFile::get();
|
||||||
|
$data = [
|
||||||
|
'page_title' => 'Files',
|
||||||
|
'servers' => $files
|
||||||
|
];
|
||||||
|
return view('infrastructure.index', $data);
|
||||||
|
//sudo chown vagrant.vagrant ~/.npm/ -R
|
||||||
|
}
|
||||||
|
}
|
||||||
28
app/Http/Controllers/HomeController.php
Executable file
28
app/Http/Controllers/HomeController.php
Executable file
@@ -0,0 +1,28 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Controllers;
|
||||||
|
|
||||||
|
use Illuminate\Http\Request;
|
||||||
|
|
||||||
|
class HomeController extends Controller
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Create a new controller instance.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
$this->middleware('auth');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Show the application dashboard.
|
||||||
|
*
|
||||||
|
* @return \Illuminate\Contracts\Support\Renderable
|
||||||
|
*/
|
||||||
|
public function index()
|
||||||
|
{
|
||||||
|
return view('home');
|
||||||
|
}
|
||||||
|
}
|
||||||
70
app/Http/Controllers/LoginController.php
Executable file
70
app/Http/Controllers/LoginController.php
Executable file
@@ -0,0 +1,70 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Controllers;
|
||||||
|
|
||||||
|
use Illuminate\Http\Request;
|
||||||
|
use App\Models;
|
||||||
|
|
||||||
|
class LoginController extends Controller
|
||||||
|
{
|
||||||
|
public function getLoginPage(){
|
||||||
|
$designation = Models\Designation::pluck('name', 'id');
|
||||||
|
$data = [
|
||||||
|
'designation' => $designation
|
||||||
|
];
|
||||||
|
|
||||||
|
return view('login.index', $data);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function handleLogin(Request $request){
|
||||||
|
$this->validate($request, ['email' => 'required', 'password' => 'required']);
|
||||||
|
|
||||||
|
$logged_in = Models\SystemUser::with('designation_info')->where('email', $request->email)->where('password', md5($request->password))->first();
|
||||||
|
|
||||||
|
if(empty($logged_in)){
|
||||||
|
return redirect("/")->withErrors(array("Incorrect Email/Password. Check and try again!"))->withInput();
|
||||||
|
}
|
||||||
|
|
||||||
|
$request->session()->regenerate(true);
|
||||||
|
$request->session()->put('current_user.id', $logged_in->id);
|
||||||
|
$request->session()->put('current_user.name', $logged_in->name);
|
||||||
|
$request->session()->put('current_user.email', $logged_in->email);
|
||||||
|
$request->session()->put('current_user.phone', $logged_in->phone);
|
||||||
|
$request->session()->put('current_user.designation', $logged_in->designation_info->name);
|
||||||
|
|
||||||
|
// return redirect(url('dashboard'));
|
||||||
|
return redirect(url('clients'));
|
||||||
|
}
|
||||||
|
|
||||||
|
public function handle_logout(Request $request) {
|
||||||
|
|
||||||
|
$request->session()->forget('current_user');
|
||||||
|
$request->session()->flush();
|
||||||
|
$request->session()->regenerate(true);
|
||||||
|
return redirect("/");
|
||||||
|
}
|
||||||
|
|
||||||
|
public function registerAccount(Request $request){
|
||||||
|
dd($request->all());
|
||||||
|
$request->validate([
|
||||||
|
'name' => 'required',
|
||||||
|
'designation' => 'required',
|
||||||
|
'email' => 'required',
|
||||||
|
'phone' => 'required',
|
||||||
|
'password' => 'required',
|
||||||
|
'confirm_password' => 'same:password',
|
||||||
|
]);
|
||||||
|
|
||||||
|
$make_account = [
|
||||||
|
'name' => $request->name,
|
||||||
|
'designation' => $request->designation,
|
||||||
|
'email' => $request->email,
|
||||||
|
'phone' => $request->phone,
|
||||||
|
'password' => md5($request->password)
|
||||||
|
];
|
||||||
|
|
||||||
|
$inserted = Models\Account::create($make_account);
|
||||||
|
Session::flash('success_message', 'Account successfully added');
|
||||||
|
return redirect(url('/'));
|
||||||
|
}
|
||||||
|
}
|
||||||
270
app/Http/Controllers/MarketerReportController.php
Executable file
270
app/Http/Controllers/MarketerReportController.php
Executable file
@@ -0,0 +1,270 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Controllers;
|
||||||
|
|
||||||
|
use App\Models;
|
||||||
|
use Illuminate\Http\Request;
|
||||||
|
use Session;
|
||||||
|
use DB;
|
||||||
|
|
||||||
|
|
||||||
|
class MarketerReportController extends Controller
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Display a listing of the resource.
|
||||||
|
*
|
||||||
|
* @return \Illuminate\Http\Response
|
||||||
|
*/
|
||||||
|
public function index(Request $request)
|
||||||
|
{
|
||||||
|
$market_reports = Models\MarketReport::where('market_reports.id', '>', 0);
|
||||||
|
$payment_type = [1 => 'Prepaid', 2 => 'Postpaid'];
|
||||||
|
|
||||||
|
$columns = [
|
||||||
|
'service' => 'Service',
|
||||||
|
'email' => 'Email',
|
||||||
|
'discussion' => 'Discussion',
|
||||||
|
'contact_person' => 'Contact Person',
|
||||||
|
'payment_status' => 'Payment Status',
|
||||||
|
'sam_comment' => 'Sam Comment',
|
||||||
|
'status' => 'status',
|
||||||
|
'client' => 'Client',
|
||||||
|
'auth_user_id' => 'User',
|
||||||
|
'payment_type' => 'Payment Type',
|
||||||
|
];
|
||||||
|
|
||||||
|
if (!empty($request->filter) && !empty($request->keyword)) {
|
||||||
|
$market_reports = $this->resolveAppQuery($market_reports, $request);
|
||||||
|
}
|
||||||
|
|
||||||
|
$market_reports = $market_reports->orderBy('market_reports.created_at', 'DESC')->paginate(20);
|
||||||
|
|
||||||
|
$data = [
|
||||||
|
'page_title' => 'Click Apps',
|
||||||
|
'market_reports' => $market_reports,
|
||||||
|
'columns' => $columns,
|
||||||
|
'payment_type' => $payment_type
|
||||||
|
];
|
||||||
|
|
||||||
|
return view('marketer_report.index', $data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Show the form for creating a new resource.
|
||||||
|
*
|
||||||
|
* @return \Illuminate\Http\Response
|
||||||
|
*/
|
||||||
|
public function create()
|
||||||
|
{
|
||||||
|
$clients = Models\Client::pluck('name', 'id');
|
||||||
|
$service = Models\Service::pluck('name', 'name');
|
||||||
|
$payment_type = Models\PaymentType::pluck('name', 'id');
|
||||||
|
$payment_status = ['paid' => 'Paid', 'unpaid' => 'Unpaid'];
|
||||||
|
|
||||||
|
$data = [
|
||||||
|
'page_title' => 'Marketing Report',
|
||||||
|
'service' => $service,
|
||||||
|
'clients' => $clients,
|
||||||
|
'payment_type' => $payment_type,
|
||||||
|
'payment_status' => $payment_status
|
||||||
|
];
|
||||||
|
|
||||||
|
return view('marketer_report.create', $data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Store a newly created resource in storage.
|
||||||
|
*
|
||||||
|
* @param \Illuminate\Http\Request $request
|
||||||
|
* @return \Illuminate\Http\Response
|
||||||
|
*/
|
||||||
|
public function store(Request $request)
|
||||||
|
{
|
||||||
|
$request->validate($this->mkrtRrptValidations());
|
||||||
|
$reportData = $request->only($this->mkrtRrptWhiteListParms());
|
||||||
|
$reportData['auth_user_id'] = session('current_user.id');
|
||||||
|
|
||||||
|
DB::transaction(function () use ($reportData) {
|
||||||
|
Models\MarketReport::create($reportData);
|
||||||
|
});
|
||||||
|
|
||||||
|
Session::flash('success_message', 'Report successfully added');
|
||||||
|
return redirect(url('marketreport'));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Display the specified resource.
|
||||||
|
*
|
||||||
|
* @param int $id
|
||||||
|
* @return \Illuminate\Http\Response
|
||||||
|
*/
|
||||||
|
public function show($id)
|
||||||
|
{
|
||||||
|
$market_report = Models\MarketReport::with('client_info', 'auth_user_info')->where('id', $id)->first();
|
||||||
|
$data = [
|
||||||
|
'page_title' => 'Report Details',
|
||||||
|
'market_report' => $market_report
|
||||||
|
];
|
||||||
|
return view('marketer_report.show', $data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Show the form for editing the specified resource.
|
||||||
|
*
|
||||||
|
* @param int $id
|
||||||
|
* @return \Illuminate\Http\Response
|
||||||
|
*/
|
||||||
|
public function edit($id)
|
||||||
|
{
|
||||||
|
$market_report = Models\MarketReport::find($id);
|
||||||
|
if (!$market_report) {
|
||||||
|
Session::flash('error_message', "Record with ID: {$id} not found");
|
||||||
|
return redirect(url('marketreport'));
|
||||||
|
}
|
||||||
|
$clients = Models\Client::pluck('name', 'id');
|
||||||
|
$service = Models\Service::pluck('name', 'name');
|
||||||
|
$payment_type = Models\PaymentType::pluck('name', 'id');
|
||||||
|
$payment_status = ['paid' => 'Paid', 'unpaid' => 'Unpaid'];
|
||||||
|
|
||||||
|
$data = [
|
||||||
|
'page_title' => 'Edit Meeting Report',
|
||||||
|
'market_report' => $market_report,
|
||||||
|
'service' => $service,
|
||||||
|
'clients' => $clients,
|
||||||
|
'payment_type' => $payment_type,
|
||||||
|
'payment_status' => $payment_status
|
||||||
|
];
|
||||||
|
|
||||||
|
return view('marketer_report.edit', $data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Update the specified resource in storage.
|
||||||
|
*
|
||||||
|
* @param \Illuminate\Http\Request $request
|
||||||
|
* @param int $id
|
||||||
|
* @return \Illuminate\Http\Response
|
||||||
|
*/
|
||||||
|
public function update(Request $request, $id)
|
||||||
|
{
|
||||||
|
$market_report = Models\MarketReport::find($id);
|
||||||
|
if (!$market_report) {
|
||||||
|
Session::flash('error_message', "Record with ID: {$id} not found");
|
||||||
|
return redirect(url('marketreport'));
|
||||||
|
}
|
||||||
|
$request->validate($this->mkrtRrptValidations());
|
||||||
|
$reportData = $request->only($this->mkrtRrptWhiteListParms());
|
||||||
|
$reportData['auth_user_id'] = session('current_user.id');
|
||||||
|
|
||||||
|
DB::transaction(function () use ($reportData, $market_report) {
|
||||||
|
$market_report->update($reportData);
|
||||||
|
});
|
||||||
|
|
||||||
|
Session::flash('success_message', 'Market report updated successfully');
|
||||||
|
return redirect(url('marketreport'));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Remove the specified resource from storage.
|
||||||
|
*
|
||||||
|
* @param int $id
|
||||||
|
* @return \Illuminate\Http\Response
|
||||||
|
*/
|
||||||
|
public function destroy($id)
|
||||||
|
{
|
||||||
|
Models\MarketReport::destroy($id);
|
||||||
|
if (request()->ajax()) {
|
||||||
|
$res = ['code' => 1];
|
||||||
|
return response()->json($res);
|
||||||
|
}
|
||||||
|
Session::flash('success_message', 'Market report successfully deleted!');
|
||||||
|
return redirect(url('clickapps'));
|
||||||
|
}
|
||||||
|
|
||||||
|
public function mkrtRrptValidations()
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
'client' => 'required',
|
||||||
|
'service' => 'required',
|
||||||
|
'contact_person' => 'required',
|
||||||
|
'email' => 'required',
|
||||||
|
'discussion' => 'required',
|
||||||
|
'payment_type' => 'required',
|
||||||
|
'current_balance' => 'required|numeric',
|
||||||
|
'payment_status' => 'required',
|
||||||
|
'next_follow_up_date' => 'required',
|
||||||
|
'last_follow_up_date' => 'required'
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
public function mkrtRrptWhiteListParms()
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
'client',
|
||||||
|
'service',
|
||||||
|
'contact_person',
|
||||||
|
'email',
|
||||||
|
'discussion',
|
||||||
|
'payment_type',
|
||||||
|
'current_balance',
|
||||||
|
'payment_status',
|
||||||
|
'next_follow_up_date',
|
||||||
|
'last_follow_up_date',
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
function resolveAppQuery($clients, $request)
|
||||||
|
{
|
||||||
|
switch ($request->filter) {
|
||||||
|
case 'service':
|
||||||
|
return $clients
|
||||||
|
->where('service', 'like', "%$request->keyword%");
|
||||||
|
break;
|
||||||
|
case 'email':
|
||||||
|
return $clients
|
||||||
|
->where('email', 'like', "%$request->keyword%");
|
||||||
|
break;
|
||||||
|
case 'discussion':
|
||||||
|
return $clients
|
||||||
|
->where('discussion', 'like', "%$request->keyword%");
|
||||||
|
break;
|
||||||
|
case 'contact_person':
|
||||||
|
return $clients
|
||||||
|
->where('contact_person', 'like', "%$request->keyword%");
|
||||||
|
break;
|
||||||
|
case 'payment_status':
|
||||||
|
return $clients
|
||||||
|
->where('payment_status', 'like', "%$request->keyword%");
|
||||||
|
break;
|
||||||
|
case 'sam_comment':
|
||||||
|
return $clients
|
||||||
|
->where('sam_comment', 'like', "%$request->keyword%");
|
||||||
|
break;
|
||||||
|
case 'status':
|
||||||
|
return $clients
|
||||||
|
->where('status', 'like', "%$request->keyword%");
|
||||||
|
break;
|
||||||
|
case 'client':
|
||||||
|
return $clients
|
||||||
|
->join('clients', 'clients.id', '=', 'market_reports.client')
|
||||||
|
->where('clients.name', 'like', "%$request->keyword%");
|
||||||
|
break;
|
||||||
|
case 'auth_user_id':
|
||||||
|
return $clients
|
||||||
|
->join('auth_users', 'auth_users.id', '=', 'market_reports.auth_user_id')
|
||||||
|
->where('auth_users.name', 'like', "%$request->keyword%");
|
||||||
|
break;
|
||||||
|
case 'payment_type':
|
||||||
|
return $clients
|
||||||
|
->join('payment_type', 'payment_type.id', '=', 'market_reports.payment_type')
|
||||||
|
->where('payment_type.name', 'like', "%$request->keyword%");
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
# code...
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// payment_type
|
||||||
461
app/Http/Controllers/MeetingReportsController.php
Executable file
461
app/Http/Controllers/MeetingReportsController.php
Executable file
@@ -0,0 +1,461 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Controllers;
|
||||||
|
|
||||||
|
use Illuminate\Http\Request;
|
||||||
|
use App\Models;
|
||||||
|
use Session;
|
||||||
|
use Illuminate\Support\Arr;
|
||||||
|
|
||||||
|
|
||||||
|
class MeetingReportsController extends Controller
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Display a listing of the resource.
|
||||||
|
*
|
||||||
|
* @return \Illuminate\Http\Response
|
||||||
|
*/
|
||||||
|
public function index()
|
||||||
|
{
|
||||||
|
if (request()->has('filter', 'keyword')){ // == true && request()->keyword = ) {
|
||||||
|
// dd('foo detected');
|
||||||
|
$keyword = request()->keyword;
|
||||||
|
$filter = request()->filter;
|
||||||
|
if ($filter == 'Location') {
|
||||||
|
$keyword = Models\Country::where('en_short_name', 'LIKE', $keyword)->get();
|
||||||
|
}
|
||||||
|
$clients = Models\Client::with('report_info')->where($filter, $keyword)
|
||||||
|
->orderBy('name', 'ASC')->paginate(1);
|
||||||
|
}
|
||||||
|
$clients = Models\Client::with('report_info')->orderBy('name', 'ASC')->paginate(1);
|
||||||
|
|
||||||
|
$data = [
|
||||||
|
'page_title' => 'Meeting Report',
|
||||||
|
'columns' => ['Name' => 'Client Name', 'Location' => 'Client Location'],
|
||||||
|
'clients' => $clients
|
||||||
|
];
|
||||||
|
// dd($clients[0]);
|
||||||
|
return view('report.dashboardreport', $data);
|
||||||
|
}
|
||||||
|
public function search()
|
||||||
|
{
|
||||||
|
dd(request()->has('filter', 'keyword'));
|
||||||
|
dd(request()->all());
|
||||||
|
|
||||||
|
$clients = Models\Client::with('report_info')->orderBy('name', 'ASC')->paginate(1);
|
||||||
|
|
||||||
|
$data = [
|
||||||
|
'page_title' => 'Meeting Report',
|
||||||
|
'columns' => ['Name' => 'Client Name', 'Location' => 'Client Location'],
|
||||||
|
'clients' => $clients
|
||||||
|
];
|
||||||
|
// dd($clients[0]);
|
||||||
|
return view('report.dashboardreport', $data);
|
||||||
|
}
|
||||||
|
public function indexBKTwo()
|
||||||
|
{
|
||||||
|
$clients = Models\Client::with('report_info')->get();
|
||||||
|
dd($clients);
|
||||||
|
$meeting_report_arr = new Models\MeetingReport;
|
||||||
|
$table_columns = \DB::select(\DB::raw("show full columns from meeting_reports"));
|
||||||
|
$exclude_arr = [
|
||||||
|
'updated_at', 'id','created_at'
|
||||||
|
];
|
||||||
|
$columns = [];
|
||||||
|
$queries = [];
|
||||||
|
foreach ($table_columns as $key) {
|
||||||
|
if ($key->Field == 'auth_user_id') {
|
||||||
|
$columns[$key->Field] = 'Account Manager';
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$columns[$key->Field] = ucwords(str_replace('_', ' ', $key->Field));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
foreach ($columns as $col) {
|
||||||
|
if (request('filter') == $col) {
|
||||||
|
$filter = request('filter');
|
||||||
|
$keyword = request('keyword');
|
||||||
|
$table_arr = ['staff_id', 'payment_type'];
|
||||||
|
if (in_array($col, $table_arr)) {
|
||||||
|
$key = $this->get_filter_ids($filter, $keyword);
|
||||||
|
if (!empty($key)) {
|
||||||
|
$keyword = $key;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$meeting_report_arr = $meeting_report_arr->where($col, 'like', '%'.$keyword.'%');
|
||||||
|
$queries[$col] = request('keyword');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/*
|
||||||
|
if (session('current_user.designation') == 'administrator') {
|
||||||
|
$meeting_report_arr = $meeting_report_arr->with('client_info', 'auth_user_info', 'sam_comment_info')->orderBy('created_at', 'DESC')->paginate(40)->appends($queries);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$meeting_report_arr = $meeting_report_arr->with('client_info', 'auth_user_info', 'sam_comment_info')
|
||||||
|
->where('auth_user_id', session('current_user.id'))
|
||||||
|
->orderBy('created_at', 'DESC')->paginate(40)->appends($queries);
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
$meeting_report_arr = $meeting_report_arr->with('client_info', 'auth_user_info', 'sam_comment_info')->orderBy('created_at', 'DESC')->paginate(40)->appends($queries);
|
||||||
|
|
||||||
|
$payment_type = [ 1 => 'Prepaid', 2 => 'Postpaid'];
|
||||||
|
$data = [
|
||||||
|
'page_title' => 'Meeting Report',
|
||||||
|
'columns' => Arr::except($columns, $exclude_arr),
|
||||||
|
'meeting_report_arr' => $meeting_report_arr,
|
||||||
|
'payment_type' => $payment_type
|
||||||
|
];
|
||||||
|
return view('report.index', $data);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function indexBK()
|
||||||
|
{
|
||||||
|
$meeting_report_arr = new Models\MeetingReport;
|
||||||
|
$table_columns = \DB::select(\DB::raw("show full columns from meeting_reports"));
|
||||||
|
$exclude_arr = [
|
||||||
|
'updated_at', 'id','created_at'
|
||||||
|
];
|
||||||
|
$columns = [];
|
||||||
|
$queries = [];
|
||||||
|
foreach ($table_columns as $key) {
|
||||||
|
if ($key->Field == 'auth_user_id') {
|
||||||
|
$columns[$key->Field] = 'Account Manager';
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$columns[$key->Field] = ucwords(str_replace('_', ' ', $key->Field));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
foreach ($columns as $col) {
|
||||||
|
if (request('filter') == $col) {
|
||||||
|
$filter = request('filter');
|
||||||
|
$keyword = request('keyword');
|
||||||
|
$table_arr = ['staff_id', 'payment_type'];
|
||||||
|
if (in_array($col, $table_arr)) {
|
||||||
|
$key = $this->get_filter_ids($filter, $keyword);
|
||||||
|
if (!empty($key)) {
|
||||||
|
$keyword = $key;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$meeting_report_arr = $meeting_report_arr->where($col, 'like', '%'.$keyword.'%');
|
||||||
|
$queries[$col] = request('keyword');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (session('current_user.designation') == 'administrator') {
|
||||||
|
$meeting_report_arr = $meeting_report_arr->with('client_info', 'auth_user_info', 'sam_comment_info')->orderBy('created_at', 'DESC')->paginate(40)->appends($queries);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$meeting_report_arr = $meeting_report_arr->with('client_info', 'auth_user_info', 'sam_comment_info')
|
||||||
|
->where('auth_user_id', session('current_user.id'))
|
||||||
|
->orderBy('created_at', 'DESC')->paginate(40)->appends($queries);
|
||||||
|
}
|
||||||
|
|
||||||
|
$payment_type = [ 1 => 'Prepaid', 2 => 'Postpaid'];
|
||||||
|
$data = [
|
||||||
|
'page_title' => 'Meeting Report',
|
||||||
|
'columns' => Arr::except($columns, $exclude_arr),
|
||||||
|
'meeting_report_arr' => $meeting_report_arr,
|
||||||
|
'payment_type' => $payment_type
|
||||||
|
];
|
||||||
|
return view('report.index', $data);
|
||||||
|
}
|
||||||
|
public function showDetails($id = '')
|
||||||
|
{
|
||||||
|
// dump(session('current_user'));
|
||||||
|
$selected_user = '';
|
||||||
|
$meeting_report_arr = new Models\MeetingReport;
|
||||||
|
$current_user = session('current_user.id');
|
||||||
|
|
||||||
|
if (session('current_user.designation') == 'administrator') {
|
||||||
|
$meeting_report_arr = $meeting_report_arr->with('client_info', 'auth_user_info', 'sam_comment_info')->orderBy('created_at', 'DESC')->paginate(20);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$meeting_report_arr = $meeting_report_arr->with('client_info', 'auth_user_info', 'sam_comment_info')->where('auth_user_id', $current_user)->orderBy('created_at', 'DESC')->paginate(20);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($id !== '') {
|
||||||
|
//->where('auth_user_id', $current_user)
|
||||||
|
$main_discussion = Models\MeetingReport::with('client_info', 'auth_user_info')->where('id', $id)->first();
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
if (session('current_user.designation') == 'administrator') {
|
||||||
|
$main_discussion = Models\MeetingReport::with('client_info', 'auth_user_info')->get()->last();
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$main_discussion = Models\MeetingReport::with('client_info', 'auth_user_info')->where('auth_user_id', $current_user)->get()->last();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
// dump($current_user);
|
||||||
|
//$main_discussion = Models\MeetingReport::with('client_info', 'auth_user_info')->where('auth_user_id', $current_user)->get()->last();
|
||||||
|
// dd($main_discussion);
|
||||||
|
// \Log::info('foo bar in the app');
|
||||||
|
if (!$main_discussion) {
|
||||||
|
return redirect(url('reports'));
|
||||||
|
}
|
||||||
|
$payment_type = [ 1 => 'Prepaid', 2 => 'Postpaid'];
|
||||||
|
$data = [
|
||||||
|
'page_title' => 'Meeting Report',
|
||||||
|
'main_discussion' => $main_discussion,
|
||||||
|
'meeting_report_arr' => $meeting_report_arr,
|
||||||
|
'payment_type' => $payment_type
|
||||||
|
];
|
||||||
|
|
||||||
|
return view('report.details', $data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Show the form for creating a new resource.
|
||||||
|
*
|
||||||
|
* @return \Illuminate\Http\Response
|
||||||
|
*/
|
||||||
|
public function create()
|
||||||
|
{
|
||||||
|
$clients = Models\Client::pluck('name','id');
|
||||||
|
$service = Models\Service::pluck('name','name');
|
||||||
|
$payment_type = Models\PaymentType::pluck('name', 'id');
|
||||||
|
$payment_status = ['paid' => 'Paid', 'unpaid' => 'Unpaid'];
|
||||||
|
|
||||||
|
$data = [
|
||||||
|
'page_title' => 'Create Meeting Report',
|
||||||
|
'service' => $service,
|
||||||
|
'clients' => $clients,
|
||||||
|
'payment_type' => $payment_type,
|
||||||
|
'payment_status' => $payment_status
|
||||||
|
];
|
||||||
|
|
||||||
|
return view('report.create', $data);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Store a newly created resource in storage.
|
||||||
|
*
|
||||||
|
* @param \Illuminate\Http\Request $request
|
||||||
|
* @return \Illuminate\Http\Response
|
||||||
|
*/
|
||||||
|
public function store(Request $request)
|
||||||
|
{
|
||||||
|
$request->validate([
|
||||||
|
'client' => 'required',
|
||||||
|
'service' => 'required',
|
||||||
|
'contact_person' => 'required',
|
||||||
|
'email' => 'required',
|
||||||
|
'discussion' => 'required',
|
||||||
|
'payment_type' => 'required',
|
||||||
|
'current_balance' => 'required|numeric',
|
||||||
|
'payment_status' => 'required',
|
||||||
|
'next_follow_up_date' => 'required',
|
||||||
|
'last_follow_up_date' => 'required'
|
||||||
|
]);
|
||||||
|
// dd($request->all());
|
||||||
|
|
||||||
|
$the_report = $request->except('_token');
|
||||||
|
$the_report['auth_user_id'] = session('current_user.id');
|
||||||
|
|
||||||
|
$savereport = Models\MeetingReport::create($the_report);
|
||||||
|
|
||||||
|
Session::flash('success_message', 'Report successfully added');
|
||||||
|
return redirect(url('dashboard'));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public function store_sam_comment(Request $request){
|
||||||
|
|
||||||
|
$comment = Models\SamComment::create(
|
||||||
|
[
|
||||||
|
'report_id' => $request->report_id,
|
||||||
|
'created_by_id' => $request->created_by_id,
|
||||||
|
'message' => $request->message
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
return response()->json(['code' => 1, 'msg' => $comment]);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Display the specified resource.
|
||||||
|
*
|
||||||
|
* @param int $id
|
||||||
|
* @return \Illuminate\Http\Response
|
||||||
|
*/
|
||||||
|
public function show($id)
|
||||||
|
{
|
||||||
|
//return redirect()->back()->withErrors(array("This section is under development. Kindly use the dashboard to view details of the reports"))->withInput();
|
||||||
|
$meetingreport = Models\MeetingReport::with('client_info', 'auth_user_info')->where('id', $id)->first();
|
||||||
|
$data = [
|
||||||
|
'page_title' => 'Report Details',
|
||||||
|
'showreport' => $meetingreport
|
||||||
|
];
|
||||||
|
return view('report.show', $data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Show the form for editing the specified resource.
|
||||||
|
*
|
||||||
|
* @param int $id
|
||||||
|
* @return \Illuminate\Http\Response
|
||||||
|
*/
|
||||||
|
public function edit($id)
|
||||||
|
{
|
||||||
|
$report_arr = Models\MeetingReport::find($id);
|
||||||
|
$clients = Models\Client::pluck('name','id');
|
||||||
|
$service = Models\Service::pluck('name','type');
|
||||||
|
$payment_type = Models\PaymentType::pluck('name', 'id');
|
||||||
|
$payment_status = ['paid' => 'Paid', 'unpaid' => 'Unpaid'];
|
||||||
|
|
||||||
|
$data = [
|
||||||
|
'page_title' => 'Edit Meeting Report',
|
||||||
|
'report_arr' => $report_arr,
|
||||||
|
'service' => $service,
|
||||||
|
'clients' => $clients,
|
||||||
|
'payment_type' => $payment_type,
|
||||||
|
'payment_status' => $payment_status
|
||||||
|
];
|
||||||
|
|
||||||
|
return view('report.edit', $data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Update the specified resource in storage.
|
||||||
|
*
|
||||||
|
* @param \Illuminate\Http\Request $request
|
||||||
|
* @param int $id
|
||||||
|
* @return \Illuminate\Http\Response
|
||||||
|
*/
|
||||||
|
public function update(Request $request, $id)
|
||||||
|
{
|
||||||
|
$request->validate([
|
||||||
|
'client' => 'required',
|
||||||
|
'service' => 'required',
|
||||||
|
'contact_person' => 'required',
|
||||||
|
'email' => 'required',
|
||||||
|
'discussion' => 'required',
|
||||||
|
'payment_type' => 'required',
|
||||||
|
'current_balance' => 'required',
|
||||||
|
'payment_status' => 'required',
|
||||||
|
]);
|
||||||
|
$report_update = Models\MeetingReport::find($id);
|
||||||
|
$report_update->client = $request->client;
|
||||||
|
$report_update->service = $request->service;
|
||||||
|
$report_update->contact_person = $request->contact_person;
|
||||||
|
$report_update->email = $request->email;
|
||||||
|
$report_update->discussion = $request->discussion;
|
||||||
|
$report_update->payment_type = $request->payment_type;
|
||||||
|
$report_update->current_balance = $request->current_balance;
|
||||||
|
$report_update->payment_status = $request->payment_status;
|
||||||
|
|
||||||
|
$report_update->auth_user_id = session('current_user.id');
|
||||||
|
|
||||||
|
$result = $report_update->save();
|
||||||
|
|
||||||
|
Session::flash('success_message', 'Report successfully Updated');
|
||||||
|
return redirect(url('reports'));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Remove the specified resource from storage.
|
||||||
|
*
|
||||||
|
* @param int $id
|
||||||
|
* @return \Illuminate\Http\Response
|
||||||
|
*/
|
||||||
|
public function destroy($id)
|
||||||
|
{
|
||||||
|
$result = Models\MeetingReport::destroy($id);
|
||||||
|
if (request()->ajax()) {
|
||||||
|
$result_arr = ['code' => 1];
|
||||||
|
return response()->json($result_arr);
|
||||||
|
}
|
||||||
|
Session::flash('success_message', 'Report successfully deleted!');
|
||||||
|
return redirect(route('reports.index'));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public function get_filter_ids($filter, $keyword)
|
||||||
|
{
|
||||||
|
switch ($filter) {
|
||||||
|
case 'client':
|
||||||
|
$id = Models\Client::where('name', 'like', "%$keyword%")->get(['id']);
|
||||||
|
if ($id->isEmpty()) {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
$step = json_decode($id);
|
||||||
|
$the_id = $step[0]->id;
|
||||||
|
return (count($step) > 0 ) ? $step[0]->id : "";
|
||||||
|
break;
|
||||||
|
case 'service':
|
||||||
|
$id = Models\MeetingReport::where('service', 'like', "%$keyword%")->get(['id']);
|
||||||
|
if ($id->isEmpty()) {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
$step = json_decode($id);
|
||||||
|
$the_id = $step[0]->id;
|
||||||
|
return (count($step) > 0 ) ? $step[0]->id : "";
|
||||||
|
break;
|
||||||
|
case 'contact_person':
|
||||||
|
$id = Models\MeetingReport::where('contact_person', 'like', "%$keyword%")->get(['id']);
|
||||||
|
if ($id->isEmpty()) {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
$step = json_decode($id);
|
||||||
|
$the_id = $step[0]->id;
|
||||||
|
return (count($step) > 0 ) ? $step[0]->id : "";
|
||||||
|
break;
|
||||||
|
case 'email':
|
||||||
|
$id = Models\MeetingReport::where('email', 'like', "%$keyword%")->get(['id']);
|
||||||
|
if ($id->isEmpty()) {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
$step = json_decode($id);
|
||||||
|
$the_id = $step[0]->id;
|
||||||
|
return (count($step) > 0 ) ? $step[0]->id : "";
|
||||||
|
break;
|
||||||
|
case 'discussion':
|
||||||
|
$id = Models\MeetingReport::where('discussion', 'like', "%$keyword%")->get(['id']);
|
||||||
|
if ($id->isEmpty()) {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
$step = json_decode($id);
|
||||||
|
$the_id = $step[0]->id;
|
||||||
|
return (count($step) > 0 ) ? $step[0]->id : "";
|
||||||
|
break;
|
||||||
|
case 'payment_type':
|
||||||
|
$id = Models\PaymentType::where('name', 'like', "%$keyword%")->get(['id']);
|
||||||
|
if ($id->isEmpty()) {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
$step = json_decode($id);
|
||||||
|
$the_id = $step[0]->id;
|
||||||
|
return (count($step) > 0 ) ? $step[0]->id : "";
|
||||||
|
break;
|
||||||
|
case 'current_balance':
|
||||||
|
$id = Models\MeetingReport::where('current_balance', 'like', "%$keyword%")->get(['id']);
|
||||||
|
if ($id->isEmpty()) {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
$step = json_decode($id);
|
||||||
|
$the_id = $step[0]->id;
|
||||||
|
return (count($step) > 0 ) ? $step[0]->id : "";
|
||||||
|
break;
|
||||||
|
case 'payment_status':
|
||||||
|
$id = Models\MeetingReport::where('payment_status', 'like', "%$keyword%")->get(['id']);
|
||||||
|
if ($id->isEmpty()) {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
$step = json_decode($id);
|
||||||
|
$the_id = $step[0]->id;
|
||||||
|
return (count($step) > 0 ) ? $step[0]->id : "";
|
||||||
|
break;
|
||||||
|
case 'sam_comment':
|
||||||
|
$id = Models\MeetingReport::where('sam_comment', 'like', "%$keyword%")->get(['id']);
|
||||||
|
if ($id->isEmpty()) {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
$step = json_decode($id);
|
||||||
|
return (count($step) > 0 ) ? $step[0]->id : "";
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
return '';
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
215
app/Http/Controllers/NetworkOperatorsController.php
Executable file
215
app/Http/Controllers/NetworkOperatorsController.php
Executable file
@@ -0,0 +1,215 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Controllers;
|
||||||
|
|
||||||
|
use Illuminate\Http\Request;
|
||||||
|
use App\Models;
|
||||||
|
use Session;
|
||||||
|
use Illuminate\Support\Arr;
|
||||||
|
|
||||||
|
|
||||||
|
class NetworkOperatorsController extends Controller
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Display a listing of the resource.
|
||||||
|
*
|
||||||
|
* @return \Illuminate\Http\Response
|
||||||
|
*/
|
||||||
|
public function index()
|
||||||
|
{
|
||||||
|
$network_operators = new Models\NetworkOps;
|
||||||
|
$table_columns = \DB::select(\DB::raw("show full columns from network_operators"));
|
||||||
|
$exclude_arr = [
|
||||||
|
'updated_at', 'id', 'account_manager_id', 'created_at'
|
||||||
|
];
|
||||||
|
$columns = [];
|
||||||
|
$queries = [];
|
||||||
|
foreach ($table_columns as $key) {
|
||||||
|
$columns[$key->Field] = $key->Field;
|
||||||
|
}
|
||||||
|
foreach ($columns as $col) {
|
||||||
|
if (request('filter') == $col) {
|
||||||
|
$filter = request('filter');
|
||||||
|
$keyword = request('keyword');
|
||||||
|
$table_arr = ['staff_id'];
|
||||||
|
if (in_array($col, $table_arr)) {
|
||||||
|
$key = $this->get_filter_ids($filter, $keyword);
|
||||||
|
if (!empty($key)) {
|
||||||
|
$keyword = $key;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$network_operators = $network_operators->where($col, 'like', '%'.$keyword.'%');
|
||||||
|
$queries[$col] = request('keyword');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$network_operators = $network_operators->with('account_manager_info', 'country_info')->orderBy('created_at', 'DESC')->paginate(40)->appends($queries);
|
||||||
|
$data = [
|
||||||
|
'page_title' => 'Network Operators',
|
||||||
|
'columns' => Arr::except($columns, $exclude_arr),
|
||||||
|
'network_operators' => $network_operators
|
||||||
|
];
|
||||||
|
|
||||||
|
return view('network_ops.index', $data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Show the form for creating a new resource.
|
||||||
|
*
|
||||||
|
* @return \Illuminate\Http\Response
|
||||||
|
*/
|
||||||
|
public function create()
|
||||||
|
{
|
||||||
|
$countries = Models\Country::pluck('en_short_name','alpha_2_code');
|
||||||
|
$account_manager = Models\SystemUser::pluck('name', 'id');
|
||||||
|
$data = [
|
||||||
|
'page_title' => 'Create Network Operator',
|
||||||
|
'countries'=> $countries,
|
||||||
|
'account_manager' => $account_manager
|
||||||
|
];
|
||||||
|
|
||||||
|
return view('network_ops.create', $data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Store a newly created resource in storage.
|
||||||
|
*
|
||||||
|
* @param \Illuminate\Http\Request $request
|
||||||
|
* @return \Illuminate\Http\Response
|
||||||
|
*/
|
||||||
|
public function store(Request $request)
|
||||||
|
{
|
||||||
|
$request->validate([
|
||||||
|
'name' => 'required',
|
||||||
|
'country' => 'required',
|
||||||
|
'account_manager_id' => 'required',
|
||||||
|
]);
|
||||||
|
|
||||||
|
$operator_arr = [
|
||||||
|
'name' => $request->name,
|
||||||
|
'country' => $request->country,
|
||||||
|
'account_manager_id' => $request->account_manager_id
|
||||||
|
];
|
||||||
|
$saved = Models\NetworkOps::create($operator_arr);
|
||||||
|
Session::flash('success_message', 'Network Operator successfully added');
|
||||||
|
return redirect(url('network_ops'));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Display the specified resource.
|
||||||
|
*
|
||||||
|
* @param int $id
|
||||||
|
* @return \Illuminate\Http\Response
|
||||||
|
*/
|
||||||
|
public function show($id)
|
||||||
|
{
|
||||||
|
$operator_arr = Models\NetworkOps::find($id);
|
||||||
|
$data = [
|
||||||
|
'page_title' => 'Network Operator Show',
|
||||||
|
'operator_arr' => $operator_arr
|
||||||
|
];
|
||||||
|
|
||||||
|
return view('network_ops.show', $data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Show the form for editing the specified resource.
|
||||||
|
*
|
||||||
|
* @param int $id
|
||||||
|
* @return \Illuminate\Http\Response
|
||||||
|
*/
|
||||||
|
public function edit($id)
|
||||||
|
{
|
||||||
|
$network_arr = Models\NetworkOps::findOrFail($id);
|
||||||
|
$countries = Models\Country::pluck('en_short_name','alpha_2_code');
|
||||||
|
$account_manager = Models\SystemUser::pluck('name', 'id');
|
||||||
|
|
||||||
|
$data = [
|
||||||
|
'page_title' => 'Edit Network Operator',
|
||||||
|
'network_arr' => $network_arr,
|
||||||
|
'countries'=> $countries,
|
||||||
|
'account_manager' => $account_manager
|
||||||
|
];
|
||||||
|
|
||||||
|
return view('network_ops.edit', $data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Update the specified resource in storage.
|
||||||
|
*
|
||||||
|
* @param \Illuminate\Http\Request $request
|
||||||
|
* @param int $id
|
||||||
|
* @return \Illuminate\Http\Response
|
||||||
|
*/
|
||||||
|
public function update(Request $request, $id)
|
||||||
|
{
|
||||||
|
$request->validate([
|
||||||
|
'name' => 'required',
|
||||||
|
'country' => 'required',
|
||||||
|
'account_manager_id' => 'required',
|
||||||
|
]);
|
||||||
|
|
||||||
|
$operator_update = Models\NetworkOps::find($id);
|
||||||
|
$operator_update->name = $request->name;
|
||||||
|
$operator_update->country = $request->country;
|
||||||
|
$operator_update->account_manager_id = $request->account_manager_id;
|
||||||
|
$result = $operator_update->save();
|
||||||
|
|
||||||
|
Session::flash('success_message', 'Network Operator successfully Updated');
|
||||||
|
return redirect(url('network_ops'));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Remove the specified resource from storage.
|
||||||
|
*
|
||||||
|
* @param int $id
|
||||||
|
* @return \Illuminate\Http\Response
|
||||||
|
*/
|
||||||
|
public function destroy($id)
|
||||||
|
{
|
||||||
|
$result = Models\NetworkOps::destroy($id);
|
||||||
|
if (request()->ajax()) {
|
||||||
|
$result_arr = ['code' => 1];
|
||||||
|
return response()->json($result_arr);
|
||||||
|
}
|
||||||
|
Session::flash('success_message', 'Network Operator successfully deleted!');
|
||||||
|
return redirect(route('network_ops.index'));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public function get_filter_ids($filter, $keyword){
|
||||||
|
switch ($filter) {
|
||||||
|
case 'name':
|
||||||
|
$id = Models\NetworkOps::where('name', 'like', "%$keyword%")->get(['id']);
|
||||||
|
if ($id->isEmpty()) {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
$step = json_decode($id);
|
||||||
|
$the_id = $step[0]->id;
|
||||||
|
return (count($step) > 0 ) ? $step[0]->id : "";
|
||||||
|
break;
|
||||||
|
case 'country':
|
||||||
|
$id = Models\Country::where('alpha_2_code', 'like', "%$keyword%")->orWhere('alpha_3_code', 'like', "%$keyword%")->orWhere('en_short_name', 'like', "%$keyword%")->get(['id']);
|
||||||
|
if ($id->isEmpty()) {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
$step = json_decode($id);
|
||||||
|
$the_id = $step[0]->id;
|
||||||
|
return (count($step) > 0 ) ? $step[0]->id : "";
|
||||||
|
break;
|
||||||
|
case 'account_manager_id':
|
||||||
|
$id = Models\SyatemUser::where('name', 'like', "%$keyword%")->get(['id']);
|
||||||
|
if ($id->isEmpty()) {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
$step = json_decode($id);
|
||||||
|
$the_id = $step[0]->id;
|
||||||
|
return (count($step) > 0 ) ? $step[0]->id : "";
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
return '';
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
201
app/Http/Controllers/ServicesController.php
Executable file
201
app/Http/Controllers/ServicesController.php
Executable file
@@ -0,0 +1,201 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Controllers;
|
||||||
|
|
||||||
|
use Illuminate\Http\Request;
|
||||||
|
use App\Models;
|
||||||
|
use Session;
|
||||||
|
use Illuminate\Support\Arr;
|
||||||
|
|
||||||
|
|
||||||
|
class ServicesController extends Controller
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Display a listing of the resource.
|
||||||
|
*
|
||||||
|
* @return \Illuminate\Http\Response
|
||||||
|
*/
|
||||||
|
public function index()
|
||||||
|
{
|
||||||
|
$service_arr = new Models\Service;
|
||||||
|
$table_columns = \DB::select(\DB::raw("show full columns from services"));
|
||||||
|
$exclude_arr = [
|
||||||
|
'updated_at', 'id'
|
||||||
|
];
|
||||||
|
$columns = [];
|
||||||
|
$queries = [];
|
||||||
|
foreach ($table_columns as $key) {
|
||||||
|
$columns[$key->Field] = $key->Field;
|
||||||
|
}
|
||||||
|
foreach ($columns as $col) {
|
||||||
|
if (request('filter') == $col) {
|
||||||
|
$filter = request('filter');
|
||||||
|
$keyword = request('keyword');
|
||||||
|
$table_arr = ['staff_id'];
|
||||||
|
if (in_array($col, $table_arr)) {
|
||||||
|
$key = $this->get_filter_ids($filter, $keyword);
|
||||||
|
if (!empty($key)) {
|
||||||
|
$keyword = $key;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$service_arr = $service_arr->where($col, 'like', '%'.$keyword.'%');
|
||||||
|
$queries[$col] = request('keyword');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$service_arr = $service_arr->orderBy('created_at', 'DESC')->paginate(40)->appends($queries);
|
||||||
|
|
||||||
|
$data = [
|
||||||
|
'page_title' => 'Services',
|
||||||
|
'columns' => Arr::except($columns, $exclude_arr),
|
||||||
|
'service_arr' => $service_arr
|
||||||
|
];
|
||||||
|
|
||||||
|
return view('service.index', $data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Show the form for creating a new resource.
|
||||||
|
*
|
||||||
|
* @return \Illuminate\Http\Response
|
||||||
|
*/
|
||||||
|
public function create()
|
||||||
|
{
|
||||||
|
$service_type = ['regular' => 'Regular', 'advanced' => 'Advanced'];
|
||||||
|
$data = [
|
||||||
|
'page_title' => 'Create Service',
|
||||||
|
'service_type' => $service_type
|
||||||
|
];
|
||||||
|
|
||||||
|
return view('service.create', $data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Store a newly created resource in storage.
|
||||||
|
*
|
||||||
|
* @param \Illuminate\Http\Request $request
|
||||||
|
* @return \Illuminate\Http\Response
|
||||||
|
*/
|
||||||
|
public function store(Request $request)
|
||||||
|
{
|
||||||
|
$request->validate([
|
||||||
|
'name' => 'required',
|
||||||
|
'type' => 'required',
|
||||||
|
]);
|
||||||
|
|
||||||
|
$service_arr = [
|
||||||
|
'name' => $request->name,
|
||||||
|
'type' => $request->type
|
||||||
|
];
|
||||||
|
$saved = Models\Service::create($service_arr);
|
||||||
|
Session::flash('success_message', 'Service successfully added');
|
||||||
|
return redirect(url('services'));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Display the specified resource.
|
||||||
|
*
|
||||||
|
* @param int $id
|
||||||
|
* @return \Illuminate\Http\Response
|
||||||
|
*/
|
||||||
|
public function show($id)
|
||||||
|
{
|
||||||
|
|
||||||
|
$showservice = Models\Service::find($id);
|
||||||
|
$data = [
|
||||||
|
'page_title' => 'Show Service',
|
||||||
|
'showservice' => $showservice
|
||||||
|
];
|
||||||
|
|
||||||
|
return view('service.show', $data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Show the form for editing the specified resource.
|
||||||
|
*
|
||||||
|
* @param int $id
|
||||||
|
* @return \Illuminate\Http\Response
|
||||||
|
*/
|
||||||
|
public function edit($id)
|
||||||
|
{
|
||||||
|
$service_arr = Models\Service::findOrFail($id);
|
||||||
|
$service_type = ['regular' => 'Regular', 'advanced' => 'Advanced'];
|
||||||
|
|
||||||
|
$data = [
|
||||||
|
'page_title' => 'Edit Service',
|
||||||
|
'service_arr' => $service_arr,
|
||||||
|
'service_type' => $service_type
|
||||||
|
];
|
||||||
|
|
||||||
|
return view('service.edit', $data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Update the specified resource in storage.
|
||||||
|
*
|
||||||
|
* @param \Illuminate\Http\Request $request
|
||||||
|
* @param int $id
|
||||||
|
* @return \Illuminate\Http\Response
|
||||||
|
*/
|
||||||
|
public function update(Request $request, $id)
|
||||||
|
{
|
||||||
|
$request->validate([
|
||||||
|
'name' => 'required',
|
||||||
|
'type' => 'required',
|
||||||
|
]);
|
||||||
|
|
||||||
|
$service_update = Models\Service::find($id);
|
||||||
|
$service_update->name = $request->name;
|
||||||
|
$operator_update->type = $request->type;
|
||||||
|
$result = $service_update->save();
|
||||||
|
|
||||||
|
Session::flash('success_message', 'Service successfully Updated');
|
||||||
|
return redirect(url('services'));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Remove the specified resource from storage.
|
||||||
|
*
|
||||||
|
* @param int $id
|
||||||
|
* @return \Illuminate\Http\Response
|
||||||
|
*/
|
||||||
|
public function destroy($id)
|
||||||
|
{
|
||||||
|
$result = Models\Service::destroy($id);
|
||||||
|
if (request()->ajax()) {
|
||||||
|
$result_arr = ['code' => 1];
|
||||||
|
return response()->json($result_arr);
|
||||||
|
}
|
||||||
|
Session::flash('success_message', 'Service successfully deleted!');
|
||||||
|
return redirect(route('services.index'));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public function get_filter_ids($filter, $keyword)
|
||||||
|
{
|
||||||
|
switch ($filter) {
|
||||||
|
case 'name':
|
||||||
|
$id = Models\Service::where('name', 'like', "%$keyword%")->get(['id']);
|
||||||
|
if ($id->isEmpty()) {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
$step = json_decode($id);
|
||||||
|
$the_id = $step[0]->id;
|
||||||
|
return (count($step) > 0 ) ? $step[0]->id : "";
|
||||||
|
break;
|
||||||
|
case 'type':
|
||||||
|
$id = Models\Service::where('type', 'like', "%$keyword%")->get(['id']);
|
||||||
|
if ($id->isEmpty()) {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
$step = json_decode($id);
|
||||||
|
$the_id = $step[0]->id;
|
||||||
|
return (count($step) > 0 ) ? $step[0]->id : "";
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
return '';
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
237
app/Http/Controllers/SystemUsersController.php
Executable file
237
app/Http/Controllers/SystemUsersController.php
Executable file
@@ -0,0 +1,237 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Controllers;
|
||||||
|
|
||||||
|
use Illuminate\Http\Request;
|
||||||
|
use App\Models;
|
||||||
|
use Session;
|
||||||
|
use Illuminate\Support\Arr;
|
||||||
|
|
||||||
|
|
||||||
|
class SystemUsersController extends Controller
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Display a listing of the resource.
|
||||||
|
*
|
||||||
|
* @return \Illuminate\Http\Response
|
||||||
|
*/
|
||||||
|
public function index()
|
||||||
|
{
|
||||||
|
$allusers = new Models\SystemUser;
|
||||||
|
$table_columns = \DB::select(\DB::raw("show full columns from auth_users"));
|
||||||
|
$exclude_arr = [
|
||||||
|
'updated_at', 'id', 'password'
|
||||||
|
];
|
||||||
|
$columns = [];
|
||||||
|
$queries = [];
|
||||||
|
foreach ($table_columns as $key) {
|
||||||
|
$columns[$key->Field] = $key->Field;
|
||||||
|
}
|
||||||
|
foreach ($columns as $col) {
|
||||||
|
if (request('filter') == $col) {
|
||||||
|
$filter = request('filter');
|
||||||
|
$keyword = request('keyword');
|
||||||
|
$table_arr = ['staff_id'];
|
||||||
|
if (in_array($col, $table_arr)) {
|
||||||
|
$key = $this->get_filter_ids($filter, $keyword);
|
||||||
|
if (!empty($key)) {
|
||||||
|
$keyword = $key;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$allusers = $allusers->where($col, 'like', '%'.$keyword.'%');
|
||||||
|
$queries[$col] = request('keyword');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$allusers = $allusers->orderBy('created_at', 'DESC')->paginate(40)->appends($queries);
|
||||||
|
|
||||||
|
$data = [
|
||||||
|
'page_title' => 'Users',
|
||||||
|
'columns' => Arr::except($columns, $exclude_arr),
|
||||||
|
'allusers' => $allusers
|
||||||
|
];
|
||||||
|
|
||||||
|
return view('account.index', $data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Show the form for creating a new resource.
|
||||||
|
*
|
||||||
|
* @return \Illuminate\Http\Response
|
||||||
|
*/
|
||||||
|
public function create()
|
||||||
|
{
|
||||||
|
$designation = Models\Designation::pluck('name', 'id');
|
||||||
|
$data = [
|
||||||
|
'page_title' => 'Create Users',
|
||||||
|
'designation' => $designation
|
||||||
|
];
|
||||||
|
|
||||||
|
return view('account.create', $data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Store a newly created resource in storage.
|
||||||
|
*
|
||||||
|
* @param \Illuminate\Http\Request $request
|
||||||
|
* @return \Illuminate\Http\Response
|
||||||
|
*/
|
||||||
|
public function store(Request $request)
|
||||||
|
{
|
||||||
|
$request->validate([
|
||||||
|
'name' => 'required',
|
||||||
|
'designation' => 'required',
|
||||||
|
'email' => 'required',
|
||||||
|
// 'phone' => 'required',
|
||||||
|
'password' => 'required',
|
||||||
|
'confirm_password' => 'same:password',
|
||||||
|
|
||||||
|
]);
|
||||||
|
|
||||||
|
$make_account = [
|
||||||
|
'name' => $request->name,
|
||||||
|
'designation' => $request->designation,
|
||||||
|
'email' => $request->email,
|
||||||
|
// 'phone' => $request->phone,
|
||||||
|
'password' => md5($request->password)
|
||||||
|
];
|
||||||
|
|
||||||
|
$inserted = Models\Account::create($make_account);
|
||||||
|
Session::flash('success_message', 'Account successfully added');
|
||||||
|
return redirect(url('accountmanagers'));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Display the specified resource.
|
||||||
|
*
|
||||||
|
* @param int $id
|
||||||
|
* @return \Illuminate\Http\Response
|
||||||
|
*/
|
||||||
|
public function show($id)
|
||||||
|
{
|
||||||
|
$account_arr = Models\Account::find($id);
|
||||||
|
$data = [
|
||||||
|
'page_title' => 'Show Service',
|
||||||
|
'account_arr' => $account_arr
|
||||||
|
];
|
||||||
|
|
||||||
|
return view('account.show', $data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Show the form for editing the specified resource.
|
||||||
|
*
|
||||||
|
* @param int $id
|
||||||
|
* @return \Illuminate\Http\Response
|
||||||
|
*/
|
||||||
|
public function edit($id)
|
||||||
|
{
|
||||||
|
$designation = Models\Designation::pluck('name', 'id');
|
||||||
|
$account_arr = Models\SystemUser::find($id);
|
||||||
|
$data = [
|
||||||
|
'page_title' => 'Edit Users',
|
||||||
|
'designation' => $designation,
|
||||||
|
'account_arr' => $account_arr
|
||||||
|
];
|
||||||
|
|
||||||
|
return view('account.edit', $data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Update the specified resource in storage.
|
||||||
|
*
|
||||||
|
* @param \Illuminate\Http\Request $request
|
||||||
|
* @param int $id
|
||||||
|
* @return \Illuminate\Http\Response
|
||||||
|
*/
|
||||||
|
public function update(Request $request, $id)
|
||||||
|
{
|
||||||
|
$account_arr = Models\Account::find($id);
|
||||||
|
$account_arr->name = $request->name;
|
||||||
|
$account_arr->designation = $request->designation;
|
||||||
|
$account_arr->email = $request->email;
|
||||||
|
// $account_arr->phone = $request->phone;
|
||||||
|
$account_arr->password = md5($request->password);
|
||||||
|
$account_arr->save();
|
||||||
|
Session::flash('success_message', 'Account successfully Updated');
|
||||||
|
return redirect(url('accountmanagers'));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Remove the specified resource from storage.
|
||||||
|
*
|
||||||
|
* @param int $id
|
||||||
|
* @return \Illuminate\Http\Response
|
||||||
|
*/
|
||||||
|
public function destroy($id)
|
||||||
|
{
|
||||||
|
$result = Models\Account::destroy($id);
|
||||||
|
if (request()->ajax()) {
|
||||||
|
$result_arr = ['code' => 1];
|
||||||
|
return response()->json($result_arr);
|
||||||
|
}
|
||||||
|
Session::flash('success_message', 'Account successfully deleted!');
|
||||||
|
return redirect(route('accounts.index'));
|
||||||
|
}
|
||||||
|
|
||||||
|
// public function showRegisterPage()
|
||||||
|
// {
|
||||||
|
// $designation = Models\Designation::pluck('name', 'id');
|
||||||
|
// $data = [
|
||||||
|
// 'page_title' => 'Register User',
|
||||||
|
// 'designation' => $designation
|
||||||
|
// ];
|
||||||
|
// // dd($data);
|
||||||
|
|
||||||
|
// return view('account.register', $data);
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public function get_filter_ids($filter, $keyword)
|
||||||
|
{
|
||||||
|
switch ($filter) {
|
||||||
|
case 'name':
|
||||||
|
$id = Models\SystemUser::where('name', 'like', "%$keyword%")->get(['id']);
|
||||||
|
if ($id->isEmpty()) {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
$step = json_decode($id);
|
||||||
|
$the_id = $step[0]->id;
|
||||||
|
return (count($step) > 0 ) ? $step[0]->id : "";
|
||||||
|
break;
|
||||||
|
case 'designation':
|
||||||
|
$id = Models\SystemUser::where('designation', 'like', "%$keyword%")->get(['id']);
|
||||||
|
if ($id->isEmpty()) {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
$step = json_decode($id);
|
||||||
|
$the_id = $step[0]->id;
|
||||||
|
return (count($step) > 0 ) ? $step[0]->id : "";
|
||||||
|
break;
|
||||||
|
case 'email':
|
||||||
|
$id = Models\SystemUser::where('email', 'like', "%$keyword%")->get(['id']);
|
||||||
|
if ($id->isEmpty()) {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
$step = json_decode($id);
|
||||||
|
$the_id = $step[0]->id;
|
||||||
|
return (count($step) > 0 ) ? $step[0]->id : "";
|
||||||
|
break;
|
||||||
|
case 'phone':
|
||||||
|
$id = Models\SystemUser::where('phone', 'like', "%$keyword%")->get(['id']);
|
||||||
|
if ($id->isEmpty()) {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
$step = json_decode($id);
|
||||||
|
$the_id = $step[0]->id;
|
||||||
|
return (count($step) > 0 ) ? $step[0]->id : "";
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
return '';
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
108
app/Http/Controllers/UssdClientsPaymentsController.php
Executable file
108
app/Http/Controllers/UssdClientsPaymentsController.php
Executable file
@@ -0,0 +1,108 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Controllers;
|
||||||
|
|
||||||
|
use App\Models;
|
||||||
|
use Session;
|
||||||
|
use Illuminate\Http\Request;
|
||||||
|
use DB;
|
||||||
|
|
||||||
|
class UssdClientsPaymentsController extends Controller
|
||||||
|
{
|
||||||
|
public function index(Request $request)
|
||||||
|
{
|
||||||
|
$columns = [
|
||||||
|
'payment_type' => 'Payment Type',
|
||||||
|
'name' => 'Client Name',
|
||||||
|
'client_email' => 'Client Email',
|
||||||
|
'account_mgr' => 'Account Manager',
|
||||||
|
];
|
||||||
|
|
||||||
|
$clients = Models\UssdClientPayment::with('client_info');
|
||||||
|
$account_managers = Models\SystemUser::pluck('name', 'id');
|
||||||
|
|
||||||
|
if (!empty($request->filter) && !empty($request->keyword)) {
|
||||||
|
$clients = $this->resolveClientQuery($clients, $request);
|
||||||
|
}
|
||||||
|
|
||||||
|
$clients = $clients->orderBy('ussd_client_payments.created_at', 'DESC')->paginate(20);
|
||||||
|
|
||||||
|
$data = [
|
||||||
|
'page_title' => 'Ussd Clients Payments',
|
||||||
|
'client_arr' => $clients,
|
||||||
|
'account_managers' => $account_managers,
|
||||||
|
'columns' => $columns
|
||||||
|
];
|
||||||
|
return view('ussdclients.index', $data);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public function edit($id)
|
||||||
|
{
|
||||||
|
$client = Models\UssdClientPayment::find($id);
|
||||||
|
|
||||||
|
$data = [
|
||||||
|
'client' => $client,
|
||||||
|
];
|
||||||
|
return view('ussdclients.edit', $data);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public function show($id)
|
||||||
|
{
|
||||||
|
$client = Models\UssdClientPayment::find($id);
|
||||||
|
$data = [
|
||||||
|
'client' => $client,
|
||||||
|
];
|
||||||
|
return view('ussdclients.edit', $data);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public function update(Request $request, $id)
|
||||||
|
{
|
||||||
|
|
||||||
|
$request->validate([
|
||||||
|
'amount_paid' => 'required|numeric',
|
||||||
|
'payment_type' => 'required',
|
||||||
|
'remarks' => 'sometimes',
|
||||||
|
]);
|
||||||
|
$ussd_client = Models\UssdClientPayment::find($id);
|
||||||
|
|
||||||
|
|
||||||
|
$ussd_client->payment_type = $request->payment_type;
|
||||||
|
$ussd_client->amount_paid = $request->amount_paid;
|
||||||
|
$ussd_client->remarks = $request->remarks;
|
||||||
|
$ussd_client->last_modified_by_id = session('current_user.id');
|
||||||
|
|
||||||
|
$result = $ussd_client->save();
|
||||||
|
|
||||||
|
Session::flash('success_message', 'Client successfully Updated');
|
||||||
|
return redirect(url('ussdclients'));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public function resolveClientQuery($clients, $request)
|
||||||
|
{
|
||||||
|
switch ($request->filter) {
|
||||||
|
case 'name':
|
||||||
|
return $clients
|
||||||
|
->join('clients', 'clients.id', '=', 'ussd_client_payments.client_id')
|
||||||
|
->where('clients.name', 'like', "%$request->keyword%");
|
||||||
|
break;
|
||||||
|
case 'client_email':
|
||||||
|
return $clients
|
||||||
|
->join('clients', 'clients.id', '=', 'ussd_client_payments.client_id')
|
||||||
|
->where('clients.email', 'like', "%$request->keyword%");
|
||||||
|
break;
|
||||||
|
case 'account_mgr':
|
||||||
|
return $clients
|
||||||
|
->join('clients', 'clients.id', '=', 'ussd_client_payments.client_id')
|
||||||
|
->join('auth_users', 'auth_users.id', '=', 'clients.auth_user_id')
|
||||||
|
->where('auth_users.name', 'like', "%$request->keyword%");
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
# code...
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
15
app/Http/Controllers/UssdDashboardController.php
Executable file
15
app/Http/Controllers/UssdDashboardController.php
Executable file
@@ -0,0 +1,15 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Controllers;
|
||||||
|
|
||||||
|
use Illuminate\Http\Request;
|
||||||
|
|
||||||
|
class UssdDashboardController extends Controller
|
||||||
|
{
|
||||||
|
public function index(){
|
||||||
|
$data = [
|
||||||
|
'page_title' => 'Dashboard'
|
||||||
|
];
|
||||||
|
return view('ussddashboard.index', $data);
|
||||||
|
}
|
||||||
|
}
|
||||||
62
app/Http/Kernel.php
Executable file
62
app/Http/Kernel.php
Executable file
@@ -0,0 +1,62 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http;
|
||||||
|
|
||||||
|
use Illuminate\Foundation\Http\Kernel as HttpKernel;
|
||||||
|
|
||||||
|
class Kernel extends HttpKernel
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* The application's global HTTP middleware stack.
|
||||||
|
*
|
||||||
|
* These middleware are run during every request to your application.
|
||||||
|
*
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
|
protected $middleware = [
|
||||||
|
\Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode::class,
|
||||||
|
\Illuminate\Foundation\Http\Middleware\ValidatePostSize::class,
|
||||||
|
\App\Http\Middleware\TrimStrings::class,
|
||||||
|
\Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull::class,
|
||||||
|
\App\Http\Middleware\TrustProxies::class,
|
||||||
|
];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The application's route middleware groups.
|
||||||
|
*
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
|
protected $middlewareGroups = [
|
||||||
|
'web' => [
|
||||||
|
\App\Http\Middleware\EncryptCookies::class,
|
||||||
|
\Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
|
||||||
|
\Illuminate\Session\Middleware\StartSession::class,
|
||||||
|
// \Illuminate\Session\Middleware\AuthenticateSession::class,
|
||||||
|
\Illuminate\View\Middleware\ShareErrorsFromSession::class,
|
||||||
|
\App\Http\Middleware\VerifyCsrfToken::class,
|
||||||
|
\Illuminate\Routing\Middleware\SubstituteBindings::class,
|
||||||
|
],
|
||||||
|
|
||||||
|
'api' => [
|
||||||
|
'throttle:60,1',
|
||||||
|
'bindings',
|
||||||
|
],
|
||||||
|
];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The application's route middleware.
|
||||||
|
*
|
||||||
|
* These middleware may be assigned to groups or used individually.
|
||||||
|
*
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
|
protected $routeMiddleware = [
|
||||||
|
'auth' => \Illuminate\Auth\Middleware\Authenticate::class,
|
||||||
|
'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class,
|
||||||
|
'bindings' => \Illuminate\Routing\Middleware\SubstituteBindings::class,
|
||||||
|
'can' => \Illuminate\Auth\Middleware\Authorize::class,
|
||||||
|
'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class,
|
||||||
|
'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class,
|
||||||
|
'checklogin' => \App\Http\Middleware\CheckLogin::class,
|
||||||
|
];
|
||||||
|
}
|
||||||
23
app/Http/Middleware/CheckLogin.php
Executable file
23
app/Http/Middleware/CheckLogin.php
Executable file
@@ -0,0 +1,23 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Middleware;
|
||||||
|
|
||||||
|
use Closure;
|
||||||
|
|
||||||
|
class CheckLogin
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Handle an incoming request.
|
||||||
|
*
|
||||||
|
* @param \Illuminate\Http\Request $request
|
||||||
|
* @param \Closure $next
|
||||||
|
* @return mixed
|
||||||
|
*/
|
||||||
|
public function handle($request, Closure $next)
|
||||||
|
{
|
||||||
|
if(!$request->session()->has('current_user')){
|
||||||
|
return redirect(url('login'))->withErrors("You need to be logged in");
|
||||||
|
}
|
||||||
|
return $next($request);
|
||||||
|
}
|
||||||
|
}
|
||||||
17
app/Http/Middleware/EncryptCookies.php
Executable file
17
app/Http/Middleware/EncryptCookies.php
Executable file
@@ -0,0 +1,17 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Middleware;
|
||||||
|
|
||||||
|
use Illuminate\Cookie\Middleware\EncryptCookies as Middleware;
|
||||||
|
|
||||||
|
class EncryptCookies extends Middleware
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* The names of the cookies that should not be encrypted.
|
||||||
|
*
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
|
protected $except = [
|
||||||
|
//
|
||||||
|
];
|
||||||
|
}
|
||||||
26
app/Http/Middleware/RedirectIfAuthenticated.php
Executable file
26
app/Http/Middleware/RedirectIfAuthenticated.php
Executable file
@@ -0,0 +1,26 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Middleware;
|
||||||
|
|
||||||
|
use Closure;
|
||||||
|
use Illuminate\Support\Facades\Auth;
|
||||||
|
|
||||||
|
class RedirectIfAuthenticated
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Handle an incoming request.
|
||||||
|
*
|
||||||
|
* @param \Illuminate\Http\Request $request
|
||||||
|
* @param \Closure $next
|
||||||
|
* @param string|null $guard
|
||||||
|
* @return mixed
|
||||||
|
*/
|
||||||
|
public function handle($request, Closure $next, $guard = null)
|
||||||
|
{
|
||||||
|
if (Auth::guard($guard)->check()) {
|
||||||
|
return redirect('/home');
|
||||||
|
}
|
||||||
|
|
||||||
|
return $next($request);
|
||||||
|
}
|
||||||
|
}
|
||||||
18
app/Http/Middleware/TrimStrings.php
Executable file
18
app/Http/Middleware/TrimStrings.php
Executable file
@@ -0,0 +1,18 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Middleware;
|
||||||
|
|
||||||
|
use Illuminate\Foundation\Http\Middleware\TrimStrings as Middleware;
|
||||||
|
|
||||||
|
class TrimStrings extends Middleware
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* The names of the attributes that should not be trimmed.
|
||||||
|
*
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
|
protected $except = [
|
||||||
|
'password',
|
||||||
|
'password_confirmation',
|
||||||
|
];
|
||||||
|
}
|
||||||
29
app/Http/Middleware/TrustProxies.php
Executable file
29
app/Http/Middleware/TrustProxies.php
Executable file
@@ -0,0 +1,29 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Middleware;
|
||||||
|
|
||||||
|
use Illuminate\Http\Request;
|
||||||
|
use Fideloper\Proxy\TrustProxies as Middleware;
|
||||||
|
|
||||||
|
class TrustProxies extends Middleware
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* The trusted proxies for this application.
|
||||||
|
*
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
|
protected $proxies;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The current proxy header mappings.
|
||||||
|
*
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
|
protected $headers = [
|
||||||
|
Request::HEADER_FORWARDED => 'FORWARDED',
|
||||||
|
Request::HEADER_X_FORWARDED_FOR => 'X_FORWARDED_FOR',
|
||||||
|
Request::HEADER_X_FORWARDED_HOST => 'X_FORWARDED_HOST',
|
||||||
|
Request::HEADER_X_FORWARDED_PORT => 'X_FORWARDED_PORT',
|
||||||
|
Request::HEADER_X_FORWARDED_PROTO => 'X_FORWARDED_PROTO',
|
||||||
|
];
|
||||||
|
}
|
||||||
17
app/Http/Middleware/VerifyCsrfToken.php
Executable file
17
app/Http/Middleware/VerifyCsrfToken.php
Executable file
@@ -0,0 +1,17 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Middleware;
|
||||||
|
|
||||||
|
use Illuminate\Foundation\Http\Middleware\VerifyCsrfToken as Middleware;
|
||||||
|
|
||||||
|
class VerifyCsrfToken extends Middleware
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* The URIs that should be excluded from CSRF verification.
|
||||||
|
*
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
|
protected $except = [
|
||||||
|
//
|
||||||
|
];
|
||||||
|
}
|
||||||
58
app/Jobs/SendNewUssdClientEmail.php
Executable file
58
app/Jobs/SendNewUssdClientEmail.php
Executable file
@@ -0,0 +1,58 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Jobs;
|
||||||
|
|
||||||
|
use App\Models;
|
||||||
|
use Illuminate\Bus\Queueable;
|
||||||
|
use Illuminate\Queue\SerializesModels;
|
||||||
|
use Illuminate\Queue\InteractsWithQueue;
|
||||||
|
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||||
|
use Illuminate\Foundation\Bus\Dispatchable;
|
||||||
|
use Illuminate\Contracts\Mail\Mailer;
|
||||||
|
|
||||||
|
class SendNewUssdClientEmail implements ShouldQueue
|
||||||
|
{
|
||||||
|
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
|
||||||
|
protected $ussd_client;
|
||||||
|
/**
|
||||||
|
* Create a new job instance.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function __construct(Models\Client $client)
|
||||||
|
{
|
||||||
|
$this->ussd_client = $client;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Execute the job.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function handle(Mailer $mailer)
|
||||||
|
{
|
||||||
|
$client = $this->ussd_client;
|
||||||
|
$emails = ['jim@click-mobile.com', 'priscilla@click-mobile.com','samuel@click-mobile.com'];
|
||||||
|
$name = ucwords($client->name);
|
||||||
|
$status = $client->status;
|
||||||
|
$data = [
|
||||||
|
'email' => strtolower($client->email),
|
||||||
|
'name' => $name,
|
||||||
|
'status' => $status
|
||||||
|
];
|
||||||
|
$mailer->send('emails.new_ussd_client', $data, function ($message) use ($data, $emails) {
|
||||||
|
$message->from('support@click-mobile.com', 'Click Mobile Account Manager Tracker');
|
||||||
|
$message->to($emails)->subject('New USSD Client Details');
|
||||||
|
});
|
||||||
|
|
||||||
|
/*
|
||||||
|
$emails = ['myoneemail@esomething.com', 'myother@esomething.com','myother2@esomething.com'];
|
||||||
|
|
||||||
|
Mail::send('emails.welcome', [], function($message) use ($emails)
|
||||||
|
{
|
||||||
|
$message->to($emails)->subject('This is test e-mail');
|
||||||
|
});
|
||||||
|
*/
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
49
app/Jobs/SendUssdClientActiveEmail.php
Executable file
49
app/Jobs/SendUssdClientActiveEmail.php
Executable file
@@ -0,0 +1,49 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Jobs;
|
||||||
|
|
||||||
|
use App\Models;
|
||||||
|
use Illuminate\Bus\Queueable;
|
||||||
|
use Illuminate\Queue\SerializesModels;
|
||||||
|
use Illuminate\Queue\InteractsWithQueue;
|
||||||
|
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||||
|
use Illuminate\Foundation\Bus\Dispatchable;
|
||||||
|
use Illuminate\Contracts\Mail\Mailer;
|
||||||
|
|
||||||
|
class SendUssdClientActiveEmail implements ShouldQueue
|
||||||
|
{
|
||||||
|
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
|
||||||
|
protected $ussd_client;
|
||||||
|
/**
|
||||||
|
* Create a new job instance.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function __construct(Models\Client $client)
|
||||||
|
{
|
||||||
|
$this->ussd_client = $client;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Execute the job.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function handle(Mailer $mailer)
|
||||||
|
{
|
||||||
|
$client = $this->ussd_client;
|
||||||
|
$emails = ['jim@click-mobile.com', 'priscilla@click-mobile.com','samuel@click-mobile.com'];
|
||||||
|
$name = ucwords($client->name);
|
||||||
|
$status = $client->status;
|
||||||
|
$data = [
|
||||||
|
'email' => strtolower($client->email),
|
||||||
|
'name' => $name,
|
||||||
|
'status' => $status
|
||||||
|
];
|
||||||
|
$mailer->send('emails.active_ussd_client', $data, function ($message) use ($data, $emails) {
|
||||||
|
$message->from('support@click-mobile.com', 'Click Mobile Account Manager Tracker');
|
||||||
|
$message->to($emails)->subject('New USSD Client Details');
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
13
app/Models/Account.php
Executable file
13
app/Models/Account.php
Executable file
@@ -0,0 +1,13 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Models;
|
||||||
|
|
||||||
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
|
||||||
|
class Account extends Model
|
||||||
|
{
|
||||||
|
protected $guarded = array('id');
|
||||||
|
public $table = "auth_users";
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
26
app/Models/ClickApps.php
Executable file
26
app/Models/ClickApps.php
Executable file
@@ -0,0 +1,26 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Models;
|
||||||
|
|
||||||
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
|
||||||
|
class ClickApps extends Model
|
||||||
|
{
|
||||||
|
protected $guarded = array('id');
|
||||||
|
public $table = "apps";
|
||||||
|
protected $fillable = [
|
||||||
|
'app_name',
|
||||||
|
'app_type',
|
||||||
|
'client',
|
||||||
|
'code',
|
||||||
|
'country',
|
||||||
|
'operator',
|
||||||
|
'tollfree',
|
||||||
|
'app_path',
|
||||||
|
'launch_date',
|
||||||
|
'status',
|
||||||
|
'other_info',
|
||||||
|
];
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
11
app/Models/ClickFile.php
Executable file
11
app/Models/ClickFile.php
Executable file
@@ -0,0 +1,11 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Models;
|
||||||
|
|
||||||
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
|
||||||
|
class ClickFile extends Model
|
||||||
|
{
|
||||||
|
protected $guarded = array('id');
|
||||||
|
public $table = "click_files";
|
||||||
|
}
|
||||||
33
app/Models/ClickServer.php
Executable file
33
app/Models/ClickServer.php
Executable file
@@ -0,0 +1,33 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Models;
|
||||||
|
|
||||||
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
|
||||||
|
class ClickServer extends Model
|
||||||
|
{
|
||||||
|
protected $guarded = array('id');
|
||||||
|
public $table = "click_servers";
|
||||||
|
|
||||||
|
protected $appends = ['root_password'];
|
||||||
|
|
||||||
|
public function direct_connections_info(){
|
||||||
|
return $this->hasMany('App\Models\DirectConnection', 'server_id', 'id');
|
||||||
|
}
|
||||||
|
public function credentials_info(){
|
||||||
|
return $this->hasMany('App\Models\ServerCredential', 'server_id', 'id');
|
||||||
|
}
|
||||||
|
public function modified_by_info(){
|
||||||
|
return $this->hasOne('App\Models\Account', 'id', 'last_modified_by_id');
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public function getRootPasswordAttribute(){
|
||||||
|
$credentials = $this->credentials_info;
|
||||||
|
foreach ($credentials as $value) {
|
||||||
|
if ($value->username == 'root') {
|
||||||
|
return $value->password;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
48
app/Models/Client.php
Executable file
48
app/Models/Client.php
Executable file
@@ -0,0 +1,48 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Models;
|
||||||
|
|
||||||
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
use App\Models;
|
||||||
|
class Client extends Model
|
||||||
|
{
|
||||||
|
protected $guarded = array('id');
|
||||||
|
public $table = "clients";
|
||||||
|
protected $appends = ['client_services'];
|
||||||
|
|
||||||
|
public function country_info(){
|
||||||
|
return $this->hasOne('App\Models\Country', 'alpha_2_code', 'country');
|
||||||
|
}
|
||||||
|
public function payment_type_info(){
|
||||||
|
return $this->hasOne('App\Models\PaymentType', 'id', 'pay_mode');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function service_info(){
|
||||||
|
#return $this->hasMany('App\Comment', 'foreign_key', 'local_key');
|
||||||
|
return $this->hasMany('App\Models\ClientCategory', 'client_id', 'id');
|
||||||
|
}
|
||||||
|
public function report_info(){
|
||||||
|
return $this->hasMany('App\Models\MeetingReport', 'client', 'id');
|
||||||
|
}
|
||||||
|
public function auth_user_info(){
|
||||||
|
return $this->hasOne('App\Models\Account', 'id', 'auth_user_id');
|
||||||
|
}
|
||||||
|
public function created_by_info(){
|
||||||
|
return $this->hasOne('App\Models\Account', 'id', 'created_by');
|
||||||
|
}
|
||||||
|
public function modified_by_info(){
|
||||||
|
return $this->hasOne('App\Models\Account', 'id', 'last_modified_by');
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public function getClientServicesAttribute(){
|
||||||
|
$services = $this->service_info;
|
||||||
|
$service_name_arr = [];
|
||||||
|
foreach ($services as $value) {
|
||||||
|
$service_name = Models\Service::find($value['category_id']);
|
||||||
|
$service_name_arr[] = $service_name->name;
|
||||||
|
}
|
||||||
|
return $service_name_arr;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
16
app/Models/ClientCategory.php
Executable file
16
app/Models/ClientCategory.php
Executable file
@@ -0,0 +1,16 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Models;
|
||||||
|
|
||||||
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
|
||||||
|
class ClientCategory extends Model
|
||||||
|
{
|
||||||
|
protected $guarded = array('id');
|
||||||
|
public $table = "client_categories";
|
||||||
|
|
||||||
|
public function client_info(){
|
||||||
|
return $this->hasOne('App\Models\Client', 'id', 'client_id');
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
18
app/Models/ClientNote.php
Normal file
18
app/Models/ClientNote.php
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Models;
|
||||||
|
|
||||||
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
|
||||||
|
class ClientNote extends Model
|
||||||
|
{
|
||||||
|
protected $guarded = array('id');
|
||||||
|
|
||||||
|
public function client_info(){
|
||||||
|
return $this->hasOne('App\Models\Client', 'id', 'client_id');
|
||||||
|
}
|
||||||
|
public function created_by_info(){
|
||||||
|
return $this->hasOne('App\Models\Account', 'id', 'auth_user_id');
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
11
app/Models/Country.php
Executable file
11
app/Models/Country.php
Executable file
@@ -0,0 +1,11 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Models;
|
||||||
|
|
||||||
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
|
||||||
|
class Country extends Model
|
||||||
|
{
|
||||||
|
protected $guarded = array('id');
|
||||||
|
public $table = "countries";
|
||||||
|
}
|
||||||
13
app/Models/Currency.php
Executable file
13
app/Models/Currency.php
Executable file
@@ -0,0 +1,13 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Models;
|
||||||
|
|
||||||
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
|
||||||
|
class Currency extends Model
|
||||||
|
{
|
||||||
|
protected $guarded = array('id');
|
||||||
|
public $table = "currencies";
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
11
app/Models/Designation.php
Executable file
11
app/Models/Designation.php
Executable file
@@ -0,0 +1,11 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Models;
|
||||||
|
|
||||||
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
|
||||||
|
class Designation extends Model
|
||||||
|
{
|
||||||
|
protected $guarded = array('id');
|
||||||
|
public $table = "designations";
|
||||||
|
}
|
||||||
11
app/Models/DirectConnection.php
Executable file
11
app/Models/DirectConnection.php
Executable file
@@ -0,0 +1,11 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Models;
|
||||||
|
|
||||||
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
|
||||||
|
class DirectConnection extends Model
|
||||||
|
{
|
||||||
|
protected $guarded = array('id');
|
||||||
|
public $table = "direct_connections";
|
||||||
|
}
|
||||||
24
app/Models/MarketReport.php
Executable file
24
app/Models/MarketReport.php
Executable file
@@ -0,0 +1,24 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Models;
|
||||||
|
|
||||||
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
|
||||||
|
class MarketReport extends Model
|
||||||
|
{
|
||||||
|
protected $guarded = array('id');
|
||||||
|
public $table = "market_reports";
|
||||||
|
|
||||||
|
public function client_info(){
|
||||||
|
return $this->hasOne('App\Models\Client', 'id', 'client');
|
||||||
|
}
|
||||||
|
public function payment_info(){
|
||||||
|
return $this->hasOne('App\Models\PaymentType', 'id', 'payment_type');
|
||||||
|
}
|
||||||
|
public function auth_user_info(){
|
||||||
|
return $this->hasOne('App\Models\Account', 'id', 'auth_user_id');
|
||||||
|
}
|
||||||
|
public function sam_comment_info(){
|
||||||
|
return $this->hasMany('App\Models\SamComment', 'report_id', 'id');
|
||||||
|
}
|
||||||
|
}
|
||||||
21
app/Models/MeetingReport.php
Executable file
21
app/Models/MeetingReport.php
Executable file
@@ -0,0 +1,21 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Models;
|
||||||
|
|
||||||
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
|
||||||
|
class MeetingReport extends Model
|
||||||
|
{
|
||||||
|
protected $guarded = array('id');
|
||||||
|
public $table = "meeting_reports";
|
||||||
|
|
||||||
|
public function client_info(){
|
||||||
|
return $this->hasOne('App\Models\Client', 'id', 'client');
|
||||||
|
}
|
||||||
|
public function auth_user_info(){
|
||||||
|
return $this->hasOne('App\Models\Account', 'id', 'auth_user_id');
|
||||||
|
}
|
||||||
|
public function sam_comment_info(){
|
||||||
|
return $this->hasMany('App\Models\SamComment', 'report_id', 'id');
|
||||||
|
}
|
||||||
|
}
|
||||||
19
app/Models/NetworkOps.php
Executable file
19
app/Models/NetworkOps.php
Executable file
@@ -0,0 +1,19 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Models;
|
||||||
|
|
||||||
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
|
||||||
|
class NetworkOps extends Model
|
||||||
|
{
|
||||||
|
protected $guarded = array('id');
|
||||||
|
public $table = "network_operators";
|
||||||
|
|
||||||
|
public function country_info(){
|
||||||
|
return $this->hasOne('App\Models\Country', 'alpha_2_code', 'country');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function account_manager_info(){
|
||||||
|
return $this->hasOne('App\Models\SystemUser', 'id', 'account_manager_id');
|
||||||
|
}
|
||||||
|
}
|
||||||
11
app/Models/Networkstatus.php
Executable file
11
app/Models/Networkstatus.php
Executable file
@@ -0,0 +1,11 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Models;
|
||||||
|
|
||||||
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
|
||||||
|
class Networkstatus extends Model
|
||||||
|
{
|
||||||
|
protected $guarded = array('id');
|
||||||
|
public $table = "network_status_responses";
|
||||||
|
}
|
||||||
11
app/Models/PaymentType.php
Executable file
11
app/Models/PaymentType.php
Executable file
@@ -0,0 +1,11 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Models;
|
||||||
|
|
||||||
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
|
||||||
|
class PaymentType extends Model
|
||||||
|
{
|
||||||
|
protected $guarded = array('id');
|
||||||
|
public $table = "payment_type";
|
||||||
|
}
|
||||||
13
app/Models/SamComment.php
Executable file
13
app/Models/SamComment.php
Executable file
@@ -0,0 +1,13 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Models;
|
||||||
|
|
||||||
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
|
||||||
|
class SamComment extends Model
|
||||||
|
{
|
||||||
|
protected $guarded = array('id');
|
||||||
|
public $table = "sam_comments";
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
16
app/Models/ServerCredential.php
Executable file
16
app/Models/ServerCredential.php
Executable file
@@ -0,0 +1,16 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Models;
|
||||||
|
|
||||||
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
|
||||||
|
class ServerCredential extends Model
|
||||||
|
{
|
||||||
|
|
||||||
|
protected $guarded = array('id');
|
||||||
|
public $table = "server_credentials";
|
||||||
|
|
||||||
|
public function server_info(){
|
||||||
|
return $this->hasOne('App\Models\ClickServer', 'id', 'server_id');
|
||||||
|
}
|
||||||
|
}
|
||||||
11
app/Models/Service.php
Executable file
11
app/Models/Service.php
Executable file
@@ -0,0 +1,11 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Models;
|
||||||
|
|
||||||
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
|
||||||
|
class Service extends Model
|
||||||
|
{
|
||||||
|
protected $guarded = array('id');
|
||||||
|
public $table = "services";
|
||||||
|
}
|
||||||
14
app/Models/SystemUser.php
Executable file
14
app/Models/SystemUser.php
Executable file
@@ -0,0 +1,14 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Models;
|
||||||
|
|
||||||
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
|
||||||
|
class SystemUser extends Model
|
||||||
|
{
|
||||||
|
protected $guarded = array('id');
|
||||||
|
public $table = "auth_users";
|
||||||
|
public function designation_info(){
|
||||||
|
return $this->hasOne('App\Models\Designation', 'id', 'designation');
|
||||||
|
}
|
||||||
|
}
|
||||||
15
app/Models/UssdClientPayment.php
Executable file
15
app/Models/UssdClientPayment.php
Executable file
@@ -0,0 +1,15 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Models;
|
||||||
|
|
||||||
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
|
||||||
|
class UssdClientPayment extends Model
|
||||||
|
{
|
||||||
|
protected $guarded = array('id');
|
||||||
|
public $table = "ussd_client_payments";
|
||||||
|
|
||||||
|
public function client_info(){
|
||||||
|
return $this->hasOne('App\Models\Client', 'id', 'client_id');
|
||||||
|
}
|
||||||
|
}
|
||||||
34
app/Providers/AppServiceProvider.php
Executable file
34
app/Providers/AppServiceProvider.php
Executable file
@@ -0,0 +1,34 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Providers;
|
||||||
|
|
||||||
|
use Illuminate\Support\ServiceProvider;
|
||||||
|
|
||||||
|
class AppServiceProvider extends ServiceProvider
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Bootstrap any application services.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function boot()
|
||||||
|
{
|
||||||
|
$monolog = \Log::getMonolog();
|
||||||
|
//new --- > xoxp-677819906294-675678554016-693747277911-5166bcbb9a5fc3d5434b42a10c4d358a
|
||||||
|
//old ---> xoxp-677819906294-675678554016-720956680656-4a6b5d0fcb00e9e0512c14341d3a7563
|
||||||
|
$slackHandler = new \Monolog\Handler\SlackHandler('xoxp-677819906294-675678554016-720956680656-4a6b5d0fcb00e9e0512c14341d3a7563', '#click_tracker', 'Monolog', true, null, \Monolog\Logger::ERROR);
|
||||||
|
$slackHandler = new \Monolog\Handler\SlackHandler('xoxp-677819906294-675678554016-720956680656-4a6b5d0fcb00e9e0512c14341d3a7563', '#click_tracker', 'Monolog', true, null, \Monolog\Logger::INFO);
|
||||||
|
$slackHandler = new \Monolog\Handler\SlackHandler('xoxp-677819906294-675678554016-720956680656-4a6b5d0fcb00e9e0512c14341d3a7563', '#click_tracker', 'Monolog', true, null, \Monolog\Logger::DEBUG);
|
||||||
|
$monolog->pushHandler($slackHandler);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Register any application services.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function register()
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
||||||
|
}
|
||||||
30
app/Providers/AuthServiceProvider.php
Executable file
30
app/Providers/AuthServiceProvider.php
Executable file
@@ -0,0 +1,30 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Providers;
|
||||||
|
|
||||||
|
use Illuminate\Support\Facades\Gate;
|
||||||
|
use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider;
|
||||||
|
|
||||||
|
class AuthServiceProvider extends ServiceProvider
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* The policy mappings for the application.
|
||||||
|
*
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
|
protected $policies = [
|
||||||
|
'App\Model' => 'App\Policies\ModelPolicy',
|
||||||
|
];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Register any authentication / authorization services.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function boot()
|
||||||
|
{
|
||||||
|
$this->registerPolicies();
|
||||||
|
|
||||||
|
//
|
||||||
|
}
|
||||||
|
}
|
||||||
21
app/Providers/BroadcastServiceProvider.php
Executable file
21
app/Providers/BroadcastServiceProvider.php
Executable file
@@ -0,0 +1,21 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Providers;
|
||||||
|
|
||||||
|
use Illuminate\Support\ServiceProvider;
|
||||||
|
use Illuminate\Support\Facades\Broadcast;
|
||||||
|
|
||||||
|
class BroadcastServiceProvider extends ServiceProvider
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Bootstrap any application services.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function boot()
|
||||||
|
{
|
||||||
|
Broadcast::routes();
|
||||||
|
|
||||||
|
require base_path('routes/channels.php');
|
||||||
|
}
|
||||||
|
}
|
||||||
32
app/Providers/EventServiceProvider.php
Executable file
32
app/Providers/EventServiceProvider.php
Executable file
@@ -0,0 +1,32 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Providers;
|
||||||
|
|
||||||
|
use Illuminate\Support\Facades\Event;
|
||||||
|
use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;
|
||||||
|
|
||||||
|
class EventServiceProvider extends ServiceProvider
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* The event listener mappings for the application.
|
||||||
|
*
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
|
protected $listen = [
|
||||||
|
'App\Events\Event' => [
|
||||||
|
'App\Listeners\EventListener',
|
||||||
|
],
|
||||||
|
];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Register any events for your application.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function boot()
|
||||||
|
{
|
||||||
|
parent::boot();
|
||||||
|
|
||||||
|
//
|
||||||
|
}
|
||||||
|
}
|
||||||
73
app/Providers/RouteServiceProvider.php
Executable file
73
app/Providers/RouteServiceProvider.php
Executable file
@@ -0,0 +1,73 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Providers;
|
||||||
|
|
||||||
|
use Illuminate\Support\Facades\Route;
|
||||||
|
use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider;
|
||||||
|
|
||||||
|
class RouteServiceProvider extends ServiceProvider
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* This namespace is applied to your controller routes.
|
||||||
|
*
|
||||||
|
* In addition, it is set as the URL generator's root namespace.
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
protected $namespace = 'App\Http\Controllers';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Define your route model bindings, pattern filters, etc.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function boot()
|
||||||
|
{
|
||||||
|
//
|
||||||
|
|
||||||
|
parent::boot();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Define the routes for the application.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function map()
|
||||||
|
{
|
||||||
|
$this->mapApiRoutes();
|
||||||
|
|
||||||
|
$this->mapWebRoutes();
|
||||||
|
|
||||||
|
//
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Define the "web" routes for the application.
|
||||||
|
*
|
||||||
|
* These routes all receive session state, CSRF protection, etc.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
protected function mapWebRoutes()
|
||||||
|
{
|
||||||
|
Route::middleware('web')
|
||||||
|
->namespace($this->namespace)
|
||||||
|
->group(base_path('routes/web.php'));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Define the "api" routes for the application.
|
||||||
|
*
|
||||||
|
* These routes are typically stateless.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
protected function mapApiRoutes()
|
||||||
|
{
|
||||||
|
Route::prefix('api')
|
||||||
|
->middleware('api')
|
||||||
|
->namespace($this->namespace)
|
||||||
|
->group(base_path('routes/api.php'));
|
||||||
|
}
|
||||||
|
}
|
||||||
29
app/User.php
Executable file
29
app/User.php
Executable file
@@ -0,0 +1,29 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App;
|
||||||
|
|
||||||
|
use Illuminate\Notifications\Notifiable;
|
||||||
|
use Illuminate\Foundation\Auth\User as Authenticatable;
|
||||||
|
|
||||||
|
class User extends Authenticatable
|
||||||
|
{
|
||||||
|
use Notifiable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The attributes that are mass assignable.
|
||||||
|
*
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
|
protected $fillable = [
|
||||||
|
'name', 'email', 'password',
|
||||||
|
];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The attributes that should be hidden for arrays.
|
||||||
|
*
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
|
protected $hidden = [
|
||||||
|
'password', 'remember_token',
|
||||||
|
];
|
||||||
|
}
|
||||||
53
artisan
Executable file
53
artisan
Executable file
@@ -0,0 +1,53 @@
|
|||||||
|
#!/usr/bin/env php
|
||||||
|
<?php
|
||||||
|
|
||||||
|
define('LARAVEL_START', microtime(true));
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Register The Auto Loader
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Composer provides a convenient, automatically generated class loader
|
||||||
|
| for our application. We just need to utilize it! We'll require it
|
||||||
|
| into the script here so that we do not have to worry about the
|
||||||
|
| loading of any our classes "manually". Feels great to relax.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
require __DIR__.'/vendor/autoload.php';
|
||||||
|
|
||||||
|
$app = require_once __DIR__.'/bootstrap/app.php';
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Run The Artisan Application
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| When we run the console application, the current CLI command will be
|
||||||
|
| executed in this console and the response sent back to a terminal
|
||||||
|
| or another output device for the developers. Here goes nothing!
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
$kernel = $app->make(Illuminate\Contracts\Console\Kernel::class);
|
||||||
|
|
||||||
|
$status = $kernel->handle(
|
||||||
|
$input = new Symfony\Component\Console\Input\ArgvInput,
|
||||||
|
new Symfony\Component\Console\Output\ConsoleOutput
|
||||||
|
);
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Shutdown The Application
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Once Artisan has finished running, we will fire off the shutdown events
|
||||||
|
| so that any final work may be done by the application before we shut
|
||||||
|
| down the process. This is the last thing to happen to the request.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
$kernel->terminate($input, $status);
|
||||||
|
|
||||||
|
exit($status);
|
||||||
55
bootstrap/app.php
Executable file
55
bootstrap/app.php
Executable file
@@ -0,0 +1,55 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Create The Application
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| The first thing we will do is create a new Laravel application instance
|
||||||
|
| which serves as the "glue" for all the components of Laravel, and is
|
||||||
|
| the IoC container for the system binding all of the various parts.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
$app = new Illuminate\Foundation\Application(
|
||||||
|
realpath(__DIR__.'/../')
|
||||||
|
);
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Bind Important Interfaces
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Next, we need to bind some important interfaces into the container so
|
||||||
|
| we will be able to resolve them when needed. The kernels serve the
|
||||||
|
| incoming requests to this application from both the web and CLI.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
$app->singleton(
|
||||||
|
Illuminate\Contracts\Http\Kernel::class,
|
||||||
|
App\Http\Kernel::class
|
||||||
|
);
|
||||||
|
|
||||||
|
$app->singleton(
|
||||||
|
Illuminate\Contracts\Console\Kernel::class,
|
||||||
|
App\Console\Kernel::class
|
||||||
|
);
|
||||||
|
|
||||||
|
$app->singleton(
|
||||||
|
Illuminate\Contracts\Debug\ExceptionHandler::class,
|
||||||
|
App\Exceptions\Handler::class
|
||||||
|
);
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Return The Application
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This script returns the application instance. The instance is given to
|
||||||
|
| the calling script so we can separate the building of the instances
|
||||||
|
| from the actual running of the application and sending responses.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
return $app;
|
||||||
2
bootstrap/cache/.gitignore
vendored
Executable file
2
bootstrap/cache/.gitignore
vendored
Executable file
@@ -0,0 +1,2 @@
|
|||||||
|
*
|
||||||
|
!.gitignore
|
||||||
983
click_team_tracker2021090910-34 AM.sql
Executable file
983
click_team_tracker2021090910-34 AM.sql
Executable file
@@ -0,0 +1,983 @@
|
|||||||
|
# ************************************************************
|
||||||
|
# Sequel Pro SQL dump
|
||||||
|
# Version 5446
|
||||||
|
#
|
||||||
|
# https://www.sequelpro.com/
|
||||||
|
# https://github.com/sequelpro/sequelpro
|
||||||
|
#
|
||||||
|
# Host: 127.0.0.1 (MySQL 5.7.21-0ubuntu0.17.10.1)
|
||||||
|
# Database: click_team_tracker
|
||||||
|
# Generation Time: 2021-09-09 10:34:33 +0000
|
||||||
|
# ************************************************************
|
||||||
|
|
||||||
|
|
||||||
|
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
|
||||||
|
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
|
||||||
|
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
|
||||||
|
/*!40101 SET NAMES utf8 */;
|
||||||
|
SET NAMES utf8mb4;
|
||||||
|
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
|
||||||
|
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
|
||||||
|
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
|
||||||
|
|
||||||
|
|
||||||
|
# Dump of table accounts
|
||||||
|
# ------------------------------------------------------------
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `accounts`;
|
||||||
|
|
||||||
|
CREATE TABLE `accounts` (
|
||||||
|
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
|
||||||
|
`name` varchar(200) NOT NULL DEFAULT '',
|
||||||
|
`account_manager_id` int(11) NOT NULL,
|
||||||
|
`type` varchar(200) NOT NULL DEFAULT '',
|
||||||
|
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||||
|
`updated_at` timestamp NULL DEFAULT NULL,
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# Dump of table apps
|
||||||
|
# ------------------------------------------------------------
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `apps`;
|
||||||
|
|
||||||
|
CREATE TABLE `apps` (
|
||||||
|
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||||
|
`app_name` varchar(50) NOT NULL,
|
||||||
|
`app_type` varchar(4) NOT NULL,
|
||||||
|
`code` varchar(10) NOT NULL,
|
||||||
|
`country` varchar(20) NOT NULL,
|
||||||
|
`operator` varchar(20) NOT NULL,
|
||||||
|
`tollfree` varchar(5) NOT NULL,
|
||||||
|
`app_path` varchar(200) NOT NULL,
|
||||||
|
`client` varchar(50) NOT NULL,
|
||||||
|
`launch_date` varchar(30) NOT NULL,
|
||||||
|
`status` varchar(12) NOT NULL,
|
||||||
|
`other_info` text NOT NULL,
|
||||||
|
`documents` text,
|
||||||
|
`created_at` timestamp NULL DEFAULT NULL,
|
||||||
|
`updated_at` timestamp NULL DEFAULT NULL,
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
||||||
|
|
||||||
|
LOCK TABLES `apps` WRITE;
|
||||||
|
/*!40000 ALTER TABLE `apps` DISABLE KEYS */;
|
||||||
|
|
||||||
|
INSERT INTO `apps` (`id`, `app_name`, `app_type`, `code`, `country`, `operator`, `tollfree`, `app_path`, `client`, `launch_date`, `status`, `other_info`, `documents`, `created_at`, `updated_at`)
|
||||||
|
VALUES
|
||||||
|
(1,'Infobox TNM','USSD','*288#','Malawi','TNM','NO','/var/www/html/ussd_click_tnm_info','Click Mobile','N/A','Active','N/A',NULL,NULL,NULL),
|
||||||
|
(2,'Sapota ','USSD','*1515#','Malawi','TNM','NO','/var/www/html/sapota_ussd','Click Mobile','N/A','Cancelled','#Subscription is free\r\n#Subscribers billed when they receive and SMS\r\n#Promotion changed code to *2020#',NULL,NULL,NULL),
|
||||||
|
(3,'UNDP Survey','SMS','3011','Malawi','TNM','YES','/var/www/html/routes/undp_survey','UNDP','2020-11-25','Finished','Contact: Wasili +265999640867',NULL,NULL,NULL),
|
||||||
|
(4,'UNDP Survey','SMS','3011','Malawi','Airtel','YES','/var/www/html/routes/undp_survey','UNDP','2020-11-25','Finished','Contact: Wasili +265999640867',NULL,NULL,NULL),
|
||||||
|
(5,'Zampira','USSD','*2020#','Malawi','TNM','NO','/var/www/html/ussd_click_tnm_zampira_mw','Click Mobile','N/A','Pending','#Subscription is free\r\n#Subscribers billed when they receive and SMS\r\n#Promotion changed code to *2020# from *1515#',NULL,NULL,NULL),
|
||||||
|
(6,'mHealth','USSD','*321#','Malawi','TNM','YES','/var/www/html/ussd_click_tnm_mhealth','GSMA/TNM','N/A','Active','#Subscription and content both free',NULL,NULL,NULL),
|
||||||
|
(7,'Drug Side Effects Reporting App','USSD','*360#','Malawi','TNM','YES','/var/www/html/ussd_click_tnm_poisonsb_mw','Pharmacy and Medicines Poison Board of Malawi','N/A','Testing','#MT sent after each reporting',NULL,NULL,NULL),
|
||||||
|
(8,'Old mutual SULOM Predict & Win','SMS','371','Malawi','TNM','NO','','Old Mutual-SULOM','N/A','Testing','#charge 50 kwacha/SMS',NULL,NULL,NULL);
|
||||||
|
|
||||||
|
/*!40000 ALTER TABLE `apps` ENABLE KEYS */;
|
||||||
|
UNLOCK TABLES;
|
||||||
|
|
||||||
|
|
||||||
|
# Dump of table auth_users
|
||||||
|
# ------------------------------------------------------------
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `auth_users`;
|
||||||
|
|
||||||
|
CREATE TABLE `auth_users` (
|
||||||
|
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
|
||||||
|
`name` varchar(200) NOT NULL DEFAULT '',
|
||||||
|
`designation` int(11) NOT NULL,
|
||||||
|
`email` varchar(200) NOT NULL DEFAULT '',
|
||||||
|
`phone` varchar(200) NOT NULL DEFAULT '',
|
||||||
|
`password` varchar(200) NOT NULL DEFAULT '',
|
||||||
|
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||||
|
`updated_at` timestamp NULL DEFAULT NULL,
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
||||||
|
|
||||||
|
LOCK TABLES `auth_users` WRITE;
|
||||||
|
/*!40000 ALTER TABLE `auth_users` DISABLE KEYS */;
|
||||||
|
|
||||||
|
INSERT INTO `auth_users` (`id`, `name`, `designation`, `email`, `phone`, `password`, `created_at`, `updated_at`)
|
||||||
|
VALUES
|
||||||
|
(1,'Kwesi Banson',3,'kwesi@gmail.com','0509076800','5f4dcc3b5aa765d61d8327deb882cf99','2021-01-26 10:49:51',NULL),
|
||||||
|
(2,'Nicole Hughes',4,'qurysapel@mailinator.com','0283851774','4bcafd8180b0b79be2f70effc5b1ef40','2021-01-26 10:47:07','2021-01-26 10:47:07'),
|
||||||
|
(3,'Ariel Villarreal',4,'zicomybabe@mailinator.com','0277171014','d751d6f50de17d526e5ca9ab62bea364','2021-01-26 10:48:42','2021-01-26 10:48:42'),
|
||||||
|
(4,'Graiden Lynch',3,'rocivejed@mailinator.com','0226672936','5f4dcc3b5aa765d61d8327deb882cf99','2021-01-27 09:41:28','2021-01-27 09:41:28'),
|
||||||
|
(5,'Hedwig Hess',4,'howone@mailinator.com','0257839588','5f4dcc3b5aa765d61d8327deb882cf99','2021-01-27 09:42:49','2021-01-27 09:42:49'),
|
||||||
|
(6,'Hedwig Hess',4,'howone@mailinator.com','0257839588','5f4dcc3b5aa765d61d8327deb882cf99','2021-01-27 09:43:19','2021-01-27 09:43:19'),
|
||||||
|
(7,'ew',4,'howone@mailinator.com','0257839588','d41d8cd98f00b204e9800998ecf8427e','2021-02-08 17:01:35','2021-02-08 17:01:35'),
|
||||||
|
(8,'Griffin Greene',3,'nakyqiza@mailinator.com','+1 (172) 799-8752','5f4dcc3b5aa765d61d8327deb882cf99','2021-02-08 09:36:53','2021-02-08 09:36:53'),
|
||||||
|
(9,'Uriah Bush',4,'nocikuc@mailinator.com','','5f4dcc3b5aa765d61d8327deb882cf99','2021-02-14 06:02:21','2021-02-14 05:47:56');
|
||||||
|
|
||||||
|
/*!40000 ALTER TABLE `auth_users` ENABLE KEYS */;
|
||||||
|
UNLOCK TABLES;
|
||||||
|
|
||||||
|
|
||||||
|
# Dump of table click_files
|
||||||
|
# ------------------------------------------------------------
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `click_files`;
|
||||||
|
|
||||||
|
CREATE TABLE `click_files` (
|
||||||
|
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
|
||||||
|
`name` varchar(250) DEFAULT NULL,
|
||||||
|
`path` varchar(199) DEFAULT NULL,
|
||||||
|
`description` varchar(199) DEFAULT NULL,
|
||||||
|
`created_at` timestamp NULL DEFAULT NULL,
|
||||||
|
`updated_at` timestamp NULL DEFAULT NULL,
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# Dump of table click_servers
|
||||||
|
# ------------------------------------------------------------
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `click_servers`;
|
||||||
|
|
||||||
|
CREATE TABLE `click_servers` (
|
||||||
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
||||||
|
`friendly_name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||||
|
`public_ip_address` varchar(45) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||||
|
`private_ip_address` varchar(45) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||||
|
`main_use` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||||
|
`remarks` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||||
|
`last_modified_by_id` int(11) DEFAULT NULL,
|
||||||
|
`created_at` timestamp NULL DEFAULT NULL,
|
||||||
|
`updated_at` timestamp NULL DEFAULT NULL,
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||||
|
|
||||||
|
LOCK TABLES `click_servers` WRITE;
|
||||||
|
/*!40000 ALTER TABLE `click_servers` DISABLE KEYS */;
|
||||||
|
|
||||||
|
INSERT INTO `click_servers` (`id`, `friendly_name`, `public_ip_address`, `private_ip_address`, `main_use`, `remarks`, `last_modified_by_id`, `created_at`, `updated_at`)
|
||||||
|
VALUES
|
||||||
|
(1,'SMS Gateway','206.225.87.174','10.199.0.1','SMS, Airtime, Electricity','Eligendi sunt recusa',1,NULL,'2021-04-19 19:22:37'),
|
||||||
|
(2,'UCM','206.225.81.36','10.199.0.10','SMSC','Ea quasi aut delectu',1,NULL,'2021-04-19 19:23:11'),
|
||||||
|
(3,'Billing Server','206.225.95.171','10.199.0.3','Airtime Billing','',1,NULL,NULL),
|
||||||
|
(4,'PACO','206.225.84.29','10.199.0.30','Bulk SMS Platform','',1,NULL,NULL),
|
||||||
|
(5,'Apps Server','206.225.84.201','10.199.0.11','Applications, Database','',1,NULL,NULL),
|
||||||
|
(6,'Reporting','216.55.186.230','10.199.0.13','Reporting for UCM','',1,NULL,NULL),
|
||||||
|
(7,'Mobile Money','206.225.95.109','10.199.0.16','Mobile Money Services','',1,NULL,NULL),
|
||||||
|
(8,'UCM 2','206.225.94.150','','SMSC for Airtel MW & ZA','',1,NULL,NULL),
|
||||||
|
(9,'IVR','206.225.82.37','','IVR Services','',1,NULL,NULL);
|
||||||
|
|
||||||
|
/*!40000 ALTER TABLE `click_servers` ENABLE KEYS */;
|
||||||
|
UNLOCK TABLES;
|
||||||
|
|
||||||
|
|
||||||
|
# Dump of table clients
|
||||||
|
# ------------------------------------------------------------
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `clients`;
|
||||||
|
|
||||||
|
CREATE TABLE `clients` (
|
||||||
|
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
|
||||||
|
`name` varchar(200) DEFAULT NULL,
|
||||||
|
`email` varchar(191) DEFAULT NULL,
|
||||||
|
`type` varchar(200) DEFAULT NULL,
|
||||||
|
`country` varchar(200) DEFAULT NULL,
|
||||||
|
`auth_user_id` int(11) NOT NULL DEFAULT '1',
|
||||||
|
`status` varchar(200) DEFAULT NULL,
|
||||||
|
`pay_mode` varchar(200) DEFAULT NULL,
|
||||||
|
`currency` varchar(200) DEFAULT NULL,
|
||||||
|
`created_by` int(11) DEFAULT '1',
|
||||||
|
`last_modified_by` int(11) DEFAULT '1',
|
||||||
|
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||||
|
`updated_at` timestamp NULL DEFAULT NULL,
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
||||||
|
|
||||||
|
LOCK TABLES `clients` WRITE;
|
||||||
|
/*!40000 ALTER TABLE `clients` DISABLE KEYS */;
|
||||||
|
|
||||||
|
INSERT INTO `clients` (`id`, `name`, `email`, `type`, `country`, `auth_user_id`, `status`, `pay_mode`, `currency`, `created_by`, `last_modified_by`, `created_at`, `updated_at`)
|
||||||
|
VALUES
|
||||||
|
(1,'Panacea',NULL,'1','KR',1,'active','1','Lek',1,1,'2021-02-12 16:48:12','2021-02-12 16:48:12'),
|
||||||
|
(2,'INFOBIP',NULL,'1','PA',1,'active','1','Lek',9,9,'2021-02-14 05:48:51','2021-02-14 05:48:51'),
|
||||||
|
(4,'Southern Region Water Board',NULL,'1','LS',1,'active','1','Afghani',1,1,'2021-02-12 18:52:03','2021-02-12 18:52:03'),
|
||||||
|
(5,'World Star Betting',NULL,'2','CK',3,'active','1','Afghani',1,1,'2021-02-14 05:47:20','2021-02-14 05:47:20'),
|
||||||
|
(6,'TEWAYS',NULL,'1','NP',6,'active','1','Afghani',1,1,'2021-02-04 10:23:11','2021-01-28 17:55:59'),
|
||||||
|
(7,'Edan Pena',NULL,'2','GB',8,'active','1','Danish Krone',1,1,'2021-02-08 17:49:52','2021-02-08 17:49:52'),
|
||||||
|
(8,'Jasmine Rasmussen',NULL,'2','PS',8,'active','2','Azerbaijan Manat',1,1,'2021-02-14 05:44:37','2021-02-14 05:44:37'),
|
||||||
|
(9,'Tad Cook',NULL,'1','AF',5,'active','1','Colombian Peso',1,1,'2021-03-09 15:01:42','2021-03-09 15:01:42'),
|
||||||
|
(10,'Mary Faulkner',NULL,'3','CA',4,'active','2','Bitcoin',1,1,'2021-03-09 15:12:20','2021-03-09 15:12:20'),
|
||||||
|
(11,'Martena Langley',NULL,'3','LC',9,'inactive','2','Australian Dollar',1,1,'2021-03-16 17:31:13','2021-03-16 17:31:13'),
|
||||||
|
(12,'Kenneth Flynn','bojanegog@mailinator.com','2','FI',9,'active','1','South Korean won (inv.)',1,1,'2021-03-16 18:26:06','2021-03-16 18:26:06'),
|
||||||
|
(13,'Zahir Marquez','horilyji@mailinator.com','3','VG',9,'active','1','New Israeli Sheqel',1,1,'2021-03-16 18:26:34','2021-03-16 18:26:34'),
|
||||||
|
(14,'Kato Stout','xegehuta@mailinator.com','3','JP',9,'active','2','Czech koruna (pl. koruny)',1,1,'2021-03-16 18:28:15','2021-03-16 18:28:15'),
|
||||||
|
(15,'Kai Pratt','cofon@mailinator.com','3','TT',9,'inactive','1','Tenge',1,1,'2021-03-16 18:29:09','2021-03-16 18:29:09'),
|
||||||
|
(16,'Hamish Watson','juwademu@mailinator.com','3','GD',1,'active','1','Colombian Peso',1,1,'2021-03-16 18:29:47','2021-03-16 18:29:47'),
|
||||||
|
(17,'Armando Gonzalez','dysenyfaje@mailinator.com','3','DM',9,'active','1','Jamaican Dollar',1,1,'2021-04-19 18:43:13','2021-04-19 18:43:13'),
|
||||||
|
(18,'Colin Berry','lexaqa@mailinator.com','3','SB',3,'inactive','2','Australian Dollar',1,1,'2021-03-16 18:33:22','2021-03-16 18:33:22'),
|
||||||
|
(19,'Fredericka Le','zokemiw@mailinator.com','3','ME',8,'active','1','Riel',1,1,'2021-03-16 18:49:11','2021-03-16 18:49:11'),
|
||||||
|
(20,'Joseph Beard','cetokop@mailinator.com','3','TN',5,'active','1','Quetzal',1,1,'2021-03-16 18:49:31','2021-03-16 18:49:31'),
|
||||||
|
(21,'Mariko Eaton','vymeqajehy@mailinator.com','3','GH',8,'active','1','Mexican Peso',1,1,'2021-03-16 18:50:44','2021-03-16 18:50:44'),
|
||||||
|
(22,'Wendy Jennings','sydomoc@mailinator.com','3','SZ',8,'active','1','Hong Kong Dollar',1,1,'2021-03-16 18:51:03','2021-03-16 18:51:03'),
|
||||||
|
(23,'Trevor Pittman','foturun@mailinator.com','3','BW',6,'inactive','1','Guyana Dollar',1,1,'2021-04-19 12:22:50','2021-04-19 12:22:50'),
|
||||||
|
(24,'Mohammad Donovan','webyc@mailinator.com','3','YT',2,'active','2','Bulgarian Lev',1,1,'2021-04-19 12:31:22','2021-04-19 12:31:22'),
|
||||||
|
(25,'Cooper Meadows','cewoqeteh@mailinator.com','3','LU',1,'active','1','Colombian Peso',1,1,'2021-05-12 09:49:50','2021-05-12 09:49:50'),
|
||||||
|
(26,'Maia Erickson','cyny@mailinator.com','3','SL',9,'inactive','1','Namibia Dollar',1,1,'2021-05-12 09:55:54','2021-05-12 09:55:54');
|
||||||
|
|
||||||
|
/*!40000 ALTER TABLE `clients` ENABLE KEYS */;
|
||||||
|
UNLOCK TABLES;
|
||||||
|
|
||||||
|
|
||||||
|
# Dump of table countries
|
||||||
|
# ------------------------------------------------------------
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `countries`;
|
||||||
|
|
||||||
|
CREATE TABLE `countries` (
|
||||||
|
`num_code` int(3) NOT NULL DEFAULT '0',
|
||||||
|
`alpha_2_code` varchar(2) DEFAULT NULL,
|
||||||
|
`alpha_3_code` varchar(3) DEFAULT NULL,
|
||||||
|
`en_short_name` varchar(52) DEFAULT NULL,
|
||||||
|
`nationality` varchar(39) DEFAULT NULL
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
|
LOCK TABLES `countries` WRITE;
|
||||||
|
/*!40000 ALTER TABLE `countries` DISABLE KEYS */;
|
||||||
|
|
||||||
|
INSERT INTO `countries` (`num_code`, `alpha_2_code`, `alpha_3_code`, `en_short_name`, `nationality`)
|
||||||
|
VALUES
|
||||||
|
(4,'AF','AFG','Afghanistan','Afghan'),
|
||||||
|
(8,'AL','ALB','Albania','Albanian'),
|
||||||
|
(10,'AQ','ATA','Antarctica','Antarctic'),
|
||||||
|
(12,'DZ','DZA','Algeria','Algerian'),
|
||||||
|
(16,'AS','ASM','American Samoa','American Samoan'),
|
||||||
|
(20,'AD','AND','Andorra','Andorran'),
|
||||||
|
(24,'AO','AGO','Angola','Angolan'),
|
||||||
|
(28,'AG','ATG','Antigua and Barbuda','Antiguan or Barbudan'),
|
||||||
|
(31,'AZ','AZE','Azerbaijan','Azerbaijani, Azeri'),
|
||||||
|
(32,'AR','ARG','Argentina','Argentine'),
|
||||||
|
(36,'AU','AUS','Australia','Australian'),
|
||||||
|
(40,'AT','AUT','Austria','Austrian'),
|
||||||
|
(44,'BS','BHS','Bahamas','Bahamian'),
|
||||||
|
(48,'BH','BHR','Bahrain','Bahraini'),
|
||||||
|
(50,'BD','BGD','Bangladesh','Bangladeshi'),
|
||||||
|
(51,'AM','ARM','Armenia','Armenian'),
|
||||||
|
(52,'BB','BRB','Barbados','Barbadian'),
|
||||||
|
(56,'BE','BEL','Belgium','Belgian'),
|
||||||
|
(60,'BM','BMU','Bermuda','Bermudian, Bermudan'),
|
||||||
|
(64,'BT','BTN','Bhutan','Bhutanese'),
|
||||||
|
(68,'BO','BOL','Bolivia (Plurinational State of)','Bolivian'),
|
||||||
|
(70,'BA','BIH','Bosnia and Herzegovina','Bosnian or Herzegovinian'),
|
||||||
|
(72,'BW','BWA','Botswana','Motswana, Botswanan'),
|
||||||
|
(74,'BV','BVT','Bouvet Island','Bouvet Island'),
|
||||||
|
(76,'BR','BRA','Brazil','Brazilian'),
|
||||||
|
(84,'BZ','BLZ','Belize','Belizean'),
|
||||||
|
(86,'IO','IOT','British Indian Ocean Territory','BIOT'),
|
||||||
|
(90,'SB','SLB','Solomon Islands','Solomon Island'),
|
||||||
|
(92,'VG','VGB','Virgin Islands (British)','British Virgin Island'),
|
||||||
|
(96,'BN','BRN','Brunei Darussalam','Bruneian'),
|
||||||
|
(100,'BG','BGR','Bulgaria','Bulgarian'),
|
||||||
|
(104,'MM','MMR','Myanmar','Burmese'),
|
||||||
|
(108,'BI','BDI','Burundi','Burundian'),
|
||||||
|
(112,'BY','BLR','Belarus','Belarusian'),
|
||||||
|
(116,'KH','KHM','Cambodia','Cambodian'),
|
||||||
|
(120,'CM','CMR','Cameroon','Cameroonian'),
|
||||||
|
(124,'CA','CAN','Canada','Canadian'),
|
||||||
|
(132,'CV','CPV','Cabo Verde','Cabo Verdean'),
|
||||||
|
(136,'KY','CYM','Cayman Islands','Caymanian'),
|
||||||
|
(140,'CF','CAF','Central African Republic','Central African'),
|
||||||
|
(144,'LK','LKA','Sri Lanka','Sri Lankan'),
|
||||||
|
(148,'TD','TCD','Chad','Chadian'),
|
||||||
|
(152,'CL','CHL','Chile','Chilean'),
|
||||||
|
(156,'CN','CHN','China','Chinese'),
|
||||||
|
(158,'TW','TWN','Taiwan, Province of China','Chinese, Taiwanese'),
|
||||||
|
(162,'CX','CXR','Christmas Island','Christmas Island'),
|
||||||
|
(166,'CC','CCK','Cocos (Keeling) Islands','Cocos Island'),
|
||||||
|
(170,'CO','COL','Colombia','Colombian'),
|
||||||
|
(174,'KM','COM','Comoros','Comoran, Comorian'),
|
||||||
|
(175,'YT','MYT','Mayotte','Mahoran'),
|
||||||
|
(178,'CG','COG','Congo (Republic of the)','Congolese'),
|
||||||
|
(180,'CD','COD','Congo (Democratic Republic of the)','Congolese'),
|
||||||
|
(184,'CK','COK','Cook Islands','Cook Island'),
|
||||||
|
(188,'CR','CRI','Costa Rica','Costa Rican'),
|
||||||
|
(191,'HR','HRV','Croatia','Croatian'),
|
||||||
|
(192,'CU','CUB','Cuba','Cuban'),
|
||||||
|
(196,'CY','CYP','Cyprus','Cypriot'),
|
||||||
|
(203,'CZ','CZE','Czech Republic','Czech'),
|
||||||
|
(204,'BJ','BEN','Benin','Beninese, Beninois'),
|
||||||
|
(208,'DK','DNK','Denmark','Danish'),
|
||||||
|
(212,'DM','DMA','Dominica','Dominican'),
|
||||||
|
(214,'DO','DOM','Dominican Republic','Dominican'),
|
||||||
|
(218,'EC','ECU','Ecuador','Ecuadorian'),
|
||||||
|
(222,'SV','SLV','El Salvador','Salvadoran'),
|
||||||
|
(226,'GQ','GNQ','Equatorial Guinea','Equatorial Guinean, Equatoguinean'),
|
||||||
|
(231,'ET','ETH','Ethiopia','Ethiopian'),
|
||||||
|
(232,'ER','ERI','Eritrea','Eritrean'),
|
||||||
|
(233,'EE','EST','Estonia','Estonian'),
|
||||||
|
(234,'FO','FRO','Faroe Islands','Faroese'),
|
||||||
|
(238,'FK','FLK','Falkland Islands (Malvinas)','Falkland Island'),
|
||||||
|
(239,'GS','SGS','South Georgia and the South Sandwich Islands','South Georgia or South Sandwich Islands'),
|
||||||
|
(242,'FJ','FJI','Fiji','Fijian'),
|
||||||
|
(246,'FI','FIN','Finland','Finnish'),
|
||||||
|
(248,'AX','ALA','Åland Islands','Åland Island'),
|
||||||
|
(250,'FR','FRA','France','French'),
|
||||||
|
(254,'GF','GUF','French Guiana','French Guianese'),
|
||||||
|
(258,'PF','PYF','French Polynesia','French Polynesian'),
|
||||||
|
(260,'TF','ATF','French Southern Territories','French Southern Territories'),
|
||||||
|
(262,'DJ','DJI','Djibouti','Djiboutian'),
|
||||||
|
(266,'GA','GAB','Gabon','Gabonese'),
|
||||||
|
(268,'GE','GEO','Georgia','Georgian'),
|
||||||
|
(270,'GM','GMB','Gambia','Gambian'),
|
||||||
|
(275,'PS','PSE','Palestine, State of','Palestinian'),
|
||||||
|
(276,'DE','DEU','Germany','German'),
|
||||||
|
(288,'GH','GHA','Ghana','Ghanaian'),
|
||||||
|
(292,'GI','GIB','Gibraltar','Gibraltar'),
|
||||||
|
(296,'KI','KIR','Kiribati','I-Kiribati'),
|
||||||
|
(300,'GR','GRC','Greece','Greek, Hellenic'),
|
||||||
|
(304,'GL','GRL','Greenland','Greenlandic'),
|
||||||
|
(308,'GD','GRD','Grenada','Grenadian'),
|
||||||
|
(312,'GP','GLP','Guadeloupe','Guadeloupe'),
|
||||||
|
(316,'GU','GUM','Guam','Guamanian, Guambat'),
|
||||||
|
(320,'GT','GTM','Guatemala','Guatemalan'),
|
||||||
|
(324,'GN','GIN','Guinea','Guinean'),
|
||||||
|
(328,'GY','GUY','Guyana','Guyanese'),
|
||||||
|
(332,'HT','HTI','Haiti','Haitian'),
|
||||||
|
(334,'HM','HMD','Heard Island and McDonald Islands','Heard Island or McDonald Islands'),
|
||||||
|
(336,'VA','VAT','Vatican City State','Vatican'),
|
||||||
|
(340,'HN','HND','Honduras','Honduran'),
|
||||||
|
(344,'HK','HKG','Hong Kong','Hong Kong, Hong Kongese'),
|
||||||
|
(348,'HU','HUN','Hungary','Hungarian, Magyar'),
|
||||||
|
(352,'IS','ISL','Iceland','Icelandic'),
|
||||||
|
(356,'IN','IND','India','Indian'),
|
||||||
|
(360,'ID','IDN','Indonesia','Indonesian'),
|
||||||
|
(364,'IR','IRN','Iran','Iranian, Persian'),
|
||||||
|
(368,'IQ','IRQ','Iraq','Iraqi'),
|
||||||
|
(372,'IE','IRL','Ireland','Irish'),
|
||||||
|
(376,'IL','ISR','Israel','Israeli'),
|
||||||
|
(380,'IT','ITA','Italy','Italian'),
|
||||||
|
(384,'CI','CIV','Côte d\'Ivoire','Ivorian'),
|
||||||
|
(388,'JM','JAM','Jamaica','Jamaican'),
|
||||||
|
(392,'JP','JPN','Japan','Japanese'),
|
||||||
|
(398,'KZ','KAZ','Kazakhstan','Kazakhstani, Kazakh'),
|
||||||
|
(400,'JO','JOR','Jordan','Jordanian'),
|
||||||
|
(404,'KE','KEN','Kenya','Kenyan'),
|
||||||
|
(408,'KP','PRK','Korea (Democratic People\'s Republic of)','North Korean'),
|
||||||
|
(410,'KR','KOR','Korea (Republic of)','South Korean'),
|
||||||
|
(414,'KW','KWT','Kuwait','Kuwaiti'),
|
||||||
|
(417,'KG','KGZ','Kyrgyzstan','Kyrgyzstani, Kyrgyz, Kirgiz, Kirghiz'),
|
||||||
|
(418,'LA','LAO','Lao People\'s Democratic Republic','Lao, Laotian'),
|
||||||
|
(422,'LB','LBN','Lebanon','Lebanese'),
|
||||||
|
(426,'LS','LSO','Lesotho','Basotho'),
|
||||||
|
(428,'LV','LVA','Latvia','Latvian'),
|
||||||
|
(430,'LR','LBR','Liberia','Liberian'),
|
||||||
|
(434,'LY','LBY','Libya','Libyan'),
|
||||||
|
(438,'LI','LIE','Liechtenstein','Liechtenstein'),
|
||||||
|
(440,'LT','LTU','Lithuania','Lithuanian'),
|
||||||
|
(442,'LU','LUX','Luxembourg','Luxembourg, Luxembourgish'),
|
||||||
|
(446,'MO','MAC','Macao','Macanese, Chinese'),
|
||||||
|
(450,'MG','MDG','Madagascar','Malagasy'),
|
||||||
|
(454,'MW','MWI','Malawi','Malawian'),
|
||||||
|
(458,'MY','MYS','Malaysia','Malaysian'),
|
||||||
|
(462,'MV','MDV','Maldives','Maldivian'),
|
||||||
|
(466,'ML','MLI','Mali','Malian, Malinese'),
|
||||||
|
(470,'MT','MLT','Malta','Maltese'),
|
||||||
|
(474,'MQ','MTQ','Martinique','Martiniquais, Martinican'),
|
||||||
|
(478,'MR','MRT','Mauritania','Mauritanian'),
|
||||||
|
(480,'MU','MUS','Mauritius','Mauritian'),
|
||||||
|
(484,'MX','MEX','Mexico','Mexican'),
|
||||||
|
(492,'MC','MCO','Monaco','Monégasque, Monacan'),
|
||||||
|
(496,'MN','MNG','Mongolia','Mongolian'),
|
||||||
|
(498,'MD','MDA','Moldova (Republic of)','Moldovan'),
|
||||||
|
(499,'ME','MNE','Montenegro','Montenegrin'),
|
||||||
|
(500,'MS','MSR','Montserrat','Montserratian'),
|
||||||
|
(504,'MA','MAR','Morocco','Moroccan'),
|
||||||
|
(508,'MZ','MOZ','Mozambique','Mozambican'),
|
||||||
|
(512,'OM','OMN','Oman','Omani'),
|
||||||
|
(516,'NA','NAM','Namibia','Namibian'),
|
||||||
|
(520,'NR','NRU','Nauru','Nauruan'),
|
||||||
|
(524,'NP','NPL','Nepal','Nepali, Nepalese'),
|
||||||
|
(528,'NL','NLD','Netherlands','Dutch, Netherlandic'),
|
||||||
|
(531,'CW','CUW','Curaçao','Curaçaoan'),
|
||||||
|
(533,'AW','ABW','Aruba','Aruban'),
|
||||||
|
(534,'SX','SXM','Sint Maarten (Dutch part)','Sint Maarten'),
|
||||||
|
(535,'BQ','BES','Bonaire, Sint Eustatius and Saba','Bonaire'),
|
||||||
|
(540,'NC','NCL','New Caledonia','New Caledonian'),
|
||||||
|
(548,'VU','VUT','Vanuatu','Ni-Vanuatu, Vanuatuan'),
|
||||||
|
(554,'NZ','NZL','New Zealand','New Zealand, NZ'),
|
||||||
|
(558,'NI','NIC','Nicaragua','Nicaraguan'),
|
||||||
|
(562,'NE','NER','Niger','Nigerien'),
|
||||||
|
(566,'NG','NGA','Nigeria','Nigerian'),
|
||||||
|
(570,'NU','NIU','Niue','Niuean'),
|
||||||
|
(574,'NF','NFK','Norfolk Island','Norfolk Island'),
|
||||||
|
(578,'NO','NOR','Norway','Norwegian'),
|
||||||
|
(580,'MP','MNP','Northern Mariana Islands','Northern Marianan'),
|
||||||
|
(581,'UM','UMI','United States Minor Outlying Islands','American'),
|
||||||
|
(583,'FM','FSM','Micronesia (Federated States of)','Micronesian'),
|
||||||
|
(584,'MH','MHL','Marshall Islands','Marshallese'),
|
||||||
|
(585,'PW','PLW','Palau','Palauan'),
|
||||||
|
(586,'PK','PAK','Pakistan','Pakistani'),
|
||||||
|
(591,'PA','PAN','Panama','Panamanian'),
|
||||||
|
(598,'PG','PNG','Papua New Guinea','Papua New Guinean, Papuan'),
|
||||||
|
(600,'PY','PRY','Paraguay','Paraguayan'),
|
||||||
|
(604,'PE','PER','Peru','Peruvian'),
|
||||||
|
(608,'PH','PHL','Philippines','Philippine, Filipino'),
|
||||||
|
(612,'PN','PCN','Pitcairn','Pitcairn Island'),
|
||||||
|
(616,'PL','POL','Poland','Polish'),
|
||||||
|
(620,'PT','PRT','Portugal','Portuguese'),
|
||||||
|
(624,'GW','GNB','Guinea-Bissau','Bissau-Guinean'),
|
||||||
|
(626,'TL','TLS','Timor-Leste','Timorese'),
|
||||||
|
(630,'PR','PRI','Puerto Rico','Puerto Rican'),
|
||||||
|
(634,'QA','QAT','Qatar','Qatari'),
|
||||||
|
(638,'RE','REU','Réunion','Réunionese, Réunionnais'),
|
||||||
|
(642,'RO','ROU','Romania','Romanian'),
|
||||||
|
(643,'RU','RUS','Russian Federation','Russian'),
|
||||||
|
(646,'RW','RWA','Rwanda','Rwandan'),
|
||||||
|
(652,'BL','BLM','Saint Barthélemy','Barthélemois'),
|
||||||
|
(654,'SH','SHN','Saint Helena, Ascension and Tristan da Cunha','Saint Helenian'),
|
||||||
|
(659,'KN','KNA','Saint Kitts and Nevis','Kittitian or Nevisian'),
|
||||||
|
(660,'AI','AIA','Anguilla','Anguillan'),
|
||||||
|
(662,'LC','LCA','Saint Lucia','Saint Lucian'),
|
||||||
|
(663,'MF','MAF','Saint Martin (French part)','Saint-Martinoise'),
|
||||||
|
(666,'PM','SPM','Saint Pierre and Miquelon','Saint-Pierrais or Miquelonnais'),
|
||||||
|
(670,'VC','VCT','Saint Vincent and the Grenadines','Saint Vincentian, Vincentian'),
|
||||||
|
(674,'SM','SMR','San Marino','Sammarinese'),
|
||||||
|
(678,'ST','STP','Sao Tome and Principe','São Toméan'),
|
||||||
|
(682,'SA','SAU','Saudi Arabia','Saudi, Saudi Arabian'),
|
||||||
|
(686,'SN','SEN','Senegal','Senegalese'),
|
||||||
|
(688,'RS','SRB','Serbia','Serbian'),
|
||||||
|
(690,'SC','SYC','Seychelles','Seychellois'),
|
||||||
|
(694,'SL','SLE','Sierra Leone','Sierra Leonean'),
|
||||||
|
(702,'SG','SGP','Singapore','Singaporean'),
|
||||||
|
(703,'SK','SVK','Slovakia','Slovak'),
|
||||||
|
(704,'VN','VNM','Vietnam','Vietnamese'),
|
||||||
|
(705,'SI','SVN','Slovenia','Slovenian, Slovene'),
|
||||||
|
(706,'SO','SOM','Somalia','Somali, Somalian'),
|
||||||
|
(710,'ZA','ZAF','South Africa','South African'),
|
||||||
|
(716,'ZW','ZWE','Zimbabwe','Zimbabwean'),
|
||||||
|
(724,'ES','ESP','Spain','Spanish'),
|
||||||
|
(728,'SS','SSD','South Sudan','South Sudanese'),
|
||||||
|
(729,'SD','SDN','Sudan','Sudanese'),
|
||||||
|
(732,'EH','ESH','Western Sahara','Sahrawi, Sahrawian, Sahraouian'),
|
||||||
|
(740,'SR','SUR','Suriname','Surinamese'),
|
||||||
|
(744,'SJ','SJM','Svalbard and Jan Mayen','Svalbard'),
|
||||||
|
(748,'SZ','SWZ','Swaziland','Swazi'),
|
||||||
|
(752,'SE','SWE','Sweden','Swedish'),
|
||||||
|
(756,'CH','CHE','Switzerland','Swiss'),
|
||||||
|
(760,'SY','SYR','Syrian Arab Republic','Syrian'),
|
||||||
|
(762,'TJ','TJK','Tajikistan','Tajikistani'),
|
||||||
|
(764,'TH','THA','Thailand','Thai'),
|
||||||
|
(768,'TG','TGO','Togo','Togolese'),
|
||||||
|
(772,'TK','TKL','Tokelau','Tokelauan'),
|
||||||
|
(776,'TO','TON','Tonga','Tongan'),
|
||||||
|
(780,'TT','TTO','Trinidad and Tobago','Trinidadian or Tobagonian'),
|
||||||
|
(784,'AE','ARE','United Arab Emirates','Emirati, Emirian, Emiri'),
|
||||||
|
(788,'TN','TUN','Tunisia','Tunisian'),
|
||||||
|
(792,'TR','TUR','Turkey','Turkish'),
|
||||||
|
(795,'TM','TKM','Turkmenistan','Turkmen'),
|
||||||
|
(796,'TC','TCA','Turks and Caicos Islands','Turks and Caicos Island'),
|
||||||
|
(798,'TV','TUV','Tuvalu','Tuvaluan'),
|
||||||
|
(800,'UG','UGA','Uganda','Ugandan'),
|
||||||
|
(804,'UA','UKR','Ukraine','Ukrainian'),
|
||||||
|
(807,'MK','MKD','Macedonia (the former Yugoslav Republic of)','Macedonian'),
|
||||||
|
(818,'EG','EGY','Egypt','Egyptian'),
|
||||||
|
(826,'GB','GBR','United Kingdom of Great Britain and Northern Ireland','British, UK'),
|
||||||
|
(831,'GG','GGY','Guernsey','Channel Island'),
|
||||||
|
(832,'JE','JEY','Jersey','Channel Island'),
|
||||||
|
(833,'IM','IMN','Isle of Man','Manx'),
|
||||||
|
(834,'TZ','TZA','Tanzania, United Republic of','Tanzanian'),
|
||||||
|
(840,'US','USA','United States of America','American'),
|
||||||
|
(850,'VI','VIR','Virgin Islands (U.S.)','U.S. Virgin Island'),
|
||||||
|
(854,'BF','BFA','Burkina Faso','Burkinabé'),
|
||||||
|
(858,'UY','URY','Uruguay','Uruguayan'),
|
||||||
|
(860,'UZ','UZB','Uzbekistan','Uzbekistani, Uzbek'),
|
||||||
|
(862,'VE','VEN','Venezuela (Bolivarian Republic of)','Venezuelan'),
|
||||||
|
(876,'WF','WLF','Wallis and Futuna','Wallis and Futuna, Wallisian or Futunan'),
|
||||||
|
(882,'WS','WSM','Samoa','Samoan'),
|
||||||
|
(887,'YE','YEM','Yemen','Yemeni'),
|
||||||
|
(894,'ZM','ZMB','Zambia','Zambian');
|
||||||
|
|
||||||
|
/*!40000 ALTER TABLE `countries` ENABLE KEYS */;
|
||||||
|
UNLOCK TABLES;
|
||||||
|
|
||||||
|
|
||||||
|
# Dump of table currencies
|
||||||
|
# ------------------------------------------------------------
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `currencies`;
|
||||||
|
|
||||||
|
CREATE TABLE `currencies` (
|
||||||
|
`id` bigint(20) NOT NULL AUTO_INCREMENT,
|
||||||
|
`name` varchar(255) DEFAULT NULL,
|
||||||
|
`symbol` varchar(255) DEFAULT NULL,
|
||||||
|
`currency_code` varchar(255) DEFAULT NULL,
|
||||||
|
`uuid` varchar(255) DEFAULT NULL,
|
||||||
|
`content_status` varchar(255) DEFAULT NULL,
|
||||||
|
`created_at` datetime DEFAULT NULL,
|
||||||
|
`updated_at` datetime DEFAULT NULL,
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
||||||
|
|
||||||
|
LOCK TABLES `currencies` WRITE;
|
||||||
|
/*!40000 ALTER TABLE `currencies` DISABLE KEYS */;
|
||||||
|
|
||||||
|
INSERT INTO `currencies` (`id`, `name`, `symbol`, `currency_code`, `uuid`, `content_status`, `created_at`, `updated_at`)
|
||||||
|
VALUES
|
||||||
|
(107,'Afghani','؋','AFN',NULL,NULL,NULL,NULL),
|
||||||
|
(108,'Lek','Lek','ALL',NULL,NULL,NULL,NULL),
|
||||||
|
(109,'Netherlands Antillean guilder','ƒ','ANG',NULL,NULL,NULL,NULL),
|
||||||
|
(110,'Argentine Peso','$','ARS',NULL,NULL,NULL,NULL),
|
||||||
|
(111,'Australian Dollar','$','AUD',NULL,NULL,NULL,NULL),
|
||||||
|
(112,'Aruban Florin','ƒ','AWG',NULL,NULL,NULL,NULL),
|
||||||
|
(113,'Azerbaijan Manat','₼','AZN',NULL,NULL,NULL,NULL),
|
||||||
|
(114,'Convertible Mark','KM','BAM',NULL,NULL,NULL,NULL),
|
||||||
|
(115,'Barbados Dollar','$','BBD',NULL,NULL,NULL,NULL),
|
||||||
|
(116,'Bulgarian Lev','лв','BGN',NULL,NULL,NULL,NULL),
|
||||||
|
(117,'Bermudian Dollar','$','BMD',NULL,NULL,NULL,NULL),
|
||||||
|
(118,'Brunei Dollar','$','BND',NULL,NULL,NULL,NULL),
|
||||||
|
(119,'boliviano','$b','BOB',NULL,NULL,NULL,NULL),
|
||||||
|
(120,'Brazilian Real','R$','BRL',NULL,NULL,NULL,NULL),
|
||||||
|
(121,'Bahamian Dollar','$','BSD',NULL,NULL,NULL,NULL),
|
||||||
|
(122,'Bitcoin','Ƀ','BTC',NULL,NULL,NULL,NULL),
|
||||||
|
(123,'Pula','P','BWP',NULL,NULL,NULL,NULL),
|
||||||
|
(124,'Belarusian Ruble','Br','BYN',NULL,NULL,NULL,NULL),
|
||||||
|
(125,'Belize Dollar','BZ$','BZD',NULL,NULL,NULL,NULL),
|
||||||
|
(126,'Canadian Dollar','$','CAD',NULL,NULL,NULL,NULL),
|
||||||
|
(127,'Swiss Franc','CHF','CHF',NULL,NULL,NULL,NULL),
|
||||||
|
(128,'Chilean Peso','$','CLP',NULL,NULL,NULL,NULL),
|
||||||
|
(129,'Yuan Renminbi','¥','CNY',NULL,NULL,NULL,NULL),
|
||||||
|
(130,'Colombian Peso','$','COP',NULL,NULL,NULL,NULL),
|
||||||
|
(131,'Costa Rican Colon','₡','CRC',NULL,NULL,NULL,NULL),
|
||||||
|
(132,'Cuban Peso','₱','CUP',NULL,NULL,NULL,NULL),
|
||||||
|
(133,'Czech koruna (pl. koruny)','Kč','CZK',NULL,NULL,NULL,NULL),
|
||||||
|
(134,'Danish Krone','kr','DKK',NULL,NULL,NULL,NULL),
|
||||||
|
(135,'Dominican peso','RD$','DOP',NULL,NULL,NULL,NULL),
|
||||||
|
(136,'Egyptian Pound','£','EGP',NULL,NULL,NULL,NULL),
|
||||||
|
(137,'Euro','€','EUR',NULL,NULL,NULL,NULL),
|
||||||
|
(138,'Fiji Dollar','$','FJD',NULL,NULL,NULL,NULL),
|
||||||
|
(139,'Falkland Islands pound','£','FKP',NULL,NULL,NULL,NULL),
|
||||||
|
(140,'pound sterling','£','GBP',NULL,NULL,NULL,NULL),
|
||||||
|
(141,'Ghana Cedi','¢','GHS',NULL,NULL,NULL,NULL),
|
||||||
|
(142,'Gibraltar Pound','£','GIP',NULL,NULL,NULL,NULL),
|
||||||
|
(143,'Quetzal','Q','GTQ',NULL,NULL,NULL,NULL),
|
||||||
|
(144,'Guyana Dollar','$','GYD',NULL,NULL,NULL,NULL),
|
||||||
|
(145,'Hong Kong Dollar','$','HKD',NULL,NULL,NULL,NULL),
|
||||||
|
(146,'Lempira','L','HNL',NULL,NULL,NULL,NULL),
|
||||||
|
(147,'Kuna','kn','HRK',NULL,NULL,NULL,NULL),
|
||||||
|
(148,'Forint','Ft','HUF',NULL,NULL,NULL,NULL),
|
||||||
|
(149,'Rupiah','Rp','IDR',NULL,NULL,NULL,NULL),
|
||||||
|
(150,'New Israeli Sheqel','₪','ILS',NULL,NULL,NULL,NULL),
|
||||||
|
(151,'Indian Rupee','₹','INR',NULL,NULL,NULL,NULL),
|
||||||
|
(152,'Iranian rial','﷼','IRR',NULL,NULL,NULL,NULL),
|
||||||
|
(153,'Iceland Krona','kr','ISK',NULL,NULL,NULL,NULL),
|
||||||
|
(154,'Jamaican Dollar','J$','JMD',NULL,NULL,NULL,NULL),
|
||||||
|
(155,'Yen','¥','JPY',NULL,NULL,NULL,NULL),
|
||||||
|
(156,'Som','лв','KGS',NULL,NULL,NULL,NULL),
|
||||||
|
(157,'Riel','៛','KHR',NULL,NULL,NULL,NULL),
|
||||||
|
(158,'North Korean won (inv.)','₩','KPW',NULL,NULL,NULL,NULL),
|
||||||
|
(159,'South Korean won (inv.)','₩','KRW',NULL,NULL,NULL,NULL),
|
||||||
|
(160,'Cayman Islands dollar','$','KYD',NULL,NULL,NULL,NULL),
|
||||||
|
(161,'Tenge','лв','KZT',NULL,NULL,NULL,NULL),
|
||||||
|
(162,'kip (inv.)','₭','LAK',NULL,NULL,NULL,NULL),
|
||||||
|
(163,'Lebanese Pound','£','LBP',NULL,NULL,NULL,NULL),
|
||||||
|
(164,'Sri Lanka Rupee','₨','LKR',NULL,NULL,NULL,NULL),
|
||||||
|
(165,'Liberian Dollar','$','LRD',NULL,NULL,NULL,NULL),
|
||||||
|
(166,'denar (inv.)','ден','MKD',NULL,NULL,NULL,NULL),
|
||||||
|
(167,'Tugrik','₮','MNT',NULL,NULL,NULL,NULL),
|
||||||
|
(168,'Mauritius Rupee','₨','MUR',NULL,NULL,NULL,NULL),
|
||||||
|
(169,'Mexican Peso','$','MXN',NULL,NULL,NULL,NULL),
|
||||||
|
(170,'Malaysian Ringgit','RM','MYR',NULL,NULL,NULL,NULL),
|
||||||
|
(171,'Mozambique Metical','MT','MZN',NULL,NULL,NULL,NULL),
|
||||||
|
(172,'Namibia Dollar','$','NAD',NULL,NULL,NULL,NULL),
|
||||||
|
(173,'Naira','₦','NGN',NULL,NULL,NULL,NULL),
|
||||||
|
(174,'Cordoba Oro','C$','NIO',NULL,NULL,NULL,NULL),
|
||||||
|
(204,'US Dollar','$','USD',NULL,NULL,NULL,NULL),
|
||||||
|
(206,'Uzbekistan Sum','лв','UZS',NULL,NULL,NULL,NULL),
|
||||||
|
(207,'dong','₫','VND',NULL,NULL,NULL,NULL),
|
||||||
|
(208,'East Caribbean Dollar','$','XCD',NULL,NULL,NULL,NULL),
|
||||||
|
(209,'Yemeni Rial','﷼','YER',NULL,NULL,NULL,NULL),
|
||||||
|
(210,'Rand','R','ZAR',NULL,NULL,NULL,NULL),
|
||||||
|
(211,'Kenya Shillings','shs','KES','e3c75da5-b011-4da0-a57a-0aae39f92f36','DRAFT',NULL,NULL),
|
||||||
|
(212,'Malawian kwacha','mwk','MWK',NULL,NULL,NULL,NULL);
|
||||||
|
|
||||||
|
/*!40000 ALTER TABLE `currencies` ENABLE KEYS */;
|
||||||
|
UNLOCK TABLES;
|
||||||
|
|
||||||
|
|
||||||
|
# Dump of table designations
|
||||||
|
# ------------------------------------------------------------
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `designations`;
|
||||||
|
|
||||||
|
CREATE TABLE `designations` (
|
||||||
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
||||||
|
`name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||||
|
`description` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
||||||
|
`default_privileges` text COLLATE utf8mb4_unicode_ci,
|
||||||
|
`created_at` timestamp NULL DEFAULT NULL,
|
||||||
|
`updated_at` timestamp NULL DEFAULT NULL,
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||||
|
|
||||||
|
LOCK TABLES `designations` WRITE;
|
||||||
|
/*!40000 ALTER TABLE `designations` DISABLE KEYS */;
|
||||||
|
|
||||||
|
INSERT INTO `designations` (`id`, `name`, `description`, `default_privileges`, `created_at`, `updated_at`)
|
||||||
|
VALUES
|
||||||
|
(3,'administrator',NULL,NULL,NULL,NULL),
|
||||||
|
(4,'standard',NULL,NULL,NULL,NULL),
|
||||||
|
(5,'technical',NULL,NULL,NULL,NULL);
|
||||||
|
|
||||||
|
/*!40000 ALTER TABLE `designations` ENABLE KEYS */;
|
||||||
|
UNLOCK TABLES;
|
||||||
|
|
||||||
|
|
||||||
|
# Dump of table direct_connections
|
||||||
|
# ------------------------------------------------------------
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `direct_connections`;
|
||||||
|
|
||||||
|
CREATE TABLE `direct_connections` (
|
||||||
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
||||||
|
`server_id` int(11) NOT NULL,
|
||||||
|
`direct_partner` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||||
|
`connection_type` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'VPN or Internet',
|
||||||
|
`main_ip_address` varchar(45) COLLATE utf8mb4_unicode_ci DEFAULT '',
|
||||||
|
`port` varchar(10) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
||||||
|
`vpn_peer_ip` varchar(45) COLLATE utf8mb4_unicode_ci DEFAULT '',
|
||||||
|
`domain_name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT '',
|
||||||
|
`connection_document` text COLLATE utf8mb4_unicode_ci,
|
||||||
|
`last_modified_by` int(11) DEFAULT NULL,
|
||||||
|
`created_at` timestamp NULL DEFAULT NULL,
|
||||||
|
`updated_at` timestamp NULL DEFAULT NULL,
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||||
|
|
||||||
|
LOCK TABLES `direct_connections` WRITE;
|
||||||
|
/*!40000 ALTER TABLE `direct_connections` DISABLE KEYS */;
|
||||||
|
|
||||||
|
INSERT INTO `direct_connections` (`id`, `server_id`, `direct_partner`, `connection_type`, `main_ip_address`, `port`, `vpn_peer_ip`, `domain_name`, `connection_document`, `last_modified_by`, `created_at`, `updated_at`)
|
||||||
|
VALUES
|
||||||
|
(1,2,'TNM Malawi','VPN','41.78.250.88','5016','','','',NULL,NULL,NULL),
|
||||||
|
(2,2,'AIrtelTigo Ghana','VPN','172.17.9.38','3010','','','',NULL,NULL,NULL),
|
||||||
|
(3,1,'Seedco','vpn','172.26.162.100','5080','41.78.57.35',NULL,NULL,1,'2021-04-17 17:50:18','2021-04-17 18:32:48'),
|
||||||
|
(4,1,'Airtel USSD','vpn','172.26.163.136','5080','41.78.57.35',NULL,NULL,1,'2021-04-17 18:29:34','2021-04-17 18:53:44'),
|
||||||
|
(5,1,'Seedco','vpn','172.26.162.100','5080','216.55.137.19',NULL,NULL,1,'2021-04-17 18:30:42','2021-04-17 18:30:42'),
|
||||||
|
(6,8,'Airtel Malawi','fqdn',NULL,'80',NULL,'messaging.airtel.mw','connection_document_1618686913.docx',1,'2021-04-17 18:58:59','2021-04-17 19:15:13'),
|
||||||
|
(7,7,'Airtel Money','vpn','172.26.163.136','4452','41.78.57.35',NULL,'connection_document_1618686983.docx',1,'2021-04-17 19:11:28','2021-04-17 19:16:23');
|
||||||
|
|
||||||
|
/*!40000 ALTER TABLE `direct_connections` ENABLE KEYS */;
|
||||||
|
UNLOCK TABLES;
|
||||||
|
|
||||||
|
|
||||||
|
# Dump of table meeting_reports
|
||||||
|
# ------------------------------------------------------------
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `meeting_reports`;
|
||||||
|
|
||||||
|
CREATE TABLE `meeting_reports` (
|
||||||
|
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
|
||||||
|
`client` varchar(200) NOT NULL DEFAULT '',
|
||||||
|
`service` varchar(200) NOT NULL DEFAULT '',
|
||||||
|
`auth_user_id` int(11) NOT NULL DEFAULT '1',
|
||||||
|
`contact_person` varchar(200) NOT NULL DEFAULT '',
|
||||||
|
`email` varchar(200) NOT NULL DEFAULT '',
|
||||||
|
`discussion` varchar(200) NOT NULL DEFAULT '',
|
||||||
|
`payment_type` varchar(200) NOT NULL DEFAULT '',
|
||||||
|
`current_balance` decimal(50,2) NOT NULL,
|
||||||
|
`payment_status` varchar(200) NOT NULL DEFAULT '',
|
||||||
|
`next_follow_up_date` date DEFAULT NULL,
|
||||||
|
`last_follow_up_date` date DEFAULT NULL,
|
||||||
|
`sam_comment` text,
|
||||||
|
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||||
|
`updated_at` timestamp NULL DEFAULT NULL,
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
||||||
|
|
||||||
|
LOCK TABLES `meeting_reports` WRITE;
|
||||||
|
/*!40000 ALTER TABLE `meeting_reports` DISABLE KEYS */;
|
||||||
|
|
||||||
|
INSERT INTO `meeting_reports` (`id`, `client`, `service`, `auth_user_id`, `contact_person`, `email`, `discussion`, `payment_type`, `current_balance`, `payment_status`, `next_follow_up_date`, `last_follow_up_date`, `sam_comment`, `created_at`, `updated_at`)
|
||||||
|
VALUES
|
||||||
|
(2,'1','regular',1,'Quo id earum dolor','hatuzyde@mailinator.net','Dolor doloremque ani','1',0.00,'paid',NULL,NULL,'A positive number - The length to be returned from the start parameter, A positive number - The length to be returned from the start parameter, A positive number - The length to be returned from the s','2021-01-28 18:45:26','2021-01-22 06:23:37'),
|
||||||
|
(3,'1','regular',1,'Voluptas rerum rem u','huki@mailinator.com','Animi inventore et','2',0.00,'unpaid',NULL,NULL,'Ad vitae voluptates','2021-01-25 10:53:42','2021-01-25 10:53:42'),
|
||||||
|
(4,'1','regular',1,'Iste rerum blanditii','rujaletir@mailinator.com','Dummy text refers to the bits of content that are used to fill a website mock-up. This text helps web designers better envision how the website will look as a finished product. It is important to unde','2',9000.00,'unpaid',NULL,NULL,NULL,'2021-02-03 11:48:52','2021-02-03 11:48:52'),
|
||||||
|
(5,'5','regular',1,'Laborum rerum laboru','bofa@mailinator.com','Esse molestias aut a Esse molestias aut a \r\nEsse molestias aut a \r\nEsse molestias aut a \r\nEsse molestias aut a Esse molestias aut a Esse molestias aut a Esse molestias aut a \r\nEsse molestias aut a Es','1',0.00,'paid',NULL,NULL,NULL,'2021-02-04 10:18:38','2021-02-04 10:18:38'),
|
||||||
|
(6,'6','regular',1,'Ut nihil nostrum id','hacyticiv@mailinator.com','Enim modi rerum quas\r\n\r\ndashboard\r\n\r\nEnim modi rerum quas\r\n\r\ndashboard\r\nEnim modi rerum quas\r\n\r\ndashboard','2',0.00,'unpaid',NULL,NULL,NULL,'2021-02-04 10:19:59','2021-02-04 10:19:59'),
|
||||||
|
(7,'5','regular',1,'Consequatur exercita','lykomyl@mailinator.com','MySQL provides several variations on INSERT and UPDATE to allow inserting and updating exactly the desired data. These features provide a lot of power and flexibility, making MySQL significantly more ','2',0.00,'unpaid',NULL,NULL,NULL,'2021-02-04 10:20:45','2021-02-04 10:20:45'),
|
||||||
|
(8,'1','regular',5,'Richard Oponglo','dumug@mailinator.com','1. FOLLOW YOUR CHILD\'S PROGRESS\r\n \r\nFrom report cards, fee structures, term dates and all the regular updates from your school fast and timely. Chat with teachers and share your child’s progress with ','2',49000.00,'paid',NULL,NULL,NULL,'2021-02-08 05:33:06','2021-02-08 05:33:06'),
|
||||||
|
(9,'6','regular',5,'Ben Sorkies','sukoz@mailinator.com','There isn\'t a minute that passes by that we aren\'t using our phones, including searching for places to buy food. So once you\'ve created your restaurant landing page, you\'ll have to ensure that it\'s mo','1',2300.00,'paid',NULL,NULL,NULL,'2021-02-08 06:04:47','2021-02-08 06:04:47'),
|
||||||
|
(10,'2','regular',1,'Frank Osem Panyin','fiqumisimi@mailinator.com','Doloremque aut sunt','1',6677.00,'paid','2021-02-08','2021-02-08',NULL,'2021-02-08 14:30:15','2021-02-08 14:30:15'),
|
||||||
|
(11,'1','BULK SMS',1,'Quod minim','gebif@mailinator.com','Quo sapiente nulla o','2',6788.00,'unpaid','2021-02-09','2021-02-09',NULL,'2021-02-09 10:01:43','2021-02-09 10:01:43');
|
||||||
|
|
||||||
|
/*!40000 ALTER TABLE `meeting_reports` ENABLE KEYS */;
|
||||||
|
UNLOCK TABLES;
|
||||||
|
|
||||||
|
|
||||||
|
# Dump of table migrations
|
||||||
|
# ------------------------------------------------------------
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `migrations`;
|
||||||
|
|
||||||
|
CREATE TABLE `migrations` (
|
||||||
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
||||||
|
`migration` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||||
|
`batch` int(11) NOT NULL,
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||||
|
|
||||||
|
LOCK TABLES `migrations` WRITE;
|
||||||
|
/*!40000 ALTER TABLE `migrations` DISABLE KEYS */;
|
||||||
|
|
||||||
|
INSERT INTO `migrations` (`id`, `migration`, `batch`)
|
||||||
|
VALUES
|
||||||
|
(4,'2021_04_13_111024_create_models_server_crendentials_table',1),
|
||||||
|
(5,'2021_04_13_111110_create_models_direct_connections_table',1),
|
||||||
|
(6,'2014_10_12_000000_create_users_table',2),
|
||||||
|
(7,'2014_10_12_100000_create_password_resets_table',2),
|
||||||
|
(8,'2021_04_13_104850_create_click_servers_table',2),
|
||||||
|
(9,'2021_04_13_111024_create_server_crendentials_table',3),
|
||||||
|
(10,'2021_04_13_111110_create_direct_connections_table',3);
|
||||||
|
|
||||||
|
/*!40000 ALTER TABLE `migrations` ENABLE KEYS */;
|
||||||
|
UNLOCK TABLES;
|
||||||
|
|
||||||
|
|
||||||
|
# Dump of table network_operators
|
||||||
|
# ------------------------------------------------------------
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `network_operators`;
|
||||||
|
|
||||||
|
CREATE TABLE `network_operators` (
|
||||||
|
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
|
||||||
|
`name` varchar(200) NOT NULL DEFAULT '',
|
||||||
|
`country` varchar(200) NOT NULL DEFAULT '',
|
||||||
|
`account_manager_id` int(11) NOT NULL,
|
||||||
|
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||||
|
`updated_at` timestamp NULL DEFAULT NULL,
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
||||||
|
|
||||||
|
LOCK TABLES `network_operators` WRITE;
|
||||||
|
/*!40000 ALTER TABLE `network_operators` DISABLE KEYS */;
|
||||||
|
|
||||||
|
INSERT INTO `network_operators` (`id`, `name`, `country`, `account_manager_id`, `created_at`, `updated_at`)
|
||||||
|
VALUES
|
||||||
|
(1,'Airtel','GH',1,'2021-01-21 01:29:56','2021-01-20 05:57:39'),
|
||||||
|
(4,'Kennedy Solis','GH',1,'2021-01-21 01:32:16','2021-01-20 15:41:20'),
|
||||||
|
(5,'Keefe Skinner','CN',1,'2021-02-08 17:13:44','2021-02-08 17:13:44');
|
||||||
|
|
||||||
|
/*!40000 ALTER TABLE `network_operators` ENABLE KEYS */;
|
||||||
|
UNLOCK TABLES;
|
||||||
|
|
||||||
|
|
||||||
|
# Dump of table password_resets
|
||||||
|
# ------------------------------------------------------------
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `password_resets`;
|
||||||
|
|
||||||
|
CREATE TABLE `password_resets` (
|
||||||
|
`email` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||||
|
`token` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||||
|
`created_at` timestamp NULL DEFAULT NULL,
|
||||||
|
KEY `password_resets_email_index` (`email`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# Dump of table payment_type
|
||||||
|
# ------------------------------------------------------------
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `payment_type`;
|
||||||
|
|
||||||
|
CREATE TABLE `payment_type` (
|
||||||
|
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
|
||||||
|
`name` varchar(200) NOT NULL DEFAULT '',
|
||||||
|
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||||
|
`updated_at` timestamp NULL DEFAULT NULL,
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
||||||
|
|
||||||
|
LOCK TABLES `payment_type` WRITE;
|
||||||
|
/*!40000 ALTER TABLE `payment_type` DISABLE KEYS */;
|
||||||
|
|
||||||
|
INSERT INTO `payment_type` (`id`, `name`, `created_at`, `updated_at`)
|
||||||
|
VALUES
|
||||||
|
(1,'Prepaid','2021-01-25 16:30:15',NULL),
|
||||||
|
(2,'Postpaid','2021-01-25 16:30:20',NULL);
|
||||||
|
|
||||||
|
/*!40000 ALTER TABLE `payment_type` ENABLE KEYS */;
|
||||||
|
UNLOCK TABLES;
|
||||||
|
|
||||||
|
|
||||||
|
# Dump of table privileges
|
||||||
|
# ------------------------------------------------------------
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `privileges`;
|
||||||
|
|
||||||
|
CREATE TABLE `privileges` (
|
||||||
|
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
|
||||||
|
`name` varchar(200) NOT NULL DEFAULT '',
|
||||||
|
`description` varchar(200) NOT NULL DEFAULT '',
|
||||||
|
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||||
|
`updated_at` timestamp NULL DEFAULT NULL,
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# Dump of table sam_comments
|
||||||
|
# ------------------------------------------------------------
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `sam_comments`;
|
||||||
|
|
||||||
|
CREATE TABLE `sam_comments` (
|
||||||
|
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
|
||||||
|
`report_id` int(11) NOT NULL,
|
||||||
|
`created_by_id` int(11) NOT NULL,
|
||||||
|
`message` text,
|
||||||
|
`created_at` timestamp NULL DEFAULT NULL,
|
||||||
|
`updated_at` timestamp NULL DEFAULT NULL,
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
||||||
|
|
||||||
|
LOCK TABLES `sam_comments` WRITE;
|
||||||
|
/*!40000 ALTER TABLE `sam_comments` DISABLE KEYS */;
|
||||||
|
|
||||||
|
INSERT INTO `sam_comments` (`id`, `report_id`, `created_by_id`, `message`, `created_at`, `updated_at`)
|
||||||
|
VALUES
|
||||||
|
(1,3,1,'here at the wall.','2021-02-03 00:00:00','2021-02-03 00:00:00'),
|
||||||
|
(2,3,1,'here at the wall again ','2021-02-03 00:00:00','2021-02-03 00:00:00'),
|
||||||
|
(3,4,1,'Now you know what dummy text is, let’s learn about its usefulness. Some people say that they don’t need to use a dummy text generator to deliver a web design project to the customer. ','2021-02-03 00:00:00','2021-02-03 00:00:00'),
|
||||||
|
(4,4,1,'Dummy text shouldn’t make any logical sense, to keep people from focusing on it instead of the visual impact it has. Using filler text is all about facilitating the visual impression of a final piece of web design.','2021-02-03 00:00:00','2021-02-03 00:00:00'),
|
||||||
|
(5,4,1,'Est facere aut volu','2021-02-03 20:33:57','2021-02-03 20:33:57'),
|
||||||
|
(6,4,1,'Eius harum culpa und','2021-02-03 20:35:49','2021-02-03 20:35:49'),
|
||||||
|
(7,4,1,'Lipsum is probably the most popular dummy text generator out there. When analyzing a website template or theme, you probably saw the Latin filler text that gave structure to the page. This was almost certainly generated with Lipsum or a similar tool. It is a simple dummy text generator where you can specify how many words of filler text you need. You can download Lipsum as an add-on for Firefox, which is quite convenient for web designers.','2021-02-03 21:03:54','2021-02-03 21:03:54'),
|
||||||
|
(8,7,1,'Suppose I wish to insert the data from t2 into t1. This data would violate the primary key (a row exists where column a is 1) so the insert will fail: ERROR 1062 (23000): Duplicate entry \'1\' for key 1. Recall that in MySQL, a primary key is simply a unique index named PRIMARY. Any data that violates any unique index will cause the same problem.','2021-02-04 11:05:00','2021-02-04 11:05:00'),
|
||||||
|
(9,3,1,'Suppose I wish to insert the data from t2 into t1. This data would violate the primary key (a row exists where column a is 1) so the insert will fail: ERROR 1062 (23000): Duplicate entry','2021-02-04 11:05:43','2021-02-04 11:05:43');
|
||||||
|
|
||||||
|
/*!40000 ALTER TABLE `sam_comments` ENABLE KEYS */;
|
||||||
|
UNLOCK TABLES;
|
||||||
|
|
||||||
|
|
||||||
|
# Dump of table server_credentials
|
||||||
|
# ------------------------------------------------------------
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `server_credentials`;
|
||||||
|
|
||||||
|
CREATE TABLE `server_credentials` (
|
||||||
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
||||||
|
`server_id` int(11) NOT NULL,
|
||||||
|
`type` varchar(20) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
||||||
|
`username` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||||
|
`password` text COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||||
|
`remarks` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT '',
|
||||||
|
`last_modified_by` int(11) DEFAULT NULL,
|
||||||
|
`created_at` timestamp NULL DEFAULT NULL,
|
||||||
|
`updated_at` timestamp NULL DEFAULT NULL,
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||||
|
|
||||||
|
LOCK TABLES `server_credentials` WRITE;
|
||||||
|
/*!40000 ALTER TABLE `server_credentials` DISABLE KEYS */;
|
||||||
|
|
||||||
|
INSERT INTO `server_credentials` (`id`, `server_id`, `type`, `username`, `password`, `remarks`, `last_modified_by`, `created_at`, `updated_at`)
|
||||||
|
VALUES
|
||||||
|
(1,1,NULL,'root','eyJpdiI6IlpsaG9ranN5Q2NxMVFuTlZvT1c2cEE9PSIsInZhbHVlIjoiNEp5Mzdqa0xoWFwvNUF6Z0lJRVQ4M1RZQmpEZzZiRjhRajZBRnZ6czU0RGs9IiwibWFjIjoiM2M0Njg2YTA1MDgzM2E0ODZhYTM4MmQzNTY1YjVhYjI1Yzk5YTFlMWJjNTE1OGRhNWZmZGUxMjM3OGQxZDg4YyJ9','',1,'2021-04-19 19:20:00','2021-04-19 19:29:27'),
|
||||||
|
(2,2,NULL,'root','eyJpdiI6IktjaHNzUGdseHVIZnpRbFpnTDJRQkE9PSIsInZhbHVlIjoiWURvY0dOUjg0WWM0ZUsyXC9GXC81RitRPT0iLCJtYWMiOiI2NDA4MzRlNjU5ODE1YzRiMzQ1NTFlMzUwMGFlOWUxOTU2YTY5M2Y4OTIwNzEwOGU3ZWU0YzA5MzAzYzdhOGE3In0=','',1,'2021-04-19 19:23:11','2021-04-19 19:23:11');
|
||||||
|
|
||||||
|
/*!40000 ALTER TABLE `server_credentials` ENABLE KEYS */;
|
||||||
|
UNLOCK TABLES;
|
||||||
|
|
||||||
|
|
||||||
|
# Dump of table services
|
||||||
|
# ------------------------------------------------------------
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `services`;
|
||||||
|
|
||||||
|
CREATE TABLE `services` (
|
||||||
|
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
|
||||||
|
`name` varchar(200) NOT NULL DEFAULT '',
|
||||||
|
`type` varchar(200) NOT NULL DEFAULT '',
|
||||||
|
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||||
|
`updated_at` timestamp NULL DEFAULT NULL,
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
||||||
|
|
||||||
|
LOCK TABLES `services` WRITE;
|
||||||
|
/*!40000 ALTER TABLE `services` DISABLE KEYS */;
|
||||||
|
|
||||||
|
INSERT INTO `services` (`id`, `name`, `type`, `created_at`, `updated_at`)
|
||||||
|
VALUES
|
||||||
|
(1,'A2P','regular','2021-02-03 12:53:10','2021-01-20 07:40:59'),
|
||||||
|
(2,'BULK SMS','regular','2021-02-03 13:17:46',NULL),
|
||||||
|
(3,'USSD','','2021-03-09 14:58:12',NULL),
|
||||||
|
(4,'SMS App','','2021-03-09 14:58:18',NULL);
|
||||||
|
|
||||||
|
/*!40000 ALTER TABLE `services` ENABLE KEYS */;
|
||||||
|
UNLOCK TABLES;
|
||||||
|
|
||||||
|
|
||||||
|
# Dump of table users
|
||||||
|
# ------------------------------------------------------------
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `users`;
|
||||||
|
|
||||||
|
CREATE TABLE `users` (
|
||||||
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
||||||
|
`name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||||
|
`email` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||||
|
`password` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||||
|
`remember_token` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
||||||
|
`created_at` timestamp NULL DEFAULT NULL,
|
||||||
|
`updated_at` timestamp NULL DEFAULT NULL,
|
||||||
|
PRIMARY KEY (`id`),
|
||||||
|
UNIQUE KEY `users_email_unique` (`email`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# Dump of table ussd_client_payments
|
||||||
|
# ------------------------------------------------------------
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `ussd_client_payments`;
|
||||||
|
|
||||||
|
CREATE TABLE `ussd_client_payments` (
|
||||||
|
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
|
||||||
|
`client_id` int(11) DEFAULT NULL,
|
||||||
|
`payment_type` varchar(191) DEFAULT NULL,
|
||||||
|
`amount_paid` decimal(30,2) DEFAULT '0.00',
|
||||||
|
`remarks` text,
|
||||||
|
`last_modified_by_id` int(11) DEFAULT NULL,
|
||||||
|
`created_at` timestamp NULL DEFAULT NULL,
|
||||||
|
`updated_at` timestamp NULL DEFAULT NULL,
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
||||||
|
|
||||||
|
LOCK TABLES `ussd_client_payments` WRITE;
|
||||||
|
/*!40000 ALTER TABLE `ussd_client_payments` DISABLE KEYS */;
|
||||||
|
|
||||||
|
INSERT INTO `ussd_client_payments` (`id`, `client_id`, `payment_type`, `amount_paid`, `remarks`, `last_modified_by_id`, `created_at`, `updated_at`)
|
||||||
|
VALUES
|
||||||
|
(1,15,NULL,0.00,NULL,1,'2021-03-16 18:29:11','2021-03-16 18:29:11'),
|
||||||
|
(2,16,NULL,0.00,NULL,1,'2021-03-16 18:29:48','2021-03-16 18:29:48'),
|
||||||
|
(3,17,NULL,0.00,NULL,1,'2021-03-16 18:32:04','2021-03-16 18:32:04'),
|
||||||
|
(4,18,NULL,0.00,NULL,1,'2021-03-16 18:33:23','2021-03-16 18:33:23'),
|
||||||
|
(5,19,NULL,0.00,NULL,1,'2021-03-16 18:49:12','2021-03-16 18:49:12'),
|
||||||
|
(6,20,NULL,0.00,NULL,1,'2021-03-16 18:49:32','2021-03-16 18:49:32'),
|
||||||
|
(7,21,'Laudantium quia qui',2345.00,'Voluptatem quos inv',1,'2021-03-16 18:50:45','2021-03-17 12:13:30'),
|
||||||
|
(8,22,'Neque qui voluptatem',4500.00,'Dolor molestiae cons',1,'2021-03-16 18:51:04','2021-03-17 12:07:12'),
|
||||||
|
(9,23,NULL,0.00,NULL,1,'2021-04-19 12:22:51','2021-04-19 12:22:51'),
|
||||||
|
(10,24,NULL,0.00,NULL,1,'2021-04-19 12:31:23','2021-04-19 12:31:23'),
|
||||||
|
(11,25,NULL,0.00,NULL,1,'2021-05-12 09:49:53','2021-05-12 09:49:53'),
|
||||||
|
(12,26,NULL,0.00,NULL,1,'2021-05-12 09:55:55','2021-05-12 09:55:55');
|
||||||
|
|
||||||
|
/*!40000 ALTER TABLE `ussd_client_payments` ENABLE KEYS */;
|
||||||
|
UNLOCK TABLES;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
||||||
|
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
|
||||||
|
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
|
||||||
|
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
|
||||||
|
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
|
||||||
|
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
||||||
59
composer.json
Executable file
59
composer.json
Executable file
@@ -0,0 +1,59 @@
|
|||||||
|
{
|
||||||
|
"name": "laravel/laravel",
|
||||||
|
"description": "The Laravel Framework.",
|
||||||
|
"keywords": ["framework", "laravel"],
|
||||||
|
"license": "MIT",
|
||||||
|
"type": "project",
|
||||||
|
"require": {
|
||||||
|
"php": ">=7.0.0",
|
||||||
|
"fideloper/proxy": "~3.3",
|
||||||
|
"laravel/framework": "5.5.*",
|
||||||
|
"laravel/tinker": "~1.0",
|
||||||
|
"laravelcollective/html": "^5.4.0"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"filp/whoops": "~2.0",
|
||||||
|
"fzaninotto/faker": "~1.4",
|
||||||
|
"laravel/homestead": "^11.2",
|
||||||
|
"mockery/mockery": "~1.0",
|
||||||
|
"phpunit/phpunit": "~6.0",
|
||||||
|
"symfony/thanks": "^1.0"
|
||||||
|
},
|
||||||
|
"autoload": {
|
||||||
|
"classmap": [
|
||||||
|
"database/seeds",
|
||||||
|
"database/factories"
|
||||||
|
],
|
||||||
|
"psr-4": {
|
||||||
|
"App\\": "app/"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"autoload-dev": {
|
||||||
|
"psr-4": {
|
||||||
|
"Tests\\": "tests/"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"extra": {
|
||||||
|
"laravel": {
|
||||||
|
"dont-discover": [
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"scripts": {
|
||||||
|
"post-root-package-install": [
|
||||||
|
"@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
|
||||||
|
],
|
||||||
|
"post-create-project-cmd": [
|
||||||
|
"@php artisan key:generate"
|
||||||
|
],
|
||||||
|
"post-autoload-dump": [
|
||||||
|
"Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
|
||||||
|
"@php artisan package:discover"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"config": {
|
||||||
|
"preferred-install": "dist",
|
||||||
|
"sort-packages": true,
|
||||||
|
"optimize-autoloader": true
|
||||||
|
}
|
||||||
|
}
|
||||||
5598
composer.lock
generated
Executable file
5598
composer.lock
generated
Executable file
File diff suppressed because it is too large
Load Diff
231
config/app.php
Executable file
231
config/app.php
Executable file
@@ -0,0 +1,231 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Application Name
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This value is the name of your application. This value is used when the
|
||||||
|
| framework needs to place the application's name in a notification or
|
||||||
|
| any other location as required by the application or its packages.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'name' => env('APP_NAME', 'Laravel'),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Application Environment
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This value determines the "environment" your application is currently
|
||||||
|
| running in. This may determine how you prefer to configure various
|
||||||
|
| services your application utilizes. Set this in your ".env" file.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'env' => env('APP_ENV', 'production'),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Application Debug Mode
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| When your application is in debug mode, detailed error messages with
|
||||||
|
| stack traces will be shown on every error that occurs within your
|
||||||
|
| application. If disabled, a simple generic error page is shown.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'debug' => env('APP_DEBUG', false),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Application URL
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This URL is used by the console to properly generate URLs when using
|
||||||
|
| the Artisan command line tool. You should set this to the root of
|
||||||
|
| your application so that it is used when running Artisan tasks.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'url' => env('APP_URL', 'http://localhost'),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Application Timezone
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Here you may specify the default timezone for your application, which
|
||||||
|
| will be used by the PHP date and date-time functions. We have gone
|
||||||
|
| ahead and set this to a sensible default for you out of the box.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'timezone' => 'UTC',
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Application Locale Configuration
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| The application locale determines the default locale that will be used
|
||||||
|
| by the translation service provider. You are free to set this value
|
||||||
|
| to any of the locales which will be supported by the application.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'locale' => 'en',
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Application Fallback Locale
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| The fallback locale determines the locale to use when the current one
|
||||||
|
| is not available. You may change the value to correspond to any of
|
||||||
|
| the language folders that are provided through your application.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'fallback_locale' => 'en',
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Encryption Key
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This key is used by the Illuminate encrypter service and should be set
|
||||||
|
| to a random, 32 character string, otherwise these encrypted strings
|
||||||
|
| will not be safe. Please do this before deploying an application!
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'key' => env('APP_KEY'),
|
||||||
|
|
||||||
|
'cipher' => 'AES-256-CBC',
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Logging Configuration
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Here you may configure the log settings for your application. Out of
|
||||||
|
| the box, Laravel uses the Monolog PHP logging library. This gives
|
||||||
|
| you a variety of powerful log handlers / formatters to utilize.
|
||||||
|
|
|
||||||
|
| Available Settings: "single", "daily", "syslog", "errorlog"
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'log' => env('APP_LOG', 'daily'),
|
||||||
|
|
||||||
|
'log_level' => env('APP_LOG_LEVEL', 'debug'),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Autoloaded Service Providers
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| The service providers listed here will be automatically loaded on the
|
||||||
|
| request to your application. Feel free to add your own services to
|
||||||
|
| this array to grant expanded functionality to your applications.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'providers' => [
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Laravel Framework Service Providers...
|
||||||
|
*/
|
||||||
|
Illuminate\Auth\AuthServiceProvider::class,
|
||||||
|
Illuminate\Broadcasting\BroadcastServiceProvider::class,
|
||||||
|
Illuminate\Bus\BusServiceProvider::class,
|
||||||
|
Illuminate\Cache\CacheServiceProvider::class,
|
||||||
|
Illuminate\Foundation\Providers\ConsoleSupportServiceProvider::class,
|
||||||
|
Illuminate\Cookie\CookieServiceProvider::class,
|
||||||
|
Illuminate\Database\DatabaseServiceProvider::class,
|
||||||
|
Illuminate\Encryption\EncryptionServiceProvider::class,
|
||||||
|
Illuminate\Filesystem\FilesystemServiceProvider::class,
|
||||||
|
Illuminate\Foundation\Providers\FoundationServiceProvider::class,
|
||||||
|
Illuminate\Hashing\HashServiceProvider::class,
|
||||||
|
Illuminate\Mail\MailServiceProvider::class,
|
||||||
|
Illuminate\Notifications\NotificationServiceProvider::class,
|
||||||
|
Illuminate\Pagination\PaginationServiceProvider::class,
|
||||||
|
Illuminate\Pipeline\PipelineServiceProvider::class,
|
||||||
|
Illuminate\Queue\QueueServiceProvider::class,
|
||||||
|
Illuminate\Redis\RedisServiceProvider::class,
|
||||||
|
Illuminate\Auth\Passwords\PasswordResetServiceProvider::class,
|
||||||
|
Illuminate\Session\SessionServiceProvider::class,
|
||||||
|
Illuminate\Translation\TranslationServiceProvider::class,
|
||||||
|
Illuminate\Validation\ValidationServiceProvider::class,
|
||||||
|
Illuminate\View\ViewServiceProvider::class,
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Package Service Providers...
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Application Service Providers...
|
||||||
|
*/
|
||||||
|
App\Providers\AppServiceProvider::class,
|
||||||
|
App\Providers\AuthServiceProvider::class,
|
||||||
|
// App\Providers\BroadcastServiceProvider::class,
|
||||||
|
App\Providers\EventServiceProvider::class,
|
||||||
|
App\Providers\RouteServiceProvider::class,
|
||||||
|
|
||||||
|
],
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Class Aliases
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This array of class aliases will be registered when this application
|
||||||
|
| is started. However, feel free to register as many as you wish as
|
||||||
|
| the aliases are "lazy" loaded so they don't hinder performance.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'aliases' => [
|
||||||
|
|
||||||
|
'App' => Illuminate\Support\Facades\App::class,
|
||||||
|
'Artisan' => Illuminate\Support\Facades\Artisan::class,
|
||||||
|
'Auth' => Illuminate\Support\Facades\Auth::class,
|
||||||
|
'Blade' => Illuminate\Support\Facades\Blade::class,
|
||||||
|
'Broadcast' => Illuminate\Support\Facades\Broadcast::class,
|
||||||
|
'Bus' => Illuminate\Support\Facades\Bus::class,
|
||||||
|
'Cache' => Illuminate\Support\Facades\Cache::class,
|
||||||
|
'Config' => Illuminate\Support\Facades\Config::class,
|
||||||
|
'Cookie' => Illuminate\Support\Facades\Cookie::class,
|
||||||
|
'Crypt' => Illuminate\Support\Facades\Crypt::class,
|
||||||
|
'DB' => Illuminate\Support\Facades\DB::class,
|
||||||
|
'Eloquent' => Illuminate\Database\Eloquent\Model::class,
|
||||||
|
'Event' => Illuminate\Support\Facades\Event::class,
|
||||||
|
'File' => Illuminate\Support\Facades\File::class,
|
||||||
|
'Gate' => Illuminate\Support\Facades\Gate::class,
|
||||||
|
'Hash' => Illuminate\Support\Facades\Hash::class,
|
||||||
|
'Lang' => Illuminate\Support\Facades\Lang::class,
|
||||||
|
'Log' => Illuminate\Support\Facades\Log::class,
|
||||||
|
'Mail' => Illuminate\Support\Facades\Mail::class,
|
||||||
|
'Notification' => Illuminate\Support\Facades\Notification::class,
|
||||||
|
'Password' => Illuminate\Support\Facades\Password::class,
|
||||||
|
'Queue' => Illuminate\Support\Facades\Queue::class,
|
||||||
|
'Redirect' => Illuminate\Support\Facades\Redirect::class,
|
||||||
|
'Redis' => Illuminate\Support\Facades\Redis::class,
|
||||||
|
'Request' => Illuminate\Support\Facades\Request::class,
|
||||||
|
'Response' => Illuminate\Support\Facades\Response::class,
|
||||||
|
'Route' => Illuminate\Support\Facades\Route::class,
|
||||||
|
'Schema' => Illuminate\Support\Facades\Schema::class,
|
||||||
|
'Session' => Illuminate\Support\Facades\Session::class,
|
||||||
|
'Storage' => Illuminate\Support\Facades\Storage::class,
|
||||||
|
'URL' => Illuminate\Support\Facades\URL::class,
|
||||||
|
'Validator' => Illuminate\Support\Facades\Validator::class,
|
||||||
|
'View' => Illuminate\Support\Facades\View::class,
|
||||||
|
|
||||||
|
],
|
||||||
|
|
||||||
|
];
|
||||||
102
config/auth.php
Executable file
102
config/auth.php
Executable file
@@ -0,0 +1,102 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Authentication Defaults
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This option controls the default authentication "guard" and password
|
||||||
|
| reset options for your application. You may change these defaults
|
||||||
|
| as required, but they're a perfect start for most applications.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'defaults' => [
|
||||||
|
'guard' => 'web',
|
||||||
|
'passwords' => 'users',
|
||||||
|
],
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Authentication Guards
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Next, you may define every authentication guard for your application.
|
||||||
|
| Of course, a great default configuration has been defined for you
|
||||||
|
| here which uses session storage and the Eloquent user provider.
|
||||||
|
|
|
||||||
|
| All authentication drivers have a user provider. This defines how the
|
||||||
|
| users are actually retrieved out of your database or other storage
|
||||||
|
| mechanisms used by this application to persist your user's data.
|
||||||
|
|
|
||||||
|
| Supported: "session", "token"
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'guards' => [
|
||||||
|
'web' => [
|
||||||
|
'driver' => 'session',
|
||||||
|
'provider' => 'users',
|
||||||
|
],
|
||||||
|
|
||||||
|
'api' => [
|
||||||
|
'driver' => 'token',
|
||||||
|
'provider' => 'users',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| User Providers
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| All authentication drivers have a user provider. This defines how the
|
||||||
|
| users are actually retrieved out of your database or other storage
|
||||||
|
| mechanisms used by this application to persist your user's data.
|
||||||
|
|
|
||||||
|
| If you have multiple user tables or models you may configure multiple
|
||||||
|
| sources which represent each model / table. These sources may then
|
||||||
|
| be assigned to any extra authentication guards you have defined.
|
||||||
|
|
|
||||||
|
| Supported: "database", "eloquent"
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'providers' => [
|
||||||
|
'users' => [
|
||||||
|
'driver' => 'eloquent',
|
||||||
|
'model' => App\User::class,
|
||||||
|
],
|
||||||
|
|
||||||
|
// 'users' => [
|
||||||
|
// 'driver' => 'database',
|
||||||
|
// 'table' => 'users',
|
||||||
|
// ],
|
||||||
|
],
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Resetting Passwords
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| You may specify multiple password reset configurations if you have more
|
||||||
|
| than one user table or model in the application and you want to have
|
||||||
|
| separate password reset settings based on the specific user types.
|
||||||
|
|
|
||||||
|
| The expire time is the number of minutes that the reset token should be
|
||||||
|
| considered valid. This security feature keeps tokens short-lived so
|
||||||
|
| they have less time to be guessed. You may change this as needed.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'passwords' => [
|
||||||
|
'users' => [
|
||||||
|
'provider' => 'users',
|
||||||
|
'table' => 'password_resets',
|
||||||
|
'expire' => 60,
|
||||||
|
],
|
||||||
|
],
|
||||||
|
|
||||||
|
];
|
||||||
59
config/broadcasting.php
Executable file
59
config/broadcasting.php
Executable file
@@ -0,0 +1,59 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Default Broadcaster
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This option controls the default broadcaster that will be used by the
|
||||||
|
| framework when an event needs to be broadcast. You may set this to
|
||||||
|
| any of the connections defined in the "connections" array below.
|
||||||
|
|
|
||||||
|
| Supported: "pusher", "redis", "log", "null"
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'default' => env('BROADCAST_DRIVER', 'null'),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Broadcast Connections
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Here you may define all of the broadcast connections that will be used
|
||||||
|
| to broadcast events to other systems or over websockets. Samples of
|
||||||
|
| each available type of connection are provided inside this array.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'connections' => [
|
||||||
|
|
||||||
|
'pusher' => [
|
||||||
|
'driver' => 'pusher',
|
||||||
|
'key' => env('PUSHER_APP_KEY'),
|
||||||
|
'secret' => env('PUSHER_APP_SECRET'),
|
||||||
|
'app_id' => env('PUSHER_APP_ID'),
|
||||||
|
'options' => [
|
||||||
|
'cluster' => env('PUSHER_APP_CLUSTER'),
|
||||||
|
'encrypted' => true,
|
||||||
|
],
|
||||||
|
],
|
||||||
|
|
||||||
|
'redis' => [
|
||||||
|
'driver' => 'redis',
|
||||||
|
'connection' => 'default',
|
||||||
|
],
|
||||||
|
|
||||||
|
'log' => [
|
||||||
|
'driver' => 'log',
|
||||||
|
],
|
||||||
|
|
||||||
|
'null' => [
|
||||||
|
'driver' => 'null',
|
||||||
|
],
|
||||||
|
|
||||||
|
],
|
||||||
|
|
||||||
|
];
|
||||||
94
config/cache.php
Executable file
94
config/cache.php
Executable file
@@ -0,0 +1,94 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Default Cache Store
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This option controls the default cache connection that gets used while
|
||||||
|
| using this caching library. This connection is used when another is
|
||||||
|
| not explicitly specified when executing a given caching function.
|
||||||
|
|
|
||||||
|
| Supported: "apc", "array", "database", "file", "memcached", "redis"
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'default' => env('CACHE_DRIVER', 'file'),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Cache Stores
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Here you may define all of the cache "stores" for your application as
|
||||||
|
| well as their drivers. You may even define multiple stores for the
|
||||||
|
| same cache driver to group types of items stored in your caches.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'stores' => [
|
||||||
|
|
||||||
|
'apc' => [
|
||||||
|
'driver' => 'apc',
|
||||||
|
],
|
||||||
|
|
||||||
|
'array' => [
|
||||||
|
'driver' => 'array',
|
||||||
|
],
|
||||||
|
|
||||||
|
'database' => [
|
||||||
|
'driver' => 'database',
|
||||||
|
'table' => 'cache',
|
||||||
|
'connection' => null,
|
||||||
|
],
|
||||||
|
|
||||||
|
'file' => [
|
||||||
|
'driver' => 'file',
|
||||||
|
'path' => storage_path('framework/cache/data'),
|
||||||
|
],
|
||||||
|
|
||||||
|
'memcached' => [
|
||||||
|
'driver' => 'memcached',
|
||||||
|
'persistent_id' => env('MEMCACHED_PERSISTENT_ID'),
|
||||||
|
'sasl' => [
|
||||||
|
env('MEMCACHED_USERNAME'),
|
||||||
|
env('MEMCACHED_PASSWORD'),
|
||||||
|
],
|
||||||
|
'options' => [
|
||||||
|
// Memcached::OPT_CONNECT_TIMEOUT => 2000,
|
||||||
|
],
|
||||||
|
'servers' => [
|
||||||
|
[
|
||||||
|
'host' => env('MEMCACHED_HOST', '127.0.0.1'),
|
||||||
|
'port' => env('MEMCACHED_PORT', 11211),
|
||||||
|
'weight' => 100,
|
||||||
|
],
|
||||||
|
],
|
||||||
|
],
|
||||||
|
|
||||||
|
'redis' => [
|
||||||
|
'driver' => 'redis',
|
||||||
|
'connection' => 'default',
|
||||||
|
],
|
||||||
|
|
||||||
|
],
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Cache Key Prefix
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| When utilizing a RAM based store such as APC or Memcached, there might
|
||||||
|
| be other applications utilizing the same cache. So, we'll specify a
|
||||||
|
| value to get prefixed to all our keys so we can avoid collisions.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'prefix' => env(
|
||||||
|
'CACHE_PREFIX',
|
||||||
|
str_slug(env('APP_NAME', 'ClickTracker'), '_').'_cache'
|
||||||
|
),
|
||||||
|
|
||||||
|
];
|
||||||
120
config/database.php
Executable file
120
config/database.php
Executable file
@@ -0,0 +1,120 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Default Database Connection Name
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Here you may specify which of the database connections below you wish
|
||||||
|
| to use as your default connection for all database work. Of course
|
||||||
|
| you may use many connections at once using the Database library.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'default' => env('DB_CONNECTION', 'mysql'),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Database Connections
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Here are each of the database connections setup for your application.
|
||||||
|
| Of course, examples of configuring each database platform that is
|
||||||
|
| supported by Laravel is shown below to make development simple.
|
||||||
|
|
|
||||||
|
|
|
||||||
|
| All database work in Laravel is done through the PHP PDO facilities
|
||||||
|
| so make sure you have the driver for your particular database of
|
||||||
|
| choice installed on your machine before you begin development.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'connections' => [
|
||||||
|
|
||||||
|
'sqlite' => [
|
||||||
|
'driver' => 'sqlite',
|
||||||
|
'database' => env('DB_DATABASE', database_path('database.sqlite')),
|
||||||
|
'prefix' => '',
|
||||||
|
],
|
||||||
|
|
||||||
|
'mysql' => [
|
||||||
|
'driver' => 'mysql',
|
||||||
|
'host' => env('DB_HOST', '127.0.0.1'),
|
||||||
|
'port' => env('DB_PORT', '3306'),
|
||||||
|
'database' => env('DB_DATABASE', 'forge'),
|
||||||
|
'username' => env('DB_USERNAME', 'forge'),
|
||||||
|
'password' => env('DB_PASSWORD', ''),
|
||||||
|
'unix_socket' => env('DB_SOCKET', ''),
|
||||||
|
'charset' => 'utf8mb4',
|
||||||
|
'collation' => 'utf8mb4_unicode_ci',
|
||||||
|
'prefix' => '',
|
||||||
|
'strict' => true,
|
||||||
|
'engine' => null,
|
||||||
|
],
|
||||||
|
|
||||||
|
'pgsql' => [
|
||||||
|
'driver' => 'pgsql',
|
||||||
|
'host' => env('DB_HOST', '127.0.0.1'),
|
||||||
|
'port' => env('DB_PORT', '5432'),
|
||||||
|
'database' => env('DB_DATABASE', 'forge'),
|
||||||
|
'username' => env('DB_USERNAME', 'forge'),
|
||||||
|
'password' => env('DB_PASSWORD', ''),
|
||||||
|
'charset' => 'utf8',
|
||||||
|
'prefix' => '',
|
||||||
|
'schema' => 'public',
|
||||||
|
'sslmode' => 'prefer',
|
||||||
|
],
|
||||||
|
|
||||||
|
'sqlsrv' => [
|
||||||
|
'driver' => 'sqlsrv',
|
||||||
|
'host' => env('DB_HOST', 'localhost'),
|
||||||
|
'port' => env('DB_PORT', '1433'),
|
||||||
|
'database' => env('DB_DATABASE', 'forge'),
|
||||||
|
'username' => env('DB_USERNAME', 'forge'),
|
||||||
|
'password' => env('DB_PASSWORD', ''),
|
||||||
|
'charset' => 'utf8',
|
||||||
|
'prefix' => '',
|
||||||
|
],
|
||||||
|
|
||||||
|
],
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Migration Repository Table
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This table keeps track of all the migrations that have already run for
|
||||||
|
| your application. Using this information, we can determine which of
|
||||||
|
| the migrations on disk haven't actually been run in the database.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'migrations' => 'migrations',
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Redis Databases
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Redis is an open source, fast, and advanced key-value store that also
|
||||||
|
| provides a richer set of commands than a typical key-value systems
|
||||||
|
| such as APC or Memcached. Laravel makes it easy to dig right in.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'redis' => [
|
||||||
|
|
||||||
|
'client' => 'predis',
|
||||||
|
|
||||||
|
'default' => [
|
||||||
|
'host' => env('REDIS_HOST', '127.0.0.1'),
|
||||||
|
'password' => env('REDIS_PASSWORD', null),
|
||||||
|
'port' => env('REDIS_PORT', 6379),
|
||||||
|
'database' => 0,
|
||||||
|
],
|
||||||
|
|
||||||
|
],
|
||||||
|
|
||||||
|
];
|
||||||
69
config/filesystems.php
Executable file
69
config/filesystems.php
Executable file
@@ -0,0 +1,69 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Default Filesystem Disk
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Here you may specify the default filesystem disk that should be used
|
||||||
|
| by the framework. The "local" disk, as well as a variety of cloud
|
||||||
|
| based disks are available to your application. Just store away!
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'default' => env('FILESYSTEM_DRIVER', 'local'),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Default Cloud Filesystem Disk
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Many applications store files both locally and in the cloud. For this
|
||||||
|
| reason, you may specify a default "cloud" driver here. This driver
|
||||||
|
| will be bound as the Cloud disk implementation in the container.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'cloud' => env('FILESYSTEM_CLOUD', 's3'),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Filesystem Disks
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Here you may configure as many filesystem "disks" as you wish, and you
|
||||||
|
| may even configure multiple disks of the same driver. Defaults have
|
||||||
|
| been setup for each driver as an example of the required options.
|
||||||
|
|
|
||||||
|
| Supported Drivers: "local", "ftp", "s3", "rackspace"
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'disks' => [
|
||||||
|
|
||||||
|
'local' => [
|
||||||
|
'driver' => 'local',
|
||||||
|
'root' => storage_path('app'),
|
||||||
|
],
|
||||||
|
|
||||||
|
'public' => [
|
||||||
|
'driver' => 'local',
|
||||||
|
// 'root' => storage_path('app/public'),
|
||||||
|
'root' => public_path('app_files'),
|
||||||
|
'url' => env('APP_URL').'/storage',
|
||||||
|
'visibility' => 'public',
|
||||||
|
],
|
||||||
|
|
||||||
|
's3' => [
|
||||||
|
'driver' => 's3',
|
||||||
|
'key' => env('AWS_ACCESS_KEY_ID'),
|
||||||
|
'secret' => env('AWS_SECRET_ACCESS_KEY'),
|
||||||
|
'region' => env('AWS_DEFAULT_REGION'),
|
||||||
|
'bucket' => env('AWS_BUCKET'),
|
||||||
|
],
|
||||||
|
|
||||||
|
],
|
||||||
|
|
||||||
|
];
|
||||||
123
config/mail.php
Executable file
123
config/mail.php
Executable file
@@ -0,0 +1,123 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Mail Driver
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Laravel supports both SMTP and PHP's "mail" function as drivers for the
|
||||||
|
| sending of e-mail. You may specify which one you're using throughout
|
||||||
|
| your application here. By default, Laravel is setup for SMTP mail.
|
||||||
|
|
|
||||||
|
| Supported: "smtp", "sendmail", "mailgun", "mandrill", "ses",
|
||||||
|
| "sparkpost", "log", "array"
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'driver' => env('MAIL_DRIVER', 'smtp'),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| SMTP Host Address
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Here you may provide the host address of the SMTP server used by your
|
||||||
|
| applications. A default option is provided that is compatible with
|
||||||
|
| the Mailgun mail service which will provide reliable deliveries.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'host' => env('MAIL_HOST', 'smtp.mailgun.org'),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| SMTP Host Port
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This is the SMTP port used by your application to deliver e-mails to
|
||||||
|
| users of the application. Like the host we have set this value to
|
||||||
|
| stay compatible with the Mailgun e-mail application by default.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'port' => env('MAIL_PORT', 587),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Global "From" Address
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| You may wish for all e-mails sent by your application to be sent from
|
||||||
|
| the same address. Here, you may specify a name and address that is
|
||||||
|
| used globally for all e-mails that are sent by your application.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'from' => [
|
||||||
|
'address' => env('MAIL_FROM_ADDRESS', 'hello@example.com'),
|
||||||
|
'name' => env('MAIL_FROM_NAME', 'Example'),
|
||||||
|
],
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| E-Mail Encryption Protocol
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Here you may specify the encryption protocol that should be used when
|
||||||
|
| the application send e-mail messages. A sensible default using the
|
||||||
|
| transport layer security protocol should provide great security.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'encryption' => env('MAIL_ENCRYPTION', 'tls'),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| SMTP Server Username
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| If your SMTP server requires a username for authentication, you should
|
||||||
|
| set it here. This will get used to authenticate with your server on
|
||||||
|
| connection. You may also set the "password" value below this one.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'username' => env('MAIL_USERNAME'),
|
||||||
|
|
||||||
|
'password' => env('MAIL_PASSWORD'),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Sendmail System Path
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| When using the "sendmail" driver to send e-mails, we will need to know
|
||||||
|
| the path to where Sendmail lives on this server. A default path has
|
||||||
|
| been provided here, which will work well on most of your systems.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'sendmail' => '/usr/sbin/sendmail -bs',
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Markdown Mail Settings
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| If you are using Markdown based email rendering, you may configure your
|
||||||
|
| theme and component paths here, allowing you to customize the design
|
||||||
|
| of the emails. Or, you may simply stick with the Laravel defaults!
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'markdown' => [
|
||||||
|
'theme' => 'default',
|
||||||
|
|
||||||
|
'paths' => [
|
||||||
|
resource_path('views/vendor/mail'),
|
||||||
|
],
|
||||||
|
],
|
||||||
|
|
||||||
|
];
|
||||||
85
config/queue.php
Executable file
85
config/queue.php
Executable file
@@ -0,0 +1,85 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Default Queue Driver
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Laravel's queue API supports an assortment of back-ends via a single
|
||||||
|
| API, giving you convenient access to each back-end using the same
|
||||||
|
| syntax for each one. Here you may set the default queue driver.
|
||||||
|
|
|
||||||
|
| Supported: "sync", "database", "beanstalkd", "sqs", "redis", "null"
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'default' => env('QUEUE_DRIVER', 'sync'),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Queue Connections
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Here you may configure the connection information for each server that
|
||||||
|
| is used by your application. A default configuration has been added
|
||||||
|
| for each back-end shipped with Laravel. You are free to add more.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'connections' => [
|
||||||
|
|
||||||
|
'sync' => [
|
||||||
|
'driver' => 'sync',
|
||||||
|
],
|
||||||
|
|
||||||
|
'database' => [
|
||||||
|
'driver' => 'database',
|
||||||
|
'table' => 'jobs',
|
||||||
|
'queue' => 'default',
|
||||||
|
'retry_after' => 90,
|
||||||
|
],
|
||||||
|
|
||||||
|
'beanstalkd' => [
|
||||||
|
'driver' => 'beanstalkd',
|
||||||
|
'host' => 'localhost',
|
||||||
|
'queue' => 'default',
|
||||||
|
'retry_after' => 90,
|
||||||
|
],
|
||||||
|
|
||||||
|
'sqs' => [
|
||||||
|
'driver' => 'sqs',
|
||||||
|
'key' => env('SQS_KEY', 'your-public-key'),
|
||||||
|
'secret' => env('SQS_SECRET', 'your-secret-key'),
|
||||||
|
'prefix' => env('SQS_PREFIX', 'https://sqs.us-east-1.amazonaws.com/your-account-id'),
|
||||||
|
'queue' => env('SQS_QUEUE', 'your-queue-name'),
|
||||||
|
'region' => env('SQS_REGION', 'us-east-1'),
|
||||||
|
],
|
||||||
|
|
||||||
|
'redis' => [
|
||||||
|
'driver' => 'redis',
|
||||||
|
'connection' => 'default',
|
||||||
|
'queue' => 'default',
|
||||||
|
'retry_after' => 90,
|
||||||
|
],
|
||||||
|
|
||||||
|
],
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Failed Queue Jobs
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| These options configure the behavior of failed queue job logging so you
|
||||||
|
| can control which database and table are used to store the jobs that
|
||||||
|
| have failed. You may change them to any database / table you wish.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'failed' => [
|
||||||
|
'database' => env('DB_CONNECTION', 'mysql'),
|
||||||
|
'table' => 'failed_jobs',
|
||||||
|
],
|
||||||
|
|
||||||
|
];
|
||||||
38
config/services.php
Executable file
38
config/services.php
Executable file
@@ -0,0 +1,38 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Third Party Services
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This file is for storing the credentials for third party services such
|
||||||
|
| as Stripe, Mailgun, SparkPost and others. This file provides a sane
|
||||||
|
| default location for this type of information, allowing packages
|
||||||
|
| to have a conventional place to find your various credentials.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'mailgun' => [
|
||||||
|
'domain' => env('MAILGUN_DOMAIN'),
|
||||||
|
'secret' => env('MAILGUN_SECRET'),
|
||||||
|
],
|
||||||
|
|
||||||
|
'ses' => [
|
||||||
|
'key' => env('SES_KEY'),
|
||||||
|
'secret' => env('SES_SECRET'),
|
||||||
|
'region' => 'us-east-1',
|
||||||
|
],
|
||||||
|
|
||||||
|
'sparkpost' => [
|
||||||
|
'secret' => env('SPARKPOST_SECRET'),
|
||||||
|
],
|
||||||
|
|
||||||
|
'stripe' => [
|
||||||
|
'model' => App\User::class,
|
||||||
|
'key' => env('STRIPE_KEY'),
|
||||||
|
'secret' => env('STRIPE_SECRET'),
|
||||||
|
],
|
||||||
|
|
||||||
|
];
|
||||||
197
config/session.php
Executable file
197
config/session.php
Executable file
@@ -0,0 +1,197 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Default Session Driver
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This option controls the default session "driver" that will be used on
|
||||||
|
| requests. By default, we will use the lightweight native driver but
|
||||||
|
| you may specify any of the other wonderful drivers provided here.
|
||||||
|
|
|
||||||
|
| Supported: "file", "cookie", "database", "apc",
|
||||||
|
| "memcached", "redis", "array"
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'driver' => env('SESSION_DRIVER', 'file'),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Session Lifetime
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Here you may specify the number of minutes that you wish the session
|
||||||
|
| to be allowed to remain idle before it expires. If you want them
|
||||||
|
| to immediately expire on the browser closing, set that option.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'lifetime' => env('SESSION_LIFETIME', 120),
|
||||||
|
|
||||||
|
'expire_on_close' => false,
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Session Encryption
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This option allows you to easily specify that all of your session data
|
||||||
|
| should be encrypted before it is stored. All encryption will be run
|
||||||
|
| automatically by Laravel and you can use the Session like normal.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'encrypt' => false,
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Session File Location
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| When using the native session driver, we need a location where session
|
||||||
|
| files may be stored. A default has been set for you but a different
|
||||||
|
| location may be specified. This is only needed for file sessions.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'files' => storage_path('framework/sessions'),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Session Database Connection
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| When using the "database" or "redis" session drivers, you may specify a
|
||||||
|
| connection that should be used to manage these sessions. This should
|
||||||
|
| correspond to a connection in your database configuration options.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'connection' => null,
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Session Database Table
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| When using the "database" session driver, you may specify the table we
|
||||||
|
| should use to manage the sessions. Of course, a sensible default is
|
||||||
|
| provided for you; however, you are free to change this as needed.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'table' => 'sessions',
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Session Cache Store
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| When using the "apc" or "memcached" session drivers, you may specify a
|
||||||
|
| cache store that should be used for these sessions. This value must
|
||||||
|
| correspond with one of the application's configured cache stores.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'store' => null,
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Session Sweeping Lottery
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Some session drivers must manually sweep their storage location to get
|
||||||
|
| rid of old sessions from storage. Here are the chances that it will
|
||||||
|
| happen on a given request. By default, the odds are 2 out of 100.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'lottery' => [2, 100],
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Session Cookie Name
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Here you may change the name of the cookie used to identify a session
|
||||||
|
| instance by ID. The name specified here will get used every time a
|
||||||
|
| new session cookie is created by the framework for every driver.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'cookie' => env(
|
||||||
|
'SESSION_COOKIE',
|
||||||
|
str_slug(env('APP_NAME', 'laravel'), '_').'_session'
|
||||||
|
),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Session Cookie Path
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| The session cookie path determines the path for which the cookie will
|
||||||
|
| be regarded as available. Typically, this will be the root path of
|
||||||
|
| your application but you are free to change this when necessary.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'path' => '/',
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Session Cookie Domain
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Here you may change the domain of the cookie used to identify a session
|
||||||
|
| in your application. This will determine which domains the cookie is
|
||||||
|
| available to in your application. A sensible default has been set.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'domain' => env('SESSION_DOMAIN', null),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| HTTPS Only Cookies
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| By setting this option to true, session cookies will only be sent back
|
||||||
|
| to the server if the browser has a HTTPS connection. This will keep
|
||||||
|
| the cookie from being sent to you if it can not be done securely.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'secure' => env('SESSION_SECURE_COOKIE', false),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| HTTP Access Only
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Setting this value to true will prevent JavaScript from accessing the
|
||||||
|
| value of the cookie and the cookie will only be accessible through
|
||||||
|
| the HTTP protocol. You are free to modify this option if needed.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'http_only' => true,
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Same-Site Cookies
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This option determines how your cookies behave when cross-site requests
|
||||||
|
| take place, and can be used to mitigate CSRF attacks. By default, we
|
||||||
|
| do not enable this as other CSRF protection services are in place.
|
||||||
|
|
|
||||||
|
| Supported: "lax", "strict"
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'same_site' => 'strict',
|
||||||
|
|
||||||
|
];
|
||||||
33
config/view.php
Executable file
33
config/view.php
Executable file
@@ -0,0 +1,33 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| View Storage Paths
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Most templating systems load templates from disk. Here you may specify
|
||||||
|
| an array of paths that should be checked for your views. Of course
|
||||||
|
| the usual Laravel view path has already been registered for you.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'paths' => [
|
||||||
|
resource_path('views'),
|
||||||
|
],
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Compiled View Path
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This option determines where all the compiled Blade templates will be
|
||||||
|
| stored for your application. Typically, this is within the storage
|
||||||
|
| directory. However, as usual, you are free to change this value.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'compiled' => realpath(storage_path('framework/views')),
|
||||||
|
|
||||||
|
];
|
||||||
1
database/.gitignore
vendored
Executable file
1
database/.gitignore
vendored
Executable file
@@ -0,0 +1 @@
|
|||||||
|
*.sqlite
|
||||||
23
database/factories/UserFactory.php
Executable file
23
database/factories/UserFactory.php
Executable file
@@ -0,0 +1,23 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Faker\Generator as Faker;
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Model Factories
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This directory should contain each of the model factory definitions for
|
||||||
|
| your application. Factories provide a convenient way to generate new
|
||||||
|
| model instances for testing / seeding your application's database.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
$factory->define(App\User::class, function (Faker $faker) {
|
||||||
|
return [
|
||||||
|
'name' => $faker->name,
|
||||||
|
'email' => $faker->unique()->safeEmail,
|
||||||
|
'password' => '$2y$10$TKh8H1.PfQx37YgCzwiKb.KjNyWgaHb9cbcoQgdIVFlYg7B77UdFm', // secret
|
||||||
|
'remember_token' => str_random(10),
|
||||||
|
];
|
||||||
|
});
|
||||||
35
database/migrations/2014_10_12_000000_create_users_table.php
Executable file
35
database/migrations/2014_10_12_000000_create_users_table.php
Executable file
@@ -0,0 +1,35 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
|
||||||
|
class CreateUsersTable extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function up()
|
||||||
|
{
|
||||||
|
Schema::create('users', function (Blueprint $table) {
|
||||||
|
$table->increments('id');
|
||||||
|
$table->string('name');
|
||||||
|
$table->string('email')->unique();
|
||||||
|
$table->string('password');
|
||||||
|
$table->rememberToken();
|
||||||
|
$table->timestamps();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function down()
|
||||||
|
{
|
||||||
|
Schema::dropIfExists('users');
|
||||||
|
}
|
||||||
|
}
|
||||||
32
database/migrations/2014_10_12_100000_create_password_resets_table.php
Executable file
32
database/migrations/2014_10_12_100000_create_password_resets_table.php
Executable file
@@ -0,0 +1,32 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
|
||||||
|
class CreatePasswordResetsTable extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function up()
|
||||||
|
{
|
||||||
|
Schema::create('password_resets', function (Blueprint $table) {
|
||||||
|
$table->string('email')->index();
|
||||||
|
$table->string('token');
|
||||||
|
$table->timestamp('created_at')->nullable();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function down()
|
||||||
|
{
|
||||||
|
Schema::dropIfExists('password_resets');
|
||||||
|
}
|
||||||
|
}
|
||||||
36
database/migrations/2021_04_13_104850_create_click_servers_table.php
Executable file
36
database/migrations/2021_04_13_104850_create_click_servers_table.php
Executable file
@@ -0,0 +1,36 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
|
||||||
|
class CreateClickServersTable extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function up()
|
||||||
|
{
|
||||||
|
Schema::create('click_servers', function (Blueprint $table) {
|
||||||
|
$table->increments('id');
|
||||||
|
$table->string('friendly_name');
|
||||||
|
$table->ipAddress('public_ip_address');
|
||||||
|
$table->ipAddress('private_ip_address');
|
||||||
|
$table->string('main_use');
|
||||||
|
$table->string('remarks');
|
||||||
|
$table->timestamps();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function down()
|
||||||
|
{
|
||||||
|
Schema::dropIfExists('click_servers');
|
||||||
|
}
|
||||||
|
}
|
||||||
36
database/migrations/2021_04_13_111024_create_server_crendentials_table.php
Executable file
36
database/migrations/2021_04_13_111024_create_server_crendentials_table.php
Executable file
@@ -0,0 +1,36 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
|
||||||
|
class CreateServerCrendentialsTable extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function up()
|
||||||
|
{
|
||||||
|
Schema::create('server_crendentials', function (Blueprint $table) {
|
||||||
|
$table->increments('id');
|
||||||
|
$table->integer('server_id');
|
||||||
|
$table->string('type')->comment('Operating System or Database');
|
||||||
|
$table->string('username');
|
||||||
|
$table->string('password');
|
||||||
|
$table->string('remarks');
|
||||||
|
$table->timestamps();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function down()
|
||||||
|
{
|
||||||
|
Schema::dropIfExists('server_crendentials');
|
||||||
|
}
|
||||||
|
}
|
||||||
39
database/migrations/2021_04_13_111110_create_direct_connections_table.php
Executable file
39
database/migrations/2021_04_13_111110_create_direct_connections_table.php
Executable file
@@ -0,0 +1,39 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
|
||||||
|
class CreateDirectConnectionsTable extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function up()
|
||||||
|
{
|
||||||
|
Schema::create('direct_connections', function (Blueprint $table) {
|
||||||
|
$table->increments('id');
|
||||||
|
$table->integer('server_id');
|
||||||
|
$table->string('direct_partner');
|
||||||
|
$table->string('connection_type')->comment('VPN or Internet');
|
||||||
|
$table->ipAddress('main_ip_address');
|
||||||
|
$table->string('port');
|
||||||
|
$table->ipAddress('vpn_peer_ip');
|
||||||
|
$table->string('domain_name');
|
||||||
|
$table->text('connection_document');
|
||||||
|
$table->timestamps();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function down()
|
||||||
|
{
|
||||||
|
Schema::dropIfExists('direct_connections');
|
||||||
|
}
|
||||||
|
}
|
||||||
16
database/seeds/DatabaseSeeder.php
Executable file
16
database/seeds/DatabaseSeeder.php
Executable file
@@ -0,0 +1,16 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Seeder;
|
||||||
|
|
||||||
|
class DatabaseSeeder extends Seeder
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the database seeds.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function run()
|
||||||
|
{
|
||||||
|
// $this->call(UsersTableSeeder::class);
|
||||||
|
}
|
||||||
|
}
|
||||||
66
effie-comments.md
Executable file
66
effie-comments.md
Executable file
@@ -0,0 +1,66 @@
|
|||||||
|
# Sam's Comments
|
||||||
|
Hi Sam,
|
||||||
|
|
||||||
|
Following your request during today training, this email serves as a reminder for you to
|
||||||
|
engage with Kwesi to come up with a tracker.
|
||||||
|
|
||||||
|
This tracker must have specifications that we get from different operators
|
||||||
|
i.e., for both USSD and SMS.
|
||||||
|
|
||||||
|
You are to engage with Hilary as well, to add a product segment on the website.
|
||||||
|
|
||||||
|
Kind Regards,
|
||||||
|
|
||||||
|
|
||||||
|
##
|
||||||
|
Hi Kwesi,
|
||||||
|
|
||||||
|
So I reviewed the tracker and below are some of my preliminary notes:
|
||||||
|
|
||||||
|
- A. when i logged in it says Welcome Effie tedela, the name is Effie Tadala 😊.
|
||||||
|
|
||||||
|
- B. the date after logging in is showing Wednesday 28th July 2021.
|
||||||
|
|
||||||
|
B. CLIENTS (the client section will require a bit more modification to accommodate the categorisation and the email alerts. I will work on it)
|
||||||
|
|
||||||
|
I am only seeing A2P clients on the list. I think that is not the full list of the A2P interconnections that we have, please engage Charity to share full list.
|
||||||
|
We need subgroups of clients; Charity can assist with the lists as well.
|
||||||
|
USSD and SMS Short Code clients- specify whether app development included or just aggregation. The short code itself should also be included.
|
||||||
|
|
||||||
|
2.1.1. toll free or revenue sharing services to be specified.
|
||||||
|
2.1.2. Specify whether USSD only, SMS only or both USSD and SMS
|
||||||
|
|
||||||
|
airtime clients.
|
||||||
|
Bulk SMS clients.
|
||||||
|
Voice clients.
|
||||||
|
|
||||||
|
an email alert to be sent out when the portal has been edited for example when a new client has been added.
|
||||||
|
I would like to be able to add a client and a notification to be sent to the account managers so that they can assign a manager to that client. Has this been done?
|
||||||
|
just like we are assigning account managers, we must have at least one point of contact from our clients end as well.
|
||||||
|
Some of the clients do not have their contacts listed on the tracker.
|
||||||
|
|
||||||
|
C. CLIENTS
|
||||||
|
can we have a way to filter the clients to be listed in alphabetical order.
|
||||||
|
I am only seeing A2P clients on the list. we need sub groups:
|
||||||
|
|
||||||
|
|
||||||
|
## Use notes column to handle the extra details
|
||||||
|
USSD Short Code clients- specify whether app development included or just aggregation.
|
||||||
|
SMS SC clients- specify whether app development included or just aggregation.
|
||||||
|
toll free or revenue sharing services to be specified.
|
||||||
|
airtime clients
|
||||||
|
Bulk SMS clients
|
||||||
|
A2P clients- grouped by country as well.
|
||||||
|
|
||||||
|
an email alert to be sent out when the portal has been edited for example when a new client has been added. I would like to be able to add a client and a notification to be sent to the account managers so that they can assign a manager to that client.
|
||||||
|
just like we are assigning account managers, we must have at least one point of contact from our clients end as well.
|
||||||
|
|
||||||
|
D. USSD clients payments
|
||||||
|
|
||||||
|
received an error when i clicked on this link.
|
||||||
|
do we have a SC monthly payment tracker for our short code clients?
|
||||||
|
|
||||||
|
E. Meeting reports:
|
||||||
|
the marketing team need to have a tab as well so that they can be updating their meeting reports with clients too.
|
||||||
|
|
||||||
|
|
||||||
60
index.php
Executable file
60
index.php
Executable file
@@ -0,0 +1,60 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Laravel - A PHP Framework For Web Artisans
|
||||||
|
*
|
||||||
|
* @package Laravel
|
||||||
|
* @author Taylor Otwell <taylor@laravel.com>
|
||||||
|
*/
|
||||||
|
|
||||||
|
define('LARAVEL_START', microtime(true));
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Register The Auto Loader
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Composer provides a convenient, automatically generated class loader for
|
||||||
|
| our application. We just need to utilize it! We'll simply require it
|
||||||
|
| into the script here so that we don't have to worry about manual
|
||||||
|
| loading any of our classes later on. It feels great to relax.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
require __DIR__.'/vendor/autoload.php';
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Turn On The Lights
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| We need to illuminate PHP development, so let us turn on the lights.
|
||||||
|
| This bootstraps the framework and gets it ready for use, then it
|
||||||
|
| will load up this application so that we can run it and send
|
||||||
|
| the responses back to the browser and delight our users.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
$app = require_once __DIR__.'/bootstrap/app.php';
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Run The Application
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Once we have the application, we can handle the incoming request
|
||||||
|
| through the kernel, and send the associated response back to
|
||||||
|
| the client's browser allowing them to enjoy the creative
|
||||||
|
| and wonderful application we have prepared for them.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
$kernel = $app->make(Illuminate\Contracts\Http\Kernel::class);
|
||||||
|
|
||||||
|
$response = $kernel->handle(
|
||||||
|
$request = Illuminate\Http\Request::capture()
|
||||||
|
);
|
||||||
|
|
||||||
|
$response->send();
|
||||||
|
|
||||||
|
$kernel->terminate($request, $response);
|
||||||
25
package.json
Executable file
25
package.json
Executable file
@@ -0,0 +1,25 @@
|
|||||||
|
{
|
||||||
|
"private": true,
|
||||||
|
"scripts": {
|
||||||
|
"dev": "npm run development",
|
||||||
|
"development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
|
||||||
|
"watch": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
|
||||||
|
"watch-poll": "npm run watch -- --watch-poll",
|
||||||
|
"hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js",
|
||||||
|
"prod": "npm run production",
|
||||||
|
"production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --no-progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"axios": "^0.17",
|
||||||
|
"bootstrap-sass": "^3.3.7",
|
||||||
|
"cross-env": "^5.1",
|
||||||
|
"jquery": "^3.2",
|
||||||
|
"laravel-mix": "^1.0",
|
||||||
|
"lodash": "^4.17.4",
|
||||||
|
"vue": "^2.5.7"
|
||||||
|
},
|
||||||
|
"config": {
|
||||||
|
"platform-check": false
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
31
phpunit.xml
Executable file
31
phpunit.xml
Executable file
@@ -0,0 +1,31 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<phpunit backupGlobals="false"
|
||||||
|
backupStaticAttributes="false"
|
||||||
|
bootstrap="vendor/autoload.php"
|
||||||
|
colors="true"
|
||||||
|
convertErrorsToExceptions="true"
|
||||||
|
convertNoticesToExceptions="true"
|
||||||
|
convertWarningsToExceptions="true"
|
||||||
|
processIsolation="false"
|
||||||
|
stopOnFailure="false">
|
||||||
|
<testsuites>
|
||||||
|
<testsuite name="Feature">
|
||||||
|
<directory suffix="Test.php">./tests/Feature</directory>
|
||||||
|
</testsuite>
|
||||||
|
|
||||||
|
<testsuite name="Unit">
|
||||||
|
<directory suffix="Test.php">./tests/Unit</directory>
|
||||||
|
</testsuite>
|
||||||
|
</testsuites>
|
||||||
|
<filter>
|
||||||
|
<whitelist processUncoveredFilesFromWhitelist="true">
|
||||||
|
<directory suffix=".php">./app</directory>
|
||||||
|
</whitelist>
|
||||||
|
</filter>
|
||||||
|
<php>
|
||||||
|
<env name="APP_ENV" value="testing"/>
|
||||||
|
<env name="CACHE_DRIVER" value="array"/>
|
||||||
|
<env name="SESSION_DRIVER" value="array"/>
|
||||||
|
<env name="QUEUE_DRIVER" value="sync"/>
|
||||||
|
</php>
|
||||||
|
</phpunit>
|
||||||
21
public/.htaccess
Executable file
21
public/.htaccess
Executable file
@@ -0,0 +1,21 @@
|
|||||||
|
<IfModule mod_rewrite.c>
|
||||||
|
<IfModule mod_negotiation.c>
|
||||||
|
Options -MultiViews -Indexes
|
||||||
|
</IfModule>
|
||||||
|
|
||||||
|
RewriteEngine On
|
||||||
|
|
||||||
|
# Handle Authorization Header
|
||||||
|
RewriteCond %{HTTP:Authorization} .
|
||||||
|
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
|
||||||
|
|
||||||
|
# Redirect Trailing Slashes If Not A Folder...
|
||||||
|
RewriteCond %{REQUEST_FILENAME} !-d
|
||||||
|
RewriteCond %{REQUEST_URI} (.+)/$
|
||||||
|
RewriteRule ^ %1 [L,R=301]
|
||||||
|
|
||||||
|
# Handle Front Controller...
|
||||||
|
RewriteCond %{REQUEST_FILENAME} !-d
|
||||||
|
RewriteCond %{REQUEST_FILENAME} !-f
|
||||||
|
RewriteRule ^ index.php [L]
|
||||||
|
</IfModule>
|
||||||
4255
public/assets/build/css/custom.css
vendored
Executable file
4255
public/assets/build/css/custom.css
vendored
Executable file
File diff suppressed because it is too large
Load Diff
7
public/assets/build/css/custom.min.css
vendored
Executable file
7
public/assets/build/css/custom.min.css
vendored
Executable file
File diff suppressed because one or more lines are too long
BIN
public/assets/build/images/back_disabled.png
Executable file
BIN
public/assets/build/images/back_disabled.png
Executable file
Binary file not shown.
|
After Width: | Height: | Size: 1.3 KiB |
BIN
public/assets/build/images/back_enabled.png
Executable file
BIN
public/assets/build/images/back_enabled.png
Executable file
Binary file not shown.
|
After Width: | Height: | Size: 1.3 KiB |
BIN
public/assets/build/images/back_enabled_hover.png
Executable file
BIN
public/assets/build/images/back_enabled_hover.png
Executable file
Binary file not shown.
|
After Width: | Height: | Size: 1.3 KiB |
BIN
public/assets/build/images/forward_disabled.png
Executable file
BIN
public/assets/build/images/forward_disabled.png
Executable file
Binary file not shown.
|
After Width: | Height: | Size: 1.3 KiB |
BIN
public/assets/build/images/forward_enabled.png
Executable file
BIN
public/assets/build/images/forward_enabled.png
Executable file
Binary file not shown.
|
After Width: | Height: | Size: 1.3 KiB |
BIN
public/assets/build/images/forward_enabled_hover.png
Executable file
BIN
public/assets/build/images/forward_enabled_hover.png
Executable file
Binary file not shown.
|
After Width: | Height: | Size: 1.3 KiB |
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user