update,
This commit is contained in:
BIN
quotation2/LMS Project.odt
Normal file
BIN
quotation2/LMS Project.odt
Normal file
Binary file not shown.
BIN
quotation2/LMS_remake note.docx
Normal file
BIN
quotation2/LMS_remake note.docx
Normal file
Binary file not shown.
BIN
quotation2/docs/admin/Screenshot from 2023-08-08 21-47-42.png
(Stored with Git LFS)
Normal file
BIN
quotation2/docs/admin/Screenshot from 2023-08-08 21-47-42.png
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
quotation2/docs/admin/Screenshot from 2023-08-08 22-02-52.png
(Stored with Git LFS)
Normal file
BIN
quotation2/docs/admin/Screenshot from 2023-08-08 22-02-52.png
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
quotation2/docs/admin/Screenshot from 2023-08-08 22-03-32.png
(Stored with Git LFS)
Normal file
BIN
quotation2/docs/admin/Screenshot from 2023-08-08 22-03-32.png
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
quotation2/docs/admin/Screenshot from 2023-08-08 22-03-38.png
(Stored with Git LFS)
Normal file
BIN
quotation2/docs/admin/Screenshot from 2023-08-08 22-03-38.png
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
quotation2/docs/admin/Screenshot from 2023-08-08 22-03-44.png
(Stored with Git LFS)
Normal file
BIN
quotation2/docs/admin/Screenshot from 2023-08-08 22-03-44.png
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
quotation2/docs/admin/Screenshot from 2023-08-08 22-03-50.png
(Stored with Git LFS)
Normal file
BIN
quotation2/docs/admin/Screenshot from 2023-08-08 22-03-50.png
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
quotation2/docs/admin/Screenshot from 2023-08-08 22-03-57.png
(Stored with Git LFS)
Normal file
BIN
quotation2/docs/admin/Screenshot from 2023-08-08 22-03-57.png
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
quotation2/docs/admin/Screenshot from 2023-08-08 22-04-04.png
(Stored with Git LFS)
Normal file
BIN
quotation2/docs/admin/Screenshot from 2023-08-08 22-04-04.png
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
quotation2/docs/admin/Screenshot from 2023-08-08 22-04-15.png
(Stored with Git LFS)
Normal file
BIN
quotation2/docs/admin/Screenshot from 2023-08-08 22-04-15.png
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
quotation2/docs/admin/Screenshot from 2023-08-08 22-04-20.png
(Stored with Git LFS)
Normal file
BIN
quotation2/docs/admin/Screenshot from 2023-08-08 22-04-20.png
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
quotation2/docs/admin/Screenshot from 2023-08-08 22-04-27.png
(Stored with Git LFS)
Normal file
BIN
quotation2/docs/admin/Screenshot from 2023-08-08 22-04-27.png
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
quotation2/docs/admin/Screenshot from 2023-08-08 22-04-32.png
(Stored with Git LFS)
Normal file
BIN
quotation2/docs/admin/Screenshot from 2023-08-08 22-04-32.png
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
quotation2/docs/admin/Screenshot from 2023-08-08 22-04-40.png
(Stored with Git LFS)
Normal file
BIN
quotation2/docs/admin/Screenshot from 2023-08-08 22-04-40.png
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
quotation2/docs/admin/Screenshot from 2023-08-08 22-04-48.png
(Stored with Git LFS)
Normal file
BIN
quotation2/docs/admin/Screenshot from 2023-08-08 22-04-48.png
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
quotation2/docs/admin/Screenshot from 2023-08-08 22-04-55.png
(Stored with Git LFS)
Normal file
BIN
quotation2/docs/admin/Screenshot from 2023-08-08 22-04-55.png
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
quotation2/docs/admin/Screenshot from 2023-08-08 22-05-01.png
(Stored with Git LFS)
Normal file
BIN
quotation2/docs/admin/Screenshot from 2023-08-08 22-05-01.png
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
quotation2/docs/admin/Screenshot from 2023-08-08 22-05-09.png
(Stored with Git LFS)
Normal file
BIN
quotation2/docs/admin/Screenshot from 2023-08-08 22-05-09.png
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
quotation2/docs/admin/Screenshot from 2023-08-08 22-05-14.png
(Stored with Git LFS)
Normal file
BIN
quotation2/docs/admin/Screenshot from 2023-08-08 22-05-14.png
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
quotation2/docs/front/4iuKD3.png
(Stored with Git LFS)
Normal file
BIN
quotation2/docs/front/4iuKD3.png
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
quotation2/docs/front/MfZmuJ.png
(Stored with Git LFS)
Normal file
BIN
quotation2/docs/front/MfZmuJ.png
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
quotation2/docs/front/XMCLNV.png
(Stored with Git LFS)
Normal file
BIN
quotation2/docs/front/XMCLNV.png
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
quotation2/docs/front/YLhjqT.png
(Stored with Git LFS)
Normal file
BIN
quotation2/docs/front/YLhjqT.png
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
quotation2/docs/front/ahj70K.png
(Stored with Git LFS)
Normal file
BIN
quotation2/docs/front/ahj70K.png
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
quotation2/docs/front/ahwGNP.png
(Stored with Git LFS)
Normal file
BIN
quotation2/docs/front/ahwGNP.png
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
quotation2/docs/front/n5FYka.png
(Stored with Git LFS)
Normal file
BIN
quotation2/docs/front/n5FYka.png
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
quotation2/docs/front/snQzrN.png
(Stored with Git LFS)
Normal file
BIN
quotation2/docs/front/snQzrN.png
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
quotation2/docs/front/zncKnX.png
(Stored with Git LFS)
Normal file
BIN
quotation2/docs/front/zncKnX.png
(Stored with Git LFS)
Normal file
Binary file not shown.
12
quotation2/laravel-simple-tryout/.editorconfig
Normal file
12
quotation2/laravel-simple-tryout/.editorconfig
Normal file
@@ -0,0 +1,12 @@
|
||||
# EditorConfig is awesome: https://EditorConfig.org
|
||||
|
||||
# top-most EditorConfig file
|
||||
root = true
|
||||
|
||||
[*]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
end_of_line = lf
|
||||
charset = utf-8
|
||||
trim_trailing_whitespace = true
|
||||
insert_final_newline = true
|
144
quotation2/laravel-simple-tryout/.gitignore
vendored
Normal file
144
quotation2/laravel-simple-tryout/.gitignore
vendored
Normal file
@@ -0,0 +1,144 @@
|
||||
# Created by https://www.toptal.com/developers/gitignore/api/node
|
||||
# Edit at https://www.toptal.com/developers/gitignore?templates=node
|
||||
|
||||
### Node ###
|
||||
# Logs
|
||||
logs
|
||||
*.log
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
lerna-debug.log*
|
||||
.pnpm-debug.log*
|
||||
|
||||
# Diagnostic reports (https://nodejs.org/api/report.html)
|
||||
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
|
||||
|
||||
# Runtime data
|
||||
pids
|
||||
*.pid
|
||||
*.seed
|
||||
*.pid.lock
|
||||
|
||||
# Directory for instrumented libs generated by jscoverage/JSCover
|
||||
lib-cov
|
||||
|
||||
# Coverage directory used by tools like istanbul
|
||||
coverage
|
||||
*.lcov
|
||||
|
||||
# nyc test coverage
|
||||
.nyc_output
|
||||
|
||||
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
|
||||
.grunt
|
||||
|
||||
# Bower dependency directory (https://bower.io/)
|
||||
bower_components
|
||||
|
||||
# node-waf configuration
|
||||
.lock-wscript
|
||||
|
||||
# Compiled binary addons (https://nodejs.org/api/addons.html)
|
||||
build/Release
|
||||
|
||||
# Dependency directories
|
||||
node_modules/
|
||||
jspm_packages/
|
||||
|
||||
# Snowpack dependency directory (https://snowpack.dev/)
|
||||
web_modules/
|
||||
|
||||
# TypeScript cache
|
||||
*.tsbuildinfo
|
||||
|
||||
# Optional npm cache directory
|
||||
.npm
|
||||
|
||||
# Optional eslint cache
|
||||
.eslintcache
|
||||
|
||||
# Optional stylelint cache
|
||||
.stylelintcache
|
||||
|
||||
# Microbundle cache
|
||||
.rpt2_cache/
|
||||
.rts2_cache_cjs/
|
||||
.rts2_cache_es/
|
||||
.rts2_cache_umd/
|
||||
|
||||
# Optional REPL history
|
||||
.node_repl_history
|
||||
|
||||
# Output of 'npm pack'
|
||||
*.tgz
|
||||
|
||||
# Yarn Integrity file
|
||||
.yarn-integrity
|
||||
|
||||
# dotenv environment variable files
|
||||
.env
|
||||
.env.development.local
|
||||
.env.test.local
|
||||
.env.production.local
|
||||
.env.local
|
||||
|
||||
# parcel-bundler cache (https://parceljs.org/)
|
||||
.cache
|
||||
.parcel-cache
|
||||
|
||||
# Next.js build output
|
||||
.next
|
||||
out
|
||||
|
||||
# Nuxt.js build / generate output
|
||||
.nuxt
|
||||
dist
|
||||
|
||||
# Gatsby files
|
||||
.cache/
|
||||
# Comment in the public line in if your project uses Gatsby and not Next.js
|
||||
# https://nextjs.org/blog/next-9-1#public-directory-support
|
||||
# public
|
||||
|
||||
# vuepress build output
|
||||
.vuepress/dist
|
||||
|
||||
# vuepress v2.x temp and cache directory
|
||||
.temp
|
||||
|
||||
# Docusaurus cache and generated files
|
||||
.docusaurus
|
||||
|
||||
# Serverless directories
|
||||
.serverless/
|
||||
|
||||
# FuseBox cache
|
||||
.fusebox/
|
||||
|
||||
# DynamoDB Local files
|
||||
.dynamodb/
|
||||
|
||||
# TernJS port file
|
||||
.tern-port
|
||||
|
||||
# Stores VSCode versions used for testing VSCode extensions
|
||||
.vscode-test
|
||||
|
||||
# yarn v2
|
||||
.yarn/cache
|
||||
.yarn/unplugged
|
||||
.yarn/build-state.yml
|
||||
.yarn/install-state.gz
|
||||
.pnp.*
|
||||
|
||||
### Node Patch ###
|
||||
# Serverless Webpack directories
|
||||
.webpack/
|
||||
|
||||
# Optional stylelint cache
|
||||
|
||||
# SvelteKit build / generate output
|
||||
.svelte-kit
|
||||
|
||||
# End of https://www.toptal.com/developers/gitignore/api/node
|
6
quotation2/laravel-simple-tryout/clear_docker.ps1
Normal file
6
quotation2/laravel-simple-tryout/clear_docker.ps1
Normal file
@@ -0,0 +1,6 @@
|
||||
# Stop and remove all running containers
|
||||
docker stop $(docker ps -a -q)
|
||||
docker rm $(docker ps -a -q)
|
||||
|
||||
# Remove all container images
|
||||
docker rmi $(docker images -q)
|
33
quotation2/laravel-simple-tryout/docker-compose.yml
Normal file
33
quotation2/laravel-simple-tryout/docker-compose.yml
Normal file
@@ -0,0 +1,33 @@
|
||||
services:
|
||||
php74-httpd:
|
||||
# image: composer
|
||||
build: php74-httpd
|
||||
ports:
|
||||
- 8000:8000
|
||||
volumes:
|
||||
- ./php74-httpd:/app
|
||||
- ./php74-httpd/php-cli.ini:/usr/local/etc/php/php-cli.ini
|
||||
working_dir: /app
|
||||
user: 1000:1000
|
||||
command: sleep infinity
|
||||
|
||||
mysql:
|
||||
image: mysql:latest
|
||||
# ports:
|
||||
# - 3306:3306
|
||||
environment:
|
||||
MYSQL_ROOT_PASSWORD: root
|
||||
MYSQL_DATABASE: laravel
|
||||
MYSQL_USER: project
|
||||
MYSQL_PASSWORD: project
|
||||
|
||||
phpmyadmin:
|
||||
image: phpmyadmin/phpmyadmin
|
||||
ports:
|
||||
- 8089:80
|
||||
environment:
|
||||
PMA_HOST: mysql
|
||||
PMA_USER: project
|
||||
PMA_PASSWORD: project
|
||||
UPLOAD_LIMIT: 10G
|
||||
MAX_EXECUTION_TIME: 1800
|
10
quotation2/laravel-simple-tryout/init_helloworld.sh
Normal file
10
quotation2/laravel-simple-tryout/init_helloworld.sh
Normal file
@@ -0,0 +1,10 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -ex
|
||||
|
||||
rm -rf example-app
|
||||
|
||||
composer create-project laravel/laravel example-app
|
||||
|
||||
pushd example-app
|
||||
php artisan serve --host 0.0.0.0
|
8
quotation2/laravel-simple-tryout/pack.ps1
Normal file
8
quotation2/laravel-simple-tryout/pack.ps1
Normal file
@@ -0,0 +1,8 @@
|
||||
|
||||
pushd ..
|
||||
|
||||
Compress-Archive laravel-helloworld-tryout-simple delivery-new.zip
|
||||
rm .\delivery.zip
|
||||
mv .\delivery-new.zip .\delivery.zip
|
||||
|
||||
popd
|
3156
quotation2/laravel-simple-tryout/package-lock.json
generated
Normal file
3156
quotation2/laravel-simple-tryout/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
17
quotation2/laravel-simple-tryout/package.json
Normal file
17
quotation2/laravel-simple-tryout/package.json
Normal file
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"name": "laravel-docker-helloworld",
|
||||
"version": "1.0.0",
|
||||
"description": "",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1",
|
||||
"gitUpdate": "git add . && git commit -m\"update laravel-material-dashboard-simple-tryout,\" && git push",
|
||||
"watch-bs": "browser-sync start --proxy \"localhost:8009\" --files \"**/*.php\""
|
||||
},
|
||||
"keywords": [],
|
||||
"author": "",
|
||||
"license": "ISC",
|
||||
"devDependencies": {
|
||||
"browser-sync": "^2.29.1"
|
||||
}
|
||||
}
|
12
quotation2/laravel-simple-tryout/php74-httpd/dev.sh
Normal file
12
quotation2/laravel-simple-tryout/php74-httpd/dev.sh
Normal file
@@ -0,0 +1,12 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -ex
|
||||
|
||||
pushd ./example-app
|
||||
# composer update
|
||||
composer install
|
||||
|
||||
php artisan migrate:fresh --seed
|
||||
|
||||
php artisan serve --host 0.0.0.0
|
||||
popd
|
4
quotation2/laravel-simple-tryout/php74-httpd/dockerfile
Normal file
4
quotation2/laravel-simple-tryout/php74-httpd/dockerfile
Normal file
@@ -0,0 +1,4 @@
|
||||
FROM composer
|
||||
|
||||
RUN docker-php-ext-install mysqli pdo pdo_mysql && docker-php-ext-enable pdo_mysql
|
||||
|
@@ -0,0 +1,18 @@
|
||||
root = true
|
||||
|
||||
[*]
|
||||
charset = utf-8
|
||||
end_of_line = lf
|
||||
indent_size = 4
|
||||
indent_style = space
|
||||
insert_final_newline = true
|
||||
trim_trailing_whitespace = true
|
||||
|
||||
[*.md]
|
||||
trim_trailing_whitespace = false
|
||||
|
||||
[*.{yml,yaml}]
|
||||
indent_size = 2
|
||||
|
||||
[docker-compose.yml]
|
||||
indent_size = 4
|
@@ -0,0 +1,58 @@
|
||||
APP_NAME=Laravel
|
||||
APP_ENV=local
|
||||
APP_KEY=
|
||||
APP_DEBUG=true
|
||||
APP_URL=http://localhost
|
||||
|
||||
LOG_CHANNEL=stack
|
||||
LOG_DEPRECATIONS_CHANNEL=null
|
||||
LOG_LEVEL=debug
|
||||
|
||||
DB_CONNECTION=mysql
|
||||
DB_HOST=127.0.0.1
|
||||
DB_PORT=3306
|
||||
DB_DATABASE=project_lms
|
||||
DB_USERNAME=root
|
||||
DB_PASSWORD=
|
||||
|
||||
BROADCAST_DRIVER=log
|
||||
CACHE_DRIVER=file
|
||||
FILESYSTEM_DISK=local
|
||||
QUEUE_CONNECTION=sync
|
||||
SESSION_DRIVER=file
|
||||
SESSION_LIFETIME=120
|
||||
|
||||
MEMCACHED_HOST=127.0.0.1
|
||||
|
||||
REDIS_HOST=127.0.0.1
|
||||
REDIS_PASSWORD=null
|
||||
REDIS_PORT=6379
|
||||
|
||||
MAIL_MAILER=smtp
|
||||
MAIL_HOST=mailhog
|
||||
MAIL_PORT=1025
|
||||
MAIL_USERNAME=null
|
||||
MAIL_PASSWORD=null
|
||||
MAIL_ENCRYPTION=null
|
||||
MAIL_FROM_ADDRESS="hello@example.com"
|
||||
MAIL_FROM_NAME="${APP_NAME}"
|
||||
|
||||
AWS_ACCESS_KEY_ID=
|
||||
AWS_SECRET_ACCESS_KEY=
|
||||
AWS_DEFAULT_REGION=us-east-1
|
||||
AWS_BUCKET=
|
||||
AWS_USE_PATH_STYLE_ENDPOINT=false
|
||||
|
||||
PUSHER_APP_ID=
|
||||
PUSHER_APP_KEY=
|
||||
PUSHER_APP_SECRET=
|
||||
PUSHER_HOST=
|
||||
PUSHER_PORT=443
|
||||
PUSHER_SCHEME=https
|
||||
PUSHER_APP_CLUSTER=mt1
|
||||
|
||||
VITE_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
|
||||
VITE_PUSHER_HOST="${PUSHER_HOST}"
|
||||
VITE_PUSHER_PORT="${PUSHER_PORT}"
|
||||
VITE_PUSHER_SCHEME="${PUSHER_SCHEME}"
|
||||
VITE_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
|
11
quotation2/laravel-simple-tryout/php74-httpd/example-app/.gitattributes
vendored
Normal file
11
quotation2/laravel-simple-tryout/php74-httpd/example-app/.gitattributes
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
* text=auto
|
||||
|
||||
*.blade.php diff=html
|
||||
*.css diff=css
|
||||
*.html diff=html
|
||||
*.md diff=markdown
|
||||
*.php diff=php
|
||||
|
||||
/.github export-ignore
|
||||
CHANGELOG.md export-ignore
|
||||
.styleci.yml export-ignore
|
18
quotation2/laravel-simple-tryout/php74-httpd/example-app/.gitignore
vendored
Normal file
18
quotation2/laravel-simple-tryout/php74-httpd/example-app/.gitignore
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
/node_modules
|
||||
/public/build
|
||||
/public/hot
|
||||
/public/storage
|
||||
/storage/*.key
|
||||
/vendor
|
||||
.env
|
||||
.env.backup
|
||||
.env.production
|
||||
.phpunit.result.cache
|
||||
Homestead.json
|
||||
Homestead.yaml
|
||||
auth.json
|
||||
npm-debug.log
|
||||
yarn-error.log
|
||||
/.fleet
|
||||
/.idea
|
||||
/.vscode
|
@@ -0,0 +1,66 @@
|
||||
<p align="center"><a href="https://laravel.com" target="_blank"><img src="https://raw.githubusercontent.com/laravel/art/master/logo-lockup/5%20SVG/2%20CMYK/1%20Full%20Color/laravel-logolockup-cmyk-red.svg" width="400" alt="Laravel Logo"></a></p>
|
||||
|
||||
<p align="center">
|
||||
<a href="https://travis-ci.org/laravel/framework"><img src="https://travis-ci.org/laravel/framework.svg" alt="Build Status"></a>
|
||||
<a href="https://packagist.org/packages/laravel/framework"><img src="https://img.shields.io/packagist/dt/laravel/framework" alt="Total Downloads"></a>
|
||||
<a href="https://packagist.org/packages/laravel/framework"><img src="https://img.shields.io/packagist/v/laravel/framework" alt="Latest Stable Version"></a>
|
||||
<a href="https://packagist.org/packages/laravel/framework"><img src="https://img.shields.io/packagist/l/laravel/framework" alt="License"></a>
|
||||
</p>
|
||||
|
||||
## About Laravel
|
||||
|
||||
Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experience to be truly fulfilling. Laravel takes the pain out of development by easing common tasks used in many web projects, such as:
|
||||
|
||||
- [Simple, fast routing engine](https://laravel.com/docs/routing).
|
||||
- [Powerful dependency injection container](https://laravel.com/docs/container).
|
||||
- Multiple back-ends for [session](https://laravel.com/docs/session) and [cache](https://laravel.com/docs/cache) storage.
|
||||
- Expressive, intuitive [database ORM](https://laravel.com/docs/eloquent).
|
||||
- Database agnostic [schema migrations](https://laravel.com/docs/migrations).
|
||||
- [Robust background job processing](https://laravel.com/docs/queues).
|
||||
- [Real-time event broadcasting](https://laravel.com/docs/broadcasting).
|
||||
|
||||
Laravel is accessible, powerful, and provides tools required for large, robust applications.
|
||||
|
||||
## Learning Laravel
|
||||
|
||||
Laravel has the most extensive and thorough [documentation](https://laravel.com/docs) and video tutorial library of all modern web application frameworks, making it a breeze to get started with the framework.
|
||||
|
||||
You may also try the [Laravel Bootcamp](https://bootcamp.laravel.com), where you will be guided through building a modern Laravel application from scratch.
|
||||
|
||||
If you don't feel like reading, [Laracasts](https://laracasts.com) can help. Laracasts contains over 2000 video tutorials on a range of topics including Laravel, modern PHP, unit testing, and JavaScript. Boost your skills by digging into our comprehensive video library.
|
||||
|
||||
## Laravel Sponsors
|
||||
|
||||
We would like to extend our thanks to the following sponsors for funding Laravel development. If you are interested in becoming a sponsor, please visit the Laravel [Patreon page](https://patreon.com/taylorotwell).
|
||||
|
||||
### Premium Partners
|
||||
|
||||
- **[Vehikl](https://vehikl.com/)**
|
||||
- **[Tighten Co.](https://tighten.co)**
|
||||
- **[Kirschbaum Development Group](https://kirschbaumdevelopment.com)**
|
||||
- **[64 Robots](https://64robots.com)**
|
||||
- **[Cubet Techno Labs](https://cubettech.com)**
|
||||
- **[Cyber-Duck](https://cyber-duck.co.uk)**
|
||||
- **[Many](https://www.many.co.uk)**
|
||||
- **[Webdock, Fast VPS Hosting](https://www.webdock.io/en)**
|
||||
- **[DevSquad](https://devsquad.com)**
|
||||
- **[Curotec](https://www.curotec.com/services/technologies/laravel/)**
|
||||
- **[OP.GG](https://op.gg)**
|
||||
- **[WebReinvent](https://webreinvent.com/?utm_source=laravel&utm_medium=github&utm_campaign=patreon-sponsors)**
|
||||
- **[Lendio](https://lendio.com)**
|
||||
|
||||
## Contributing
|
||||
|
||||
Thank you for considering contributing to the Laravel framework! The contribution guide can be found in the [Laravel documentation](https://laravel.com/docs/contributions).
|
||||
|
||||
## Code of Conduct
|
||||
|
||||
In order to ensure that the Laravel community is welcoming to all, please review and abide by the [Code of Conduct](https://laravel.com/docs/contributions#code-of-conduct).
|
||||
|
||||
## Security Vulnerabilities
|
||||
|
||||
If you discover a security vulnerability within Laravel, please send an e-mail to Taylor Otwell via [taylor@laravel.com](mailto:taylor@laravel.com). All security vulnerabilities will be promptly addressed.
|
||||
|
||||
## License
|
||||
|
||||
The Laravel framework is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT).
|
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
namespace App\Console;
|
||||
|
||||
use Illuminate\Console\Scheduling\Schedule;
|
||||
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
|
||||
|
||||
class Kernel extends ConsoleKernel
|
||||
{
|
||||
/**
|
||||
* 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');
|
||||
}
|
||||
}
|
@@ -0,0 +1,50 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exceptions;
|
||||
|
||||
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
|
||||
use Throwable;
|
||||
|
||||
class Handler extends ExceptionHandler
|
||||
{
|
||||
/**
|
||||
* A list of exception types with their corresponding custom log levels.
|
||||
*
|
||||
* @var array<class-string<\Throwable>, \Psr\Log\LogLevel::*>
|
||||
*/
|
||||
protected $levels = [
|
||||
//
|
||||
];
|
||||
|
||||
/**
|
||||
* A list of the exception types that are not reported.
|
||||
*
|
||||
* @var array<int, class-string<\Throwable>>
|
||||
*/
|
||||
protected $dontReport = [
|
||||
//
|
||||
];
|
||||
|
||||
/**
|
||||
* A list of the inputs that are never flashed to the session on validation exceptions.
|
||||
*
|
||||
* @var array<int, string>
|
||||
*/
|
||||
protected $dontFlash = [
|
||||
'current_password',
|
||||
'password',
|
||||
'password_confirmation',
|
||||
];
|
||||
|
||||
/**
|
||||
* Register the exception handling callbacks for the application.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function register()
|
||||
{
|
||||
$this->reportable(function (Throwable $e) {
|
||||
//
|
||||
});
|
||||
}
|
||||
}
|
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
namespace App\Helper;
|
||||
|
||||
class Helpers {
|
||||
|
||||
public static function getunlimitedTestAttempt($attempt)
|
||||
{
|
||||
$html = "";
|
||||
if($attempt == 1){
|
||||
$html = "<label class='badge badge-success'>Yes</label>";
|
||||
}else{
|
||||
$html = "<lable class='badge badge-primary'>No</lable>";
|
||||
}
|
||||
return $html;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
?>
|
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Auth;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Providers\RouteServiceProvider;
|
||||
use Illuminate\Foundation\Auth\ConfirmsPasswords;
|
||||
|
||||
class ConfirmPasswordController extends Controller
|
||||
{
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Confirm Password Controller
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This controller is responsible for handling password confirmations and
|
||||
| uses a simple trait to include the behavior. You're free to explore
|
||||
| this trait and override any functions that require customization.
|
||||
|
|
||||
*/
|
||||
|
||||
use ConfirmsPasswords;
|
||||
|
||||
/**
|
||||
* Where to redirect users when the intended url fails.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $redirectTo = RouteServiceProvider::HOME;
|
||||
|
||||
/**
|
||||
* Create a new controller instance.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->middleware('auth');
|
||||
}
|
||||
}
|
@@ -0,0 +1,22 @@
|
||||
<?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;
|
||||
}
|
@@ -0,0 +1,85 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Auth;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Providers\RouteServiceProvider;
|
||||
use Illuminate\Foundation\Auth\AuthenticatesUsers;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Illuminate\Support\Facades\Validator;
|
||||
|
||||
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 = RouteServiceProvider::HOME;
|
||||
|
||||
/**
|
||||
* Create a new controller instance.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->middleware('guest')->except('logout');
|
||||
}
|
||||
public function index() {
|
||||
if(Auth::check()){
|
||||
return redirect(route('admin.dashboard'));
|
||||
}
|
||||
return view('admin.login');
|
||||
}
|
||||
/* Login Check Authenticate User */
|
||||
public function login(Request $request){
|
||||
|
||||
$validator = Validator::make($request->all(), [
|
||||
'email' => 'required|email|max:255',
|
||||
'password' => 'required|min:8',
|
||||
]);
|
||||
if ($validator->fails()) {
|
||||
|
||||
return redirect('login')
|
||||
->withErrors($validator, 'login')
|
||||
->withInput();
|
||||
}
|
||||
if (Auth::attempt(['email' => $request->email, 'password' => $request->password])) {
|
||||
$user = Auth::user();
|
||||
if($user->email_verified_at && $user->email_verified_at ==null){
|
||||
$this->logout($request);
|
||||
redirect()->route('login')->with("error","Your are not verified user.");
|
||||
}
|
||||
if($user->role == 1){
|
||||
return redirect()->route('admin.dashboard')->with("success","Welcome To ". env("APP_NAME"));
|
||||
}else{
|
||||
redirect()->route('login')->with("error","Your are not authorized user.");
|
||||
}
|
||||
|
||||
}else{
|
||||
return redirect()->back()->with("error","Invalid Email Or Password.");
|
||||
}
|
||||
}
|
||||
|
||||
/*Logout*/
|
||||
public function logout(Request $request){
|
||||
Auth::logout();
|
||||
$request->session()->regenerateToken();
|
||||
return redirect()->route('login');
|
||||
}
|
||||
}
|
@@ -0,0 +1,73 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Auth;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Providers\RouteServiceProvider;
|
||||
use App\Models\User;
|
||||
use Illuminate\Foundation\Auth\RegistersUsers;
|
||||
use Illuminate\Support\Facades\Hash;
|
||||
use Illuminate\Support\Facades\Validator;
|
||||
|
||||
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 = RouteServiceProvider::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:8', 'confirmed'],
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a new user instance after a valid registration.
|
||||
*
|
||||
* @param array $data
|
||||
* @return \App\Models\User
|
||||
*/
|
||||
protected function create(array $data)
|
||||
{
|
||||
return User::create([
|
||||
'name' => $data['name'],
|
||||
'email' => $data['email'],
|
||||
'password' => Hash::make($data['password']),
|
||||
]);
|
||||
}
|
||||
}
|
@@ -0,0 +1,85 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Auth;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Providers\RouteServiceProvider;
|
||||
use Illuminate\Foundation\Auth\ResetsPasswords;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Validator;
|
||||
use App\Models\User;
|
||||
use Illuminate\Support\Facades\Crypt;
|
||||
use App\Models\ResetPassword;
|
||||
use App\Jobs\SendEmailJob;
|
||||
use Illuminate\Support\Facades\Hash;
|
||||
use Illuminate\Support\Facades\URL;
|
||||
|
||||
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 = RouteServiceProvider::HOME;
|
||||
|
||||
public function forgotpassword() {
|
||||
return view('admin.forgotpassword');
|
||||
}
|
||||
|
||||
public function sendEmailForgotPassword(Request $request) {
|
||||
$validator = Validator::make($request->all(), [
|
||||
'email' => 'required|email|max:255',
|
||||
]);
|
||||
if ($validator->fails()) {
|
||||
return redirect('forgotpassword')
|
||||
->withErrors($validator, 'forgotpassword')
|
||||
->withInput();
|
||||
}
|
||||
$user = User::where('email', $request->email)->first();
|
||||
if (!$user) {
|
||||
return redirect()->route('forgotpassword')->with("error", "Your not Registered User.");
|
||||
}
|
||||
$token = Crypt::encrypt($request->email);
|
||||
ResetPassword::updateOrCreate(["email" => $request->email, 'token' => $token]);
|
||||
dispatch(new SendEmailJob([
|
||||
'_blade' => 'forgot',
|
||||
'name' => $user->name,
|
||||
'toemail' => $request->email,
|
||||
'token' => $token,
|
||||
'url' => route('resetpassword', $token)
|
||||
]));
|
||||
return redirect()->route('forgotpassword')->with("success", "Your Forgot Password mail has been sent Succefully!");
|
||||
}
|
||||
|
||||
public function resetpassword($token) {
|
||||
$resetpasswordData = ResetPassword::where('token', $token)->first();
|
||||
if (empty($resetpasswordData)) {
|
||||
return redirect()->route('login')->with("error", "Your Reset Password link has been expired.");
|
||||
}
|
||||
return view('admin.resetpassword', compact('resetpasswordData'));
|
||||
}
|
||||
|
||||
public function postResetPassword(Request $request) {
|
||||
if ($request->password != $request->confirmpassword) {
|
||||
return redirect()->route('resetpassword')->with("error", "Password and Confirm Password has been not match.");
|
||||
}
|
||||
$email = $request->email;
|
||||
User::where('email', $email)->update(["password" => Hash::make($request->password)]);
|
||||
ResetPassword::where('email', $email)->delete();
|
||||
return redirect()->route('login')->with("success", "Your Password has been Reset Succefully!");
|
||||
}
|
||||
|
||||
}
|
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Auth;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Providers\RouteServiceProvider;
|
||||
use Illuminate\Foundation\Auth\VerifiesEmails;
|
||||
|
||||
class VerificationController extends Controller
|
||||
{
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Email Verification Controller
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This controller is responsible for handling email verification for any
|
||||
| user that recently registered with the application. Emails may also
|
||||
| be re-sent if the user didn't receive the original email message.
|
||||
|
|
||||
*/
|
||||
|
||||
use VerifiesEmails;
|
||||
|
||||
/**
|
||||
* Where to redirect users after verification.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $redirectTo = RouteServiceProvider::HOME;
|
||||
|
||||
/**
|
||||
* Create a new controller instance.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->middleware('auth');
|
||||
$this->middleware('signed')->only('verify');
|
||||
$this->middleware('throttle:6,1')->only('verify', 'resend');
|
||||
}
|
||||
}
|
@@ -0,0 +1,13 @@
|
||||
<?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;
|
||||
}
|
@@ -0,0 +1,77 @@
|
||||
<?php
|
||||
namespace App\Http\Controllers;
|
||||
use Illuminate\Http\Request;
|
||||
use App\Models\Country;
|
||||
use App\Models\State;
|
||||
use Illuminate\Support\Facades\Response;
|
||||
use Illuminate\Support\Facades\Validator;
|
||||
|
||||
class CountryController extends Controller
|
||||
{
|
||||
public function index()
|
||||
{
|
||||
return view('admin.country.index');
|
||||
}
|
||||
|
||||
public function getCountryList(Request $request){
|
||||
return Country::getCountryList($request);
|
||||
}
|
||||
public function create(Request $request){
|
||||
return view('admin.country.create');
|
||||
}
|
||||
|
||||
function store(Request $request)
|
||||
{
|
||||
$validator = Validator::make($request->all(), [
|
||||
'name' => 'required|unique:country,name',
|
||||
]);
|
||||
if ($validator->fails()) {
|
||||
return redirect()->route('admin.country.add')
|
||||
->withErrors($validator, 'country')
|
||||
->withInput();
|
||||
}
|
||||
$country = Country::addEditCountry($request);
|
||||
if($country){
|
||||
return redirect()->route('admin.country')->with("success","Country add Successfully!");
|
||||
}else{
|
||||
return redirect()->route('admin.add-country')->with("error","Some thing went wrong!");
|
||||
}
|
||||
}
|
||||
|
||||
public function edit($id){
|
||||
$country = Country::find($id);
|
||||
return view('admin.country.edit',compact('country'));
|
||||
}
|
||||
|
||||
public function update(Request $request,$id)
|
||||
{
|
||||
$validator = Validator::make($request->all(), [
|
||||
'name' => 'required|unique:country,name,'.$id,
|
||||
]);
|
||||
if ($validator->fails()) {
|
||||
return redirect()->route('admin.country.edit',$id)
|
||||
->withErrors($validator, 'country')
|
||||
->withInput();
|
||||
}
|
||||
$country = Country::addEditCountry($request,$id);
|
||||
if($country){
|
||||
return redirect()->route('admin.country')->with("success","Country update Successfully!");
|
||||
}else{
|
||||
return redirect()->route('admin.country.edit',$id)->with("error","Some thing went wrong!");
|
||||
}
|
||||
}
|
||||
|
||||
public function delete(Request $request)
|
||||
{ $state = State::where('country_id',$request->id)->get();
|
||||
if ($state->count() == 0){
|
||||
$data = Country::countrydelete($request->id);
|
||||
if($data == 1){
|
||||
echo json_encode(["status"=>1]);exit;
|
||||
}else{
|
||||
echo json_encode(["status"=>0]);exit;
|
||||
}
|
||||
}else{
|
||||
echo json_encode(["status"=>2]);exit;
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,77 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use App\Models\Exam;
|
||||
use Illuminate\Http\Request;
|
||||
use App\Models\ExamCategory;
|
||||
use Illuminate\Support\Facades\Validator;
|
||||
use Illuminate\Support\Facades\Response;
|
||||
|
||||
class ExamCategoryController extends Controller
|
||||
{
|
||||
public function index(){
|
||||
return view('admin.examcategory.index');
|
||||
}
|
||||
|
||||
public function getExamCategoryList(Request $request){
|
||||
return ExamCategory::getExamCategoryList($request);
|
||||
}
|
||||
public function create(Request $request){
|
||||
return view('admin.examcategory.create');
|
||||
}
|
||||
|
||||
function store(Request $request){
|
||||
|
||||
$validator = Validator::make($request->all(), [
|
||||
'title' => 'required|unique:exam_category,title'
|
||||
]);
|
||||
if ($validator->fails()) {
|
||||
return redirect()->route('admin.examcategory.add')
|
||||
->withErrors($validator, 'examcategory')
|
||||
->withInput();
|
||||
}
|
||||
$state = ExamCategory::addEditExamCategory($request);
|
||||
if($state){
|
||||
return redirect()->route('admin.examcategory')->with("success","Exam Category add Successfully!");
|
||||
}else{
|
||||
return redirect()->route('admin.examcategory.add')->with("error","Some thing went wrong!");
|
||||
}
|
||||
}
|
||||
|
||||
public function edit($id){
|
||||
$examcategory = ExamCategory::find($id);
|
||||
return view('admin.examcategory.edit',compact('examcategory'));
|
||||
}
|
||||
|
||||
public function update(Request $request,$id){
|
||||
$validator = Validator::make($request->all(), [
|
||||
'title' => 'required|unique:exam_category,title,except'.$id
|
||||
]);
|
||||
if ($validator->fails()) {
|
||||
return redirect()->route('admin.examcategory.edit',$id)
|
||||
->withErrors($validator, 'examcategory')
|
||||
->withInput();
|
||||
}
|
||||
$country = ExamCategory::addEditExamCategory($request,$id);
|
||||
if($country){
|
||||
return redirect()->route('admin.examcategory')->with("success","Exam Category update Successfully!");
|
||||
}else{
|
||||
return redirect()->route('admin.examcategory.edit')->with("error","Some thing went wrong!");
|
||||
}
|
||||
}
|
||||
|
||||
public function delete(Request $request){
|
||||
$exam = Exam::where('exam_category_id',$request->id)->get();
|
||||
if ($exam->count() == 0){
|
||||
$data = ExamCategory::ExamCategorydelete($request->id);
|
||||
if($data == 1){
|
||||
echo json_encode(["status"=>1]);exit;
|
||||
}else{
|
||||
echo json_encode(["status"=>0]);exit;
|
||||
}
|
||||
}else{
|
||||
echo json_encode(["status"=>2]);exit;
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,106 @@
|
||||
<?php
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use App\Models\Country;
|
||||
use Illuminate\Http\Request;
|
||||
use App\Models\Exam;
|
||||
use App\Models\ExamCategory;
|
||||
use App\Models\Plan;
|
||||
use App\Models\State;
|
||||
use Illuminate\Support\Facades\Response;
|
||||
use Illuminate\Support\Facades\Validator;
|
||||
|
||||
class ExamController extends Controller
|
||||
{
|
||||
public function index(){
|
||||
return view('admin.exam.index');
|
||||
}
|
||||
|
||||
public function getExamList(Request $request){
|
||||
return Exam::getExamList($request);
|
||||
}
|
||||
public function get_StateList(Request $request)
|
||||
{
|
||||
$country = $request->country_id;
|
||||
$state = State::get_StateList($country);
|
||||
return Response::json($state);
|
||||
}
|
||||
public function create(Request $request){
|
||||
$country = Country::get_CountryList();
|
||||
$examCategory = ExamCategory::get_ExamCategoryList();
|
||||
return view('admin.exam.create',compact('country','examCategory'));
|
||||
}
|
||||
|
||||
function store(Request $request){
|
||||
$validator = Validator::make($request->all(), [
|
||||
'country' => 'required',
|
||||
'state' => 'required',
|
||||
'examcategory' => 'required',
|
||||
'name' => 'required|unique:exam,name',
|
||||
]);
|
||||
if ($validator->fails()) {
|
||||
return redirect()
|
||||
->route('admin.exam.add')
|
||||
->withErrors($validator, 'exam')
|
||||
->withInput();
|
||||
}
|
||||
$Exam = Exam::addEditExam($request);
|
||||
if ($Exam) {
|
||||
return redirect()
|
||||
->route('admin.exam')
|
||||
->with('success', 'Exam update Successfully!');
|
||||
} else {
|
||||
return redirect()
|
||||
->route('admin.exam.add')
|
||||
->with('error', 'Some thing went wrong!');
|
||||
}
|
||||
}
|
||||
|
||||
public function edit($id){
|
||||
$exam = Exam::find($id);
|
||||
$country = Country::get_CountryList();
|
||||
$state = State::all();
|
||||
$examCategory = ExamCategory::get_ExamCategoryList();
|
||||
return view('admin.exam.edit', compact('exam','country','state','examCategory'));
|
||||
}
|
||||
|
||||
public function update(Request $request, $id){
|
||||
$validator = Validator::make($request->all(), [
|
||||
'name' => 'required|unique:exam,name,'. $id,
|
||||
'country' => 'required',
|
||||
'state' => 'required',
|
||||
'examcategory' => 'required',
|
||||
|
||||
]);
|
||||
if ($validator->fails()) {
|
||||
return redirect()
|
||||
->route('admin.exam.edit', $id)
|
||||
->withErrors($validator, 'exam')
|
||||
->withInput();
|
||||
}
|
||||
$Exam = Exam::addEditExam($request, $id);
|
||||
if ($Exam) {
|
||||
return redirect()
|
||||
->route('admin.exam')
|
||||
->with('success', 'Exam update Successfully!');
|
||||
} else {
|
||||
return redirect()
|
||||
->route('admin.Exam.edit', $id)
|
||||
->with('error', 'Some thing went wrong!');
|
||||
}
|
||||
}
|
||||
|
||||
public function delete(Request $request){
|
||||
$plan = Plan::where('exam_id',$request->id)->get();
|
||||
if ($plan->count() == 0){
|
||||
$data = Exam::Examdelete($request->id);
|
||||
if($data == 1){
|
||||
echo json_encode(["status"=>1],true);exit;
|
||||
}else{
|
||||
echo json_encode(["status"=>0],true);exit;
|
||||
}
|
||||
}else{
|
||||
echo json_encode(["status"=>2],true);exit;
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,93 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Illuminate\Support\Facades\Validator;
|
||||
use App\Models\User;
|
||||
use Illuminate\Support\Facades\Hash;
|
||||
use App\Services\CommonService;
|
||||
|
||||
class HomeController extends Controller {
|
||||
|
||||
protected $service;
|
||||
|
||||
/**
|
||||
* Create a new controller instance.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct(CommonService $userService) {
|
||||
$this->middleware('auth');
|
||||
$this->service = $userService;
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the application dashboard.
|
||||
*
|
||||
* @return \Illuminate\Contracts\Support\Renderable
|
||||
*/
|
||||
public function dashboard() {
|
||||
if (Auth::user()) {
|
||||
$data['totalExam'] = $this->service->totalExam();
|
||||
$data['totalPlan'] = $this->service->totalPlan();
|
||||
$data['totalSubject'] = $this->service->totalSubject();
|
||||
$data['totalTest'] = $this->service->totalTest();
|
||||
$data['totalCountry'] = $this->service->totalCountry();
|
||||
$data['totalState'] = $this->service->totalState();
|
||||
return view('admin.dashboard', compact('data'));
|
||||
} else {
|
||||
Auth::logout();
|
||||
return redirect(route('login'));
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Admin Profile
|
||||
*/
|
||||
|
||||
public function profile() {
|
||||
$user = User::find(Auth::user()->id);
|
||||
return view('admin.profile', compact('user'));
|
||||
}
|
||||
|
||||
/*
|
||||
* Update User Profile
|
||||
*/
|
||||
|
||||
public function updateProfile(Request $request) {
|
||||
$validator = Validator::make($request->all(), [
|
||||
'name' => 'required|max:255',
|
||||
]);
|
||||
if ($validator->fails()) {
|
||||
return redirect('admin/profile')->withErrors($validator, 'profile')->withInput();
|
||||
}
|
||||
User::updateProfile($request, Auth::user()->id);
|
||||
return redirect()->route('admin.profile')->with('success', 'Profile Update Successfully!');
|
||||
}
|
||||
|
||||
/*
|
||||
* Update User Password
|
||||
*/
|
||||
|
||||
public function updatePassword(Request $request) {
|
||||
$validator = Validator::make($request->all(), [
|
||||
'currentpassword' => 'required|max:255',
|
||||
'newpassword' => 'required|max:255',
|
||||
'password_confirmation' => 'required|max:255|same:newpassword',
|
||||
]);
|
||||
if ($validator->fails()) {
|
||||
return redirect('admin/profile')->withErrors($validator, 'changepassword')->withInput();
|
||||
}
|
||||
if (!Hash::check($request->currentpassword, Auth::user()->password)) {
|
||||
return redirect()->route('admin.profile')->with('error', 'Password and Current Password does not match.');
|
||||
}
|
||||
if ($request->newpassword != $request->password_confirmation) {
|
||||
return redirect()->route('admin.profile')->with('error', 'New Password and Confirm Password does not match.');
|
||||
}
|
||||
User::updatePassword($request, Auth::user()->id);
|
||||
return redirect()->route('admin.profile')->with('success', 'Password Change Successfully!');
|
||||
}
|
||||
|
||||
}
|
@@ -0,0 +1,94 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use App\Models\Exam;
|
||||
use Illuminate\Http\Request;
|
||||
use App\Models\Plan;
|
||||
use Illuminate\Support\Facades\Validator;
|
||||
|
||||
class PlanController extends Controller
|
||||
{
|
||||
public function index(){
|
||||
return view('admin.plan.index');
|
||||
}
|
||||
|
||||
public function getPlanList(Request $request){
|
||||
return Plan::getPlanList($request);
|
||||
}
|
||||
public function create(Request $request){
|
||||
$exam = Exam::all();
|
||||
return view('admin.plan.create',compact('exam'));
|
||||
}
|
||||
|
||||
function store(Request $request)
|
||||
{
|
||||
$validator = Validator::make($request->all(), [
|
||||
'exam' => 'required',
|
||||
'name' => 'required|unique:plans,name',
|
||||
'year' => 'required|numeric',
|
||||
'price' => 'required',
|
||||
'validity' => 'required',
|
||||
'unlimited_test_attempt'=>"required",
|
||||
'attempt' => 'required_if:unlimited_test_attempt,==,0',
|
||||
]);
|
||||
$message = array(
|
||||
'required_if' =>'Attempt field is required.'
|
||||
);
|
||||
if ($validator->fails($message)) {
|
||||
return redirect()->route('admin.plan.add')
|
||||
->withErrors($validator, 'plan')
|
||||
->withInput();
|
||||
}
|
||||
$plan = Plan::addEditPlan($request);
|
||||
if($plan){
|
||||
return redirect()->route('admin.plan')->with("success","Plan add Successfully!");
|
||||
}else{
|
||||
return redirect()->route('admin.add-plan')->with("error","Some thing went wrong!");
|
||||
}
|
||||
}
|
||||
|
||||
public function edit($id){
|
||||
$exam = Exam::all();
|
||||
$plan = Plan::find($id);
|
||||
return view('admin.plan.edit',compact('plan','exam'));
|
||||
}
|
||||
|
||||
public function update(Request $request,$id)
|
||||
{
|
||||
$validator = Validator::make($request->all(), [
|
||||
'exam' => 'required',
|
||||
'name' => 'required|unique:plans,name,'.$id,
|
||||
'year' => 'required|numeric',
|
||||
'price' => 'required',
|
||||
'validity' => 'required',
|
||||
'unlimited_test_attempt'=>"required",
|
||||
'attempt' => 'required_if:unlimited_test_attempt,==,0',
|
||||
]);
|
||||
if ($validator->fails()) {
|
||||
return redirect()->route('admin.plan.edit',$id)
|
||||
->withErrors($validator, 'plan')
|
||||
->withInput();
|
||||
}
|
||||
$plan = Plan::addEditPlan($request,$id);
|
||||
if($plan){
|
||||
return redirect()->route('admin.plan')->with("success","Plan update Successfully!");
|
||||
}else{
|
||||
return redirect()->route('admin.plan.edit',$id)->with("error","Some thing went wrong!");
|
||||
}
|
||||
}
|
||||
|
||||
public function delete(Request $request)
|
||||
{ $exam = Plan::where('id',$request->id)->get();
|
||||
if(empty($state)){
|
||||
$data = Plan::countrydelete($request->id);
|
||||
if($data == 1){
|
||||
echo json_encode(["status"=>1]);exit;
|
||||
}else{
|
||||
echo json_encode(["status"=>2]);exit;
|
||||
}
|
||||
}else{
|
||||
echo json_encode(["status"=>0]);exit;
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,80 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use App\Models\State;
|
||||
use App\Models\Country;
|
||||
use Illuminate\Support\Facades\Validator;
|
||||
use Illuminate\Support\Facades\Response;
|
||||
|
||||
class StateController extends Controller
|
||||
{
|
||||
public function index(){
|
||||
return view('admin.state.index');
|
||||
}
|
||||
|
||||
public function getStateList(Request $request){
|
||||
return State::getStateList($request);
|
||||
}
|
||||
public function create(Request $request){
|
||||
$country = Country::get_CountryList();
|
||||
return view('admin.state.create',compact('country'));
|
||||
}
|
||||
|
||||
function store(Request $request)
|
||||
{
|
||||
$validator = Validator::make($request->all(), [
|
||||
'country' =>'required',
|
||||
'name' => 'required|unique:state,name',
|
||||
]);
|
||||
if ($validator->fails()) {
|
||||
return redirect('admin/add-state')
|
||||
->withErrors($validator, 'state')
|
||||
->withInput();
|
||||
}
|
||||
$state = State::addEditState($request);
|
||||
if($state){
|
||||
return redirect()->route('admin.state')->with("success","State add Successfully!");
|
||||
}else{
|
||||
return redirect()->route('admin.add-state')->with("error","Some thing went wrong!");
|
||||
}
|
||||
}
|
||||
|
||||
public function edit($id){
|
||||
$country = Country::get_CountryList();
|
||||
$state = State::find($id);
|
||||
return view('admin.state.edit',compact('country','state'));
|
||||
}
|
||||
|
||||
public function update(Request $request,$id)
|
||||
{
|
||||
$validator = Validator::make($request->all(), [
|
||||
'country' =>'required',
|
||||
'name' => 'required|unique:state,name,'.$id
|
||||
|
||||
]);
|
||||
if ($validator->fails()) {
|
||||
return redirect()->route('admin.state.edit',$id)
|
||||
->withErrors($validator, 'state')
|
||||
->withInput();
|
||||
}
|
||||
$state = State::addEditState($request,$id);
|
||||
if($state){
|
||||
return redirect()->route('admin.state')->with("success","State update Successfully!");
|
||||
}else{
|
||||
return redirect()->route('admin.state.edit',$id)->with("error","Some thing went wrong!");
|
||||
}
|
||||
}
|
||||
|
||||
public function delete(Request $request)
|
||||
{
|
||||
$data = State::Statedelete($request->id);
|
||||
if($data == 1){
|
||||
return Response::json(["status"=>true],200);
|
||||
}else{
|
||||
return Response::json(["status"=>false],500);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@@ -0,0 +1,85 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Validator;
|
||||
use Illuminate\Support\Facades\Response;
|
||||
use App\Models\Subject;
|
||||
use App\Models\Plan;
|
||||
use App\Models\Test;
|
||||
|
||||
class SubjectController extends Controller
|
||||
{
|
||||
public function index(){
|
||||
return view('admin.subject.index');
|
||||
}
|
||||
|
||||
public function getSubjectList(Request $request){
|
||||
return Subject::getSubjectList($request);
|
||||
}
|
||||
public function create(Request $request){
|
||||
$plan = Plan::get_PlanList();
|
||||
return view('admin.subject.create',compact('plan'));
|
||||
}
|
||||
|
||||
function store(Request $request)
|
||||
{
|
||||
$validator = Validator::make($request->all(), [
|
||||
'plan' =>'required',
|
||||
'name' => 'required|unique:subjects,name',
|
||||
]);
|
||||
if ($validator->fails()) {
|
||||
return redirect('admin/add-subject')
|
||||
->withErrors($validator, 'state')
|
||||
->withInput();
|
||||
}
|
||||
$state = Subject::addEditSubject($request);
|
||||
if($state){
|
||||
return redirect()->route('admin.subject')->with("success","State add Successfully!");
|
||||
}else{
|
||||
return redirect()->route('admin.add-subject')->with("error","Some thing went wrong!");
|
||||
}
|
||||
}
|
||||
|
||||
public function edit($id){
|
||||
$plan = Plan::get_PlanList();
|
||||
$subject = Subject::find($id);
|
||||
return view('admin.subject.edit',compact('plan','subject'));
|
||||
}
|
||||
|
||||
public function update(Request $request,$id)
|
||||
{
|
||||
$validator = Validator::make($request->all(), [
|
||||
'plan' =>'required',
|
||||
'name' => 'required|unique:subjects,name,'.$id
|
||||
|
||||
]);
|
||||
if ($validator->fails()) {
|
||||
return redirect()->route('admin.subject.edit',$id)
|
||||
->withErrors($validator, 'subject')
|
||||
->withInput();
|
||||
}
|
||||
$subject = Subject::addEditSubject($request,$id);
|
||||
if($subject){
|
||||
return redirect()->route('admin.subject')->with("success","Subject update Successfully!");
|
||||
}else{
|
||||
return redirect()->route('admin.subject.edit',$id)->with("error","Some thing went wrong!");
|
||||
}
|
||||
}
|
||||
|
||||
public function delete(Request $request)
|
||||
{
|
||||
$test = Test::where('subject_id',$request->id)->get();
|
||||
if ($test->count() == 0){
|
||||
$data = Subject::Subjectdelete($request->id);
|
||||
if($data == 1){
|
||||
echo json_encode(["status"=>1]);exit;
|
||||
}else{
|
||||
echo json_encode(["status"=>0]);exit;
|
||||
}
|
||||
}else{
|
||||
echo json_encode(["status"=>2]);exit;
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,82 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use App\Models\Test;
|
||||
use App\Models\Subject;
|
||||
use Illuminate\Support\Facades\Validator;
|
||||
|
||||
class TestController extends Controller
|
||||
{
|
||||
public function index()
|
||||
{
|
||||
return view('admin.test.index');
|
||||
}
|
||||
|
||||
public function getTestList(Request $request)
|
||||
{
|
||||
return Test::getTestList($request);
|
||||
}
|
||||
public function create(Request $request)
|
||||
{
|
||||
$subject = Subject::all();
|
||||
return view('admin.test.create',compact('subject'));
|
||||
}
|
||||
|
||||
function store(Request $request)
|
||||
{
|
||||
$validator = Validator::make($request->all(), [
|
||||
'subject' => 'required',
|
||||
'name' => 'required|unique:test,name',
|
||||
]);
|
||||
if ($validator->fails()) {
|
||||
return redirect()->route('admin.test.add')
|
||||
->withErrors($validator, 'test')
|
||||
->withInput();
|
||||
}
|
||||
$test = Test::addEditTest($request);
|
||||
if ($test) {
|
||||
return redirect()->route('admin.test')->with("success", "Test add Successfully!");
|
||||
} else {
|
||||
return redirect()->route('admin.add-test')->with("error", "Some thing went wrong!");
|
||||
}
|
||||
}
|
||||
|
||||
public function edit($id)
|
||||
{
|
||||
$subject = Subject::all();
|
||||
$test = Test::find($id);
|
||||
return view('admin.test.edit', compact('subject','test'));
|
||||
}
|
||||
public function update(Request $request, $id)
|
||||
{
|
||||
$validator = Validator::make($request->all(), [
|
||||
'subject' => 'required',
|
||||
'name' => 'required|unique:test,name,' . $id,
|
||||
]);
|
||||
if ($validator->fails()) {
|
||||
return redirect()->route('admin.test.edit', $id)
|
||||
->withErrors($validator, 'test')
|
||||
->withInput();
|
||||
}
|
||||
$test = Test::addEditTest($request, $id);
|
||||
if ($test) {
|
||||
return redirect()->route('admin.test')->with("success", "Test update Successfully!");
|
||||
} else {
|
||||
return redirect()->route('admin.test.edit', $id)->with("error", "Some thing went wrong!");
|
||||
}
|
||||
}
|
||||
|
||||
public function delete(Request $request)
|
||||
{
|
||||
$data = Test::testdelete($request->id);
|
||||
if ($data == 1) {
|
||||
echo json_encode(["status" => 1]);
|
||||
exit;
|
||||
} else {
|
||||
echo json_encode(["status" => 0]);
|
||||
exit;
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,94 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
use Illuminate\Http\Request;
|
||||
use App\Models\TestQuestion;
|
||||
use App\Models\Test;
|
||||
use Illuminate\Support\Facades\Validator;
|
||||
use Illuminate\Support\Facades\Response;
|
||||
|
||||
class TestQuestionController extends Controller
|
||||
{
|
||||
public function index(){
|
||||
return view('admin.test_question.index');
|
||||
}
|
||||
|
||||
public function getQuestionList(Request $request){
|
||||
return TestQuestion::getQuestionList($request);
|
||||
}
|
||||
public function create(Request $request){
|
||||
$test = TestQuestion::get_TestList();
|
||||
return view('admin.test_question.create',compact('test'));
|
||||
}
|
||||
|
||||
function store(Request $request)
|
||||
{
|
||||
$validator = Validator::make($request->all(), [
|
||||
'test' =>'required',
|
||||
'question' => 'required|unique:test_question,question',
|
||||
'option_1' => 'required|unique:test_question,option_1',
|
||||
'option_2' => 'required|unique:test_question,option_2',
|
||||
'option_3' => 'required|unique:test_question,option_2',
|
||||
'option_4' => 'required|unique:test_question,option_2',
|
||||
'true_answer' => 'required|unique:test_question,true_answer',
|
||||
'solution' => 'required|unique:test_question,solution',
|
||||
]);
|
||||
if ($validator->fails()) {
|
||||
return redirect('admin/add-question')
|
||||
->withErrors($validator, 'testquestion')
|
||||
->withInput();
|
||||
}
|
||||
$question = TestQuestion::addEditTestQuestion($request);
|
||||
if($question){
|
||||
return redirect()->route('admin.question')->with("success","Test Question add Successfully!");
|
||||
}else{
|
||||
return redirect()->route('admin.add-question')->with("error","Some thing went wrong!");
|
||||
}
|
||||
}
|
||||
|
||||
public function edit($id){
|
||||
$test = TestQuestion::get_TestList();
|
||||
$state = TestQuestion::find($id);
|
||||
return view('admin.test_question.edit',compact('country','state'));
|
||||
}
|
||||
|
||||
public function update(Request $request,$id)
|
||||
{
|
||||
$validator = Validator::make($request->all(), [
|
||||
'test' =>'required',
|
||||
'question' => 'required|unique:test_question,question',
|
||||
'option_1' => 'required|unique:test_question,option_1',
|
||||
'option_2' => 'required|unique:test_question,option_2',
|
||||
'option_3' => 'required|unique:test_question,option_2',
|
||||
'option_4' => 'required|unique:test_question,option_2',
|
||||
'true_answer' => 'required|unique:test_question,true_answer',
|
||||
'solution' => 'required|unique:test_question,solution',
|
||||
]);
|
||||
if ($validator->fails()) {
|
||||
return redirect()->route('admin.state.edit',$id)
|
||||
->withErrors($validator, 'state')
|
||||
->withInput();
|
||||
}
|
||||
$question = TestQuestion::addEditTestQuestion($request,$id);
|
||||
if($question){
|
||||
return redirect()->route('admin.state')->with("success","Test Question update Successfully!");
|
||||
}else{
|
||||
return redirect()->route('admin.state.edit',$id)->with("error","Some thing went wrong!");
|
||||
}
|
||||
}
|
||||
|
||||
public function delete(Request $request)
|
||||
{
|
||||
$data = TestQuestion::Statedelete($request->id);
|
||||
if($data == 1){
|
||||
return Response::json(["status"=>true],200);
|
||||
}else{
|
||||
return Response::json(["status"=>false],500);
|
||||
}
|
||||
|
||||
}
|
||||
public function show($id){
|
||||
$testquestion = TestQuestion::find($id);
|
||||
return view('admin.test_question.show',compact('testquestion'));
|
||||
}
|
||||
}
|
@@ -0,0 +1,80 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\front;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Models\User;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Validator;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
|
||||
class AuthController extends Controller
|
||||
{
|
||||
/* Login / Register Page */
|
||||
public function login()
|
||||
{
|
||||
return view('front.login');
|
||||
}
|
||||
|
||||
/* Login */
|
||||
public function postlogin(Request $request)
|
||||
{
|
||||
$validator = Validator::make($request->all(), [
|
||||
'email' => 'required|email|max:255',
|
||||
'password' => 'required|min:8',
|
||||
]);
|
||||
|
||||
if ($validator->fails()) {
|
||||
return redirect('front.login')
|
||||
->withErrors($validator, 'login')
|
||||
->withInput();
|
||||
}
|
||||
|
||||
if (Auth::attempt($request->only('email', 'password'))) {
|
||||
$user = Auth::user();
|
||||
if ($user->role != config('const.studentRole')) {
|
||||
return redirect()->route('front.login')->with("error", "You are not authorized user.");
|
||||
}
|
||||
return redirect()->route('front.dashboard');
|
||||
} else {
|
||||
return redirect()->route('front.login')->with("error", "Invalid Email Or Password.");
|
||||
}
|
||||
}
|
||||
|
||||
/* Regisert */
|
||||
public function register(Request $request)
|
||||
{
|
||||
$validator = Validator::make($request->all(), [
|
||||
'name' => 'required|max:100',
|
||||
'email' => 'required|unique:users,email|max:190',
|
||||
'password' => 'required|confirmed',
|
||||
'password_confirmation' => 'required|same:password'
|
||||
]);
|
||||
$message = array(
|
||||
'password.confirmed' => 'Password and Confirm Password doesnot match.'
|
||||
);
|
||||
if ($validator->fails($message)) {
|
||||
return redirect()->route('front.login')
|
||||
->withErrors($validator, 'register')
|
||||
->withInput();
|
||||
}
|
||||
$user = User::where('email', $request->email)->count();
|
||||
if ($user > 0) {
|
||||
return redirect()->route('front.login')->with("error", "Email is already registered.");
|
||||
}
|
||||
$user = User::register($request);
|
||||
if ($user) {
|
||||
return redirect()->route('front.login')->with("success", "You are Register Successfully!");
|
||||
} else {
|
||||
return redirect()->route('front.login')->with("error", "Some thing went wrong!");
|
||||
}
|
||||
}
|
||||
|
||||
/*Logout*/
|
||||
public function logout(Request $request)
|
||||
{
|
||||
Auth::logout();
|
||||
$request->session()->regenerateToken();
|
||||
return redirect()->route('front.login');
|
||||
}
|
||||
}
|
@@ -0,0 +1,54 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\front;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use App\Http\Controllers\Controller;
|
||||
use Illuminate\Support\Facades\Validator;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Illuminate\Support\Facades\Hash;
|
||||
use App\Models\User;
|
||||
|
||||
|
||||
class FrontHomeController extends Controller
|
||||
{
|
||||
public function index() {
|
||||
return view('front.index');
|
||||
}
|
||||
|
||||
/* Student Dashboard */
|
||||
public function dashboard(){
|
||||
return view('front.dahsboard');
|
||||
}
|
||||
/* Student Profile */
|
||||
public function profile(){
|
||||
return view('front.profile');
|
||||
}
|
||||
/* Student Change Password */
|
||||
public function changepassword(){
|
||||
return view('front.changepassword');
|
||||
}
|
||||
|
||||
/*
|
||||
* Update User Password
|
||||
*/
|
||||
|
||||
public function updatePassword(Request $request) {
|
||||
$validator = Validator::make($request->all(), [
|
||||
'currentpassword' => 'required|max:255',
|
||||
'password' => 'required|max:255',
|
||||
'password_confirmation' => 'required|max:255|same:password',
|
||||
]);
|
||||
if ($validator->fails()) {
|
||||
return redirect()->route('front.changepassword')->withErrors($validator, 'changepassword')->withInput();
|
||||
}
|
||||
if (!Hash::check($request->currentpassword, Auth::user()->password)) {
|
||||
return redirect()->route('front.changepassword')->with('error', 'Password and Current Password does not match.');
|
||||
}
|
||||
if ($request->newpassword != $request->confirmpassword) {
|
||||
return redirect()->route('front.changepassword')->with('error', 'New Password and Confirm Password does not match.');
|
||||
}
|
||||
User::updatePassword($request, Auth::user()->id);
|
||||
return redirect()->route('front.changepassword')->with('success', 'Password Change Successfully!');
|
||||
}
|
||||
}
|
@@ -0,0 +1,68 @@
|
||||
<?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<int, class-string|string>
|
||||
*/
|
||||
protected $middleware = [
|
||||
// \App\Http\Middleware\TrustHosts::class,
|
||||
\App\Http\Middleware\TrustProxies::class,
|
||||
\Illuminate\Http\Middleware\HandleCors::class,
|
||||
\App\Http\Middleware\PreventRequestsDuringMaintenance::class,
|
||||
\Illuminate\Foundation\Http\Middleware\ValidatePostSize::class,
|
||||
\App\Http\Middleware\TrimStrings::class,
|
||||
\Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull::class,
|
||||
];
|
||||
|
||||
/**
|
||||
* The application's route middleware groups.
|
||||
*
|
||||
* @var array<string, array<int, class-string|string>>
|
||||
*/
|
||||
protected $middlewareGroups = [
|
||||
'web' => [
|
||||
\App\Http\Middleware\EncryptCookies::class,
|
||||
\Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
|
||||
\Illuminate\Session\Middleware\StartSession::class,
|
||||
\Illuminate\View\Middleware\ShareErrorsFromSession::class,
|
||||
\App\Http\Middleware\VerifyCsrfToken::class,
|
||||
\Illuminate\Routing\Middleware\SubstituteBindings::class,
|
||||
],
|
||||
|
||||
'api' => [
|
||||
// \Laravel\Sanctum\Http\Middleware\EnsureFrontendRequestsAreStateful::class,
|
||||
'throttle:api',
|
||||
\Illuminate\Routing\Middleware\SubstituteBindings::class,
|
||||
],
|
||||
];
|
||||
|
||||
/**
|
||||
* The application's route middleware.
|
||||
*
|
||||
* These middleware may be assigned to groups or used individually.
|
||||
*
|
||||
* @var array<string, class-string|string>
|
||||
*/
|
||||
protected $routeMiddleware = [
|
||||
'auth' => \App\Http\Middleware\Authenticate::class,
|
||||
'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class,
|
||||
'auth.session' => \Illuminate\Session\Middleware\AuthenticateSession::class,
|
||||
'cache.headers' => \Illuminate\Http\Middleware\SetCacheHeaders::class,
|
||||
'can' => \Illuminate\Auth\Middleware\Authorize::class,
|
||||
'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class,
|
||||
'password.confirm' => \Illuminate\Auth\Middleware\RequirePassword::class,
|
||||
'signed' => \App\Http\Middleware\ValidateSignature::class,
|
||||
'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class,
|
||||
'verified' => \Illuminate\Auth\Middleware\EnsureEmailIsVerified::class,
|
||||
'prevent-back-history' => \App\Http\Middleware\PreventBackHistory::class,
|
||||
];
|
||||
}
|
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Middleware;
|
||||
|
||||
use Illuminate\Auth\Middleware\Authenticate as Middleware;
|
||||
|
||||
class Authenticate extends Middleware
|
||||
{
|
||||
/**
|
||||
* Get the path the user should be redirected to when they are not authenticated.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @return string|null
|
||||
*/
|
||||
protected function redirectTo($request)
|
||||
{
|
||||
if (! $request->expectsJson()) {
|
||||
return route('login');
|
||||
}
|
||||
}
|
||||
}
|
@@ -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<int, string>
|
||||
*/
|
||||
protected $except = [
|
||||
//
|
||||
];
|
||||
}
|
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Middleware;
|
||||
|
||||
use Closure;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class PreventBackHistory {
|
||||
|
||||
/**
|
||||
* Handle an incoming request.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @param \Closure(\Illuminate\Http\Request): (\Illuminate\Http\Response|\Illuminate\Http\RedirectResponse) $next
|
||||
* @return \Illuminate\Http\Response|\Illuminate\Http\RedirectResponse
|
||||
*/
|
||||
public function handle(Request $request, Closure $next) {
|
||||
$response = $next($request);
|
||||
return $response->header('Cache-Control', 'nocache, no-store, max-age=0, must-revalidate')
|
||||
->header('Pragma', 'no-cache')
|
||||
->header('Expires', 'Sun, 02 Jan 1990 00:00:00 GMT');
|
||||
}
|
||||
|
||||
}
|
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Middleware;
|
||||
|
||||
use Illuminate\Foundation\Http\Middleware\PreventRequestsDuringMaintenance as Middleware;
|
||||
|
||||
class PreventRequestsDuringMaintenance extends Middleware
|
||||
{
|
||||
/**
|
||||
* The URIs that should be reachable while maintenance mode is enabled.
|
||||
*
|
||||
* @var array<int, string>
|
||||
*/
|
||||
protected $except = [
|
||||
//
|
||||
];
|
||||
}
|
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Middleware;
|
||||
|
||||
use App\Providers\RouteServiceProvider;
|
||||
use Closure;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
|
||||
class RedirectIfAuthenticated
|
||||
{
|
||||
/**
|
||||
* Handle an incoming request.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @param \Closure(\Illuminate\Http\Request): (\Illuminate\Http\Response|\Illuminate\Http\RedirectResponse) $next
|
||||
* @param string|null ...$guards
|
||||
* @return \Illuminate\Http\Response|\Illuminate\Http\RedirectResponse
|
||||
*/
|
||||
public function handle(Request $request, Closure $next, ...$guards)
|
||||
{
|
||||
$guards = empty($guards) ? [null] : $guards;
|
||||
|
||||
foreach ($guards as $guard) {
|
||||
if (Auth::guard($guard)->check()) {
|
||||
return redirect(RouteServiceProvider::HOME);
|
||||
}
|
||||
}
|
||||
|
||||
return $next($request);
|
||||
}
|
||||
}
|
@@ -0,0 +1,19 @@
|
||||
<?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<int, string>
|
||||
*/
|
||||
protected $except = [
|
||||
'current_password',
|
||||
'password',
|
||||
'password_confirmation',
|
||||
];
|
||||
}
|
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Middleware;
|
||||
|
||||
use Illuminate\Http\Middleware\TrustHosts as Middleware;
|
||||
|
||||
class TrustHosts extends Middleware
|
||||
{
|
||||
/**
|
||||
* Get the host patterns that should be trusted.
|
||||
*
|
||||
* @return array<int, string|null>
|
||||
*/
|
||||
public function hosts()
|
||||
{
|
||||
return [
|
||||
$this->allSubdomainsOfApplicationUrl(),
|
||||
];
|
||||
}
|
||||
}
|
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Middleware;
|
||||
|
||||
use Illuminate\Http\Middleware\TrustProxies as Middleware;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class TrustProxies extends Middleware
|
||||
{
|
||||
/**
|
||||
* The trusted proxies for this application.
|
||||
*
|
||||
* @var array<int, string>|string|null
|
||||
*/
|
||||
protected $proxies;
|
||||
|
||||
/**
|
||||
* The headers that should be used to detect proxies.
|
||||
*
|
||||
* @var int
|
||||
*/
|
||||
protected $headers =
|
||||
Request::HEADER_X_FORWARDED_FOR |
|
||||
Request::HEADER_X_FORWARDED_HOST |
|
||||
Request::HEADER_X_FORWARDED_PORT |
|
||||
Request::HEADER_X_FORWARDED_PROTO |
|
||||
Request::HEADER_X_FORWARDED_AWS_ELB;
|
||||
}
|
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Middleware;
|
||||
|
||||
use Illuminate\Routing\Middleware\ValidateSignature as Middleware;
|
||||
|
||||
class ValidateSignature extends Middleware
|
||||
{
|
||||
/**
|
||||
* The names of the query string parameters that should be ignored.
|
||||
*
|
||||
* @var array<int, string>
|
||||
*/
|
||||
protected $except = [
|
||||
// 'fbclid',
|
||||
// 'utm_campaign',
|
||||
// 'utm_content',
|
||||
// 'utm_medium',
|
||||
// 'utm_source',
|
||||
// 'utm_term',
|
||||
];
|
||||
}
|
@@ -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<int, string>
|
||||
*/
|
||||
protected $except = [
|
||||
//
|
||||
];
|
||||
}
|
@@ -0,0 +1,54 @@
|
||||
<?php
|
||||
|
||||
namespace App\Jobs;
|
||||
|
||||
use Illuminate\Bus\Queueable;
|
||||
use Illuminate\Contracts\Queue\ShouldBeUnique;
|
||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||
use Illuminate\Foundation\Bus\Dispatchable;
|
||||
use Illuminate\Queue\InteractsWithQueue;
|
||||
use Illuminate\Queue\SerializesModels;
|
||||
use Illuminate\Support\Facades\Mail;
|
||||
use App\Mail\Sendmail;
|
||||
|
||||
class SendEmailJob implements ShouldQueue {
|
||||
|
||||
use Dispatchable,
|
||||
InteractsWithQueue,
|
||||
Queueable,
|
||||
SerializesModels;
|
||||
|
||||
protected $event;
|
||||
|
||||
/**
|
||||
* Create a new job instance.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct($event) {
|
||||
$this->event = $event;
|
||||
}
|
||||
|
||||
/**
|
||||
* Build the message.
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function build() {
|
||||
return $this->subject('Mail from ItSolutionStuff.com')->view('mail.forgot');
|
||||
}
|
||||
|
||||
/**
|
||||
* Execute the job.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function handle() {
|
||||
$event = $this->event;
|
||||
Mail::send('mail.' . $this->event['_blade'], $event, function ($message) use ($event) {
|
||||
$message->to($event['toemail'], env('APP_NAME'));
|
||||
$message->subject('Forgot Password');
|
||||
});
|
||||
}
|
||||
|
||||
}
|
@@ -0,0 +1,57 @@
|
||||
<?php
|
||||
|
||||
namespace App\Mail;
|
||||
|
||||
use Illuminate\Bus\Queueable;
|
||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||
use Illuminate\Mail\Mailable;
|
||||
use Illuminate\Mail\Mailables\Content;
|
||||
use Illuminate\Mail\Mailables\Envelope;
|
||||
use Illuminate\Queue\SerializesModels;
|
||||
|
||||
class Sendmail extends Mailable {
|
||||
|
||||
use Queueable,
|
||||
SerializesModels;
|
||||
|
||||
/**
|
||||
* Create a new message instance.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct() {
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the message envelope.
|
||||
*
|
||||
* @return \Illuminate\Mail\Mailables\Envelope
|
||||
*/
|
||||
public function envelope() {
|
||||
return new Envelope(
|
||||
subject: 'Sendmail',
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the message content definition.
|
||||
*
|
||||
* @return \Illuminate\Mail\Mailables\Content
|
||||
*/
|
||||
public function content() {
|
||||
return new Content(
|
||||
view: 'view.name',
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the attachments for the message.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function attachments() {
|
||||
return [];
|
||||
}
|
||||
|
||||
}
|
@@ -0,0 +1,57 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use PHPUnit\Framework\Constraint\Count;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
use Yajra\DataTables\Facades\DataTables;
|
||||
use App\Models\State;
|
||||
use Illuminate\Support\Facades\Response;
|
||||
|
||||
class Country extends Model
|
||||
{
|
||||
use HasFactory, SoftDeletes;
|
||||
protected $table = "country";
|
||||
|
||||
public static function getCountryList($request)
|
||||
{
|
||||
|
||||
if ($request->ajax()) {
|
||||
$data = Country::orderBy('id','desc');
|
||||
return DataTables::of($data)
|
||||
->addColumn('action', function ($row) {
|
||||
$actionBtn = '<a href="' . route("admin.country.edit", $row->id) . '" class="edit btn btn-success btn-flat btn-sm"><i class="fa fa-pencil-square-o"></i> </a> <a href="javascript:void(0)" class="delete btn btn-danger btn-flat btn-sm delete_counntry" data-id="' . $row->id . '" ><i class="fa-sharp fa-solid fa fa-trash"></i></a>';
|
||||
return $actionBtn;
|
||||
})
|
||||
->rawColumns(['action'])
|
||||
->make(true);
|
||||
}
|
||||
}
|
||||
/* Add Edit Country */
|
||||
public static function addEditCountry($request, $id = '')
|
||||
{
|
||||
if ($id) {
|
||||
$data = Country::find($id);
|
||||
} else {
|
||||
$data = new Country();
|
||||
}
|
||||
$data->name = $request->name;
|
||||
$data->save();
|
||||
return $data;
|
||||
}
|
||||
|
||||
/* Delete Country */
|
||||
public static function countrydelete($id)
|
||||
{
|
||||
Country::where('id', $id)->delete();
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* Get Country List */
|
||||
public static function get_CountryList()
|
||||
{
|
||||
return Country::all();
|
||||
}
|
||||
}
|
@@ -0,0 +1,81 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
use Yajra\DataTables\Facades\DataTables;
|
||||
use App\Models\Country;
|
||||
use App\Models\State;
|
||||
use App\Models\ExamCategory;
|
||||
|
||||
class Exam extends Model {
|
||||
|
||||
use HasFactory,
|
||||
SoftDeletes;
|
||||
|
||||
protected $table = 'exam';
|
||||
|
||||
public function getCountry() {
|
||||
return $this->hasOne(Country::class, 'id', 'country_id');
|
||||
}
|
||||
|
||||
public function getState() {
|
||||
return $this->hasOne(State::class, 'id', 'state_id');
|
||||
}
|
||||
|
||||
public function getExamCategory() {
|
||||
return $this->hasOne(ExamCategory::class, 'id', 'exam_category_id');
|
||||
}
|
||||
|
||||
public static function getExamList($request) {
|
||||
if ($request->ajax()) {
|
||||
$data = Exam::with(['getCountry', 'getState', 'getExamCategory']);
|
||||
if ($request->order) {
|
||||
$data->orderBy('id', 'desc');
|
||||
}
|
||||
return DataTables::of($data)
|
||||
->addColumn('country', function ($row) {
|
||||
return $row->getCountry->name;
|
||||
})
|
||||
->addColumn('state', function ($row) {
|
||||
return $row->getState->name;
|
||||
})
|
||||
->addColumn('category', function ($row) {
|
||||
return $row->getExamCategory->title;
|
||||
})
|
||||
->addColumn('action', function ($row) {
|
||||
$actionBtn = '<a href="' . route('admin.exam.edit', $row->id) . '" class="edit btn btn-success btn-flat btn-sm"><i class="fa fa-pencil-square-o"></i> </a> <a href="javascript:void(0)" class="delete btn btn-danger btn-flat btn-sm delete_exam" data-id="' . $row->id . '" ><i class="fa-sharp fa-solid fa fa-trash"></i></a>';
|
||||
return $actionBtn;
|
||||
})
|
||||
->rawColumns(['action'])
|
||||
->make(true);
|
||||
}
|
||||
}
|
||||
|
||||
/* Add Edit Country */
|
||||
|
||||
public static function addEditExam($request, $id = '') {
|
||||
if ($id) {
|
||||
$data = Exam::find($id);
|
||||
} else {
|
||||
$data = new Exam();
|
||||
}
|
||||
$data->exam_category_id = $request->examcategory;
|
||||
$data->country_id = $request->country;
|
||||
$data->state_id = $request->state;
|
||||
$data->name = $request->name;
|
||||
$data->description = $request->description;
|
||||
$data->save();
|
||||
return $data;
|
||||
}
|
||||
|
||||
/* Delete Exam */
|
||||
|
||||
public static function Examdelete($id) {
|
||||
Exam::where('id', $id)->delete();
|
||||
return 1;
|
||||
}
|
||||
|
||||
}
|
@@ -0,0 +1,54 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
use Illuminate\Support\Facades\Response;
|
||||
use Yajra\DataTables\Facades\DataTables;
|
||||
use App\Models\Exam;
|
||||
|
||||
class ExamCategory extends Model
|
||||
{
|
||||
use HasFactory, SoftDeletes;
|
||||
protected $table = "exam_category";
|
||||
public static function getExamCategoryList($request)
|
||||
{
|
||||
if ($request->ajax()) {
|
||||
$data = ExamCategory::orderBy('id', 'desc');
|
||||
return DataTables::of($data)
|
||||
->addColumn('action', function ($row) {
|
||||
$actionBtn = '<a href="' . route('admin.examcategory.edit', $row->id) . '" class="edit btn btn-success btn-flat btn-sm"><i class="fa fa-pencil-square-o"></i> </a> <a href="javascript:void(0)" class="delete btn btn-danger btn-flat btn-sm delete_examcategory" data-id="' . $row->id . '" ><i class="fa-sharp fa-solid fa fa-trash"></i></a>';
|
||||
return $actionBtn;
|
||||
})
|
||||
->rawColumns(['action'])
|
||||
->make(true);
|
||||
}
|
||||
}
|
||||
/* Add Edit Country */
|
||||
public static function addEditExamCategory($request, $id = '')
|
||||
{
|
||||
if ($id) {
|
||||
$data = ExamCategory::find($id);
|
||||
} else {
|
||||
$data = new ExamCategory();
|
||||
}
|
||||
$data->title = $request->title;
|
||||
$data->save();
|
||||
return $data;
|
||||
}
|
||||
|
||||
/* Delete Country */
|
||||
public static function ExamCategorydelete($id)
|
||||
{
|
||||
ExamCategory::where('id', $id)->delete();
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* Exam Category */
|
||||
public static function get_ExamCategoryList()
|
||||
{
|
||||
return ExamCategory::all();
|
||||
}
|
||||
}
|
@@ -0,0 +1,73 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
use App\Models\Exam;
|
||||
use Yajra\DataTables\Facades\DataTables;
|
||||
use App\Helper\Helpers;
|
||||
|
||||
class Plan extends Model
|
||||
{
|
||||
use HasFactory, SoftDeletes;
|
||||
protected $table = 'plans';
|
||||
|
||||
public function getExam(){
|
||||
return $this->hasOne(Exam::class,'id','exam_id');
|
||||
}
|
||||
public static function getPlanList($request)
|
||||
{
|
||||
if ($request->ajax()) {
|
||||
$data = Plan::with(['getExam']);
|
||||
if($request->order){
|
||||
$data->orderBy('id','desc');
|
||||
}
|
||||
return DataTables::of($data)
|
||||
->addColumn('exam', function ($row) {
|
||||
return $row->getExam->name;
|
||||
})
|
||||
->addColumn('unlimited_test_attempt', function ($row) {
|
||||
return Helpers::getunlimitedTestAttempt($row->unlimited_test_attempt);
|
||||
})
|
||||
->addColumn('action', function ($row) {
|
||||
$actionBtn = '<a href="' . route('admin.plan.edit', $row->id) . '" class="edit btn btn-success btn-flat btn-sm"><i class="fa fa-pencil-square-o"></i> </a> <a href="javascript:void(0)" class="delete btn btn-danger btn-flat btn-sm delete_plan" data-id="' . $row->id . '" ><i class="fa-sharp fa-solid fa fa-trash"></i></a>';
|
||||
return $actionBtn;
|
||||
})
|
||||
->rawColumns(['unlimited_test_attempt','action'])
|
||||
->make(true);
|
||||
}
|
||||
}
|
||||
/* Add Edit Plan */
|
||||
public static function addEditPlan($request, $id = '')
|
||||
{
|
||||
if ($id) {
|
||||
$data = Plan::find($id);
|
||||
} else {
|
||||
$data = new Plan();
|
||||
}
|
||||
$data->exam_id = $request->exam;
|
||||
$data->name = $request->name;
|
||||
$data->year = $request->year;
|
||||
$data->price = $request->price ;
|
||||
$data->validity = $request->validity;
|
||||
$data->unlimited_test_attempt = $request->unlimited_test_attempt;
|
||||
$data->attempt = ($request->unlimited_test_attempt == 0) ? $request->attempt : null;
|
||||
$data->description = $request->description;
|
||||
$data->save();
|
||||
return $data;
|
||||
}
|
||||
|
||||
/* Delete Plan */
|
||||
public static function Plandelete($id)
|
||||
{
|
||||
return Plan::where('id', $id)->delete();
|
||||
}
|
||||
|
||||
/* Get Plan List */
|
||||
public static function get_PlanList()
|
||||
{
|
||||
return Plan::all();
|
||||
}
|
||||
}
|
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class ResetPassword extends Model {
|
||||
|
||||
use HasFactory;
|
||||
|
||||
protected $table = "password_resets";
|
||||
protected $fillable = ['email', 'token'];
|
||||
|
||||
}
|
@@ -0,0 +1,62 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
use PHPUnit\Framework\Constraint\Count;
|
||||
use Yajra\DataTables\Facades\DataTables;
|
||||
|
||||
class State extends Model
|
||||
{
|
||||
use HasFactory, SoftDeletes;
|
||||
protected $table = 'state';
|
||||
|
||||
public function getCountry()
|
||||
{
|
||||
return $this->hasOne(Country::class, 'id', 'country_id');
|
||||
}
|
||||
public static function getStateList($request)
|
||||
{
|
||||
if ($request->ajax()) {
|
||||
$data = State::with('getCountry');
|
||||
$data->orderBy('id','desc');
|
||||
return DataTables::of($data)
|
||||
->addColumn('country', function ($row) {
|
||||
return $row->getCountry->name;
|
||||
})
|
||||
->addColumn('action', function ($row) {
|
||||
$actionBtn = '<a href="' . route('admin.state.edit', $row->id) . '" class="edit btn btn-success btn-flat btn-sm"><i class="fa fa-pencil-square-o"></i> </a> <a href="javascript:void(0)" class="delete btn btn-danger btn-sm btn-flat delete_state" data-id="' . $row->id . '" ><i class=" fa-sharp fa-solid fa fa-trash"></i></a>';
|
||||
return $actionBtn;
|
||||
})
|
||||
->rawColumns(['action'])
|
||||
->make(true);
|
||||
}
|
||||
}
|
||||
/* Add Edit State */
|
||||
public static function addEditState($request, $id = '')
|
||||
{
|
||||
if ($id) {
|
||||
$data = State::find($id);
|
||||
} else {
|
||||
$data = new State();
|
||||
}
|
||||
$data->country_id = $request->country;
|
||||
$data->name = $request->name;
|
||||
$data->save();
|
||||
return $data;
|
||||
}
|
||||
|
||||
/* Delete State */
|
||||
public static function Statedelete($id)
|
||||
{
|
||||
return State::where('id', $id)->delete();
|
||||
}
|
||||
|
||||
/* Get State List */
|
||||
public static function get_StateList($country='')
|
||||
{
|
||||
return State::where('country_id', $country)->get();
|
||||
}
|
||||
}
|
@@ -0,0 +1,56 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Yajra\DataTables\Facades\DataTables;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
use App\Models\Plan;
|
||||
|
||||
class Subject extends Model
|
||||
{
|
||||
use HasFactory, SoftDeletes;
|
||||
protected $table = 'subjects';
|
||||
|
||||
public function getPlan()
|
||||
{
|
||||
return $this->hasOne(Plan::class, 'id', 'plan_id');
|
||||
}
|
||||
public static function getSubjectList($request)
|
||||
{
|
||||
if ($request->ajax()) {
|
||||
$data = Subject::with('getPlan');
|
||||
$data->orderBy('id', 'desc');
|
||||
return DataTables::of($data)
|
||||
->addColumn('plan', function ($row) {
|
||||
return $row->getPlan->name;
|
||||
})
|
||||
->addColumn('action', function ($row) {
|
||||
$actionBtn = '<a href="' . route('admin.subject.edit', $row->id) . '" class="edit btn btn-success btn-flat btn-sm"><i class="fa fa-pencil-square-o"></i> </a> <a href="javascript:void(0)" class="delete btn btn-danger btn-sm btn-flat delete_subject" data-id="' . $row->id . '" ><i class=" fa-sharp fa-solid fa fa-trash"></i></a>';
|
||||
return $actionBtn;
|
||||
})
|
||||
->rawColumns(['action'])
|
||||
->make(true);
|
||||
}
|
||||
}
|
||||
/* Add Edit State */
|
||||
public static function addEditSubject($request, $id = '')
|
||||
{
|
||||
if ($id) {
|
||||
$data = Subject::find($id);
|
||||
} else {
|
||||
$data = new Subject();
|
||||
}
|
||||
$data->plan_id = $request->plan;
|
||||
$data->name = $request->name;
|
||||
$data->save();
|
||||
return $data;
|
||||
}
|
||||
|
||||
/* Delete State */
|
||||
public static function Subjectdelete($id)
|
||||
{
|
||||
return Subject::where('id', $id)->delete();
|
||||
}
|
||||
}
|
@@ -0,0 +1,66 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
use App\Models\Subject;
|
||||
use Yajra\DataTables\Facades\DataTables;
|
||||
|
||||
class Test extends Model
|
||||
{
|
||||
use HasFactory, SoftDeletes;
|
||||
protected $table = 'test';
|
||||
public function getSubject()
|
||||
{
|
||||
return $this->hasOne(Subject::class, 'id', 'subject_id');
|
||||
}
|
||||
public static function getTestList($request)
|
||||
{
|
||||
|
||||
if ($request->ajax()) {
|
||||
$data = Test::with('getSubject');
|
||||
if ($request->order) {
|
||||
$data->orderBy('id', 'desc');
|
||||
}
|
||||
return DataTables::of($data)
|
||||
->addColumn('subject', function ($row) {
|
||||
return $row->getSubject->name;
|
||||
})
|
||||
->addColumn('action', function ($row) {
|
||||
$actionBtn = '<a href="' . route("admin.test.edit", $row->id) . '" class="edit btn btn-success btn-flat btn-sm"><i class="fa fa-pencil-square-o"></i> </a> <a href="javascript:void(0)" class="delete btn btn-danger btn-flat btn-sm delete_test" data-id="' . $row->id . '" ><i class="fa-sharp fa-solid fa fa-trash"></i></a>';
|
||||
return $actionBtn;
|
||||
})
|
||||
->rawColumns(['action'])
|
||||
->make(true);
|
||||
}
|
||||
}
|
||||
/* Add Edit Test */
|
||||
public static function addEditTest($request, $id = '')
|
||||
{
|
||||
if ($id) {
|
||||
$data = Test::find($id);
|
||||
} else {
|
||||
$data = new Test();
|
||||
}
|
||||
$data->subject_id = $request->subject;
|
||||
$data->name = $request->name;
|
||||
$data->description = $request->description;
|
||||
$data->save();
|
||||
return $data;
|
||||
}
|
||||
|
||||
/* Delete Country */
|
||||
public static function testdelete($id)
|
||||
{
|
||||
Test::where('id', $id)->delete();
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* Get Subject List */
|
||||
public static function get_SubjectList()
|
||||
{
|
||||
return Subject::all();
|
||||
}
|
||||
}
|
@@ -0,0 +1,69 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use App\Models\Test;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
use Yajra\DataTables\Facades\DataTables;
|
||||
|
||||
class TestQuestion extends Model
|
||||
{
|
||||
use HasFactory, SoftDeletes;
|
||||
|
||||
protected $table = 'test_question';
|
||||
|
||||
public function getTest()
|
||||
{
|
||||
return $this->hasOne(Test::class, 'id', 'test_id');
|
||||
}
|
||||
|
||||
/* Get Question List*/
|
||||
public static function getQuestionList($request)
|
||||
{
|
||||
if ($request->ajax()) {
|
||||
$data = TestQuestion::with('getTest');
|
||||
$data->orderBy('id','desc');
|
||||
return DataTables::of($data)
|
||||
->addColumn('test', function ($row) {
|
||||
return $row->getTest->name;
|
||||
})
|
||||
->addColumn('action', function ($row) {
|
||||
$actionBtn = '<a href="' . route('admin.question.show', $row->id) . '" class="edit btn btn-primary btn-flat btn-sm"><i class="fa fa-eye"></i> </a> <a href="' . route('admin.question.edit', $row->id) . '" class="edit btn btn-success btn-flat btn-sm"><i class="fa fa-pencil-square-o"></i> </a> <a href="javascript:void(0)" class="delete btn btn-danger btn-sm btn-flat delete_question" data-id="' . $row->id . '" ><i class=" fa-sharp fa-solid fa fa-trash"></i></a>';
|
||||
return $actionBtn;
|
||||
})
|
||||
->rawColumns(['action'])
|
||||
->make(true);
|
||||
}
|
||||
}
|
||||
/* Add Edit Question */
|
||||
public static function addEditTestQuestion($request, $id = ''){
|
||||
if ($id) {
|
||||
$data = TestQuestion::find($id);
|
||||
} else {
|
||||
$data = new TestQuestion();
|
||||
}
|
||||
$data->test_id = $request->test;
|
||||
$data->question = $request->question;
|
||||
$data->option_1 = $request->option_1;
|
||||
$data->option_2 = $request->option_2;
|
||||
$data->option_3 = $request->option_3;
|
||||
$data->option_4 = $request->option_4;
|
||||
$data->true_answer = $request->true_answer;
|
||||
$data->solution = $request->solution;
|
||||
|
||||
$data->save();
|
||||
return $data;
|
||||
}
|
||||
|
||||
/* Delete State */
|
||||
public static function Statedelete($id){
|
||||
return TestQuestion::where('id', $id)->delete();
|
||||
}
|
||||
|
||||
/* Get Test List */
|
||||
public static function get_TestList(){
|
||||
return Test::all();
|
||||
}
|
||||
}
|
@@ -0,0 +1,73 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
// use Illuminate\Contracts\Auth\MustVerifyEmail;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Foundation\Auth\User as Authenticatable;
|
||||
use Illuminate\Notifications\Notifiable;
|
||||
use Laravel\Sanctum\HasApiTokens;
|
||||
use Illuminate\Support\Facades\Hash;
|
||||
|
||||
class User extends Authenticatable {
|
||||
|
||||
use HasApiTokens,
|
||||
HasFactory,
|
||||
Notifiable;
|
||||
|
||||
/**
|
||||
* The attributes that are mass assignable.
|
||||
*
|
||||
* @var array<int, string>
|
||||
*/
|
||||
protected $fillable = [
|
||||
'name',
|
||||
'email',
|
||||
'password',
|
||||
];
|
||||
|
||||
/**
|
||||
* The attributes that should be hidden for serialization.
|
||||
*
|
||||
* @var array<int, string>
|
||||
*/
|
||||
protected $hidden = [
|
||||
'password',
|
||||
'remember_token',
|
||||
];
|
||||
|
||||
/**
|
||||
* The attributes that should be cast.
|
||||
*
|
||||
* @var array<string, string>
|
||||
*/
|
||||
protected $casts = [
|
||||
'email_verified_at' => 'datetime',
|
||||
];
|
||||
|
||||
public static function updateProfile($request, $id) {
|
||||
$user = User::find($id);
|
||||
$user->name = $request->name;
|
||||
$user->save();
|
||||
}
|
||||
|
||||
public static function updatePassword($request, $id) {
|
||||
$user = User::find($id);
|
||||
$user->password = Hash::make($request->newpassword);
|
||||
$user->save();
|
||||
}
|
||||
|
||||
/* Student Register */
|
||||
public static function register($request)
|
||||
{
|
||||
$data = new User();
|
||||
|
||||
$data->name = $request->name;
|
||||
$data->email = $request->email;
|
||||
$data->password = Hash::make($request->password);
|
||||
$data->role = config('const.studentRole');
|
||||
$data->save();
|
||||
return $data;
|
||||
}
|
||||
|
||||
}
|
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
namespace App\Providers;
|
||||
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
|
||||
class AppServiceProvider extends ServiceProvider
|
||||
{
|
||||
/**
|
||||
* Register any application services.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function register()
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Bootstrap any application services.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function boot()
|
||||
{
|
||||
//
|
||||
}
|
||||
}
|
@@ -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 model to policy mappings for the application.
|
||||
*
|
||||
* @var array<class-string, class-string>
|
||||
*/
|
||||
protected $policies = [
|
||||
// 'App\Models\Model' => 'App\Policies\ModelPolicy',
|
||||
];
|
||||
|
||||
/**
|
||||
* Register any authentication / authorization services.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function boot()
|
||||
{
|
||||
$this->registerPolicies();
|
||||
|
||||
//
|
||||
}
|
||||
}
|
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace App\Providers;
|
||||
|
||||
use Illuminate\Support\Facades\Broadcast;
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
|
||||
class BroadcastServiceProvider extends ServiceProvider
|
||||
{
|
||||
/**
|
||||
* Bootstrap any application services.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function boot()
|
||||
{
|
||||
Broadcast::routes();
|
||||
|
||||
require base_path('routes/channels.php');
|
||||
}
|
||||
}
|
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
|
||||
namespace App\Providers;
|
||||
|
||||
use Illuminate\Auth\Events\Registered;
|
||||
use Illuminate\Auth\Listeners\SendEmailVerificationNotification;
|
||||
use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;
|
||||
use Illuminate\Support\Facades\Event;
|
||||
|
||||
class EventServiceProvider extends ServiceProvider
|
||||
{
|
||||
/**
|
||||
* The event to listener mappings for the application.
|
||||
*
|
||||
* @var array<class-string, array<int, class-string>>
|
||||
*/
|
||||
protected $listen = [
|
||||
Registered::class => [
|
||||
SendEmailVerificationNotification::class,
|
||||
],
|
||||
];
|
||||
|
||||
/**
|
||||
* Register any events for your application.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function boot()
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine if events and listeners should be automatically discovered.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function shouldDiscoverEvents()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
@@ -0,0 +1,52 @@
|
||||
<?php
|
||||
|
||||
namespace App\Providers;
|
||||
|
||||
use Illuminate\Cache\RateLimiting\Limit;
|
||||
use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\RateLimiter;
|
||||
use Illuminate\Support\Facades\Route;
|
||||
|
||||
class RouteServiceProvider extends ServiceProvider
|
||||
{
|
||||
/**
|
||||
* The path to the "home" route for your application.
|
||||
*
|
||||
* Typically, users are redirected here after authentication.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public const HOME = '/admin/dashboard';
|
||||
|
||||
/**
|
||||
* Define your route model bindings, pattern filters, and other route configuration.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function boot()
|
||||
{
|
||||
$this->configureRateLimiting();
|
||||
|
||||
$this->routes(function () {
|
||||
Route::middleware('api')
|
||||
->prefix('api')
|
||||
->group(base_path('routes/api.php'));
|
||||
|
||||
Route::middleware('web')
|
||||
->group(base_path('routes/web.php'));
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Configure the rate limiters for the application.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
protected function configureRateLimiting()
|
||||
{
|
||||
RateLimiter::for('api', function (Request $request) {
|
||||
return Limit::perMinute(60)->by($request->user()?->id ?: $request->ip());
|
||||
});
|
||||
}
|
||||
}
|
@@ -0,0 +1,48 @@
|
||||
<?php
|
||||
|
||||
namespace App\Services;
|
||||
|
||||
use App\Models\Exam;
|
||||
use App\Models\Plan;
|
||||
use App\Models\Subject;
|
||||
use App\Models\Test;
|
||||
use App\Models\Country;
|
||||
use App\Models\State;
|
||||
|
||||
class CommonService {
|
||||
/* Get Total Count of Exam */
|
||||
|
||||
public static function totalExam() {
|
||||
return Exam::all()->count();
|
||||
}
|
||||
|
||||
/* Get Total Count of Plan */
|
||||
|
||||
public static function totalPlan() {
|
||||
return Plan::all()->count();
|
||||
}
|
||||
|
||||
/* Get Total Count of Plan */
|
||||
|
||||
public static function totalSubject() {
|
||||
return Subject::all()->count();
|
||||
}
|
||||
|
||||
/* Get Total Count of Plan */
|
||||
|
||||
public static function totalTest() {
|
||||
return Test::all()->count();
|
||||
}
|
||||
|
||||
/* Get Total Country */
|
||||
|
||||
public static function totalCountry() {
|
||||
return Country::all()->count();
|
||||
}
|
||||
/* Get Total State */
|
||||
|
||||
public static function totalState() {
|
||||
return State::all()->count();
|
||||
}
|
||||
|
||||
}
|
@@ -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 of our classes manually. It's 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);
|
@@ -0,0 +1,606 @@
|
||||
-- phpMyAdmin SQL Dump
|
||||
-- version 5.2.0
|
||||
-- https://www.phpmyadmin.net/
|
||||
--
|
||||
-- Host: 127.0.0.1
|
||||
-- Generation Time: Dec 17, 2022 at 12:29 PM
|
||||
-- Server version: 10.4.25-MariaDB
|
||||
-- PHP Version: 8.0.23
|
||||
|
||||
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
|
||||
START TRANSACTION;
|
||||
SET time_zone = "+00:00";
|
||||
|
||||
|
||||
/*!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 utf8mb4 */;
|
||||
|
||||
--
|
||||
-- Database: `auschooltest`
|
||||
--
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table `city`
|
||||
--
|
||||
|
||||
CREATE TABLE `city` (
|
||||
`id` bigint(20) UNSIGNED NOT NULL,
|
||||
`name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`country_id` bigint(20) UNSIGNED NOT NULL,
|
||||
`created_at` timestamp NULL DEFAULT NULL,
|
||||
`updated_at` timestamp NULL DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
|
||||
--
|
||||
-- Dumping data for table `city`
|
||||
--
|
||||
|
||||
INSERT INTO `city` (`id`, `name`, `country_id`, `created_at`, `updated_at`) VALUES
|
||||
(1, 'NSW', 1, NULL, NULL);
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table `country`
|
||||
--
|
||||
|
||||
CREATE TABLE `country` (
|
||||
`id` bigint(20) UNSIGNED NOT NULL,
|
||||
`name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`created_at` timestamp NULL DEFAULT NULL,
|
||||
`updated_at` timestamp NULL DEFAULT NULL,
|
||||
`deleted_at` timestamp NULL DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
|
||||
--
|
||||
-- Dumping data for table `country`
|
||||
--
|
||||
|
||||
INSERT INTO `country` (`id`, `name`, `created_at`, `updated_at`, `deleted_at`) VALUES
|
||||
(1, 'Australia', '2022-11-27 10:43:36', '2022-11-30 13:52:41', NULL),
|
||||
(2, 'India', '2022-11-27 10:02:08', '2022-11-30 13:38:49', NULL),
|
||||
(3, 'America', '2022-11-27 10:36:28', '2022-11-30 13:50:47', NULL),
|
||||
(4, 'UK', '2022-11-27 11:21:00', '2022-12-02 12:32:17', '2022-12-02 12:32:17');
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table `exam`
|
||||
--
|
||||
|
||||
CREATE TABLE `exam` (
|
||||
`id` bigint(20) UNSIGNED NOT NULL,
|
||||
`exam_category_id` bigint(20) UNSIGNED NOT NULL,
|
||||
`country_id` bigint(20) UNSIGNED NOT NULL,
|
||||
`state_id` bigint(20) UNSIGNED NOT NULL,
|
||||
`name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`description` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
||||
`created_at` timestamp NULL DEFAULT NULL,
|
||||
`updated_at` timestamp NULL DEFAULT NULL,
|
||||
`deleted_at` timestamp NULL DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
|
||||
--
|
||||
-- Dumping data for table `exam`
|
||||
--
|
||||
|
||||
INSERT INTO `exam` (`id`, `exam_category_id`, `country_id`, `state_id`, `name`, `description`, `created_at`, `updated_at`, `deleted_at`) VALUES
|
||||
(1, 1, 2, 3, 'NPLAN', 'This is NAPLAN', '2022-11-29 13:16:56', '2022-12-01 10:26:16', NULL),
|
||||
(2, 2, 1, 2, 'NPLAN 2', 'This is Test Demo', '2022-11-30 11:40:17', '2022-11-30 11:40:17', NULL),
|
||||
(3, 2, 2, 3, 'NPLAN 3', 'This is NAPLAN', '2022-11-30 11:44:58', '2022-11-30 12:42:31', NULL),
|
||||
(4, 1, 3, 4, 'NPLAN 4', 'This is NPLAN 4', '2022-12-01 10:27:49', '2022-12-02 13:11:16', NULL),
|
||||
(5, 3, 3, 4, 'NPLAN Exam', 'Testwet', '2022-12-03 04:45:36', '2022-12-03 04:45:36', NULL),
|
||||
(6, 1, 2, 3, 'America', 'test', '2022-12-04 01:12:59', '2022-12-04 01:13:13', '2022-12-04 01:13:13');
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table `exam_category`
|
||||
--
|
||||
|
||||
CREATE TABLE `exam_category` (
|
||||
`id` bigint(20) UNSIGNED NOT NULL,
|
||||
`title` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`created_at` timestamp NULL DEFAULT NULL,
|
||||
`updated_at` timestamp NULL DEFAULT NULL,
|
||||
`deleted_at` timestamp NULL DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
|
||||
--
|
||||
-- Dumping data for table `exam_category`
|
||||
--
|
||||
|
||||
INSERT INTO `exam_category` (`id`, `title`, `created_at`, `updated_at`, `deleted_at`) VALUES
|
||||
(1, 'Category', '2022-11-28 13:00:13', '2022-11-28 13:17:08', NULL),
|
||||
(2, 'Category 2', '2022-11-28 13:01:59', '2022-11-30 12:56:27', NULL),
|
||||
(3, 'Category 3', '2022-12-02 12:37:00', '2022-12-02 12:37:36', NULL),
|
||||
(4, 'Category 4', '2022-12-03 04:44:23', '2022-12-05 11:56:51', '2022-12-05 11:56:51');
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table `failed_jobs`
|
||||
--
|
||||
|
||||
CREATE TABLE `failed_jobs` (
|
||||
`id` bigint(20) UNSIGNED NOT NULL,
|
||||
`uuid` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`connection` text COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`queue` text COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`payload` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`exception` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`failed_at` timestamp NOT NULL DEFAULT current_timestamp()
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table `migrations`
|
||||
--
|
||||
|
||||
CREATE TABLE `migrations` (
|
||||
`id` int(10) UNSIGNED NOT NULL,
|
||||
`migration` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`batch` int(11) NOT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
|
||||
--
|
||||
-- Dumping data for table `migrations`
|
||||
--
|
||||
|
||||
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES
|
||||
(1, '2014_10_12_000000_create_users_table', 1),
|
||||
(2, '2014_10_12_100000_create_password_resets_table', 1),
|
||||
(3, '2019_08_19_000000_create_failed_jobs_table', 1),
|
||||
(4, '2019_12_14_000001_create_personal_access_tokens_table', 1),
|
||||
(5, '2022_11_26_083707_add_colunm_to_users_table', 2),
|
||||
(6, '2022_11_26_190814_change_colounm_size_password_resets_table', 3),
|
||||
(7, '2022_11_26_194150_add_colunm_to_password_resets_table', 4),
|
||||
(8, '2022_11_27_082949_create_plans_table', 5),
|
||||
(9, '2022_11_27_085822_create_country_table', 5),
|
||||
(10, '2022_11_27_085937_creat_city_table', 6),
|
||||
(11, '2022_11_27_120108_create_state_table', 7),
|
||||
(12, '2022_11_27_174609_add_colunm_to_country', 8),
|
||||
(13, '2022_11_28_164122_add_colunm_to_state_table', 9),
|
||||
(14, '2022_11_28_175105_create_exam_category_table', 10),
|
||||
(15, '2022_11_29_160620_create_exam_table', 11),
|
||||
(16, '2022_11_29_181715_add_colunm_to_exam_table', 12),
|
||||
(17, '2022_12_01_171004_add_colunm_to_plans_table', 13),
|
||||
(18, '2022_12_01_174704_create_plans_table', 14),
|
||||
(19, '2022_12_01_180824_add_colunm_to_plans_table', 15),
|
||||
(20, '2022_12_02_184735_create_subjects_table', 16),
|
||||
(21, '2022_12_03_062303_create_test_table', 17),
|
||||
(22, '2022_12_03_081541_add_colunm_to_subject_table', 18),
|
||||
(23, '2022_12_03_134412_add_colunm_to_plans_table', 19),
|
||||
(24, '2022_12_04_071758_create_test_question_table', 20),
|
||||
(26, '2022_12_11_114751_add_colunm_to_test_question', 21);
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table `password_resets`
|
||||
--
|
||||
|
||||
CREATE TABLE `password_resets` (
|
||||
`email` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`token` text COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`created_at` timestamp NULL DEFAULT NULL,
|
||||
`updated_at` timestamp NULL DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table `personal_access_tokens`
|
||||
--
|
||||
|
||||
CREATE TABLE `personal_access_tokens` (
|
||||
`id` bigint(20) UNSIGNED NOT NULL,
|
||||
`tokenable_type` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`tokenable_id` bigint(20) UNSIGNED NOT NULL,
|
||||
`name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`token` varchar(64) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`abilities` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
||||
`last_used_at` timestamp NULL DEFAULT NULL,
|
||||
`expires_at` timestamp NULL DEFAULT NULL,
|
||||
`created_at` timestamp NULL DEFAULT NULL,
|
||||
`updated_at` timestamp NULL DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table `plans`
|
||||
--
|
||||
|
||||
CREATE TABLE `plans` (
|
||||
`id` bigint(20) UNSIGNED NOT NULL,
|
||||
`exam_id` bigint(20) UNSIGNED NOT NULL,
|
||||
`name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`year` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`price` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`validity` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`unlimited_test_attempt` tinyint(4) NOT NULL COMMENT '1-yes,0-no',
|
||||
`attempt` int(11) DEFAULT NULL,
|
||||
`description` text COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`created_at` timestamp NULL DEFAULT NULL,
|
||||
`updated_at` timestamp NULL DEFAULT NULL,
|
||||
`deleted_at` timestamp NULL DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
|
||||
--
|
||||
-- Dumping data for table `plans`
|
||||
--
|
||||
|
||||
INSERT INTO `plans` (`id`, `exam_id`, `name`, `year`, `price`, `validity`, `unlimited_test_attempt`, `attempt`, `description`, `created_at`, `updated_at`, `deleted_at`) VALUES
|
||||
(1, 1, '3 Year', '3', '2000', '356', 0, 5, 'aeqwe', '2022-12-01 13:24:46', '2022-12-03 12:04:51', NULL),
|
||||
(2, 2, '6 year', '6', '5000', '450', 0, 2, 'Test', '2022-12-01 13:55:51', '2022-12-02 13:14:57', NULL),
|
||||
(3, 4, '4', '4', '500', '365', 1, NULL, 'This is NPLAN 4 Plan', '2022-12-03 11:27:00', '2022-12-03 12:05:59', NULL),
|
||||
(4, 1, 'English', '3', '200', '356', 1, NULL, 'test', '2022-12-04 01:14:17', '2022-12-04 01:14:17', NULL);
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table `state`
|
||||
--
|
||||
|
||||
CREATE TABLE `state` (
|
||||
`id` bigint(20) UNSIGNED NOT NULL,
|
||||
`name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`country_id` bigint(20) UNSIGNED NOT NULL,
|
||||
`created_at` timestamp NULL DEFAULT NULL,
|
||||
`updated_at` timestamp NULL DEFAULT NULL,
|
||||
`deleted_at` timestamp NULL DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
|
||||
--
|
||||
-- Dumping data for table `state`
|
||||
--
|
||||
|
||||
INSERT INTO `state` (`id`, `name`, `country_id`, `created_at`, `updated_at`, `deleted_at`) VALUES
|
||||
(1, 'sydney', 1, '2022-11-28 11:53:11', '2022-11-28 12:13:33', NULL),
|
||||
(2, 'Perth', 1, '2022-11-28 11:53:48', '2022-11-28 12:14:47', NULL),
|
||||
(3, 'Gujrat', 2, '2022-11-28 11:54:05', '2022-11-28 12:12:51', NULL),
|
||||
(4, 'California', 3, '2022-12-01 10:27:09', '2022-12-01 10:27:09', NULL);
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table `subjects`
|
||||
--
|
||||
|
||||
CREATE TABLE `subjects` (
|
||||
`id` bigint(20) UNSIGNED NOT NULL,
|
||||
`plan_id` bigint(20) UNSIGNED NOT NULL,
|
||||
`name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`description` text COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`created_at` timestamp NULL DEFAULT NULL,
|
||||
`updated_at` timestamp NULL DEFAULT NULL,
|
||||
`deleted_at` timestamp NULL DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
|
||||
--
|
||||
-- Dumping data for table `subjects`
|
||||
--
|
||||
|
||||
INSERT INTO `subjects` (`id`, `plan_id`, `name`, `description`, `created_at`, `updated_at`, `deleted_at`) VALUES
|
||||
(1, 1, 'English', 'This is English Subject', '2022-12-02 14:02:36', '2022-12-03 02:55:47', NULL),
|
||||
(2, 1, 'Medium English', 'This is Medium English', '2022-12-03 00:47:58', '2022-12-03 03:20:15', NULL),
|
||||
(3, 1, 'Mathematics', 'This is Mathematics', '2022-12-03 00:48:29', '2022-12-03 03:18:47', NULL);
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table `test`
|
||||
--
|
||||
|
||||
CREATE TABLE `test` (
|
||||
`id` bigint(20) UNSIGNED NOT NULL,
|
||||
`subject_id` bigint(20) UNSIGNED NOT NULL,
|
||||
`name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`description` text COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`created_at` timestamp NULL DEFAULT NULL,
|
||||
`updated_at` timestamp NULL DEFAULT NULL,
|
||||
`deleted_at` timestamp NULL DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
|
||||
--
|
||||
-- Dumping data for table `test`
|
||||
--
|
||||
|
||||
INSERT INTO `test` (`id`, `subject_id`, `name`, `description`, `created_at`, `updated_at`, `deleted_at`) VALUES
|
||||
(1, 1, 'English Test', 'This is English Test', '2022-12-03 06:36:42', '2022-12-03 08:02:40', NULL),
|
||||
(2, 2, 'Medium English Test', 'This is Medium English Test', '2022-12-03 06:59:12', '2022-12-03 06:59:12', NULL);
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table `test_question`
|
||||
--
|
||||
|
||||
CREATE TABLE `test_question` (
|
||||
`id` bigint(20) UNSIGNED NOT NULL,
|
||||
`test_id` bigint(20) UNSIGNED NOT NULL,
|
||||
`question_type` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`question` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
||||
`question_image` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
||||
`option_1` text COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`option_2` text COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`option_3` text COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`option_4` text COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`true_answer` text COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`solution` text COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`created_at` timestamp NULL DEFAULT NULL,
|
||||
`updated_at` timestamp NULL DEFAULT NULL,
|
||||
`deleted_at` timestamp NULL DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table `users`
|
||||
--
|
||||
|
||||
CREATE TABLE `users` (
|
||||
`id` bigint(20) UNSIGNED NOT NULL,
|
||||
`name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`email` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`email_verified_at` timestamp NULL DEFAULT NULL,
|
||||
`password` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`role` tinyint(4) NOT NULL COMMENT '1-admin,2-student',
|
||||
`remember_token` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
||||
`created_at` timestamp NULL DEFAULT NULL,
|
||||
`updated_at` timestamp NULL DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
|
||||
--
|
||||
-- Dumping data for table `users`
|
||||
--
|
||||
|
||||
INSERT INTO `users` (`id`, `name`, `email`, `email_verified_at`, `password`, `role`, `remember_token`, `created_at`, `updated_at`) VALUES
|
||||
(1, 'Admin', 'auschooladmin@yopmail.com', NULL, '$2y$10$V6qT1fPyObzGhZt6Ikx5jODtwUDftYIIYb/go.kCOOskDe5pkRDNW', 1, NULL, '2022-12-09 13:22:09', '2022-12-09 13:22:09'),
|
||||
(2, 'Student1', 'student1@yopmail.com', NULL, '$2y$10$6WdD7dhhkyNkxeNRIGzxUeKt/vy2GHGQb2fS/5tUC6RpBoPMl1RWG', 2, NULL, '2022-12-09 13:24:26', '2022-12-10 06:34:49'),
|
||||
(3, 'Student3', 'student3@yopmail.com', NULL, '$2y$10$3kgWdumLNbb0f/TwlBjVwuVuR4tT73KIp8Oa3v3/2dn5r.XGlMrKy', 2, NULL, '2022-12-09 13:34:49', '2022-12-09 13:34:49'),
|
||||
(4, 'Student4', 'student4@yopmail.com', NULL, '$2y$10$Wl1W5R7Rger/RbHlHzX83eJTlweQe62pV4dN/Z8blq7jstaEJV8rO', 2, NULL, '2022-12-09 13:56:19', '2022-12-09 13:56:19'),
|
||||
(5, 'Student5', 'student5@yopmail.com', NULL, '$2y$10$vVQODFOJtTmK0dPK6Ru9h.1SQLjRB4bqrZbHZaptIAMu7phc3HLxu', 2, NULL, '2022-12-09 13:57:58', '2022-12-09 13:57:58'),
|
||||
(6, 'Student 2', 'student2@yopmail.com', NULL, '$2y$10$jJRxB.izbJoPhZK9n7GBDeLOpAXCG.6RvMADUKtM4iDowUgDKZzMC', 2, NULL, '2022-12-10 01:14:17', '2022-12-10 01:14:17');
|
||||
|
||||
--
|
||||
-- Indexes for dumped tables
|
||||
--
|
||||
|
||||
--
|
||||
-- Indexes for table `city`
|
||||
--
|
||||
ALTER TABLE `city`
|
||||
ADD PRIMARY KEY (`id`),
|
||||
ADD KEY `city_country_id_foreign` (`country_id`);
|
||||
|
||||
--
|
||||
-- Indexes for table `country`
|
||||
--
|
||||
ALTER TABLE `country`
|
||||
ADD PRIMARY KEY (`id`);
|
||||
|
||||
--
|
||||
-- Indexes for table `exam`
|
||||
--
|
||||
ALTER TABLE `exam`
|
||||
ADD PRIMARY KEY (`id`),
|
||||
ADD KEY `exam_exam_category_id_foreign` (`exam_category_id`),
|
||||
ADD KEY `exam_country_id_foreign` (`country_id`),
|
||||
ADD KEY `exam_state_id_foreign` (`state_id`);
|
||||
|
||||
--
|
||||
-- Indexes for table `exam_category`
|
||||
--
|
||||
ALTER TABLE `exam_category`
|
||||
ADD PRIMARY KEY (`id`);
|
||||
|
||||
--
|
||||
-- Indexes for table `failed_jobs`
|
||||
--
|
||||
ALTER TABLE `failed_jobs`
|
||||
ADD PRIMARY KEY (`id`),
|
||||
ADD UNIQUE KEY `failed_jobs_uuid_unique` (`uuid`);
|
||||
|
||||
--
|
||||
-- Indexes for table `migrations`
|
||||
--
|
||||
ALTER TABLE `migrations`
|
||||
ADD PRIMARY KEY (`id`);
|
||||
|
||||
--
|
||||
-- Indexes for table `password_resets`
|
||||
--
|
||||
ALTER TABLE `password_resets`
|
||||
ADD KEY `password_resets_email_index` (`email`);
|
||||
|
||||
--
|
||||
-- Indexes for table `personal_access_tokens`
|
||||
--
|
||||
ALTER TABLE `personal_access_tokens`
|
||||
ADD PRIMARY KEY (`id`),
|
||||
ADD UNIQUE KEY `personal_access_tokens_token_unique` (`token`),
|
||||
ADD KEY `personal_access_tokens_tokenable_type_tokenable_id_index` (`tokenable_type`,`tokenable_id`);
|
||||
|
||||
--
|
||||
-- Indexes for table `plans`
|
||||
--
|
||||
ALTER TABLE `plans`
|
||||
ADD PRIMARY KEY (`id`),
|
||||
ADD KEY `plans_exam_id_foreign` (`exam_id`);
|
||||
|
||||
--
|
||||
-- Indexes for table `state`
|
||||
--
|
||||
ALTER TABLE `state`
|
||||
ADD PRIMARY KEY (`id`),
|
||||
ADD KEY `state_country_id_foreign` (`country_id`);
|
||||
|
||||
--
|
||||
-- Indexes for table `subjects`
|
||||
--
|
||||
ALTER TABLE `subjects`
|
||||
ADD PRIMARY KEY (`id`),
|
||||
ADD KEY `subjects_plan_id_foreign` (`plan_id`);
|
||||
|
||||
--
|
||||
-- Indexes for table `test`
|
||||
--
|
||||
ALTER TABLE `test`
|
||||
ADD PRIMARY KEY (`id`),
|
||||
ADD KEY `test_subject_id_foreign` (`subject_id`);
|
||||
|
||||
--
|
||||
-- Indexes for table `test_question`
|
||||
--
|
||||
ALTER TABLE `test_question`
|
||||
ADD PRIMARY KEY (`id`),
|
||||
ADD KEY `test_question_test_id_foreign` (`test_id`);
|
||||
|
||||
--
|
||||
-- Indexes for table `users`
|
||||
--
|
||||
ALTER TABLE `users`
|
||||
ADD PRIMARY KEY (`id`),
|
||||
ADD UNIQUE KEY `users_email_unique` (`email`);
|
||||
|
||||
--
|
||||
-- AUTO_INCREMENT for dumped tables
|
||||
--
|
||||
|
||||
--
|
||||
-- AUTO_INCREMENT for table `city`
|
||||
--
|
||||
ALTER TABLE `city`
|
||||
MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
|
||||
|
||||
--
|
||||
-- AUTO_INCREMENT for table `country`
|
||||
--
|
||||
ALTER TABLE `country`
|
||||
MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;
|
||||
|
||||
--
|
||||
-- AUTO_INCREMENT for table `exam`
|
||||
--
|
||||
ALTER TABLE `exam`
|
||||
MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;
|
||||
|
||||
--
|
||||
-- AUTO_INCREMENT for table `exam_category`
|
||||
--
|
||||
ALTER TABLE `exam_category`
|
||||
MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;
|
||||
|
||||
--
|
||||
-- AUTO_INCREMENT for table `failed_jobs`
|
||||
--
|
||||
ALTER TABLE `failed_jobs`
|
||||
MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;
|
||||
|
||||
--
|
||||
-- AUTO_INCREMENT for table `migrations`
|
||||
--
|
||||
ALTER TABLE `migrations`
|
||||
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=27;
|
||||
|
||||
--
|
||||
-- AUTO_INCREMENT for table `personal_access_tokens`
|
||||
--
|
||||
ALTER TABLE `personal_access_tokens`
|
||||
MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;
|
||||
|
||||
--
|
||||
-- AUTO_INCREMENT for table `plans`
|
||||
--
|
||||
ALTER TABLE `plans`
|
||||
MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;
|
||||
|
||||
--
|
||||
-- AUTO_INCREMENT for table `state`
|
||||
--
|
||||
ALTER TABLE `state`
|
||||
MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;
|
||||
|
||||
--
|
||||
-- AUTO_INCREMENT for table `subjects`
|
||||
--
|
||||
ALTER TABLE `subjects`
|
||||
MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;
|
||||
|
||||
--
|
||||
-- AUTO_INCREMENT for table `test`
|
||||
--
|
||||
ALTER TABLE `test`
|
||||
MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
|
||||
|
||||
--
|
||||
-- AUTO_INCREMENT for table `test_question`
|
||||
--
|
||||
ALTER TABLE `test_question`
|
||||
MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;
|
||||
|
||||
--
|
||||
-- AUTO_INCREMENT for table `users`
|
||||
--
|
||||
ALTER TABLE `users`
|
||||
MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;
|
||||
|
||||
--
|
||||
-- Constraints for dumped tables
|
||||
--
|
||||
|
||||
--
|
||||
-- Constraints for table `city`
|
||||
--
|
||||
ALTER TABLE `city`
|
||||
ADD CONSTRAINT `city_country_id_foreign` FOREIGN KEY (`country_id`) REFERENCES `country` (`id`);
|
||||
|
||||
--
|
||||
-- Constraints for table `exam`
|
||||
--
|
||||
ALTER TABLE `exam`
|
||||
ADD CONSTRAINT `exam_country_id_foreign` FOREIGN KEY (`country_id`) REFERENCES `country` (`id`),
|
||||
ADD CONSTRAINT `exam_exam_category_id_foreign` FOREIGN KEY (`exam_category_id`) REFERENCES `exam_category` (`id`),
|
||||
ADD CONSTRAINT `exam_state_id_foreign` FOREIGN KEY (`state_id`) REFERENCES `state` (`id`);
|
||||
|
||||
--
|
||||
-- Constraints for table `plans`
|
||||
--
|
||||
ALTER TABLE `plans`
|
||||
ADD CONSTRAINT `plans_exam_id_foreign` FOREIGN KEY (`exam_id`) REFERENCES `exam` (`id`);
|
||||
|
||||
--
|
||||
-- Constraints for table `state`
|
||||
--
|
||||
ALTER TABLE `state`
|
||||
ADD CONSTRAINT `state_country_id_foreign` FOREIGN KEY (`country_id`) REFERENCES `country` (`id`);
|
||||
|
||||
--
|
||||
-- Constraints for table `subjects`
|
||||
--
|
||||
ALTER TABLE `subjects`
|
||||
ADD CONSTRAINT `subjects_plan_id_foreign` FOREIGN KEY (`plan_id`) REFERENCES `plans` (`id`);
|
||||
|
||||
--
|
||||
-- Constraints for table `test`
|
||||
--
|
||||
ALTER TABLE `test`
|
||||
ADD CONSTRAINT `test_subject_id_foreign` FOREIGN KEY (`subject_id`) REFERENCES `subjects` (`id`);
|
||||
|
||||
--
|
||||
-- Constraints for table `test_question`
|
||||
--
|
||||
ALTER TABLE `test_question`
|
||||
ADD CONSTRAINT `test_question_test_id_foreign` FOREIGN KEY (`test_id`) REFERENCES `test` (`id`);
|
||||
COMMIT;
|
||||
|
||||
/*!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 */;
|
@@ -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(
|
||||
$_ENV['APP_BASE_PATH'] ?? dirname(__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
quotation2/laravel-simple-tryout/php74-httpd/example-app/bootstrap/cache/.gitignore
vendored
Normal file
2
quotation2/laravel-simple-tryout/php74-httpd/example-app/bootstrap/cache/.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
*
|
||||
!.gitignore
|
@@ -0,0 +1,68 @@
|
||||
{
|
||||
"name": "laravel/laravel",
|
||||
"type": "project",
|
||||
"description": "The Laravel Framework.",
|
||||
"keywords": ["framework", "laravel"],
|
||||
"license": "MIT",
|
||||
"require": {
|
||||
"php": "^8.0.2",
|
||||
"doctrine/dbal": "^3.5",
|
||||
"guzzlehttp/guzzle": "^7.2",
|
||||
"laravel/framework": "^9.19",
|
||||
"laravel/sanctum": "^3.0",
|
||||
"laravel/tinker": "^2.7",
|
||||
"laravel/ui": "^4.1",
|
||||
"yajra/laravel-datatables": "9.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"fakerphp/faker": "^1.9.1",
|
||||
"laravel/pint": "^1.0",
|
||||
"laravel/sail": "^1.0.1",
|
||||
"mockery/mockery": "^1.4.4",
|
||||
"nunomaduro/collision": "^6.1",
|
||||
"phpunit/phpunit": "^9.5.10",
|
||||
"spatie/laravel-ignition": "^1.0"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"App\\": "app/",
|
||||
"Database\\Factories\\": "database/factories/",
|
||||
"Database\\Seeders\\": "database/seeders/"
|
||||
}
|
||||
},
|
||||
"autoload-dev": {
|
||||
"psr-4": {
|
||||
"Tests\\": "tests/"
|
||||
}
|
||||
},
|
||||
"scripts": {
|
||||
"post-autoload-dump": [
|
||||
"Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
|
||||
"@php artisan package:discover --ansi"
|
||||
],
|
||||
"post-update-cmd": [
|
||||
"@php artisan vendor:publish --tag=laravel-assets --ansi --force"
|
||||
],
|
||||
"post-root-package-install": [
|
||||
"@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
|
||||
],
|
||||
"post-create-project-cmd": [
|
||||
"@php artisan key:generate --ansi"
|
||||
]
|
||||
},
|
||||
"extra": {
|
||||
"laravel": {
|
||||
"dont-discover": []
|
||||
}
|
||||
},
|
||||
"config": {
|
||||
"optimize-autoloader": true,
|
||||
"preferred-install": "dist",
|
||||
"sort-packages": true,
|
||||
"allow-plugins": {
|
||||
"pestphp/pest-plugin": true
|
||||
}
|
||||
},
|
||||
"minimum-stability": "dev",
|
||||
"prefer-stable": true
|
||||
}
|
9109
quotation2/laravel-simple-tryout/php74-httpd/example-app/composer.lock
generated
Normal file
9109
quotation2/laravel-simple-tryout/php74-httpd/example-app/composer.lock
generated
Normal file
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user