├── public ├── favicon.ico ├── robots.txt ├── fonts │ ├── dropify.eot │ ├── dropify.ttf │ ├── dropify.woff │ └── dropify.svg ├── img │ ├── background.jpg │ └── 404.svg ├── mix-manifest.json ├── .htaccess ├── js │ ├── dropify-uploads.js │ └── main.js ├── web.config ├── index.php └── css │ └── app.css ├── resources ├── css │ └── app.css ├── js │ ├── app.js │ └── bootstrap.js ├── sass │ ├── app.scss │ └── _variables.scss ├── lang │ └── en │ │ ├── pagination.php │ │ ├── auth.php │ │ ├── passwords.php │ │ └── validation.php └── views │ ├── 404.blade.php │ ├── auth │ ├── verify.blade.php │ ├── passwords │ │ ├── email.blade.php │ │ ├── confirm.blade.php │ │ └── reset.blade.php │ ├── login.blade.php │ └── register.blade.php │ ├── adminHome.blade.php │ ├── showCustomers.blade.php │ ├── viewCustomer.blade.php │ ├── welcome.blade.php │ ├── editUser.blade.php │ ├── showTrades.blade.php │ ├── layouts │ └── app.blade.php │ ├── addCustomer.blade.php │ └── home.blade.php ├── bootstrap ├── cache │ └── .gitignore └── app.php ├── storage ├── logs │ └── .gitignore ├── app │ ├── public │ │ └── .gitignore │ └── .gitignore └── framework │ ├── testing │ └── .gitignore │ ├── views │ └── .gitignore │ ├── cache │ ├── data │ │ └── .gitignore │ └── .gitignore │ ├── sessions │ └── .gitignore │ └── .gitignore ├── database ├── .gitignore ├── seeders │ ├── DatabaseSeeder.php │ └── CreateUsersSeeder.php ├── migrations │ ├── 2014_10_12_100000_create_password_resets_table.php │ ├── 2019_08_19_000000_create_failed_jobs_table.php │ └── 2021_03_24_000000_create_users_table.php └── factories │ └── UserFactory.php ├── .gitattributes ├── tests ├── TestCase.php ├── Unit │ └── ExampleTest.php ├── Feature │ └── ExampleTest.php └── CreatesApplication.php ├── .styleci.yml ├── .gitignore ├── .editorconfig ├── app ├── Http │ ├── Middleware │ │ ├── EncryptCookies.php │ │ ├── VerifyCsrfToken.php │ │ ├── TrustHosts.php │ │ ├── PreventRequestsDuringMaintenance.php │ │ ├── TrimStrings.php │ │ ├── Authenticate.php │ │ ├── IsAdmin.php │ │ ├── TrustProxies.php │ │ └── RedirectIfAuthenticated.php │ ├── Controllers │ │ ├── Controller.php │ │ ├── Auth │ │ │ ├── ForgotPasswordController.php │ │ │ ├── ResetPasswordController.php │ │ │ ├── ConfirmPasswordController.php │ │ │ ├── VerificationController.php │ │ │ ├── LoginController.php │ │ │ └── RegisterController.php │ │ ├── HomeController.php │ │ ├── AdminController.php │ │ └── UserController.php │ └── Kernel.php ├── Providers │ ├── BroadcastServiceProvider.php │ ├── AppServiceProvider.php │ ├── AuthServiceProvider.php │ ├── EventServiceProvider.php │ └── RouteServiceProvider.php ├── Exceptions │ └── Handler.php ├── Console │ └── Kernel.php └── Models │ └── User.php ├── webpack.mix.js ├── routes ├── channels.php ├── api.php ├── console.php └── web.php ├── server.php ├── SECURITY.md ├── package.json ├── .github └── workflows │ ├── dependency-review.yml │ ├── codeql.yml │ └── apisec-scan.yml ├── config ├── cors.php ├── services.php ├── view.php ├── hashing.php ├── broadcasting.php ├── filesystems.php ├── queue.php ├── logging.php ├── cache.php ├── mail.php ├── auth.php ├── database.php └── session.php ├── phpunit.xml ├── README.md ├── artisan ├── composer.json └── db.sql /public/favicon.ico: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /resources/css/app.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /bootstrap/cache/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /resources/js/app.js: -------------------------------------------------------------------------------- 1 | require('./bootstrap'); 2 | -------------------------------------------------------------------------------- /storage/logs/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /database/.gitignore: -------------------------------------------------------------------------------- 1 | *.sqlite 2 | *.sqlite-journal 3 | -------------------------------------------------------------------------------- /public/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | Disallow: 3 | -------------------------------------------------------------------------------- /storage/app/public/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/app/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !public/ 3 | !.gitignore 4 | -------------------------------------------------------------------------------- /storage/framework/testing/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/views/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/cache/data/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/sessions/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/cache/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !data/ 3 | !.gitignore 4 | -------------------------------------------------------------------------------- /public/fonts/dropify.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superstar1205/LoanSystem/HEAD/public/fonts/dropify.eot -------------------------------------------------------------------------------- /public/fonts/dropify.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superstar1205/LoanSystem/HEAD/public/fonts/dropify.ttf -------------------------------------------------------------------------------- /public/fonts/dropify.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superstar1205/LoanSystem/HEAD/public/fonts/dropify.woff -------------------------------------------------------------------------------- /public/img/background.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superstar1205/LoanSystem/HEAD/public/img/background.jpg -------------------------------------------------------------------------------- /public/mix-manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "/js/app.js": "/js/app.js", 3 | "/css/app.css": "/css/app.css" 4 | } 5 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto 2 | *.css linguist-vendored 3 | *.scss linguist-vendored 4 | *.js linguist-vendored 5 | CHANGELOG.md export-ignore 6 | -------------------------------------------------------------------------------- /storage/framework/.gitignore: -------------------------------------------------------------------------------- 1 | compiled.php 2 | config.php 3 | down 4 | events.scanned.php 5 | maintenance.php 6 | routes.php 7 | routes.scanned.php 8 | schedule-* 9 | services.json 10 | -------------------------------------------------------------------------------- /resources/sass/app.scss: -------------------------------------------------------------------------------- 1 | // Fonts 2 | @import url('https://fonts.googleapis.com/css?family=Nunito'); 3 | 4 | // Variables 5 | @import 'variables'; 6 | 7 | // Bootstrap 8 | @import '~bootstrap/scss/bootstrap'; 9 | -------------------------------------------------------------------------------- /tests/TestCase.php: -------------------------------------------------------------------------------- 1 | assertTrue(true); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /database/seeders/DatabaseSeeder.php: -------------------------------------------------------------------------------- 1 | create(); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /app/Http/Middleware/EncryptCookies.php: -------------------------------------------------------------------------------- 1 | get('/'); 18 | 19 | $response->assertStatus(200); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /app/Http/Middleware/TrustHosts.php: -------------------------------------------------------------------------------- 1 | allSubdomainsOfApplicationUrl(), 18 | ]; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /app/Http/Middleware/PreventRequestsDuringMaintenance.php: -------------------------------------------------------------------------------- 1 | make(Kernel::class)->bootstrap(); 19 | 20 | return $app; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /app/Providers/BroadcastServiceProvider.php: -------------------------------------------------------------------------------- 1 | expectsJson()) { 18 | return route('login'); 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /webpack.mix.js: -------------------------------------------------------------------------------- 1 | const mix = require('laravel-mix'); 2 | 3 | /* 4 | |-------------------------------------------------------------------------- 5 | | Mix Asset Management 6 | |-------------------------------------------------------------------------- 7 | | 8 | | Mix provides a clean, fluent API for defining some Webpack build steps 9 | | for your Laravel application. By default, we are compiling the Sass 10 | | file for the application as well as bundling up all the JS files. 11 | | 12 | */ 13 | 14 | mix.js('resources/js/app.js', 'public/js') 15 | .sass('resources/sass/app.scss', 'public/css') 16 | .sourceMaps(); 17 | -------------------------------------------------------------------------------- /app/Http/Middleware/IsAdmin.php: -------------------------------------------------------------------------------- 1 | user()->is_admin == 1){ 20 | return $next($request); 21 | } 22 | 23 | return redirect(‘home’)->with(‘error’,"You don't have admin access."); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /resources/lang/en/pagination.php: -------------------------------------------------------------------------------- 1 | '« Previous', 17 | 'next' => 'Next »', 18 | 19 | ]; 20 | -------------------------------------------------------------------------------- /routes/channels.php: -------------------------------------------------------------------------------- 1 | id === (int) $id; 18 | }); 19 | -------------------------------------------------------------------------------- /routes/api.php: -------------------------------------------------------------------------------- 1 | get('/user', function (Request $request) { 18 | return $request->user(); 19 | }); 20 | -------------------------------------------------------------------------------- /server.php: -------------------------------------------------------------------------------- 1 | 8 | */ 9 | 10 | $uri = urldecode( 11 | parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH) 12 | ); 13 | 14 | // This file allows us to emulate Apache's "mod_rewrite" functionality from the 15 | // built-in PHP web server. This provides a convenient way to test a Laravel 16 | // application without having installed a "real" web server software here. 17 | if ($uri !== '/' && file_exists(__DIR__.'/public'.$uri)) { 18 | return false; 19 | } 20 | 21 | require_once __DIR__.'/public/index.php'; 22 | -------------------------------------------------------------------------------- /routes/console.php: -------------------------------------------------------------------------------- 1 | comment(Inspiring::quote()); 19 | })->purpose('Display an inspiring quote'); 20 | -------------------------------------------------------------------------------- /resources/views/404.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | 3 | @section('content') 4 |
5 |
6 |
7 |
8 |
9 |

You must get access role from admin!

10 |
11 |
12 | 13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 | @endsection 21 | -------------------------------------------------------------------------------- /public/.htaccess: -------------------------------------------------------------------------------- 1 | 2 | 3 | Options -MultiViews -Indexes 4 | 5 | 6 | RewriteEngine On 7 | 8 | # Handle Authorization Header 9 | RewriteCond %{HTTP:Authorization} . 10 | RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] 11 | 12 | # Redirect Trailing Slashes If Not A Folder... 13 | RewriteCond %{REQUEST_FILENAME} !-d 14 | RewriteCond %{REQUEST_URI} (.+)/$ 15 | RewriteRule ^ %1 [L,R=301] 16 | 17 | # Send Requests To Front Controller... 18 | RewriteCond %{REQUEST_FILENAME} !-d 19 | RewriteCond %{REQUEST_FILENAME} !-f 20 | RewriteRule ^ index.php [L] 21 | 22 | -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- 1 | # Security Policy 2 | 3 | ## Supported Versions 4 | 5 | Use this section to tell people about which versions of your project are 6 | currently being supported with security updates. 7 | 8 | | Version | Supported | 9 | | ------- | ------------------ | 10 | | 5.1.x | :white_check_mark: | 11 | | 5.0.x | :x: | 12 | | 4.0.x | :white_check_mark: | 13 | | < 4.0 | :x: | 14 | 15 | ## Reporting a Vulnerability 16 | 17 | Use this section to tell people how to report a vulnerability. 18 | 19 | Tell them where to go, how often they can expect to get an update on a 20 | reported vulnerability, what to expect if the vulnerability is accepted or 21 | declined, etc. 22 | -------------------------------------------------------------------------------- /app/Http/Middleware/TrustProxies.php: -------------------------------------------------------------------------------- 1 | 'App\Policies\ModelPolicy', 17 | ]; 18 | 19 | /** 20 | * Register any authentication / authorization services. 21 | * 22 | * @return void 23 | */ 24 | public function boot() 25 | { 26 | $this->registerPolicies(); 27 | 28 | // 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "private": true, 3 | "scripts": { 4 | "dev": "npm run development", 5 | "development": "mix", 6 | "watch": "mix watch", 7 | "watch-poll": "mix watch -- --watch-options-poll=1000", 8 | "hot": "mix watch --hot", 9 | "prod": "npm run production", 10 | "production": "mix --production" 11 | }, 12 | "devDependencies": { 13 | "axios": "^0.21", 14 | "bootstrap": "^4.0.0", 15 | "jquery": "^3.2", 16 | "laravel-mix": "^6.0.6", 17 | "lodash": "^4.17.19", 18 | "popper.js": "^1.12", 19 | "postcss": "^8.1.14", 20 | "resolve-url-loader": "^3.1.2", 21 | "sass": "^1.15.2", 22 | "sass-loader": "^8.0.0" 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /resources/lang/en/auth.php: -------------------------------------------------------------------------------- 1 | 'These credentials do not match our records.', 17 | 'password' => 'The provided password is incorrect.', 18 | 'throttle' => 'Too many login attempts. Please try again in :seconds seconds.', 19 | 20 | ]; 21 | -------------------------------------------------------------------------------- /app/Http/Controllers/Auth/ForgotPasswordController.php: -------------------------------------------------------------------------------- 1 | [ 19 | SendEmailVerificationNotification::class, 20 | ], 21 | ]; 22 | 23 | /** 24 | * Register any events for your application. 25 | * 26 | * @return void 27 | */ 28 | public function boot() 29 | { 30 | // 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /resources/lang/en/passwords.php: -------------------------------------------------------------------------------- 1 | 'Your password has been reset!', 17 | 'sent' => 'We have emailed your password reset link!', 18 | 'throttled' => 'Please wait before retrying.', 19 | 'token' => 'This password reset token is invalid.', 20 | 'user' => "We can't find a user with that email address.", 21 | 22 | ]; 23 | -------------------------------------------------------------------------------- /database/migrations/2014_10_12_100000_create_password_resets_table.php: -------------------------------------------------------------------------------- 1 | string('email')->index(); 18 | $table->string('token'); 19 | $table->timestamp('created_at')->nullable(); 20 | }); 21 | } 22 | 23 | /** 24 | * Reverse the migrations. 25 | * 26 | * @return void 27 | */ 28 | public function down() 29 | { 30 | Schema::dropIfExists('password_resets'); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /app/Http/Middleware/RedirectIfAuthenticated.php: -------------------------------------------------------------------------------- 1 | check()) { 26 | return redirect(RouteServiceProvider::HOME); 27 | } 28 | } 29 | 30 | return $next($request); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /app/Exceptions/Handler.php: -------------------------------------------------------------------------------- 1 | reportable(function (Throwable $e) { 38 | // 39 | }); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /.github/workflows/dependency-review.yml: -------------------------------------------------------------------------------- 1 | # Dependency Review Action 2 | # 3 | # This Action will scan dependency manifest files that change as part of a Pull Reqest, surfacing known-vulnerable versions of the packages declared or updated in the PR. Once installed, if the workflow run is marked as required, PRs introducing known-vulnerable packages will be blocked from merging. 4 | # 5 | # Source repository: https://github.com/actions/dependency-review-action 6 | # Public documentation: https://docs.github.com/en/code-security/supply-chain-security/understanding-your-software-supply-chain/about-dependency-review#dependency-review-enforcement 7 | name: 'Dependency Review' 8 | on: [pull_request] 9 | 10 | permissions: 11 | contents: read 12 | 13 | jobs: 14 | dependency-review: 15 | runs-on: ubuntu-latest 16 | steps: 17 | - name: 'Checkout Repository' 18 | uses: actions/checkout@v3 19 | - name: 'Dependency Review' 20 | uses: actions/dependency-review-action@v1 21 | -------------------------------------------------------------------------------- /config/cors.php: -------------------------------------------------------------------------------- 1 | ['api/*', 'sanctum/csrf-cookie'], 19 | 20 | 'allowed_methods' => ['*'], 21 | 22 | 'allowed_origins' => ['*'], 23 | 24 | 'allowed_origins_patterns' => [], 25 | 26 | 'allowed_headers' => ['*'], 27 | 28 | 'exposed_headers' => [], 29 | 30 | 'max_age' => 0, 31 | 32 | 'supports_credentials' => false, 33 | 34 | ]; 35 | -------------------------------------------------------------------------------- /database/seeders/CreateUsersSeeder.php: -------------------------------------------------------------------------------- 1 | 'Admin', 20 | 'email'=>'admin@itsolutionstuff.com', 21 | 'is_admin'=>'1', 22 | 'status'=>'1', 23 | 'password'=> bcrypt('123456'), 24 | ], 25 | [ 26 | 'name'=>'User', 27 | 'email'=>'user@itsolutionstuff.com', 28 | 'is_admin'=>'0', 29 | 'status'=>'0', 30 | 'password'=> bcrypt('123456'), 31 | ], 32 | ]; 33 | 34 | foreach ($user as $key => $value) { 35 | User::create($value); 36 | } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /app/Http/Controllers/Auth/ResetPasswordController.php: -------------------------------------------------------------------------------- 1 | command('inspire')->hourly(); 28 | } 29 | 30 | /** 31 | * Register the commands for the application. 32 | * 33 | * @return void 34 | */ 35 | protected function commands() 36 | { 37 | $this->load(__DIR__.'/Commands'); 38 | 39 | require base_path('routes/console.php'); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /database/migrations/2019_08_19_000000_create_failed_jobs_table.php: -------------------------------------------------------------------------------- 1 | id(); 18 | $table->string('uuid')->unique(); 19 | $table->text('connection'); 20 | $table->text('queue'); 21 | $table->longText('payload'); 22 | $table->longText('exception'); 23 | $table->timestamp('failed_at')->useCurrent(); 24 | }); 25 | } 26 | 27 | /** 28 | * Reverse the migrations. 29 | * 30 | * @return void 31 | */ 32 | public function down() 33 | { 34 | Schema::dropIfExists('failed_jobs'); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /app/Http/Controllers/HomeController.php: -------------------------------------------------------------------------------- 1 | middleware('auth'); 19 | } 20 | 21 | /** 22 | * Show the application dashboard. 23 | * 24 | * @return \Illuminate\Contracts\Support\Renderable 25 | */ 26 | public function index() 27 | { 28 | $id=Auth::user()->id; 29 | $result=DB::select('SELECT * from users where id=?', [$id]); 30 | $flag = $result[0]->status; 31 | if($flag == 1){ 32 | return redirect()->route('dashboard'); 33 | }else{ 34 | return view('404'); 35 | } 36 | } 37 | public function adminHome() 38 | { 39 | return redirect()->route('manageboard'); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /database/migrations/2021_03_24_000000_create_users_table.php: -------------------------------------------------------------------------------- 1 | id(); 18 | $table->string('name'); 19 | $table->string('email')->unique(); 20 | $table->timestamp('email_verified_at')->nullable(); 21 | $table->boolean('is_admin')->notnull(); 22 | $table->string('password'); 23 | $table->rememberToken(); 24 | $table->timestamps(); 25 | }); 26 | } 27 | 28 | /** 29 | * Reverse the migrations. 30 | * 31 | * @return void 32 | */ 33 | public function down() 34 | { 35 | Schema::dropIfExists('users'); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /app/Http/Controllers/AdminController.php: -------------------------------------------------------------------------------- 1 | $results 14 | ]; 15 | return view('adminHome')->with($data); 16 | } 17 | public function edituser(Request $request){ 18 | $id = $request->input('id'); 19 | $result = DB::select('SELECT * from users where id=?', [$id]); 20 | $data = [ 21 | 'result'=>$result, 22 | ]; 23 | return view('editUser')->with($data); 24 | } 25 | public function roleuser(Request $request){ 26 | $id = $request->input('id'); 27 | $status = $request->input('status'); 28 | DB::update('UPDATE users SET status = ? where id=?', [$status, $id]); 29 | return redirect()->route('manageboard'); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /config/services.php: -------------------------------------------------------------------------------- 1 | [ 18 | 'domain' => env('MAILGUN_DOMAIN'), 19 | 'secret' => env('MAILGUN_SECRET'), 20 | 'endpoint' => env('MAILGUN_ENDPOINT', 'api.mailgun.net'), 21 | ], 22 | 23 | 'postmark' => [ 24 | 'token' => env('POSTMARK_TOKEN'), 25 | ], 26 | 27 | 'ses' => [ 28 | 'key' => env('AWS_ACCESS_KEY_ID'), 29 | 'secret' => env('AWS_SECRET_ACCESS_KEY'), 30 | 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'), 31 | ], 32 | 33 | ]; 34 | -------------------------------------------------------------------------------- /config/view.php: -------------------------------------------------------------------------------- 1 | [ 17 | resource_path('views'), 18 | ], 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Compiled View Path 23 | |-------------------------------------------------------------------------- 24 | | 25 | | This option determines where all the compiled Blade templates will be 26 | | stored for your application. Typically, this is within the storage 27 | | directory. However, as usual, you are free to change this value. 28 | | 29 | */ 30 | 31 | 'compiled' => env( 32 | 'VIEW_COMPILED_PATH', 33 | realpath(storage_path('framework/views')) 34 | ), 35 | 36 | ]; 37 | -------------------------------------------------------------------------------- /public/js/main.js: -------------------------------------------------------------------------------- 1 | (function () { 2 | 'use strict' 3 | var forms = document.querySelectorAll('.needs-validation') 4 | Array.prototype.slice.call(forms) 5 | .forEach(function (form) { 6 | form.addEventListener('submit', function (event) { 7 | if (!form.checkValidity()) { 8 | event.preventDefault() 9 | event.stopPropagation() 10 | } 11 | 12 | form.classList.add('was-validated') 13 | }, false) 14 | }) 15 | })() 16 | $('#example').DataTable(); 17 | $('#example1').DataTable(); 18 | function delete_customer(id){ 19 | $.ajaxSetup({ 20 | headers: { 21 | 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') 22 | } 23 | }); 24 | $.ajax({ 25 | url:"{{ route('deletecustomer') }}", 26 | type:"POST", 27 | data:{ id: id}, 28 | dataType:"json", 29 | success:function(result){ 30 | location.reload(); 31 | }, 32 | }); 33 | } -------------------------------------------------------------------------------- /app/Http/Controllers/Auth/ConfirmPasswordController.php: -------------------------------------------------------------------------------- 1 | middleware('auth'); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /resources/views/auth/verify.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | 3 | @section('content') 4 |
5 |
6 |
7 |
8 |
{{ __('Verify Your Email Address') }}
9 | 10 |
11 | @if (session('resent')) 12 | 15 | @endif 16 | 17 | {{ __('Before proceeding, please check your email for a verification link.') }} 18 | {{ __('If you did not receive the email') }}, 19 |
20 | @csrf 21 | . 22 |
23 |
24 |
25 |
26 |
27 |
28 | @endsection 29 | -------------------------------------------------------------------------------- /public/web.config: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /phpunit.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | ./tests/Unit 10 | 11 | 12 | ./tests/Feature 13 | 14 | 15 | 16 | 17 | ./app 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /database/factories/UserFactory.php: -------------------------------------------------------------------------------- 1 | $this->faker->name, 27 | 'email' => $this->faker->unique()->safeEmail, 28 | 'email_verified_at' => now(), 29 | 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', // password 30 | 'remember_token' => Str::random(10), 31 | ]; 32 | } 33 | 34 | /** 35 | * Indicate that the model's email address should be unverified. 36 | * 37 | * @return \Illuminate\Database\Eloquent\Factories\Factory 38 | */ 39 | public function unverified() 40 | { 41 | return $this->state(function (array $attributes) { 42 | return [ 43 | 'email_verified_at' => null, 44 | ]; 45 | }); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /app/Http/Controllers/Auth/VerificationController.php: -------------------------------------------------------------------------------- 1 | middleware('auth'); 39 | $this->middleware('signed')->only('verify'); 40 | $this->middleware('throttle:6,1')->only('verify', 'resend'); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /resources/js/bootstrap.js: -------------------------------------------------------------------------------- 1 | window._ = require('lodash'); 2 | 3 | /** 4 | * We'll load jQuery and the Bootstrap jQuery plugin which provides support 5 | * for JavaScript based Bootstrap features such as modals and tabs. This 6 | * code may be modified to fit the specific needs of your application. 7 | */ 8 | 9 | try { 10 | window.Popper = require('popper.js').default; 11 | window.$ = window.jQuery = require('jquery'); 12 | 13 | require('bootstrap'); 14 | } catch (e) {} 15 | 16 | /** 17 | * We'll load the axios HTTP library which allows us to easily issue requests 18 | * to our Laravel back-end. This library automatically handles sending the 19 | * CSRF token as a header based on the value of the "XSRF" token cookie. 20 | */ 21 | 22 | window.axios = require('axios'); 23 | 24 | window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest'; 25 | 26 | /** 27 | * Echo exposes an expressive API for subscribing to channels and listening 28 | * for events that are broadcast by Laravel. Echo and event broadcasting 29 | * allows your team to easily build robust real-time web applications. 30 | */ 31 | 32 | // import Echo from 'laravel-echo'; 33 | 34 | // window.Pusher = require('pusher-js'); 35 | 36 | // window.Echo = new Echo({ 37 | // broadcaster: 'pusher', 38 | // key: process.env.MIX_PUSHER_APP_KEY, 39 | // cluster: process.env.MIX_PUSHER_APP_CLUSTER, 40 | // forceTLS: true 41 | // }); 42 | -------------------------------------------------------------------------------- /app/Models/User.php: -------------------------------------------------------------------------------- 1 | 'datetime', 45 | ]; 46 | protected $appends = ['referral_link']; 47 | 48 | public function referrer() 49 | { 50 | return $this->belongsTo(User::class, 'referrer_id', 'id'); 51 | } 52 | public function referrals() 53 | { 54 | return $this->hasMany(User::class, 'referrer_id', 'id'); 55 | } 56 | public function getReferralLinkAttribute() 57 | { 58 | return $this->referral_link = route('register', ['ref' => $this->id]); 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # LoanSystem 2 | (Build by laravel) 3 | There are 3 kind user : Admin, user, customer 4 | Admin can manage users and user can mange customers. 5 | This is a loansystem based website. user can lend funds to customers. And have blackbarry and fee, invest..... 6 | It's have amny function about loan. 7 | 8 | # how to run 9 | - download from github on your local directory (https://github.com/Kind-ekaterina/LoanSystem.git) 10 | - `composer install` 11 | - You have to migrate db 12 | or you can set up maually. 13 | (download db.sql file and then import your database.) 14 | - seeding 15 | 16 | `php artisan db:seed` 17 | 18 | `php artisan db:seed --class=CreateUserSeeder` 19 | - Running 20 | `php artisan serve` 21 | 22 | ![Screenshot_2](https://user-images.githubusercontent.com/86986628/130820536-68ec0c16-4c91-465d-be43-365816307c1e.jpg) 23 | ![Screenshot_3](https://user-images.githubusercontent.com/86986628/130820545-58672616-1663-418e-8af6-28f0c4da1c3c.jpg) 24 | ![Screenshot_4](https://user-images.githubusercontent.com/86986628/130820551-f061dba0-f9f3-4239-a4c6-09fe31c36cec.jpg) 25 | ![Screenshot_5](https://user-images.githubusercontent.com/86986628/130820565-f9945f16-4318-4d05-9b23-eadfb1d87a8b.jpg) 26 | ![Screenshot_6](https://user-images.githubusercontent.com/86986628/130820573-1daadf91-6d22-48f2-b175-696959e6a80c.jpg) 27 | ![Screenshot_8](https://user-images.githubusercontent.com/86986628/130820589-e6efd7df-060b-4af9-9a1b-61942d34e70a.jpg) 28 | ![Screenshot_7](https://user-images.githubusercontent.com/86986628/130820576-620ed0b6-3913-44dd-b295-854075cccf2f.jpg) 29 | 30 | ## Contact Link 31 | 32 | If you have any problem or need my help, contact me in here. 33 | 34 | [telegram] (https://t.me/ProDev1205) 35 | 36 | [Skype] (https://join.skype.com/invite/xAHPnMKaZkkk) 37 | -------------------------------------------------------------------------------- /config/hashing.php: -------------------------------------------------------------------------------- 1 | 'bcrypt', 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Bcrypt Options 23 | |-------------------------------------------------------------------------- 24 | | 25 | | Here you may specify the configuration options that should be used when 26 | | passwords are hashed using the Bcrypt algorithm. This will allow you 27 | | to control the amount of time it takes to hash the given password. 28 | | 29 | */ 30 | 31 | 'bcrypt' => [ 32 | 'rounds' => env('BCRYPT_ROUNDS', 10), 33 | ], 34 | 35 | /* 36 | |-------------------------------------------------------------------------- 37 | | Argon Options 38 | |-------------------------------------------------------------------------- 39 | | 40 | | Here you may specify the configuration options that should be used when 41 | | passwords are hashed using the Argon algorithm. These will allow you 42 | | to control the amount of time it takes to hash the given password. 43 | | 44 | */ 45 | 46 | 'argon' => [ 47 | 'memory' => 1024, 48 | 'threads' => 2, 49 | 'time' => 2, 50 | ], 51 | 52 | ]; 53 | -------------------------------------------------------------------------------- /bootstrap/app.php: -------------------------------------------------------------------------------- 1 | singleton( 30 | Illuminate\Contracts\Http\Kernel::class, 31 | App\Http\Kernel::class 32 | ); 33 | 34 | $app->singleton( 35 | Illuminate\Contracts\Console\Kernel::class, 36 | App\Console\Kernel::class 37 | ); 38 | 39 | $app->singleton( 40 | Illuminate\Contracts\Debug\ExceptionHandler::class, 41 | App\Exceptions\Handler::class 42 | ); 43 | 44 | /* 45 | |-------------------------------------------------------------------------- 46 | | Return The Application 47 | |-------------------------------------------------------------------------- 48 | | 49 | | This script returns the application instance. The instance is given to 50 | | the calling script so we can separate the building of the instances 51 | | from the actual running of the application and sending responses. 52 | | 53 | */ 54 | 55 | return $app; 56 | -------------------------------------------------------------------------------- /artisan: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env php 2 | make(Illuminate\Contracts\Console\Kernel::class); 34 | 35 | $status = $kernel->handle( 36 | $input = new Symfony\Component\Console\Input\ArgvInput, 37 | new Symfony\Component\Console\Output\ConsoleOutput 38 | ); 39 | 40 | /* 41 | |-------------------------------------------------------------------------- 42 | | Shutdown The Application 43 | |-------------------------------------------------------------------------- 44 | | 45 | | Once Artisan has finished running, we will fire off the shutdown events 46 | | so that any final work may be done by the application before we shut 47 | | down the process. This is the last thing to happen to the request. 48 | | 49 | */ 50 | 51 | $kernel->terminate($input, $status); 52 | 53 | exit($status); 54 | -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "laravel/laravel", 3 | "type": "project", 4 | "description": "The Laravel Framework.", 5 | "keywords": ["framework", "laravel"], 6 | "license": "MIT", 7 | "require": { 8 | "php": "^7.3|^8.0", 9 | "fideloper/proxy": "^4.4", 10 | "fruitcake/laravel-cors": "^2.0", 11 | "guzzlehttp/guzzle": "^7.0.1", 12 | "laravel/framework": "^8.12", 13 | "laravel/tinker": "^2.5", 14 | "laravel/ui": "^3.2" 15 | }, 16 | "require-dev": { 17 | "facade/ignition": "^2.5", 18 | "fakerphp/faker": "^1.9.1", 19 | "laravel/sail": "^1.0.1", 20 | "mockery/mockery": "^1.4.2", 21 | "nunomaduro/collision": "^5.0", 22 | "phpunit/phpunit": "^9.3.3" 23 | }, 24 | "autoload": { 25 | "psr-4": { 26 | "App\\": "app/", 27 | "Database\\Factories\\": "database/factories/", 28 | "Database\\Seeders\\": "database/seeders/" 29 | } 30 | }, 31 | "autoload-dev": { 32 | "psr-4": { 33 | "Tests\\": "tests/" 34 | } 35 | }, 36 | "scripts": { 37 | "post-autoload-dump": [ 38 | "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump", 39 | "@php artisan package:discover --ansi" 40 | ], 41 | "post-root-package-install": [ 42 | "@php -r \"file_exists('.env') || copy('.env.example', '.env');\"" 43 | ], 44 | "post-create-project-cmd": [ 45 | "@php artisan key:generate --ansi" 46 | ] 47 | }, 48 | "extra": { 49 | "laravel": { 50 | "dont-discover": [] 51 | } 52 | }, 53 | "config": { 54 | "optimize-autoloader": true, 55 | "preferred-install": "dist", 56 | "sort-packages": true 57 | }, 58 | "minimum-stability": "dev", 59 | "prefer-stable": true 60 | } 61 | -------------------------------------------------------------------------------- /public/index.php: -------------------------------------------------------------------------------- 1 | make(Kernel::class); 50 | 51 | $response = tap($kernel->handle( 52 | $request = Request::capture() 53 | ))->send(); 54 | 55 | $kernel->terminate($request, $response); 56 | -------------------------------------------------------------------------------- /app/Providers/RouteServiceProvider.php: -------------------------------------------------------------------------------- 1 | configureRateLimiting(); 39 | 40 | $this->routes(function () { 41 | Route::prefix('api') 42 | ->middleware('api') 43 | ->namespace($this->namespace) 44 | ->group(base_path('routes/api.php')); 45 | 46 | Route::middleware('web') 47 | ->namespace($this->namespace) 48 | ->group(base_path('routes/web.php')); 49 | }); 50 | } 51 | 52 | /** 53 | * Configure the rate limiters for the application. 54 | * 55 | * @return void 56 | */ 57 | protected function configureRateLimiting() 58 | { 59 | RateLimiter::for('api', function (Request $request) { 60 | return Limit::perMinute(60)->by(optional($request->user())->id ?: $request->ip()); 61 | }); 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /resources/views/adminHome.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | 3 | @section('content') 4 |
5 |
6 |
7 |
8 |
{{ __('Users') }}
9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | @foreach($results as $i=>$data) 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | @endforeach 34 | 35 |
NoIDNombreRefer IDE-mailRolestatus
{{$i+1}}{{$data->id}}{{$data->name}}{{$data->referal_id}}{{$data->email}}{{$data->is_admin}}{{$data->status}}
36 |
37 |
38 |
39 |
40 |
41 | @endsection 42 | -------------------------------------------------------------------------------- /config/broadcasting.php: -------------------------------------------------------------------------------- 1 | env('BROADCAST_DRIVER', 'null'), 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Broadcast Connections 23 | |-------------------------------------------------------------------------- 24 | | 25 | | Here you may define all of the broadcast connections that will be used 26 | | to broadcast events to other systems or over websockets. Samples of 27 | | each available type of connection are provided inside this array. 28 | | 29 | */ 30 | 31 | 'connections' => [ 32 | 33 | 'pusher' => [ 34 | 'driver' => 'pusher', 35 | 'key' => env('PUSHER_APP_KEY'), 36 | 'secret' => env('PUSHER_APP_SECRET'), 37 | 'app_id' => env('PUSHER_APP_ID'), 38 | 'options' => [ 39 | 'cluster' => env('PUSHER_APP_CLUSTER'), 40 | 'useTLS' => true, 41 | ], 42 | ], 43 | 44 | 'ably' => [ 45 | 'driver' => 'ably', 46 | 'key' => env('ABLY_KEY'), 47 | ], 48 | 49 | 'redis' => [ 50 | 'driver' => 'redis', 51 | 'connection' => 'default', 52 | ], 53 | 54 | 'log' => [ 55 | 'driver' => 'log', 56 | ], 57 | 58 | 'null' => [ 59 | 'driver' => 'null', 60 | ], 61 | 62 | ], 63 | 64 | ]; 65 | -------------------------------------------------------------------------------- /public/fonts/dropify.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Copyright (C) 2015 by original authors @ fontello.com 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /app/Http/Controllers/Auth/LoginController.php: -------------------------------------------------------------------------------- 1 | middleware('guest')->except('logout'); 40 | } 41 | public function login(Request $request) 42 | { 43 | $input = $request->all(); 44 | 45 | $this->validate($request, [ 46 | 'email' => 'required|email', 47 | 'password' => 'required', 48 | ]); 49 | 50 | if(auth()->attempt(array('email' => $input['email'], 'password' => $input['password']))) 51 | { 52 | if (auth()->user()->is_admin == 1) { 53 | return redirect()->route('admin.home'); 54 | }else{ 55 | return redirect()->route('home'); 56 | } 57 | }else{ 58 | return redirect()->route('login') 59 | ->with('error','Email-Address And Password Are Wrong.'); 60 | } 61 | 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /resources/views/auth/passwords/email.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | 3 | @section('content') 4 |
5 |
6 |
7 |
8 |
{{ __('Reset Password') }}
9 | 10 |
11 | @if (session('status')) 12 | 15 | @endif 16 | 17 |
18 | @csrf 19 | 20 |
21 | 22 | 23 |
24 | 25 | 26 | @error('email') 27 | 28 | {{ $message }} 29 | 30 | @enderror 31 |
32 |
33 | 34 |
35 |
36 | 39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 | @endsection 48 | -------------------------------------------------------------------------------- /routes/web.php: -------------------------------------------------------------------------------- 1 | name('admin.home')->middleware('is_admin'); 18 | Route::get('/manageboard', [AdminController::class, 'manageboard'])->name('manageboard'); 19 | Route::get('/edituser', [AdminController::class, 'edituser'])->name('edituser'); 20 | Route::post('/roleuser', [AdminController::class, 'roleuser'])->name('roleuser'); 21 | Route::get('/', function () { 22 | return view('welcome'); 23 | }); 24 | 25 | Auth::routes(); 26 | 27 | Route::get('/home', [HomeController::class, 'index'])->name('home'); 28 | 29 | Route::get('/dashboard', [UserController::class, 'dashboard'])->name('dashboard'); 30 | 31 | Route::get('/addcustomer', [UserController::class, 'addcustomer'])->name('addcustomer'); 32 | 33 | Route::post('/addnewcustomer', [UserController::class, 'addnewcustomer'])->name('addnewcustomer'); 34 | 35 | Route::get('/showcustomers', [UserController::class, 'showcustomers'])->name('showcustomers'); 36 | 37 | Route::get('/viewcustomer', [UserController::class, 'viewcustomer'])->name('viewcustomer'); 38 | 39 | Route::get('/addtrade', [UserController::class, 'addtrade'])->name('addtrade'); 40 | 41 | Route::post('/deletecustomer', [UserController::class, 'delcustomer'])->name('deletecustomer'); 42 | 43 | Route::post('/addnewtrade', [UserController::class, 'newtrade'])->name('addnewtrade'); 44 | 45 | Route::get('/showtrades', [UserController::class, 'showtrades'])->name('showtrades'); 46 | 47 | Route::get('/addnewpay', [UserController::class, 'addnewpay'])->name('addnewpay'); 48 | 49 | Route::post('/tradepay', [UserController::class, 'tradepay'])->name('tradepay'); 50 | 51 | -------------------------------------------------------------------------------- /resources/views/auth/passwords/confirm.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | 3 | @section('content') 4 |
5 |
6 |
7 |
8 |
{{ __('Confirm Password') }}
9 | 10 |
11 | {{ __('Please confirm your password before continuing.') }} 12 | 13 |
14 | @csrf 15 | 16 |
17 | 18 | 19 |
20 | 21 | 22 | @error('password') 23 | 24 | {{ $message }} 25 | 26 | @enderror 27 |
28 |
29 | 30 |
31 |
32 | 35 | 36 | @if (Route::has('password.request')) 37 | 38 | {{ __('Forgot Your Password?') }} 39 | 40 | @endif 41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 | @endsection 50 | -------------------------------------------------------------------------------- /config/filesystems.php: -------------------------------------------------------------------------------- 1 | env('FILESYSTEM_DRIVER', 'local'), 17 | 18 | /* 19 | |-------------------------------------------------------------------------- 20 | | Filesystem Disks 21 | |-------------------------------------------------------------------------- 22 | | 23 | | Here you may configure as many filesystem "disks" as you wish, and you 24 | | may even configure multiple disks of the same driver. Defaults have 25 | | been setup for each driver as an example of the required options. 26 | | 27 | | Supported Drivers: "local", "ftp", "sftp", "s3" 28 | | 29 | */ 30 | 31 | 'disks' => [ 32 | 33 | 'local' => [ 34 | 'driver' => 'local', 35 | 'root' => storage_path('app'), 36 | ], 37 | 38 | 'public' => [ 39 | 'driver' => 'local', 40 | 'root' => storage_path('app/public'), 41 | 'url' => env('APP_URL').'/storage', 42 | 'visibility' => 'public', 43 | ], 44 | 45 | 's3' => [ 46 | 'driver' => 's3', 47 | 'key' => env('AWS_ACCESS_KEY_ID'), 48 | 'secret' => env('AWS_SECRET_ACCESS_KEY'), 49 | 'region' => env('AWS_DEFAULT_REGION'), 50 | 'bucket' => env('AWS_BUCKET'), 51 | 'url' => env('AWS_URL'), 52 | 'endpoint' => env('AWS_ENDPOINT'), 53 | ], 54 | 55 | ], 56 | 57 | /* 58 | |-------------------------------------------------------------------------- 59 | | Symbolic Links 60 | |-------------------------------------------------------------------------- 61 | | 62 | | Here you may configure the symbolic links that will be created when the 63 | | `storage:link` Artisan command is executed. The array keys should be 64 | | the locations of the links and the values should be their targets. 65 | | 66 | */ 67 | 68 | 'links' => [ 69 | public_path('storage') => storage_path('app/public'), 70 | ], 71 | 72 | ]; 73 | -------------------------------------------------------------------------------- /app/Http/Kernel.php: -------------------------------------------------------------------------------- 1 | [ 33 | \App\Http\Middleware\EncryptCookies::class, 34 | \Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class, 35 | \Illuminate\Session\Middleware\StartSession::class, 36 | // \Illuminate\Session\Middleware\AuthenticateSession::class, 37 | \Illuminate\View\Middleware\ShareErrorsFromSession::class, 38 | \App\Http\Middleware\VerifyCsrfToken::class, 39 | \Illuminate\Routing\Middleware\SubstituteBindings::class, 40 | ], 41 | 42 | 'api' => [ 43 | 'throttle:api', 44 | \Illuminate\Routing\Middleware\SubstituteBindings::class, 45 | ], 46 | ]; 47 | 48 | /** 49 | * The application's route middleware. 50 | * 51 | * These middleware may be assigned to groups or used individually. 52 | * 53 | * @var array 54 | */ 55 | protected $routeMiddleware = [ 56 | 'auth' => \App\Http\Middleware\Authenticate::class, 57 | 'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class, 58 | 'cache.headers' => \Illuminate\Http\Middleware\SetCacheHeaders::class, 59 | 'can' => \Illuminate\Auth\Middleware\Authorize::class, 60 | 'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class, 61 | 'password.confirm' => \Illuminate\Auth\Middleware\RequirePassword::class, 62 | 'signed' => \Illuminate\Routing\Middleware\ValidateSignature::class, 63 | 'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class, 64 | 'verified' => \Illuminate\Auth\Middleware\EnsureEmailIsVerified::class, 65 | 'is_admin' => \App\Http\Middleware\IsAdmin::class, 66 | ]; 67 | } 68 | -------------------------------------------------------------------------------- /.github/workflows/codeql.yml: -------------------------------------------------------------------------------- 1 | # For most projects, this workflow file will not need changing; you simply need 2 | # to commit it to your repository. 3 | # 4 | # You may wish to alter this file to override the set of languages analyzed, 5 | # or to provide custom queries or build logic. 6 | # 7 | # ******** NOTE ******** 8 | # We have attempted to detect the languages in your repository. Please check 9 | # the `language` matrix defined below to confirm you have the correct set of 10 | # supported CodeQL languages. 11 | # 12 | name: "CodeQL" 13 | 14 | on: 15 | push: 16 | branches: [ main ] 17 | pull_request: 18 | # The branches below must be a subset of the branches above 19 | branches: [ main ] 20 | schedule: 21 | - cron: '26 1 * * 0' 22 | 23 | jobs: 24 | analyze: 25 | name: Analyze 26 | runs-on: ubuntu-latest 27 | permissions: 28 | actions: read 29 | contents: read 30 | security-events: write 31 | 32 | strategy: 33 | fail-fast: false 34 | matrix: 35 | language: [ ] 36 | # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ] 37 | # Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support 38 | 39 | steps: 40 | - name: Checkout repository 41 | uses: actions/checkout@v3 42 | 43 | # Initializes the CodeQL tools for scanning. 44 | - name: Initialize CodeQL 45 | uses: github/codeql-action/init@v2 46 | with: 47 | languages: ${{ matrix.language }} 48 | # If you wish to specify custom queries, you can do so here or in a config file. 49 | # By default, queries listed here will override any specified in a config file. 50 | # Prefix the list here with "+" to use these queries and those in the config file. 51 | 52 | # Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs 53 | # queries: security-extended,security-and-quality 54 | 55 | 56 | # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). 57 | # If this step fails, then you should remove it and run the build manually (see below) 58 | - name: Autobuild 59 | uses: github/codeql-action/autobuild@v2 60 | 61 | # ℹ️ Command-line programs to run using the OS shell. 62 | # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun 63 | 64 | # If the Autobuild fails above, remove it and uncomment the following three lines. 65 | # modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance. 66 | 67 | # - run: | 68 | # echo "Run, Build Application using script" 69 | # ./location_of_script_within_repo/buildscript.sh 70 | 71 | - name: Perform CodeQL Analysis 72 | uses: github/codeql-action/analyze@v2 73 | -------------------------------------------------------------------------------- /app/Http/Controllers/Auth/RegisterController.php: -------------------------------------------------------------------------------- 1 | has('ref')) { 34 | session(['referrer' => $request->query('ref')]); 35 | } 36 | 37 | return view('auth.register'); 38 | } 39 | /** 40 | * Where to redirect users after registration. 41 | * 42 | * @var string 43 | */ 44 | protected $redirectTo = RouteServiceProvider::HOME; 45 | 46 | /** 47 | * Create a new controller instance. 48 | * 49 | * @return void 50 | */ 51 | public function __construct() 52 | { 53 | $this->middleware('guest'); 54 | } 55 | 56 | /** 57 | * Get a validator for an incoming registration request. 58 | * 59 | * @param array $data 60 | * @return \Illuminate\Contracts\Validation\Validator 61 | */ 62 | protected function validator(array $data) 63 | { 64 | return Validator::make($data, [ 65 | 'name' => ['required', 'string', 'max:255'], 66 | 'email' => ['required', 'string', 'email', 'max:255', 'unique:users'], 67 | 'password' => ['required', 'string', 'min:8', 'confirmed'], 68 | ]); 69 | } 70 | 71 | /** 72 | * Create a new user instance after a valid registration. 73 | * 74 | * @param array $data 75 | * @return \App\Models\User 76 | */ 77 | protected function create(array $data) 78 | { 79 | $referrer = User::whereId(session()->pull('referrer'))->first(); 80 | 81 | return User::create([ 82 | 'name' => $data['name'], 83 | 'email' => $data['email'], 84 | 'referal_id' => $referrer ? $referrer->id : null, 85 | 'password' => Hash::make($data['password']), 86 | ]); 87 | } 88 | 89 | protected function registered(Request $request, $user) 90 | { 91 | if ($user->referrer !== null) { 92 | Notification::send($user->referrer, new ReferrerBonus($user)); 93 | } 94 | 95 | return redirect($this->redirectPath()); 96 | } 97 | } 98 | -------------------------------------------------------------------------------- /.github/workflows/apisec-scan.yml: -------------------------------------------------------------------------------- 1 | # This workflow uses actions that are not certified by GitHub. 2 | # They are provided by a third-party and are governed by 3 | # separate terms of service, privacy policy, and support 4 | # documentation. 5 | 6 | # APIsec addresses the critical need to secure APIs before they reach production. 7 | # APIsec provides the industry’s only automated and continuous API testing platform that uncovers security vulnerabilities and logic flaws in APIs. 8 | # Clients rely on APIsec to evaluate every update and release, ensuring that no APIs go to production with vulnerabilities. 9 | 10 | # How to Get Started with APIsec.ai 11 | # 1. Schedule a demo at https://www.apisec.ai/request-a-demo . 12 | # 13 | # 2. Register your account at https://cloud.fxlabs.io/#/signup . 14 | # 15 | # 3. Register your API . See the video (https://www.youtube.com/watch?v=MK3Xo9Dbvac) to get up and running with APIsec quickly. 16 | # 17 | # 4. Get GitHub Actions scan attributes from APIsec Project -> Configurations -> Integrations -> CI-CD -> GitHub Actions 18 | # 19 | # apisec-run-scan 20 | # 21 | # This action triggers the on-demand scans for projects registered in APIsec. 22 | # If your GitHub account allows code scanning alerts, you can then upload the sarif file generated by this action to show the scan findings. 23 | # Else you can view the scan results from the project home page in APIsec Platform. 24 | # The link to view the scan results is also displayed on the console on successful completion of action. 25 | 26 | # This is a starter workflow to help you get started with APIsec-Scan Actions 27 | 28 | name: APIsec 29 | 30 | # Controls when the workflow will run 31 | on: 32 | # Triggers the workflow on push or pull request events but only for the main branch 33 | # Customize trigger events based on your DevSecOps processes. 34 | push: 35 | branches: [ main ] 36 | pull_request: 37 | branches: [ main ] 38 | schedule: 39 | - cron: '15 10 * * 4' 40 | 41 | # Allows you to run this workflow manually from the Actions tab 42 | workflow_dispatch: 43 | 44 | 45 | permissions: 46 | contents: read 47 | 48 | jobs: 49 | Trigger APIsec scan: 50 | permissions: 51 | security-events: write # for github/codeql-action/upload-sarif to upload SARIF results 52 | runs-on: ubuntu-latest 53 | 54 | steps: 55 | - name: APIsec scan 56 | uses: apisec-inc/apisec-run-scan@f62d0c6fae8a80f97b091a323befdb56e6ad9993 57 | with: 58 | # The APIsec username with which the scans will be executed 59 | apisec-username: ${{ secrets.apisec_username }} 60 | # The Password of the APIsec user with which the scans will be executed 61 | apisec-password: ${{ secrets.apisec_password}} 62 | # The name of the project for security scan 63 | apisec-project: "VAmPI" 64 | # The name of the sarif format result file The file is written only if this property is provided. 65 | sarif-result-file: "apisec-results.sarif" 66 | - name: Import results 67 | uses: github/codeql-action/upload-sarif@v2 68 | with: 69 | sarif_file: ./apisec-results.sarif 70 | -------------------------------------------------------------------------------- /config/queue.php: -------------------------------------------------------------------------------- 1 | env('QUEUE_CONNECTION', 'sync'), 17 | 18 | /* 19 | |-------------------------------------------------------------------------- 20 | | Queue Connections 21 | |-------------------------------------------------------------------------- 22 | | 23 | | Here you may configure the connection information for each server that 24 | | is used by your application. A default configuration has been added 25 | | for each back-end shipped with Laravel. You are free to add more. 26 | | 27 | | Drivers: "sync", "database", "beanstalkd", "sqs", "redis", "null" 28 | | 29 | */ 30 | 31 | 'connections' => [ 32 | 33 | 'sync' => [ 34 | 'driver' => 'sync', 35 | ], 36 | 37 | 'database' => [ 38 | 'driver' => 'database', 39 | 'table' => 'jobs', 40 | 'queue' => 'default', 41 | 'retry_after' => 90, 42 | 'after_commit' => false, 43 | ], 44 | 45 | 'beanstalkd' => [ 46 | 'driver' => 'beanstalkd', 47 | 'host' => 'localhost', 48 | 'queue' => 'default', 49 | 'retry_after' => 90, 50 | 'block_for' => 0, 51 | 'after_commit' => false, 52 | ], 53 | 54 | 'sqs' => [ 55 | 'driver' => 'sqs', 56 | 'key' => env('AWS_ACCESS_KEY_ID'), 57 | 'secret' => env('AWS_SECRET_ACCESS_KEY'), 58 | 'prefix' => env('SQS_PREFIX', 'https://sqs.us-east-1.amazonaws.com/your-account-id'), 59 | 'queue' => env('SQS_QUEUE', 'default'), 60 | 'suffix' => env('SQS_SUFFIX'), 61 | 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'), 62 | 'after_commit' => false, 63 | ], 64 | 65 | 'redis' => [ 66 | 'driver' => 'redis', 67 | 'connection' => 'default', 68 | 'queue' => env('REDIS_QUEUE', 'default'), 69 | 'retry_after' => 90, 70 | 'block_for' => null, 71 | 'after_commit' => false, 72 | ], 73 | 74 | ], 75 | 76 | /* 77 | |-------------------------------------------------------------------------- 78 | | Failed Queue Jobs 79 | |-------------------------------------------------------------------------- 80 | | 81 | | These options configure the behavior of failed queue job logging so you 82 | | can control which database and table are used to store the jobs that 83 | | have failed. You may change them to any database / table you wish. 84 | | 85 | */ 86 | 87 | 'failed' => [ 88 | 'driver' => env('QUEUE_FAILED_DRIVER', 'database-uuids'), 89 | 'database' => env('DB_CONNECTION', 'mysql'), 90 | 'table' => 'failed_jobs', 91 | ], 92 | 93 | ]; 94 | -------------------------------------------------------------------------------- /resources/views/auth/passwords/reset.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | 3 | @section('content') 4 |
5 |
6 |
7 |
8 |
{{ __('Reset Password') }}
9 | 10 |
11 |
12 | @csrf 13 | 14 | 15 | 16 |
17 | 18 | 19 |
20 | 21 | 22 | @error('email') 23 | 24 | {{ $message }} 25 | 26 | @enderror 27 |
28 |
29 | 30 |
31 | 32 | 33 |
34 | 35 | 36 | @error('password') 37 | 38 | {{ $message }} 39 | 40 | @enderror 41 |
42 |
43 | 44 |
45 | 46 | 47 |
48 | 49 |
50 |
51 | 52 |
53 |
54 | 57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 | @endsection 66 | -------------------------------------------------------------------------------- /resources/views/showCustomers.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | 3 | @section('content') 4 |
5 |
6 |
7 |
8 |
{{ __('Customers') }}
9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | @foreach($results as $data) 26 | 27 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | @endforeach 40 | 41 |
Nombre de pilaApellidoTeléfonoDirecciónExpresarVistaletBorrar
28 |
29 |
{{$data->first_name}}{{$data->last_name}}{{$data->phone}}{{$data->address}}{{$data->trade_id}}
42 |
43 |
44 |
45 |
46 |
47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 |
57 |
58 | @endsection 59 | -------------------------------------------------------------------------------- /config/logging.php: -------------------------------------------------------------------------------- 1 | env('LOG_CHANNEL', 'stack'), 21 | 22 | /* 23 | |-------------------------------------------------------------------------- 24 | | Log Channels 25 | |-------------------------------------------------------------------------- 26 | | 27 | | Here you may configure the log channels for your application. Out of 28 | | the box, Laravel uses the Monolog PHP logging library. This gives 29 | | you a variety of powerful log handlers / formatters to utilize. 30 | | 31 | | Available Drivers: "single", "daily", "slack", "syslog", 32 | | "errorlog", "monolog", 33 | | "custom", "stack" 34 | | 35 | */ 36 | 37 | 'channels' => [ 38 | 'stack' => [ 39 | 'driver' => 'stack', 40 | 'channels' => ['single'], 41 | 'ignore_exceptions' => false, 42 | ], 43 | 44 | 'single' => [ 45 | 'driver' => 'single', 46 | 'path' => storage_path('logs/laravel.log'), 47 | 'level' => env('LOG_LEVEL', 'debug'), 48 | ], 49 | 50 | 'daily' => [ 51 | 'driver' => 'daily', 52 | 'path' => storage_path('logs/laravel.log'), 53 | 'level' => env('LOG_LEVEL', 'debug'), 54 | 'days' => 14, 55 | ], 56 | 57 | 'slack' => [ 58 | 'driver' => 'slack', 59 | 'url' => env('LOG_SLACK_WEBHOOK_URL'), 60 | 'username' => 'Laravel Log', 61 | 'emoji' => ':boom:', 62 | 'level' => env('LOG_LEVEL', 'critical'), 63 | ], 64 | 65 | 'papertrail' => [ 66 | 'driver' => 'monolog', 67 | 'level' => env('LOG_LEVEL', 'debug'), 68 | 'handler' => SyslogUdpHandler::class, 69 | 'handler_with' => [ 70 | 'host' => env('PAPERTRAIL_URL'), 71 | 'port' => env('PAPERTRAIL_PORT'), 72 | ], 73 | ], 74 | 75 | 'stderr' => [ 76 | 'driver' => 'monolog', 77 | 'level' => env('LOG_LEVEL', 'debug'), 78 | 'handler' => StreamHandler::class, 79 | 'formatter' => env('LOG_STDERR_FORMATTER'), 80 | 'with' => [ 81 | 'stream' => 'php://stderr', 82 | ], 83 | ], 84 | 85 | 'syslog' => [ 86 | 'driver' => 'syslog', 87 | 'level' => env('LOG_LEVEL', 'debug'), 88 | ], 89 | 90 | 'errorlog' => [ 91 | 'driver' => 'errorlog', 92 | 'level' => env('LOG_LEVEL', 'debug'), 93 | ], 94 | 95 | 'null' => [ 96 | 'driver' => 'monolog', 97 | 'handler' => NullHandler::class, 98 | ], 99 | 100 | 'emergency' => [ 101 | 'path' => storage_path('logs/laravel.log'), 102 | ], 103 | ], 104 | 105 | ]; 106 | -------------------------------------------------------------------------------- /resources/views/auth/login.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | 3 | @section('content') 4 |
5 |
6 |
7 |
8 |
{{ __('Login') }}
9 | 10 |
11 |
12 | @csrf 13 | 14 |
15 | 16 | 17 |
18 | 19 | 20 | @error('email') 21 | 22 | {{ $message }} 23 | 24 | @enderror 25 |
26 |
27 | 28 |
29 | 30 | 31 |
32 | 33 | 34 | @error('password') 35 | 36 | {{ $message }} 37 | 38 | @enderror 39 |
40 |
41 | 42 |
43 |
44 |
45 | 46 | 47 | 50 |
51 |
52 |
53 | 54 |
55 |
56 | 59 | 60 | @if (Route::has('password.request')) 61 | 62 | {{ __('Forgot Your Password?') }} 63 | 64 | @endif 65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 | @endsection 74 | -------------------------------------------------------------------------------- /config/cache.php: -------------------------------------------------------------------------------- 1 | env('CACHE_DRIVER', 'file'), 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Cache Stores 23 | |-------------------------------------------------------------------------- 24 | | 25 | | Here you may define all of the cache "stores" for your application as 26 | | well as their drivers. You may even define multiple stores for the 27 | | same cache driver to group types of items stored in your caches. 28 | | 29 | | Supported drivers: "apc", "array", "database", "file", 30 | | "memcached", "redis", "dynamodb", "null" 31 | | 32 | */ 33 | 34 | 'stores' => [ 35 | 36 | 'apc' => [ 37 | 'driver' => 'apc', 38 | ], 39 | 40 | 'array' => [ 41 | 'driver' => 'array', 42 | 'serialize' => false, 43 | ], 44 | 45 | 'database' => [ 46 | 'driver' => 'database', 47 | 'table' => 'cache', 48 | 'connection' => null, 49 | 'lock_connection' => null, 50 | ], 51 | 52 | 'file' => [ 53 | 'driver' => 'file', 54 | 'path' => storage_path('framework/cache/data'), 55 | ], 56 | 57 | 'memcached' => [ 58 | 'driver' => 'memcached', 59 | 'persistent_id' => env('MEMCACHED_PERSISTENT_ID'), 60 | 'sasl' => [ 61 | env('MEMCACHED_USERNAME'), 62 | env('MEMCACHED_PASSWORD'), 63 | ], 64 | 'options' => [ 65 | // Memcached::OPT_CONNECT_TIMEOUT => 2000, 66 | ], 67 | 'servers' => [ 68 | [ 69 | 'host' => env('MEMCACHED_HOST', '127.0.0.1'), 70 | 'port' => env('MEMCACHED_PORT', 11211), 71 | 'weight' => 100, 72 | ], 73 | ], 74 | ], 75 | 76 | 'redis' => [ 77 | 'driver' => 'redis', 78 | 'connection' => 'cache', 79 | 'lock_connection' => 'default', 80 | ], 81 | 82 | 'dynamodb' => [ 83 | 'driver' => 'dynamodb', 84 | 'key' => env('AWS_ACCESS_KEY_ID'), 85 | 'secret' => env('AWS_SECRET_ACCESS_KEY'), 86 | 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'), 87 | 'table' => env('DYNAMODB_CACHE_TABLE', 'cache'), 88 | 'endpoint' => env('DYNAMODB_ENDPOINT'), 89 | ], 90 | 91 | ], 92 | 93 | /* 94 | |-------------------------------------------------------------------------- 95 | | Cache Key Prefix 96 | |-------------------------------------------------------------------------- 97 | | 98 | | When utilizing a RAM based store such as APC or Memcached, there might 99 | | be other applications utilizing the same cache. So, we'll specify a 100 | | value to get prefixed to all our keys so we can avoid collisions. 101 | | 102 | */ 103 | 104 | 'prefix' => env('CACHE_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_cache'), 105 | 106 | ]; 107 | -------------------------------------------------------------------------------- /resources/views/viewCustomer.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | 3 | @section('content') 4 |
5 |
6 |
7 |
8 | @foreach($results as $data) 9 |
{{$data->first_name}} {{$data->last_name}}
10 |
11 |
12 |
13 | 14 |
15 |
16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 |
First nmae :{{ $data->first_name}}
Last nmae :{{$data->last_name}}
Address :{{$data->address}}
Phone :{{$data->phone}}
ID Number :{{$data->idnum}}
Gender :@if($data->gender == 1) 42 | {{'Man'}} 43 | @else 44 | {{'women'}} 45 | @endif
Created At :{{$data->created_at}}
Updated At :{{$data->updated_at}}
57 |
58 |
59 | @endforeach 60 |
61 |
62 |
63 |
64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 |
74 |
75 | @endsection 76 | -------------------------------------------------------------------------------- /config/mail.php: -------------------------------------------------------------------------------- 1 | env('MAIL_MAILER', 'smtp'), 17 | 18 | /* 19 | |-------------------------------------------------------------------------- 20 | | Mailer Configurations 21 | |-------------------------------------------------------------------------- 22 | | 23 | | Here you may configure all of the mailers used by your application plus 24 | | their respective settings. Several examples have been configured for 25 | | you and you are free to add your own as your application requires. 26 | | 27 | | Laravel supports a variety of mail "transport" drivers to be used while 28 | | sending an e-mail. You will specify which one you are using for your 29 | | mailers below. You are free to add additional mailers as required. 30 | | 31 | | Supported: "smtp", "sendmail", "mailgun", "ses", 32 | | "postmark", "log", "array" 33 | | 34 | */ 35 | 36 | 'mailers' => [ 37 | 'smtp' => [ 38 | 'transport' => 'smtp', 39 | 'host' => env('MAIL_HOST', 'smtp.mailgun.org'), 40 | 'port' => env('MAIL_PORT', 587), 41 | 'encryption' => env('MAIL_ENCRYPTION', 'tls'), 42 | 'username' => env('MAIL_USERNAME'), 43 | 'password' => env('MAIL_PASSWORD'), 44 | 'timeout' => null, 45 | 'auth_mode' => null, 46 | ], 47 | 48 | 'ses' => [ 49 | 'transport' => 'ses', 50 | ], 51 | 52 | 'mailgun' => [ 53 | 'transport' => 'mailgun', 54 | ], 55 | 56 | 'postmark' => [ 57 | 'transport' => 'postmark', 58 | ], 59 | 60 | 'sendmail' => [ 61 | 'transport' => 'sendmail', 62 | 'path' => '/usr/sbin/sendmail -bs', 63 | ], 64 | 65 | 'log' => [ 66 | 'transport' => 'log', 67 | 'channel' => env('MAIL_LOG_CHANNEL'), 68 | ], 69 | 70 | 'array' => [ 71 | 'transport' => 'array', 72 | ], 73 | ], 74 | 75 | /* 76 | |-------------------------------------------------------------------------- 77 | | Global "From" Address 78 | |-------------------------------------------------------------------------- 79 | | 80 | | You may wish for all e-mails sent by your application to be sent from 81 | | the same address. Here, you may specify a name and address that is 82 | | used globally for all e-mails that are sent by your application. 83 | | 84 | */ 85 | 86 | 'from' => [ 87 | 'address' => env('MAIL_FROM_ADDRESS', 'hello@example.com'), 88 | 'name' => env('MAIL_FROM_NAME', 'Example'), 89 | ], 90 | 91 | /* 92 | |-------------------------------------------------------------------------- 93 | | Markdown Mail Settings 94 | |-------------------------------------------------------------------------- 95 | | 96 | | If you are using Markdown based email rendering, you may configure your 97 | | theme and component paths here, allowing you to customize the design 98 | | of the emails. Or, you may simply stick with the Laravel defaults! 99 | | 100 | */ 101 | 102 | 'markdown' => [ 103 | 'theme' => 'default', 104 | 105 | 'paths' => [ 106 | resource_path('views/vendor/mail'), 107 | ], 108 | ], 109 | 110 | ]; 111 | -------------------------------------------------------------------------------- /resources/views/auth/register.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | 3 | @section('content') 4 |
5 |
6 |
7 |
8 |
{{ __('Register') }}
9 | 10 |
11 |
12 | @csrf 13 | 14 |
15 | 16 | 17 |
18 | 19 | 20 | @error('name') 21 | 22 | {{ $message }} 23 | 24 | @enderror 25 |
26 |
27 | 28 |
29 | 30 | 31 |
32 | 33 | 34 | @error('email') 35 | 36 | {{ $message }} 37 | 38 | @enderror 39 |
40 |
41 | 42 |
43 | 44 | 45 |
46 | 47 | 48 | @error('password') 49 | 50 | {{ $message }} 51 | 52 | @enderror 53 |
54 |
55 | 56 |
57 | 58 | 59 |
60 | 61 |
62 |
63 | 64 |
65 |
66 | 69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 | @endsection 78 | -------------------------------------------------------------------------------- /resources/views/welcome.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Laravel 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 49 | 50 | 51 | 52 |
53 |
54 |
55 |
56 | @if (Route::has('login')) 57 |
58 | @auth 59 | 60 |

Home

61 |
62 | @else 63 | 64 |

Log in

65 |
66 | 67 | @if (Route::has('register')) 68 | 69 |

Register

70 |
71 | @endif 72 | @endauth 73 |
74 | @endif 75 |
76 |
77 | 78 |
79 |
80 |
81 |
82 | 83 |
84 |
85 | 86 | 87 | -------------------------------------------------------------------------------- /config/auth.php: -------------------------------------------------------------------------------- 1 | [ 17 | 'guard' => 'web', 18 | 'passwords' => 'users', 19 | ], 20 | 21 | /* 22 | |-------------------------------------------------------------------------- 23 | | Authentication Guards 24 | |-------------------------------------------------------------------------- 25 | | 26 | | Next, you may define every authentication guard for your application. 27 | | Of course, a great default configuration has been defined for you 28 | | here which uses session storage and the Eloquent user provider. 29 | | 30 | | All authentication drivers have a user provider. This defines how the 31 | | users are actually retrieved out of your database or other storage 32 | | mechanisms used by this application to persist your user's data. 33 | | 34 | | Supported: "session", "token" 35 | | 36 | */ 37 | 38 | 'guards' => [ 39 | 'web' => [ 40 | 'driver' => 'session', 41 | 'provider' => 'users', 42 | ], 43 | 44 | 'api' => [ 45 | 'driver' => 'token', 46 | 'provider' => 'users', 47 | 'hash' => false, 48 | ], 49 | ], 50 | 51 | /* 52 | |-------------------------------------------------------------------------- 53 | | User Providers 54 | |-------------------------------------------------------------------------- 55 | | 56 | | All authentication drivers have a user provider. This defines how the 57 | | users are actually retrieved out of your database or other storage 58 | | mechanisms used by this application to persist your user's data. 59 | | 60 | | If you have multiple user tables or models you may configure multiple 61 | | sources which represent each model / table. These sources may then 62 | | be assigned to any extra authentication guards you have defined. 63 | | 64 | | Supported: "database", "eloquent" 65 | | 66 | */ 67 | 68 | 'providers' => [ 69 | 'users' => [ 70 | 'driver' => 'eloquent', 71 | 'model' => App\Models\User::class, 72 | ], 73 | 74 | // 'users' => [ 75 | // 'driver' => 'database', 76 | // 'table' => 'users', 77 | // ], 78 | ], 79 | 80 | /* 81 | |-------------------------------------------------------------------------- 82 | | Resetting Passwords 83 | |-------------------------------------------------------------------------- 84 | | 85 | | You may specify multiple password reset configurations if you have more 86 | | than one user table or model in the application and you want to have 87 | | separate password reset settings based on the specific user types. 88 | | 89 | | The expire time is the number of minutes that the reset token should be 90 | | considered valid. This security feature keeps tokens short-lived so 91 | | they have less time to be guessed. You may change this as needed. 92 | | 93 | */ 94 | 95 | 'passwords' => [ 96 | 'users' => [ 97 | 'provider' => 'users', 98 | 'table' => 'password_resets', 99 | 'expire' => 60, 100 | 'throttle' => 60, 101 | ], 102 | ], 103 | 104 | /* 105 | |-------------------------------------------------------------------------- 106 | | Password Confirmation Timeout 107 | |-------------------------------------------------------------------------- 108 | | 109 | | Here you may define the amount of seconds before a password confirmation 110 | | times out and the user is prompted to re-enter their password via the 111 | | confirmation screen. By default, the timeout lasts for three hours. 112 | | 113 | */ 114 | 115 | 'password_timeout' => 10800, 116 | 117 | ]; 118 | -------------------------------------------------------------------------------- /db.sql: -------------------------------------------------------------------------------- 1 | /* 2 | SQLyog Community v13.1.7 (64 bit) 3 | MySQL - 10.4.24-MariaDB : Database - laravel 4 | ********************************************************************* 5 | */ 6 | 7 | /*!40101 SET NAMES utf8 */; 8 | 9 | /*!40101 SET SQL_MODE=''*/; 10 | 11 | /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; 12 | /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; 13 | /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; 14 | /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; 15 | CREATE DATABASE /*!32312 IF NOT EXISTS*/`laravel` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci */; 16 | 17 | USE `laravel`; 18 | 19 | /*Table structure for table `customers` */ 20 | 21 | DROP TABLE IF EXISTS `customers`; 22 | 23 | CREATE TABLE `customers` ( 24 | `id` int(11) DEFAULT NULL, 25 | `user_id` int(11) DEFAULT NULL, 26 | `image` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, 27 | `phone` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, 28 | `first_name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, 29 | `last_name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, 30 | `address` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, 31 | `idnum` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, 32 | `gender` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, 33 | `deleted` tinyint(4) DEFAULT NULL 34 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; 35 | 36 | /*Table structure for table `failed_jobs` */ 37 | 38 | DROP TABLE IF EXISTS `failed_jobs`; 39 | 40 | CREATE TABLE `failed_jobs` ( 41 | `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, 42 | `uuid` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, 43 | `connection` text COLLATE utf8mb4_unicode_ci NOT NULL, 44 | `queue` text COLLATE utf8mb4_unicode_ci NOT NULL, 45 | `payload` longtext COLLATE utf8mb4_unicode_ci NOT NULL, 46 | `exception` longtext COLLATE utf8mb4_unicode_ci NOT NULL, 47 | `failed_at` timestamp NOT NULL DEFAULT current_timestamp(), 48 | PRIMARY KEY (`id`), 49 | UNIQUE KEY `failed_jobs_uuid_unique` (`uuid`) 50 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; 51 | 52 | /*Table structure for table `migrations` */ 53 | 54 | DROP TABLE IF EXISTS `migrations`; 55 | 56 | CREATE TABLE `migrations` ( 57 | `id` int(10) unsigned NOT NULL AUTO_INCREMENT, 58 | `migration` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, 59 | `batch` int(11) NOT NULL, 60 | PRIMARY KEY (`id`) 61 | ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; 62 | 63 | /*Table structure for table `password_resets` */ 64 | 65 | DROP TABLE IF EXISTS `password_resets`; 66 | 67 | CREATE TABLE `password_resets` ( 68 | `email` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, 69 | `token` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, 70 | `created_at` timestamp NULL DEFAULT NULL, 71 | KEY `password_resets_email_index` (`email`) 72 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; 73 | 74 | /*Table structure for table `pays` */ 75 | 76 | DROP TABLE IF EXISTS `pays`; 77 | 78 | CREATE TABLE `pays` ( 79 | `id` int(11) DEFAULT NULL, 80 | `trade_id` int(11) DEFAULT NULL, 81 | `amount` double DEFAULT NULL, 82 | `paydate` datetime DEFAULT NULL 83 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; 84 | 85 | /*Table structure for table `trade` */ 86 | 87 | DROP TABLE IF EXISTS `trade`; 88 | 89 | CREATE TABLE `trade` ( 90 | `id` int(11) DEFAULT NULL, 91 | `customer_id` int(11) DEFAULT NULL, 92 | `paymethod` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, 93 | `amount` double DEFAULT NULL, 94 | `interest` double DEFAULT NULL, 95 | `payamount` double DEFAULT NULL, 96 | `quota` double DEFAULT NULL, 97 | `blackbarry` double DEFAULT NULL, 98 | `day` int(11) DEFAULT NULL, 99 | `rent_date` datetime DEFAULT NULL, 100 | `next_date` datetime DEFAULT NULL, 101 | `status` tinyint(4) DEFAULT NULL 102 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; 103 | 104 | /*Table structure for table `users` */ 105 | 106 | DROP TABLE IF EXISTS `users`; 107 | 108 | CREATE TABLE `users` ( 109 | `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, 110 | `referal_id` int(11) DEFAULT NULL, 111 | `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, 112 | `email` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, 113 | `email_verified_at` timestamp NULL DEFAULT NULL, 114 | `is_admin` tinyint(1) NOT NULL, 115 | `status` tinyint(4) DEFAULT NULL, 116 | `password` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, 117 | `remember_token` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL, 118 | `created_at` timestamp NULL DEFAULT NULL, 119 | `updated_at` timestamp NULL DEFAULT NULL, 120 | PRIMARY KEY (`id`), 121 | UNIQUE KEY `users_email_unique` (`email`) 122 | ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; 123 | 124 | /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; 125 | /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; 126 | /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; 127 | /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; 128 | -------------------------------------------------------------------------------- /resources/views/editUser.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | 3 | @section('content') 4 |
5 |
6 |
7 |
8 | @foreach($result as $data) 9 |
{{ __('Edit User') }}
10 |
11 | 12 | 13 | 14 |
15 |
name :
16 |
{{$data->name}}
17 |
18 | 19 | 20 |
21 |
E-mail:
22 |
{{$data->email}}
23 |
24 | 25 | 26 |
27 |
status :
28 |
29 | @if($data->name==1) 30 | {{ __('This user can use.') }} 31 | @else 32 | {{ __("This user can't use!") }} 33 | @endif 34 |
35 |
36 | 37 | 38 |
39 |
Created_at:
40 |
{{ $data->created_at}}
41 |
42 | 43 | 44 |
45 |
Updated_at :
46 |
{{ $data->updated_at}}
47 |
48 | 49 | 50 |
51 |
52 |
53 |
54 | @csrf 55 | 56 |
57 |
58 | 59 | 64 |
65 | Seleccione un sexo válido. 66 |
67 |
68 |
69 |
70 |
71 | 72 | 75 |
76 | Debes estar de acuerdo antes de enviar. 77 |
78 |
79 |
80 |
81 |
82 | 83 |
84 |
85 |
86 |
87 |
88 | @endforeach 89 |
90 |
91 |
92 | 93 | @endsection 94 | -------------------------------------------------------------------------------- /resources/views/showTrades.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | 3 | @section('content') 4 |
5 |
6 |
7 |
8 |
{{ __('Customers') }}
9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | @foreach($results as $data) 27 | 28 | 29 | 32 | 33 | 34 | 35 | 48 | 49 | 50 | 51 | 52 | 69 | 70 | @endforeach 71 | 72 |
#nameAmountFeeMethodPaydateTimeTotalQuotaStatus
30 |
31 |
{{$data->first_name}} {{$data->last_name}}{{$data->amount}}${{$data->interest}}% 36 | @if($data->paymethod == 1) 37 | {{'Diary'}} 38 | @elseif($data->paymethod == 2) 39 | {{'Inter Diary'}} 40 | @elseif($data->paymethod == 7) 41 | {{'Weekly'}} 42 | @elseif($data->paymethod == 15) 43 | {{'Fortnightly'}} 44 | @else 45 | {{'Monthly'}} 46 | @endif 47 | {{$data->next_date}}{{$data->day}}day{{$data->payamount}}${{$data->quota}}$ 53 | @if($data->ongoing==null) 54 |
{{'0%'}}
55 | @elseif($data->ongoing <= 1) 56 |
{{$data->ongoing}} %
57 | @elseif($data->ongoing <= 10) 58 |
{{$data->ongoing}} %
59 | @elseif($data->ongoing <= 20) 60 |
{{$data->ongoing}} %
61 | @elseif($data->ongoing <= 50) 62 |
{{$data->ongoing}} %
63 | @elseif($data->ongoing <= 70) 64 |
{{$data->ongoing}} %
65 | @elseif($data->ongoing <= 90) 66 |
{{$data->ongoing}} %
67 | @endif 68 |
73 |
74 |
75 |
76 |
77 |
78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 |
88 |
89 | @endsection 90 | -------------------------------------------------------------------------------- /resources/views/layouts/app.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | {{ config('app.name', 'Laravel') }} 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 |
36 | 86 |
87 | @yield('content') 88 |
89 |
90 | 91 | 92 | -------------------------------------------------------------------------------- /config/database.php: -------------------------------------------------------------------------------- 1 | env('DB_CONNECTION', 'mysql'), 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Database Connections 23 | |-------------------------------------------------------------------------- 24 | | 25 | | Here are each of the database connections setup for your application. 26 | | Of course, examples of configuring each database platform that is 27 | | supported by Laravel is shown below to make development simple. 28 | | 29 | | 30 | | All database work in Laravel is done through the PHP PDO facilities 31 | | so make sure you have the driver for your particular database of 32 | | choice installed on your machine before you begin development. 33 | | 34 | */ 35 | 36 | 'connections' => [ 37 | 38 | 'sqlite' => [ 39 | 'driver' => 'sqlite', 40 | 'url' => env('DATABASE_URL'), 41 | 'database' => env('DB_DATABASE', database_path('database.sqlite')), 42 | 'prefix' => '', 43 | 'foreign_key_constraints' => env('DB_FOREIGN_KEYS', true), 44 | ], 45 | 46 | 'mysql' => [ 47 | 'driver' => 'mysql', 48 | 'url' => env('DATABASE_URL'), 49 | 'host' => env('DB_HOST', '127.0.0.1'), 50 | 'port' => env('DB_PORT', '3306'), 51 | 'database' => env('DB_DATABASE', 'forge'), 52 | 'username' => env('DB_USERNAME', 'forge'), 53 | 'password' => env('DB_PASSWORD', ''), 54 | 'unix_socket' => env('DB_SOCKET', ''), 55 | 'charset' => 'utf8mb4', 56 | 'collation' => 'utf8mb4_unicode_ci', 57 | 'prefix' => '', 58 | 'prefix_indexes' => true, 59 | 'strict' => true, 60 | 'engine' => null, 61 | 'options' => extension_loaded('pdo_mysql') ? array_filter([ 62 | PDO::MYSQL_ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'), 63 | ]) : [], 64 | ], 65 | 66 | 'pgsql' => [ 67 | 'driver' => 'pgsql', 68 | 'url' => env('DATABASE_URL'), 69 | 'host' => env('DB_HOST', '127.0.0.1'), 70 | 'port' => env('DB_PORT', '5432'), 71 | 'database' => env('DB_DATABASE', 'forge'), 72 | 'username' => env('DB_USERNAME', 'forge'), 73 | 'password' => env('DB_PASSWORD', ''), 74 | 'charset' => 'utf8', 75 | 'prefix' => '', 76 | 'prefix_indexes' => true, 77 | 'schema' => 'public', 78 | 'sslmode' => 'prefer', 79 | ], 80 | 81 | 'sqlsrv' => [ 82 | 'driver' => 'sqlsrv', 83 | 'url' => env('DATABASE_URL'), 84 | 'host' => env('DB_HOST', 'localhost'), 85 | 'port' => env('DB_PORT', '1433'), 86 | 'database' => env('DB_DATABASE', 'forge'), 87 | 'username' => env('DB_USERNAME', 'forge'), 88 | 'password' => env('DB_PASSWORD', ''), 89 | 'charset' => 'utf8', 90 | 'prefix' => '', 91 | 'prefix_indexes' => true, 92 | ], 93 | 94 | ], 95 | 96 | /* 97 | |-------------------------------------------------------------------------- 98 | | Migration Repository Table 99 | |-------------------------------------------------------------------------- 100 | | 101 | | This table keeps track of all the migrations that have already run for 102 | | your application. Using this information, we can determine which of 103 | | the migrations on disk haven't actually been run in the database. 104 | | 105 | */ 106 | 107 | 'migrations' => 'migrations', 108 | 109 | /* 110 | |-------------------------------------------------------------------------- 111 | | Redis Databases 112 | |-------------------------------------------------------------------------- 113 | | 114 | | Redis is an open source, fast, and advanced key-value store that also 115 | | provides a richer body of commands than a typical key-value system 116 | | such as APC or Memcached. Laravel makes it easy to dig right in. 117 | | 118 | */ 119 | 120 | 'redis' => [ 121 | 122 | 'client' => env('REDIS_CLIENT', 'phpredis'), 123 | 124 | 'options' => [ 125 | 'cluster' => env('REDIS_CLUSTER', 'redis'), 126 | 'prefix' => env('REDIS_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_database_'), 127 | ], 128 | 129 | 'default' => [ 130 | 'url' => env('REDIS_URL'), 131 | 'host' => env('REDIS_HOST', '127.0.0.1'), 132 | 'password' => env('REDIS_PASSWORD', null), 133 | 'port' => env('REDIS_PORT', '6379'), 134 | 'database' => env('REDIS_DB', '0'), 135 | ], 136 | 137 | 'cache' => [ 138 | 'url' => env('REDIS_URL'), 139 | 'host' => env('REDIS_HOST', '127.0.0.1'), 140 | 'password' => env('REDIS_PASSWORD', null), 141 | 'port' => env('REDIS_PORT', '6379'), 142 | 'database' => env('REDIS_CACHE_DB', '1'), 143 | ], 144 | 145 | ], 146 | 147 | ]; 148 | -------------------------------------------------------------------------------- /app/Http/Controllers/UserController.php: -------------------------------------------------------------------------------- 1 | id; 19 | print_r($user_id); 20 | $request->validate([ 21 | 'file' => 'required|mimes:jpg', 22 | 'fname' => 'required|string|min:3|max:30', 23 | 'lname' => 'required|string|min:3|max:30', 24 | 'phone' => 'required|string|min:9|max:13', 25 | 'address' => 'required|string|min:6|max:50', 26 | 'idnum' => 'required|string|max:10', 27 | ]); 28 | $fname=$request->fname; 29 | $lname=$request->lname; 30 | $phone=$request->phone; 31 | $address=$request->address; 32 | $idnum=$request->idnum; 33 | if($request->input('gender')=='man'){ 34 | $gender = 1; 35 | }else{ 36 | $gender = 0; 37 | } 38 | $fileName = $request->fname.$request->idnum.'.'.$request->file->extension(); 39 | $request->file->move(public_path('uploads'), $fileName); 40 | $image = 'uploads/'.$fileName; 41 | DB::insert('INSERT INTO customers (user_id, first_name, last_name, phone, address, image, idnum, gender) value(?,?,?,?,?,?,?,?)', [$user_id, $fname, $lname, $phone, $address, $image, $idnum, $gender]); 42 | return redirect()->route('showcustomers'); 43 | } 44 | public function showcustomers (){ 45 | $user_id = Auth::user()->id; 46 | $results=DB::select('SELECT * FROM(SELECT t1.*, t2.id AS trade_id, t2.paymethod, t2.amount, t2.interest, t2.payamount, t2.quota, t2.blackbarry, t2.day, t2.rent_date FROM customers t1 LEFT JOIN ( SELECT * FROM trade )t2 ON t1.id=t2.customer_id WHERE deleted=0 AND user_id=? ) rt GROUP BY id DESC', [$user_id]); 47 | $data = [ 48 | 'results' =>$results 49 | ]; 50 | return view('showCustomers')->with($data); 51 | } 52 | public function viewcustomer (Request $request){ 53 | $id = $request->input('id'); 54 | $results=DB::select('SELECT * FROM customers where id=?', [$id]); 55 | $data = [ 56 | 'results' =>$results 57 | ]; 58 | return view('viewcustomer')->with($data); 59 | } 60 | public function delcustomer (Request $request){ 61 | $cid=$request->input('id'); 62 | DB::update('UPDATE customers SET deleted=1 where id=?',[$cid]); 63 | echo true; 64 | } 65 | public function addtrade (Request $request){ 66 | $id = $request->input('id'); 67 | $results=DB::select('SELECT * FROM customers where id=?', [$id]); 68 | $data = [ 69 | 'results' =>$results 70 | ]; 71 | return view('addTrade')->with($data); 72 | } 73 | public function showtrades (){ 74 | $user_id=Auth::user()->id; 75 | $results=DB::select('SELECT t1.*, t2.first_name, t2.last_name, t2.phone, t2.address, t2.idnum, t2.image FROM trade t1 LEFT JOIN ( SELECT * FROM customers WHERE deleted = "0")t2 ON t1.customer_id=t2.id WHERE t1.status = "0" AND t2.user_id=?', [$user_id]); 76 | $data = [ 77 | 'results' =>$results 78 | ]; 79 | return view('showTrades')->with($data); 80 | } 81 | public function newtrade(Request $request){ 82 | $customer_id=$request->input('customer_id'); 83 | $amount = $request->input('amount'); 84 | $method = $request->input('method'); 85 | $interest = $request->input('interest'); 86 | $day = $request->input('day'); 87 | $total = $request->input('total'); 88 | $quota = $request->input('quota'); 89 | $rent_date = $request->input('rent_date'); 90 | $rdate = date_create($rent_date); 91 | $tdate = $method." days"; 92 | $ndate = date_add($rdate, date_interval_create_from_date_string($tdate)); 93 | $next_date = date_format($ndate,"Y-m-d"); 94 | $black = $request->input('black'); 95 | DB::insert('insert into trade (customer_id, paymethod, amount, interest, payamount, quota, blackbarry, day, rent_date, next_date) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)', [$customer_id, $method, $amount, $interest, $total, $quota, $black, $day, $rent_date, $next_date]); 96 | return redirect()->route('showTrades'); 97 | } 98 | public function addnewpay(Request $request){ 99 | $id = $request->input('id'); 100 | $results = DB::select('SELECT t1.*, t2.first_name, t2.last_name, t2.phone, t2.address, t2.idnum, t2.image FROM trade t1 LEFT JOIN ( SELECT * FROM customers WHERE deleted = "0" )t2 ON t1.customer_id=t2.id WHERE t1.id = ?', [$id]); 101 | $resultt = DB::select('SELECT * from pays where trade_id = ?', [$id]); 102 | $data = [ 103 | 'results' => $results, 104 | 'resultt' => $resultt 105 | ]; 106 | return view('addNewpay')->with($data); 107 | } 108 | public function tradepay(Request $request){ 109 | $tid = $request->input('tid'); 110 | $amount = $request->input('amount'); 111 | $pa = $request->input('pa'); 112 | $method = $request->input('method'); 113 | $paydate = $request->input('paydate'); 114 | DB::insert('insert into pays (trade_id, amount, paydate) values (?, ?, ?)', [$tid, $amount, $paydate]); 115 | $pa = $request->input('pa'); 116 | $result = DB::select('SELECT * from trade where id=?', [$tid]); 117 | $og = $result[0]->ongoing; 118 | $ong = $og+(round($amount/$pa, 3))*100; 119 | $pdat = date_create($paydate); 120 | $tdat = $method." days"; 121 | $ndat = date_add($pdat, date_interval_create_from_date_string($tdat)); 122 | $next_date = date_format($ndat,"Y-m-d"); 123 | DB::update('UPDATE trade SET ongoing = ?, next_date = ? where id =? ', [$ong, $next_date, $tid]); 124 | return redirect()->route('showtrades'); 125 | } 126 | public function dashboard(){ 127 | $user_id=Auth::user()->id; 128 | $date = Carbon::now()->format('Y-m-d'); 129 | $result = DB::select("SELECT * FROM (SELECT * FROM trade WHERE next_date = ?) t1 LEFT JOIN (SELECT id AS c_id, user_id, image, phone, first_name, last_name, address, idnum FROM customers) t2 ON t1.customer_id = t2.c_id WHERE user_id = ?", [$date, $user_id]); 130 | $result1 = DB::select("SELECT * FROM (SELECT trade_id, amount AS payamt FROM pays WHERE paydate = ?)st1 LEFT JOIN (SELECT *FROM trade t1 LEFT JOIN (SELECT id AS c_id, first_name, last_name, image, user_id FROM customers )t2 ON t1.customer_id = t2.c_id)st2 ON st1.trade_id = st2.id WHERE user_id = ?", [$date, $user_id]); 131 | $result2 = DB::select('SELECT COUNT(id) as total FROM customers WHERE user_id = ?', [$user_id]); 132 | $data = [ 133 | 'result'=>$result, 134 | 'result1'=>$result1, 135 | 'result2'=>$result2, 136 | ]; 137 | return view('home')->with($data); 138 | } 139 | } 140 | -------------------------------------------------------------------------------- /resources/views/addCustomer.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | 3 | @section('content') 4 |
5 |
6 |
7 |
8 |
{{ __('Add new customer') }}
9 |
10 |
11 | @csrf 12 |
13 |
14 | 15 |
16 |
17 |
18 |
19 | 20 | 21 |
22 | ¡Se ve bien! 23 |
24 |
25 |
26 | 27 | 28 |
29 | ¡Se ve bien! 30 |
31 |
32 |
33 |
34 | 35 |
36 | 37 | 38 |
39 | Introduzca un teléfono válido. 40 |
41 |
42 |
43 |
44 | 45 |
46 | 47 | 48 |
49 | Proporcione una dirección válida. 50 |
51 |
52 |
53 |
54 | 55 |
56 | 57 | 58 |
59 | Proporcione un número de identificación válido. 60 |
61 |
62 |
63 |
64 | 65 | 70 |
71 | Seleccione un sexo válido. 72 |
73 |
74 |
75 |
76 |
77 |
78 | 79 | 82 |
83 | Debes estar de acuerdo antes de enviar. 84 |
85 |
86 |
87 |
88 |
89 | 90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 |
109 |
110 | @endsection 111 | -------------------------------------------------------------------------------- /public/css/app.css: -------------------------------------------------------------------------------- 1 | @import url(https://fonts.googleapis.com/css?family=Nunito); 2 | 3 | .alert{ 4 | background-color: #3290dc; 5 | border-radius: 5px; 6 | color: #fff; 7 | } 8 | .card{ 9 | margin-bottom: 1rem; 10 | } 11 | .card-header { 12 | padding: .5rem 1rem; 13 | margin-bottom: 0; 14 | color: #fff; 15 | background-color: rgba(52,144,220,.75); 16 | border: 1px solid rgba(52,144,220,.75); 17 | } 18 | .cadhed{ 19 | display: flex; 20 | justify-content: space-between; 21 | } 22 | .cadhbt{ 23 | background-color: darkgreen; 24 | padding: 3px 6px; 25 | border-radius: 15px; 26 | } 27 | .cadhbt:hover{ 28 | background-color: aliceblue; 29 | color: blue; 30 | } 31 | .d4d{ 32 | width: 100%; 33 | height: 50vh; 34 | } 35 | .dimage{ 36 | width: 100%; 37 | height: 100%; 38 | display: flex; 39 | justify-content: center; 40 | align-items: center; 41 | } 42 | .dimg{ 43 | width: 100%; 44 | height: 100%; 45 | } 46 | .form-group{ 47 | margin-bottom: 1rem; 48 | } 49 | input::-webkit-outer-spin-button, 50 | input::-webkit-inner-spin-button { 51 | -webkit-appearance: none; 52 | margin: 0; 53 | } 54 | /* Firefox */ 55 | input[type=number] { 56 | -moz-appearance: textfield; 57 | } 58 | input[type=file]{ 59 | line-height: 100px; 60 | } 61 | .form-check .form-check-input { 62 | float: left; 63 | margin-left: 0.0em; 64 | } 65 | 66 | .image{ 67 | width:60px; 68 | height: 60px; 69 | } 70 | .td-avatar{ 71 | width: 100%; 72 | height: 100%; 73 | border-radius: 30px; 74 | } 75 | .tdbtn{ 76 | display: flex; 77 | align-items: center; 78 | justify-content: center; 79 | font-size: 32px; 80 | width: 100%; 81 | height: 45px; 82 | } 83 | 84 | table.dataTable tbody th, table.dataTable tbody td { 85 | padding: 1px 1px; 86 | text-align: center; 87 | align-items: center; 88 | } 89 | .table>:not(caption)>*>* { 90 | padding: 1px 1px; 91 | } 92 | table.dataTable thead th, table.dataTable tfoot th { 93 | text-align: center; 94 | } 95 | table.dataTable tbody tr:hover{ 96 | outline: #3290dc; 97 | outline-style:groove; 98 | outline-width: 5px; 99 | } 100 | .page-item.active .page-link { 101 | z-index: 0; 102 | } 103 | 104 | .image{ 105 | width:60px; 106 | height: 60px; 107 | } 108 | .td-avatar{ 109 | width: 100%; 110 | height: 100%; 111 | border-radius: 30px; 112 | } 113 | .image-box{ 114 | width: 100%; 115 | max-height:300px; 116 | } 117 | .vi-avatar{ 118 | display: flex; 119 | justify-content: center; 120 | align-items: center; 121 | } 122 | .c-image{ 123 | width:220px; 124 | height:220px; 125 | border-radius: 110px; 126 | } 127 | 128 | 129 | /* max */ 130 | 131 | @media(max-width: 991px){ 132 | .f-none{ 133 | display: none; 134 | } 135 | .dataTables_length{ 136 | display: none; 137 | } 138 | } 139 | @media(max-width: 767px){ 140 | .s-none{ 141 | display: none; 142 | } 143 | } 144 | @media(max-width: 575px){ 145 | .t-none{ 146 | display: none; 147 | } 148 | } 149 | 150 | 151 | 152 | /* min */ 153 | 154 | @media (min-width: 576px){ 155 | .container, .container-sm { 156 | max-width: 96%; 157 | } 158 | } 159 | @media (min-width: 768px){ 160 | .container, .container-md, .container-sm { 161 | max-width: 96%; 162 | } 163 | } 164 | @media (min-width: 992px){ 165 | .container, .container-lg, .container-md, .container-sm { 166 | max-width: 960px; 167 | } 168 | } 169 | @media (min-width: 1200px){ 170 | .container, .container-lg, .container-md, .container-sm, .container-xl { 171 | max-width: 1140px; 172 | } 173 | } 174 | @media (min-width: 1400px){ 175 | .container{ 176 | max-width: 1320px; 177 | } 178 | } 179 | 180 | 181 | 182 | /* circle */ 183 | .circular-menu { 184 | position: fixed; 185 | bottom: 1em; 186 | right: 1em; 187 | } 188 | 189 | .circular-menu .floating-btn { 190 | display: block; 191 | width: 3.5em; 192 | height: 3.5em; 193 | border-radius: 50%; 194 | background-color: hsl(4, 98%, 60%); 195 | box-shadow: 0 2px 5px 0 hsla(0, 0%, 0%, .26); 196 | color: hsl(0, 0%, 100%); 197 | text-align: center; 198 | line-height: 3.9; 199 | cursor: pointer; 200 | outline: 0; 201 | } 202 | 203 | .circular-menu.active .floating-btn { 204 | box-shadow: inset 0 0 3px hsla(0, 0%, 0%, .3); 205 | } 206 | 207 | .circular-menu .floating-btn:active { 208 | box-shadow: 0 4px 8px 0 hsla(0, 0%, 0%, .4); 209 | } 210 | 211 | .circular-menu .floating-btn i { 212 | font-size: 1.3em; 213 | transition: transform .2s; 214 | } 215 | 216 | .circular-menu.active .floating-btn i { 217 | transform: rotate(-45deg); 218 | } 219 | 220 | .circular-menu:after { 221 | display: block; 222 | content: ' '; 223 | width: 3.5em; 224 | height: 3.5em; 225 | border-radius: 50%; 226 | position: absolute; 227 | top: 0; 228 | right: 0; 229 | z-index: -2; 230 | background-color: hsl(4, 98%, 60%); 231 | transition: all .3s ease; 232 | } 233 | 234 | .circular-menu.active:after { 235 | transform: scale3d(5.5, 5.5, 1); 236 | transition-timing-function: cubic-bezier(.68, 1.55, .265, 1); 237 | } 238 | 239 | .circular-menu .items-wrapper { 240 | padding: 0; 241 | margin: 0; 242 | } 243 | 244 | .circular-menu .menu-item { 245 | position: absolute; 246 | top: .2em; 247 | right: .2em; 248 | z-index: -1; 249 | display: block; 250 | text-decoration: none; 251 | color: hsl(0, 0%, 100%); 252 | font-size: 1em; 253 | width: 3em; 254 | height: 3em; 255 | border-radius: 50%; 256 | text-align: center; 257 | line-height: 3; 258 | background-color: hsla(0,0%,0%,.1); 259 | transition: transform .3s ease, background .2s ease; 260 | } 261 | 262 | .circular-menu .menu-item:hover { 263 | background-color: hsla(0,0%,0%,.3); 264 | } 265 | 266 | .circular-menu.active .menu-item { 267 | transition-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1.275); 268 | } 269 | 270 | .circular-menu.active .menu-item:nth-child(1) { 271 | transform: translate3d(1em,-7em,0); 272 | } 273 | 274 | .circular-menu.active .menu-item:nth-child(2) { 275 | transform: translate3d(-3.5em,-6.3em,0); 276 | } 277 | 278 | .circular-menu.active .menu-item:nth-child(3) { 279 | transform: translate3d(-6.5em,-3.2em,0); 280 | } 281 | 282 | .circular-menu.active .menu-item:nth-child(4) { 283 | transform: translate3d(-7em,1em,0); 284 | } 285 | 286 | /** 287 | * The other theme for this menu 288 | */ 289 | 290 | .circular-menu.circular-menu-left { 291 | right: auto; 292 | left: 1em; 293 | } 294 | 295 | .circular-menu.circular-menu-left .floating-btn { 296 | background-color: hsl(217, 89%, 61%); 297 | } 298 | 299 | .circular-menu.circular-menu-left:after { 300 | background-color: hsl(217, 89%, 61%); 301 | } 302 | 303 | .circular-menu.circular-menu-left.active .floating-btn i { 304 | transform: rotate(90deg); 305 | } 306 | 307 | .circular-menu.circular-menu-left.active .menu-item:nth-child(1) { 308 | transform: translate3d(-1em,-7em,0); 309 | } 310 | 311 | .circular-menu.circular-menu-left.active .menu-item:nth-child(2) { 312 | transform: translate3d(3.5em,-6.3em,0); 313 | } 314 | 315 | .circular-menu.circular-menu-left.active .menu-item:nth-child(3) { 316 | transform: translate3d(6.5em,-3.2em,0); 317 | } 318 | 319 | .circular-menu.circular-menu-left.active .menu-item:nth-child(4) { 320 | transform: translate3d(7em,1em,0); 321 | } -------------------------------------------------------------------------------- /config/session.php: -------------------------------------------------------------------------------- 1 | env('SESSION_DRIVER', 'file'), 22 | 23 | /* 24 | |-------------------------------------------------------------------------- 25 | | Session Lifetime 26 | |-------------------------------------------------------------------------- 27 | | 28 | | Here you may specify the number of minutes that you wish the session 29 | | to be allowed to remain idle before it expires. If you want them 30 | | to immediately expire on the browser closing, set that option. 31 | | 32 | */ 33 | 34 | 'lifetime' => env('SESSION_LIFETIME', 120), 35 | 36 | 'expire_on_close' => false, 37 | 38 | /* 39 | |-------------------------------------------------------------------------- 40 | | Session Encryption 41 | |-------------------------------------------------------------------------- 42 | | 43 | | This option allows you to easily specify that all of your session data 44 | | should be encrypted before it is stored. All encryption will be run 45 | | automatically by Laravel and you can use the Session like normal. 46 | | 47 | */ 48 | 49 | 'encrypt' => false, 50 | 51 | /* 52 | |-------------------------------------------------------------------------- 53 | | Session File Location 54 | |-------------------------------------------------------------------------- 55 | | 56 | | When using the native session driver, we need a location where session 57 | | files may be stored. A default has been set for you but a different 58 | | location may be specified. This is only needed for file sessions. 59 | | 60 | */ 61 | 62 | 'files' => storage_path('framework/sessions'), 63 | 64 | /* 65 | |-------------------------------------------------------------------------- 66 | | Session Database Connection 67 | |-------------------------------------------------------------------------- 68 | | 69 | | When using the "database" or "redis" session drivers, you may specify a 70 | | connection that should be used to manage these sessions. This should 71 | | correspond to a connection in your database configuration options. 72 | | 73 | */ 74 | 75 | 'connection' => env('SESSION_CONNECTION', null), 76 | 77 | /* 78 | |-------------------------------------------------------------------------- 79 | | Session Database Table 80 | |-------------------------------------------------------------------------- 81 | | 82 | | When using the "database" session driver, you may specify the table we 83 | | should use to manage the sessions. Of course, a sensible default is 84 | | provided for you; however, you are free to change this as needed. 85 | | 86 | */ 87 | 88 | 'table' => 'sessions', 89 | 90 | /* 91 | |-------------------------------------------------------------------------- 92 | | Session Cache Store 93 | |-------------------------------------------------------------------------- 94 | | 95 | | While using one of the framework's cache driven session backends you may 96 | | list a cache store that should be used for these sessions. This value 97 | | must match with one of the application's configured cache "stores". 98 | | 99 | | Affects: "apc", "dynamodb", "memcached", "redis" 100 | | 101 | */ 102 | 103 | 'store' => env('SESSION_STORE', null), 104 | 105 | /* 106 | |-------------------------------------------------------------------------- 107 | | Session Sweeping Lottery 108 | |-------------------------------------------------------------------------- 109 | | 110 | | Some session drivers must manually sweep their storage location to get 111 | | rid of old sessions from storage. Here are the chances that it will 112 | | happen on a given request. By default, the odds are 2 out of 100. 113 | | 114 | */ 115 | 116 | 'lottery' => [2, 100], 117 | 118 | /* 119 | |-------------------------------------------------------------------------- 120 | | Session Cookie Name 121 | |-------------------------------------------------------------------------- 122 | | 123 | | Here you may change the name of the cookie used to identify a session 124 | | instance by ID. The name specified here will get used every time a 125 | | new session cookie is created by the framework for every driver. 126 | | 127 | */ 128 | 129 | 'cookie' => env( 130 | 'SESSION_COOKIE', 131 | Str::slug(env('APP_NAME', 'laravel'), '_').'_session' 132 | ), 133 | 134 | /* 135 | |-------------------------------------------------------------------------- 136 | | Session Cookie Path 137 | |-------------------------------------------------------------------------- 138 | | 139 | | The session cookie path determines the path for which the cookie will 140 | | be regarded as available. Typically, this will be the root path of 141 | | your application but you are free to change this when necessary. 142 | | 143 | */ 144 | 145 | 'path' => '/', 146 | 147 | /* 148 | |-------------------------------------------------------------------------- 149 | | Session Cookie Domain 150 | |-------------------------------------------------------------------------- 151 | | 152 | | Here you may change the domain of the cookie used to identify a session 153 | | in your application. This will determine which domains the cookie is 154 | | available to in your application. A sensible default has been set. 155 | | 156 | */ 157 | 158 | 'domain' => env('SESSION_DOMAIN', null), 159 | 160 | /* 161 | |-------------------------------------------------------------------------- 162 | | HTTPS Only Cookies 163 | |-------------------------------------------------------------------------- 164 | | 165 | | By setting this option to true, session cookies will only be sent back 166 | | to the server if the browser has a HTTPS connection. This will keep 167 | | the cookie from being sent to you if it can not be done securely. 168 | | 169 | */ 170 | 171 | 'secure' => env('SESSION_SECURE_COOKIE'), 172 | 173 | /* 174 | |-------------------------------------------------------------------------- 175 | | HTTP Access Only 176 | |-------------------------------------------------------------------------- 177 | | 178 | | Setting this value to true will prevent JavaScript from accessing the 179 | | value of the cookie and the cookie will only be accessible through 180 | | the HTTP protocol. You are free to modify this option if needed. 181 | | 182 | */ 183 | 184 | 'http_only' => true, 185 | 186 | /* 187 | |-------------------------------------------------------------------------- 188 | | Same-Site Cookies 189 | |-------------------------------------------------------------------------- 190 | | 191 | | This option determines how your cookies behave when cross-site requests 192 | | take place, and can be used to mitigate CSRF attacks. By default, we 193 | | will set this value to "lax" since this is a secure default value. 194 | | 195 | | Supported: "lax", "strict", "none", null 196 | | 197 | */ 198 | 199 | 'same_site' => 'lax', 200 | 201 | ]; 202 | -------------------------------------------------------------------------------- /resources/views/home.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | 3 | @section('content') 4 |
5 |
6 |
7 |
8 |
{{ __('Operaciones que debería obtener hoy') }}
9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | @foreach($result as $data) 24 | 25 | 26 | 29 | 30 | 31 | 44 | 45 | 46 | 47 | @endforeach 48 | 49 |
#NombreMontoPagarInteresarQuota
27 |
28 |
{{$data->first_name}} {{$data->last_name}}{{$data->amount}} 32 | @if($data->paymethod == 1) 33 | {{'Diary'}} 34 | @elseif($data->paymethod == 2) 35 | {{'Inter Diary'}} 36 | @elseif($data->paymethod == 7) 37 | {{'Weekly'}} 38 | @elseif($data->paymethod == 15) 39 | {{'Fortnightly'}} 40 | @else 41 | {{'Monthly'}} 42 | @endif 43 | {{$data->interest}}{{$data->quota}}
50 |
51 |
52 |
53 |
{{ __('Operaciones recibidas hoy') }}
54 |
55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | @foreach($result1 as $data1) 69 | 70 | 71 | 74 | 75 | 76 | 89 | 90 | 91 | 92 | 93 | @endforeach 94 | 95 |
#NombreRecibióPagarInteresarMotaAlquiler fecha
72 |
73 |
{{$data1->first_name}} {{$data1->last_name}}{{$data1->payamt}} 77 | @if($data1->paymethod == 1) 78 | {{'Diary'}} 79 | @elseif($data1->paymethod == 2) 80 | {{'Inter Diary'}} 81 | @elseif($data1->paymethod == 7) 82 | {{'Weekly'}} 83 | @elseif($data1->paymethod == 15) 84 | {{'Fortnightly'}} 85 | @else 86 | {{'Monthly'}} 87 | @endif 88 | {{$data1->interest}}{{$data1->amount}}{{$data1->rent_date}}
96 |
97 |
98 |
99 |
100 |
101 |
{{ __('Otros') }}
102 |
103 |
104 | @foreach($result2 as $data2) 105 |
Número de clientes:
106 |
{{$data2->total}}
107 | @endforeach 108 |
109 |
110 |
Todo remanente:
111 |
112 | @php 113 | $ttl = 0; 114 | @endphp 115 | @foreach($result as $data) 116 | @php 117 | $ttl+=$data->quota; 118 | @endphp 119 | @endforeach 120 | @php 121 | echo $ttl; 122 | @endphp 123 |
124 |
125 |
126 |
Todo recibió:
127 |
128 | @php 129 | $ttl = 0; 130 | @endphp 131 | @foreach($result1 as $data1) 132 | @php 133 | $ttl+=$data1->payamt; 134 | @endphp 135 | @endforeach 136 | @php 137 | echo $ttl; 138 | @endphp 139 |
140 |
141 |
142 |
143 | 144 |
145 |

Referral link: {{ Auth::user()->referral_link }}

146 |
147 |
148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 |
158 |
159 | @endsection 160 | -------------------------------------------------------------------------------- /resources/lang/en/validation.php: -------------------------------------------------------------------------------- 1 | 'The :attribute must be accepted.', 17 | 'active_url' => 'The :attribute is not a valid URL.', 18 | 'after' => 'The :attribute must be a date after :date.', 19 | 'after_or_equal' => 'The :attribute must be a date after or equal to :date.', 20 | 'alpha' => 'The :attribute must only contain letters.', 21 | 'alpha_dash' => 'The :attribute must only contain letters, numbers, dashes and underscores.', 22 | 'alpha_num' => 'The :attribute must only contain letters and numbers.', 23 | 'array' => 'The :attribute must be an array.', 24 | 'before' => 'The :attribute must be a date before :date.', 25 | 'before_or_equal' => 'The :attribute must be a date before or equal to :date.', 26 | 'between' => [ 27 | 'numeric' => 'The :attribute must be between :min and :max.', 28 | 'file' => 'The :attribute must be between :min and :max kilobytes.', 29 | 'string' => 'The :attribute must be between :min and :max characters.', 30 | 'array' => 'The :attribute must have between :min and :max items.', 31 | ], 32 | 'boolean' => 'The :attribute field must be true or false.', 33 | 'confirmed' => 'The :attribute confirmation does not match.', 34 | 'date' => 'The :attribute is not a valid date.', 35 | 'date_equals' => 'The :attribute must be a date equal to :date.', 36 | 'date_format' => 'The :attribute does not match the format :format.', 37 | 'different' => 'The :attribute and :other must be different.', 38 | 'digits' => 'The :attribute must be :digits digits.', 39 | 'digits_between' => 'The :attribute must be between :min and :max digits.', 40 | 'dimensions' => 'The :attribute has invalid image dimensions.', 41 | 'distinct' => 'The :attribute field has a duplicate value.', 42 | 'email' => 'The :attribute must be a valid email address.', 43 | 'ends_with' => 'The :attribute must end with one of the following: :values.', 44 | 'exists' => 'The selected :attribute is invalid.', 45 | 'file' => 'The :attribute must be a file.', 46 | 'filled' => 'The :attribute field must have a value.', 47 | 'gt' => [ 48 | 'numeric' => 'The :attribute must be greater than :value.', 49 | 'file' => 'The :attribute must be greater than :value kilobytes.', 50 | 'string' => 'The :attribute must be greater than :value characters.', 51 | 'array' => 'The :attribute must have more than :value items.', 52 | ], 53 | 'gte' => [ 54 | 'numeric' => 'The :attribute must be greater than or equal :value.', 55 | 'file' => 'The :attribute must be greater than or equal :value kilobytes.', 56 | 'string' => 'The :attribute must be greater than or equal :value characters.', 57 | 'array' => 'The :attribute must have :value items or more.', 58 | ], 59 | 'image' => 'The :attribute must be an image.', 60 | 'in' => 'The selected :attribute is invalid.', 61 | 'in_array' => 'The :attribute field does not exist in :other.', 62 | 'integer' => 'The :attribute must be an integer.', 63 | 'ip' => 'The :attribute must be a valid IP address.', 64 | 'ipv4' => 'The :attribute must be a valid IPv4 address.', 65 | 'ipv6' => 'The :attribute must be a valid IPv6 address.', 66 | 'json' => 'The :attribute must be a valid JSON string.', 67 | 'lt' => [ 68 | 'numeric' => 'The :attribute must be less than :value.', 69 | 'file' => 'The :attribute must be less than :value kilobytes.', 70 | 'string' => 'The :attribute must be less than :value characters.', 71 | 'array' => 'The :attribute must have less than :value items.', 72 | ], 73 | 'lte' => [ 74 | 'numeric' => 'The :attribute must be less than or equal :value.', 75 | 'file' => 'The :attribute must be less than or equal :value kilobytes.', 76 | 'string' => 'The :attribute must be less than or equal :value characters.', 77 | 'array' => 'The :attribute must not have more than :value items.', 78 | ], 79 | 'max' => [ 80 | 'numeric' => 'The :attribute must not be greater than :max.', 81 | 'file' => 'The :attribute must not be greater than :max kilobytes.', 82 | 'string' => 'The :attribute must not be greater than :max characters.', 83 | 'array' => 'The :attribute must not have more than :max items.', 84 | ], 85 | 'mimes' => 'The :attribute must be a file of type: :values.', 86 | 'mimetypes' => 'The :attribute must be a file of type: :values.', 87 | 'min' => [ 88 | 'numeric' => 'The :attribute must be at least :min.', 89 | 'file' => 'The :attribute must be at least :min kilobytes.', 90 | 'string' => 'The :attribute must be at least :min characters.', 91 | 'array' => 'The :attribute must have at least :min items.', 92 | ], 93 | 'multiple_of' => 'The :attribute must be a multiple of :value.', 94 | 'not_in' => 'The selected :attribute is invalid.', 95 | 'not_regex' => 'The :attribute format is invalid.', 96 | 'numeric' => 'The :attribute must be a number.', 97 | 'password' => 'The password is incorrect.', 98 | 'present' => 'The :attribute field must be present.', 99 | 'regex' => 'The :attribute format is invalid.', 100 | 'required' => 'The :attribute field is required.', 101 | 'required_if' => 'The :attribute field is required when :other is :value.', 102 | 'required_unless' => 'The :attribute field is required unless :other is in :values.', 103 | 'required_with' => 'The :attribute field is required when :values is present.', 104 | 'required_with_all' => 'The :attribute field is required when :values are present.', 105 | 'required_without' => 'The :attribute field is required when :values is not present.', 106 | 'required_without_all' => 'The :attribute field is required when none of :values are present.', 107 | 'prohibited' => 'The :attribute field is prohibited.', 108 | 'prohibited_if' => 'The :attribute field is prohibited when :other is :value.', 109 | 'prohibited_unless' => 'The :attribute field is prohibited unless :other is in :values.', 110 | 'same' => 'The :attribute and :other must match.', 111 | 'size' => [ 112 | 'numeric' => 'The :attribute must be :size.', 113 | 'file' => 'The :attribute must be :size kilobytes.', 114 | 'string' => 'The :attribute must be :size characters.', 115 | 'array' => 'The :attribute must contain :size items.', 116 | ], 117 | 'starts_with' => 'The :attribute must start with one of the following: :values.', 118 | 'string' => 'The :attribute must be a string.', 119 | 'timezone' => 'The :attribute must be a valid zone.', 120 | 'unique' => 'The :attribute has already been taken.', 121 | 'uploaded' => 'The :attribute failed to upload.', 122 | 'url' => 'The :attribute format is invalid.', 123 | 'uuid' => 'The :attribute must be a valid UUID.', 124 | 125 | /* 126 | |-------------------------------------------------------------------------- 127 | | Custom Validation Language Lines 128 | |-------------------------------------------------------------------------- 129 | | 130 | | Here you may specify custom validation messages for attributes using the 131 | | convention "attribute.rule" to name the lines. This makes it quick to 132 | | specify a specific custom language line for a given attribute rule. 133 | | 134 | */ 135 | 136 | 'custom' => [ 137 | 'attribute-name' => [ 138 | 'rule-name' => 'custom-message', 139 | ], 140 | ], 141 | 142 | /* 143 | |-------------------------------------------------------------------------- 144 | | Custom Validation Attributes 145 | |-------------------------------------------------------------------------- 146 | | 147 | | The following language lines are used to swap our attribute placeholder 148 | | with something more reader friendly such as "E-Mail Address" instead 149 | | of "email". This simply helps us make our message more expressive. 150 | | 151 | */ 152 | 153 | 'attributes' => [], 154 | 155 | ]; 156 | -------------------------------------------------------------------------------- /public/img/404.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 14 | 15 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | --------------------------------------------------------------------------------