├── public ├── favicon.ico ├── robots.txt ├── js │ └── app.js ├── .htaccess ├── web.config ├── index.php └── css │ └── app.css ├── database ├── .gitignore ├── seeds │ ├── DatabaseSeeder.php │ ├── GendersTableSeeder.php │ └── AdminsTableSeeder.php ├── migrations │ ├── 2018_03_06_123354_create_states_table.php │ ├── 2018_03_07_164659_create_genders_table.php │ ├── 2018_03_06_115649_create_salaries_table.php │ ├── 2018_03_05_132536_create_countries_table.php │ ├── 2018_03_06_131623_create_divisions_table.php │ ├── 2018_03_01_045640_create_departments_table.php │ ├── 2018_06_25_150148_password_resets.php │ ├── 2018_03_05_170530_create_cities_table.php │ ├── 2018_03_13_165135_create_admins_table.php │ └── 2018_03_08_133020_create_employees_table.php └── factories │ └── UserFactory.php ├── bootstrap ├── cache │ └── .gitignore └── app.php ├── storage ├── logs │ └── .gitignore ├── app │ ├── .gitignore │ └── public │ │ └── .gitignore ├── framework │ ├── cache │ │ └── .gitignore │ ├── testing │ │ └── .gitignore │ ├── views │ │ └── .gitignore │ ├── sessions │ │ └── .gitignore │ └── .gitignore └── fonts │ ├── 2df510fd6a1e9aab9c540b2adb81277a.ttf │ └── dompdf_font_family_cache.php ├── screenshot └── ems.PNG ├── .gitattributes ├── app ├── Gender.php ├── City.php ├── Salary.php ├── State.php ├── Country.php ├── Division.php ├── Department.php ├── Http │ ├── Middleware │ │ ├── EncryptCookies.php │ │ ├── VerifyCsrfToken.php │ │ ├── TrimStrings.php │ │ ├── TrustProxies.php │ │ └── RedirectIfAuthenticated.php │ ├── Controllers │ │ ├── Controller.php │ │ ├── ResetPassword │ │ │ ├── ForgotPasswordController.php │ │ │ └── ResetPasswordController.php │ │ ├── AuthController.php │ │ ├── ReportsController.php │ │ ├── DashboardController.php │ │ ├── SalariesController.php │ │ ├── StatesController.php │ │ ├── CountriesController.php │ │ ├── DivisionsController.php │ │ └── CitiesController.php │ └── Kernel.php ├── Providers │ ├── BroadcastServiceProvider.php │ ├── AppServiceProvider.php │ ├── AuthServiceProvider.php │ ├── EventServiceProvider.php │ └── RouteServiceProvider.php ├── User.php ├── Admin.php ├── Console │ └── Kernel.php ├── Exceptions │ └── Handler.php └── Employee.php ├── tests ├── TestCase.php ├── Unit │ └── ExampleTest.php ├── Feature │ └── ExampleTest.php └── CreatesApplication.php ├── resources ├── views │ ├── inc │ │ ├── footer.blade.php │ │ ├── message.blade.php │ │ ├── navbar.blade.php │ │ └── sidenav.blade.php │ ├── layouts │ │ ├── auth.blade.php │ │ └── app.blade.php │ ├── auth │ │ ├── passwords │ │ │ ├── email.blade.php │ │ │ └── reset.blade.php │ │ ├── show.blade.php │ │ └── index.blade.php │ ├── sys_mg │ │ ├── inc │ │ │ └── search.blade.php │ │ ├── states │ │ │ ├── create.blade.php │ │ │ ├── edit.blade.php │ │ │ └── index.blade.php │ │ ├── salaries │ │ │ ├── create.blade.php │ │ │ ├── edit.blade.php │ │ │ └── index.blade.php │ │ ├── countries │ │ │ ├── create.blade.php │ │ │ ├── edit.blade.php │ │ │ └── index.blade.php │ │ ├── divisions │ │ │ ├── create.blade.php │ │ │ ├── edit.blade.php │ │ │ └── index.blade.php │ │ ├── departments │ │ │ ├── edit.blade.php │ │ │ └── create.blade.php │ │ └── cities │ │ │ ├── create.blade.php │ │ │ ├── edit.blade.php │ │ │ └── index.blade.php │ ├── vendor │ │ └── pagination │ │ │ └── default.blade.php │ ├── reports │ │ ├── report.blade.php │ │ └── index.blade.php │ ├── employee │ │ ├── show.blade.php │ │ └── index.blade.php │ └── admin │ │ ├── create.blade.php │ │ └── edit.blade.php └── lang │ └── en │ ├── pagination.php │ ├── auth.php │ └── passwords.php ├── .gitignore ├── routes ├── channels.php ├── api.php ├── console.php └── web.php ├── config ├── hashing.php ├── view.php ├── services.php ├── broadcasting.php ├── logging.php ├── filesystems.php ├── queue.php ├── cache.php ├── auth.php ├── mail.php └── database.php ├── webpack.mix.js ├── server.php ├── .env.example ├── LICENSE ├── phpunit.xml ├── package.json ├── composer.json ├── artisan └── readme.md /public/favicon.ico: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /database/.gitignore: -------------------------------------------------------------------------------- 1 | *.sqlite 2 | -------------------------------------------------------------------------------- /bootstrap/cache/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/logs/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /public/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | Disallow: 3 | -------------------------------------------------------------------------------- /storage/app/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !public/ 3 | !.gitignore 4 | -------------------------------------------------------------------------------- /storage/framework/cache/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/testing/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/views/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/sessions/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/app/public/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !admins/no_image.png 3 | !.gitignore 4 | -------------------------------------------------------------------------------- /screenshot/ems.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SagarMaheshwary/Employee/HEAD/screenshot/ems.PNG -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto 2 | *.css linguist-vendored 3 | *.scss linguist-vendored 4 | *.js linguist-vendored 5 | CHANGELOG.md export-ignore 6 | -------------------------------------------------------------------------------- /app/Gender.php: -------------------------------------------------------------------------------- 1 | 2 | 7 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /node_modules 2 | /public/hot 3 | /public/storage 4 | /storage/*.key 5 | /vendor 6 | /.idea 7 | /.vscode 8 | /nbproject 9 | /.vagrant 10 | Homestead.json 11 | Homestead.yaml 12 | npm-debug.log 13 | yarn-error.log 14 | .env 15 | .phpunit.result.cache 16 | -------------------------------------------------------------------------------- /database/seeds/DatabaseSeeder.php: -------------------------------------------------------------------------------- 1 | call(GendersTableSeeder::class); 15 | $this->call(AdminsTableSeeder::class); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /app/Http/Middleware/EncryptCookies.php: -------------------------------------------------------------------------------- 1 | assertTrue(true); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /app/Http/Middleware/VerifyCsrfToken.php: -------------------------------------------------------------------------------- 1 | get('/'); 18 | 19 | $response->assertStatus(200); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /app/Providers/BroadcastServiceProvider.php: -------------------------------------------------------------------------------- 1 | gender_name = 'Male'; 17 | $gender->save(); 18 | $gender = new Gender(); 19 | $gender->gender_name = 'Female'; 20 | $gender->save(); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /public/js/app.js: -------------------------------------------------------------------------------- 1 | //Initialize sideNav 2 | var sideNav = document.querySelector('.sidenav'); 3 | M.Sidenav.init(sideNav); 4 | 5 | //Initialize Modal 6 | var modal = document.querySelector('.modal'); 7 | M.Modal.init(modal); 8 | 9 | //initialize Form Select 10 | $(document).ready(function(){ 11 | $('select').formSelect(); 12 | $('.datepicker').datepicker(); 13 | $(".dropdown-trigger").dropdown(); 14 | $('.collapsible').collapsible(); 15 | }); 16 | if(document.getElementById('address')){ 17 | M.textareaAutoResize($('#address')); 18 | } -------------------------------------------------------------------------------- /app/Http/Middleware/TrustProxies.php: -------------------------------------------------------------------------------- 1 | 3 | 12 | @endif -------------------------------------------------------------------------------- /routes/channels.php: -------------------------------------------------------------------------------- 1 | id === (int) $id; 16 | }); 17 | -------------------------------------------------------------------------------- /tests/CreatesApplication.php: -------------------------------------------------------------------------------- 1 | make(Kernel::class)->bootstrap(); 20 | 21 | Hash::driver('bcrypt')->setRounds(4); 22 | 23 | return $app; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /routes/api.php: -------------------------------------------------------------------------------- 1 | get('/user', function (Request $request) { 17 | return $request->user(); 18 | }); 19 | -------------------------------------------------------------------------------- /config/hashing.php: -------------------------------------------------------------------------------- 1 | 'bcrypt', 19 | 20 | ]; 21 | -------------------------------------------------------------------------------- /webpack.mix.js: -------------------------------------------------------------------------------- 1 | let 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/assets/js/app.js', 'public/js') 15 | .sass('resources/assets/sass/app.scss', 'public/css'); 16 | -------------------------------------------------------------------------------- /app/Providers/AppServiceProvider.php: -------------------------------------------------------------------------------- 1 | '« Previous', 17 | 'next' => 'Next »', 18 | 19 | ]; 20 | -------------------------------------------------------------------------------- /routes/console.php: -------------------------------------------------------------------------------- 1 | comment(Inspiring::quote()); 18 | })->describe('Display an inspiring quote'); 19 | -------------------------------------------------------------------------------- /app/User.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 | -------------------------------------------------------------------------------- /app/Http/Middleware/RedirectIfAuthenticated.php: -------------------------------------------------------------------------------- 1 | check()) { 21 | return redirect('/dashboard'); 22 | } 23 | 24 | return $next($request); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /database/seeds/AdminsTableSeeder.php: -------------------------------------------------------------------------------- 1 | first_name = 'John'; 18 | $admin->last_name = 'Doe'; 19 | $admin->username = 'admin'; 20 | $admin->email = 'admin@admin.com'; 21 | $admin->password = bcrypt('password'); 22 | $admin->picture = 'no_image.png'; 23 | $admin->save(); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /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 | # Handle Front Controller... 18 | RewriteCond %{REQUEST_FILENAME} !-d 19 | RewriteCond %{REQUEST_FILENAME} !-f 20 | RewriteRule ^ index.php [L] 21 | 22 | -------------------------------------------------------------------------------- /resources/lang/en/auth.php: -------------------------------------------------------------------------------- 1 | 'These credentials do not match our records.', 17 | 'throttle' => 'Too many login attempts. Please try again in :seconds seconds.', 18 | 19 | ]; 20 | -------------------------------------------------------------------------------- /app/Providers/AuthServiceProvider.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 | -------------------------------------------------------------------------------- /app/Providers/EventServiceProvider.php: -------------------------------------------------------------------------------- 1 | [ 17 | 'App\Listeners\EventListener', 18 | ], 19 | ]; 20 | 21 | /** 22 | * Register any events for your application. 23 | * 24 | * @return void 25 | */ 26 | public function boot() 27 | { 28 | parent::boot(); 29 | 30 | // 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /app/Admin.php: -------------------------------------------------------------------------------- 1 | increments('id'); 18 | $table->string('state_name'); 19 | $table->timestamps(); 20 | }); 21 | } 22 | 23 | /** 24 | * Reverse the migrations. 25 | * 26 | * @return void 27 | */ 28 | public function down() 29 | { 30 | Schema::dropIfExists('states'); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /database/migrations/2018_03_07_164659_create_genders_table.php: -------------------------------------------------------------------------------- 1 | increments('id'); 18 | $table->string('gender_name'); 19 | $table->timestamps(); 20 | }); 21 | } 22 | 23 | /** 24 | * Reverse the migrations. 25 | * 26 | * @return void 27 | */ 28 | public function down() 29 | { 30 | Schema::dropIfExists('genders'); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /.env.example: -------------------------------------------------------------------------------- 1 | APP_NAME=Laravel 2 | APP_ENV=local 3 | APP_KEY= 4 | APP_DEBUG=true 5 | APP_URL=http://localhost 6 | 7 | LOG_CHANNEL=stack 8 | 9 | DB_CONNECTION=mysql 10 | DB_HOST=127.0.0.1 11 | DB_PORT=3306 12 | DB_DATABASE=homestead 13 | DB_USERNAME=homestead 14 | DB_PASSWORD=secret 15 | 16 | BROADCAST_DRIVER=log 17 | CACHE_DRIVER=file 18 | SESSION_DRIVER=file 19 | SESSION_LIFETIME=120 20 | QUEUE_DRIVER=sync 21 | 22 | REDIS_HOST=127.0.0.1 23 | REDIS_PASSWORD=null 24 | REDIS_PORT=6379 25 | 26 | MAIL_DRIVER=smtp 27 | MAIL_HOST=smtp.mailtrap.io 28 | MAIL_PORT=2525 29 | MAIL_USERNAME=null 30 | MAIL_PASSWORD=null 31 | MAIL_ENCRYPTION=null 32 | 33 | PUSHER_APP_ID= 34 | PUSHER_APP_KEY= 35 | PUSHER_APP_SECRET= 36 | PUSHER_APP_CLUSTER=mt1 37 | 38 | MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}" 39 | MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}" 40 | -------------------------------------------------------------------------------- /database/migrations/2018_03_06_115649_create_salaries_table.php: -------------------------------------------------------------------------------- 1 | increments('id'); 18 | $table->float('s_amount',12); 19 | $table->timestamps(); 20 | }); 21 | } 22 | 23 | /** 24 | * Reverse the migrations. 25 | * 26 | * @return void 27 | */ 28 | public function down() 29 | { 30 | Schema::dropIfExists('salaries'); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /database/migrations/2018_03_05_132536_create_countries_table.php: -------------------------------------------------------------------------------- 1 | increments('id'); 18 | $table->string('country_name'); 19 | $table->timestamps(); 20 | }); 21 | } 22 | 23 | /** 24 | * Reverse the migrations. 25 | * 26 | * @return void 27 | */ 28 | public function down() 29 | { 30 | Schema::dropIfExists('countries'); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /database/migrations/2018_03_06_131623_create_divisions_table.php: -------------------------------------------------------------------------------- 1 | increments('id'); 18 | $table->string('division_name'); 19 | $table->timestamps(); 20 | }); 21 | } 22 | 23 | /** 24 | * Reverse the migrations. 25 | * 26 | * @return void 27 | */ 28 | public function down() 29 | { 30 | Schema::dropIfExists('divisions'); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /database/migrations/2018_03_01_045640_create_departments_table.php: -------------------------------------------------------------------------------- 1 | increments('id'); 18 | $table->string('dept_name'); 19 | $table->timestamps(); 20 | }); 21 | } 22 | 23 | /** 24 | * Reverse the migrations. 25 | * 26 | * @return void 27 | */ 28 | public function down() 29 | { 30 | Schema::dropIfExists('departments'); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /database/factories/UserFactory.php: -------------------------------------------------------------------------------- 1 | define(App\User::class, function (Faker $faker) { 17 | return [ 18 | 'name' => $faker->name, 19 | 'email' => $faker->unique()->safeEmail, 20 | 'password' => '$2y$10$TKh8H1.PfQx37YgCzwiKb.KjNyWgaHb9cbcoQgdIVFlYg7B77UdFm', // secret 21 | 'remember_token' => str_random(10), 22 | ]; 23 | }); 24 | -------------------------------------------------------------------------------- /database/migrations/2018_06_25_150148_password_resets.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 | -------------------------------------------------------------------------------- /database/migrations/2018_03_05_170530_create_cities_table.php: -------------------------------------------------------------------------------- 1 | increments('id'); 18 | $table->string('city_name'); 19 | $table->integer('zip_code'); 20 | $table->timestamps(); 21 | }); 22 | } 23 | 24 | /** 25 | * Reverse the migrations. 26 | * 27 | * @return void 28 | */ 29 | public function down() 30 | { 31 | Schema::dropIfExists('cities'); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /resources/lang/en/passwords.php: -------------------------------------------------------------------------------- 1 | 'Passwords must be at least six characters and match the confirmation.', 17 | 'reset' => 'Your password has been reset!', 18 | 'sent' => 'We have e-mailed your password reset link!', 19 | 'token' => 'This password reset token is invalid.', 20 | 'user' => "We can't find a user with that e-mail address.", 21 | 22 | ]; 23 | -------------------------------------------------------------------------------- /public/web.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /app/Http/Controllers/ResetPassword/ForgotPasswordController.php: -------------------------------------------------------------------------------- 1 | middleware('guest'); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /app/Console/Kernel.php: -------------------------------------------------------------------------------- 1 | command('inspire') 28 | // ->hourly(); 29 | } 30 | 31 | /** 32 | * Register the commands for the application. 33 | * 34 | * @return void 35 | */ 36 | protected function commands() 37 | { 38 | $this->load(__DIR__.'/Commands'); 39 | 40 | require base_path('routes/console.php'); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /database/migrations/2018_03_13_165135_create_admins_table.php: -------------------------------------------------------------------------------- 1 | increments('id'); 18 | $table->string('username'); 19 | $table->string('first_name'); 20 | $table->string('last_name'); 21 | $table->string('email')->unique(); 22 | $table->string('password'); 23 | $table->string('picture'); 24 | $table->rememberToken(); 25 | $table->softDeletes(); 26 | $table->timestamps(); 27 | }); 28 | } 29 | 30 | /** 31 | * Reverse the migrations. 32 | * 33 | * @return void 34 | */ 35 | public function down() 36 | { 37 | Schema::dropIfExists('admins'); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 SagarMaheshwary 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /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' => realpath(storage_path('framework/views')), 32 | 33 | ]; 34 | -------------------------------------------------------------------------------- /config/services.php: -------------------------------------------------------------------------------- 1 | [ 18 | 'domain' => env('MAILGUN_DOMAIN'), 19 | 'secret' => env('MAILGUN_SECRET'), 20 | ], 21 | 22 | 'ses' => [ 23 | 'key' => env('SES_KEY'), 24 | 'secret' => env('SES_SECRET'), 25 | 'region' => 'us-east-1', 26 | ], 27 | 28 | 'sparkpost' => [ 29 | 'secret' => env('SPARKPOST_SECRET'), 30 | ], 31 | 32 | 'stripe' => [ 33 | 'model' => App\User::class, 34 | 'key' => env('STRIPE_KEY'), 35 | 'secret' => env('STRIPE_SECRET'), 36 | ], 37 | 38 | ]; 39 | -------------------------------------------------------------------------------- /phpunit.xml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 13 | ./tests/Feature 14 | 15 | 16 | 17 | ./tests/Unit 18 | 19 | 20 | 21 | 22 | ./app 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /app/Http/Controllers/ResetPassword/ResetPasswordController.php: -------------------------------------------------------------------------------- 1 | middleware('guest'); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /resources/views/layouts/auth.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | Employee Management System 11 | 12 | 13 |
14 | @yield('content') 15 |
16 | 23 | 24 | 25 | 26 | 27 | @include('inc.message') 28 | 29 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "private": true, 3 | "scripts": { 4 | "dev": "npm run development", 5 | "development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js", 6 | "watch": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js", 7 | "watch-poll": "npm run watch -- --watch-poll", 8 | "hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js", 9 | "prod": "npm run production", 10 | "production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --no-progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js" 11 | }, 12 | "devDependencies": { 13 | "axios": "^0.17", 14 | "bootstrap": "^4.0.0", 15 | "popper.js": "^1.12", 16 | "cross-env": "^5.1", 17 | "jquery": "^3.2", 18 | "laravel-mix": "^2.0", 19 | "lodash": "^4.17.4", 20 | "vue": "^2.5.7" 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /resources/views/layouts/app.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | Employee Management System 11 | 12 | 13 | 17 | 18 | @include('inc.navbar') 19 |
20 | @yield('content') 21 |
22 | 23 | @include('inc.footer') 24 | 25 | 26 | 27 | 28 | @include('inc.message') 29 | 30 | -------------------------------------------------------------------------------- /resources/views/inc/navbar.blade.php: -------------------------------------------------------------------------------- 1 |
2 | 21 |
22 | 23 | 28 | @include('inc.sidenav') -------------------------------------------------------------------------------- /app/Exceptions/Handler.php: -------------------------------------------------------------------------------- 1 | 5 |
6 |
7 | 29 |
30 |
31 | 32 | @endsection 33 | -------------------------------------------------------------------------------- /resources/views/sys_mg/inc/search.blade.php: -------------------------------------------------------------------------------- 1 | {{-- Search --}} 2 |
3 | 30 |
31 | {{-- Search END --}} -------------------------------------------------------------------------------- /resources/views/sys_mg/states/create.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | @section('content') 3 |
4 |
5 |
6 |

Add State

7 |
8 |
9 |
10 |
11 | grid_on 12 | 13 | 14 | {{$errors->first('state_name')}} 15 |
16 | @csrf() 17 | 18 |
19 |
20 |
21 |
22 | Go Back 23 |
24 |
25 |
26 |
27 | @endsection -------------------------------------------------------------------------------- /resources/views/sys_mg/salaries/create.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | @section('content') 3 |
4 |
5 |
6 |

Add Salary

7 |
8 |
9 |
10 |
11 | attach_money 12 | 13 | 14 | {{$errors->first('s_amount')}} 15 |
16 | @csrf() 17 | 18 |
19 |
20 |
21 |
22 | Go Back 23 |
24 |
25 |
26 |
27 | @endsection -------------------------------------------------------------------------------- /app/Http/Controllers/AuthController.php: -------------------------------------------------------------------------------- 1 | validate($request,[ 26 | 'email' => 'required|email|min:6', 27 | 'password' => 'required|min:7', 28 | ]); 29 | 30 | //try to login the user 31 | if (Auth::attempt(['email' => $request->input('email'), 'password' => $request->input('password')], $request->has('remember'))) { 32 | // Authentication passed... 33 | return redirect()->route('dashboard'); 34 | }else{ 35 | // Authentication failed... 36 | //redirect the user with the old input 37 | return redirect('/')->withInput()->with('info','Invalid Credentials!'); 38 | } 39 | } 40 | 41 | public function logout() 42 | { 43 | //logout the user 44 | Auth::logout(); 45 | 46 | return redirect('/')->with('info','Successfully logged out!'); 47 | } 48 | 49 | /** 50 | * show details of authenticated user 51 | */ 52 | public function show(){ 53 | return view('auth.show'); 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /resources/views/sys_mg/countries/create.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | @section('content') 3 |
4 |
5 |
6 |

Add country

7 |
8 |
9 |
10 |
11 | location_on 12 | 13 | 14 | {{$errors->first('country_name')}} 15 |
16 | @csrf() 17 | 18 |
19 |
20 |
21 |
22 | Go Back 23 |
24 |
25 |
26 |
27 | @endsection -------------------------------------------------------------------------------- /resources/views/sys_mg/divisions/create.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | @section('content') 3 |
4 |
5 |
6 |

Add Division

7 |
8 |
9 |
10 |
11 | business 12 | 13 | 14 | {{$errors->first('division_name')}} 15 |
16 | @csrf() 17 | 18 |
19 |
20 |
21 |
22 | Go Back 23 |
24 |
25 |
26 |
27 | @endsection -------------------------------------------------------------------------------- /app/Http/Controllers/ReportsController.php: -------------------------------------------------------------------------------- 1 | middleware('auth'); 19 | } 20 | 21 | /** 22 | * Show the Report view 23 | * 24 | * @return \Illuminate\Http\Response 25 | */ 26 | public function index() 27 | { 28 | $employees = Employee::Paginate(4); 29 | return view('reports.index')->with('employees',$employees); 30 | } 31 | 32 | /** 33 | * Generate PDF 34 | * 35 | * @return \Illuminate\Http\Response 36 | */ 37 | public function makeReport(Request $request){ 38 | $this->validate($request,[ 39 | 'date_from' => 'required', 40 | 'date_to' => 'required' 41 | ]); 42 | 43 | $date_from = $request->input('date_from'); 44 | $date_to = $request->input('date_to'); 45 | 46 | /** 47 | * employees between two dates 48 | */ 49 | $employees = Employee::whereBetween('join_date' ,[new Carbon($date_from),new Carbon($date_to)])->get(); 50 | 51 | //generate pdf 52 | $pdf = PDF::loadView('reports.report',['employees' => $employees])->setPaper('a4', 'landscape'); 53 | return $pdf->stream('Employee_hired_report_from_'.$date_from.'_to_'.$date_to.'.pdf'); 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /resources/views/sys_mg/states/edit.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | @section('content') 3 |
4 |
5 |
6 |

Update State

7 |
8 |
9 |
10 |
11 | grid_on 12 | 13 | 14 | {{$errors->first('state_name')}} 15 |
16 | @method('PUT') 17 | @csrf() 18 | 19 |
20 |
21 |
22 | Go Back 23 |
24 |
25 |
26 |
27 |
28 | @endsection -------------------------------------------------------------------------------- /resources/views/sys_mg/salaries/edit.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | @section('content') 3 |
4 |
5 |
6 |

Update Salary

7 |
8 |
9 |
10 |
11 | attach_money 12 | 13 | 14 | {{$errors->first('s_amount')}} 15 |
16 | @method('PUT') 17 | @csrf() 18 | 19 |
20 |
21 |
22 | Go Back 23 |
24 |
25 |
26 |
27 |
28 | @endsection -------------------------------------------------------------------------------- /resources/views/sys_mg/countries/edit.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | @section('content') 3 |
4 |
5 |
6 |

Update Country

7 |
8 |
9 |
10 |
11 | location_on 12 | 13 | 14 | {{$errors->first('country_name')}} 15 |
16 | @method('PUT') 17 | @csrf() 18 | 19 |
20 |
21 |
22 | Go Back 23 |
24 |
25 |
26 |
27 |
28 | @endsection -------------------------------------------------------------------------------- /resources/views/vendor/pagination/default.blade.php: -------------------------------------------------------------------------------- 1 | @if ($paginator->hasPages()) 2 | 36 | @endif 37 | -------------------------------------------------------------------------------- /resources/views/sys_mg/divisions/edit.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | @section('content') 3 |
4 |
5 |
6 |

Update Division

7 |
8 |
9 |
10 |
11 | business 12 | 13 | 14 | {{$errors->first('division_name')}} 15 |
16 | @method('PUT') 17 | @csrf() 18 | 19 |
20 |
21 |
22 | Go Back 23 |
24 |
25 |
26 |
27 |
28 | @endsection -------------------------------------------------------------------------------- /resources/views/auth/show.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | @section('content') 3 |
4 |
5 |

My Details

6 |
7 |
8 | 9 |
10 |
11 | 12 |
13 |
14 |
15 |
{{Auth::user()->first_name}} {{Auth::user()->last_name}}
16 |

person{{Auth::user()->username}}

17 |

email{{Auth::user()->email}}

18 |
19 | 20 |
21 | 22 |
23 |
24 | Update 25 |
26 |
27 |
28 | @endsection -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "laravel/laravel", 3 | "description": "The Laravel Framework.", 4 | "keywords": ["framework", "laravel"], 5 | "license": "MIT", 6 | "type": "project", 7 | "require": { 8 | "php": ">=7.1.3", 9 | "barryvdh/laravel-dompdf": "^0.8.2", 10 | "fideloper/proxy": "~4.0", 11 | "laravel/framework": "5.6.*", 12 | "laravel/tinker": "~1.0" 13 | }, 14 | "require-dev": { 15 | "filp/whoops": "~2.0", 16 | "nunomaduro/collision": "~1.1", 17 | "fzaninotto/faker": "~1.4", 18 | "mockery/mockery": "~1.0", 19 | "phpunit/phpunit": "~7.0", 20 | "symfony/thanks": "^1.0" 21 | }, 22 | "autoload": { 23 | "classmap": [ 24 | "database/seeds", 25 | "database/factories" 26 | ], 27 | "psr-4": { 28 | "App\\": "app/" 29 | } 30 | }, 31 | "autoload-dev": { 32 | "psr-4": { 33 | "Tests\\": "tests/" 34 | } 35 | }, 36 | "extra": { 37 | "laravel": { 38 | "dont-discover": [ 39 | ] 40 | } 41 | }, 42 | "scripts": { 43 | "post-root-package-install": [ 44 | "@php -r \"file_exists('.env') || copy('.env.example', '.env');\"" 45 | ], 46 | "post-create-project-cmd": [ 47 | "@php artisan key:generate" 48 | ], 49 | "post-autoload-dump": [ 50 | "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump", 51 | "@php artisan package:discover" 52 | ] 53 | }, 54 | "config": { 55 | "preferred-install": "dist", 56 | "sort-packages": true, 57 | "optimize-autoloader": true 58 | }, 59 | "minimum-stability": "dev", 60 | "prefer-stable": true 61 | } 62 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | 'encrypted' => true, 41 | ], 42 | ], 43 | 44 | 'redis' => [ 45 | 'driver' => 'redis', 46 | 'connection' => 'default', 47 | ], 48 | 49 | 'log' => [ 50 | 'driver' => 'log', 51 | ], 52 | 53 | 'null' => [ 54 | 'driver' => 'null', 55 | ], 56 | 57 | ], 58 | 59 | ]; 60 | -------------------------------------------------------------------------------- /app/Providers/RouteServiceProvider.php: -------------------------------------------------------------------------------- 1 | mapApiRoutes(); 39 | 40 | $this->mapWebRoutes(); 41 | 42 | // 43 | } 44 | 45 | /** 46 | * Define the "web" routes for the application. 47 | * 48 | * These routes all receive session state, CSRF protection, etc. 49 | * 50 | * @return void 51 | */ 52 | protected function mapWebRoutes() 53 | { 54 | Route::middleware('web') 55 | ->namespace($this->namespace) 56 | ->group(base_path('routes/web.php')); 57 | } 58 | 59 | /** 60 | * Define the "api" routes for the application. 61 | * 62 | * These routes are typically stateless. 63 | * 64 | * @return void 65 | */ 66 | protected function mapApiRoutes() 67 | { 68 | Route::prefix('api') 69 | ->middleware('api') 70 | ->namespace($this->namespace) 71 | ->group(base_path('routes/api.php')); 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /app/Employee.php: -------------------------------------------------------------------------------- 1 | belongsTo('App\Department','dept_id'); 35 | } 36 | 37 | /** 38 | * @return object 39 | */ 40 | public function empDivision(){ 41 | return $this->belongsTo('App\Division','division_id'); 42 | } 43 | 44 | /** 45 | * @return object 46 | */ 47 | public function empCountry(){ 48 | return $this->belongsTo('App\Country','country_id'); 49 | } 50 | 51 | /** 52 | * @return object 53 | */ 54 | public function empState(){ 55 | return $this->belongsTo('App\State','state_id'); 56 | } 57 | 58 | /** 59 | * @return object 60 | */ 61 | public function empCity(){ 62 | return $this->belongsTo('App\City','city_id'); 63 | } 64 | 65 | /** 66 | * @return object 67 | */ 68 | public function empSalary(){ 69 | return $this->belongsTo('App\Salary','salary_id'); 70 | } 71 | 72 | /** 73 | * @return object 74 | */ 75 | public function empGender(){ 76 | return $this->belongsTo('App\Gender','gender_id'); 77 | } 78 | } 79 | -------------------------------------------------------------------------------- /readme.md: -------------------------------------------------------------------------------- 1 | ## Employee Management System 2 | This Application is using Laravel, Materialize-css version 1.0.0 alpha-4 , material icons. 3 | 4 | NOTE: checkout my [blog-api](https://github.com/SagarMaheshwary/learning) that I recently created using latest laravel features. 5 | 6 | ### Running this web application 7 | 8 | - make sure you already have xampp or wamp installed if you are on windows machine, mamp for mac , and lamp for linux. 9 | 10 | - clone this repository to your local machine or just download the zip. 11 | 12 | - install [Composer](https://getcomposer.org/download) first, then run this command in your command-line (you should be inside your project directory). 13 | ```bash 14 | composer install 15 | ``` 16 | 17 | - rename .env.example to .env and add your database and mail driver credentials. 18 | 19 | - generate application key. 20 | 21 | ```bash 22 | php artisan key:generate 23 | ``` 24 | 25 | - create database tables. 26 | 27 | ```bash 28 | php artisan migrate 29 | ``` 30 | 31 | - create a default admin and genders. 32 | 33 | ```bash 34 | php artisan db:seed 35 | ``` 36 | 37 | - clear config (only if you make changes to .env file and restart the server if you are using laravel dev server). 38 | 39 | ```bash 40 | php artisan config:clear 41 | ``` 42 | 43 | - Link the storage folder for images. 44 | 45 | ```bash 46 | php artisan storage:link 47 | ``` 48 | 49 | - Start the development server. 50 | 51 | ```bash 52 | php artisan serve 53 | ``` 54 | > In Laravel, all the requests are directed to index.php in public directory so, please use a Virtual Host instead of opening it from http://localhost/your-laravel-project/public (It doesn't work that way). 55 | 56 | #### Admin Credentials 57 | - Email :- admin@admin.com 58 | - Password :- Password 59 | 60 | #### ScreenShot 61 | 62 | ![screen shot](https://github.com/SagarMaheshwary/Employee/blob/master/screenshot/ems.PNG) 63 | 64 | Please star the project if you like it. Thank you! 65 | -------------------------------------------------------------------------------- /resources/views/sys_mg/departments/edit.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | @section('content') 3 |
4 |
5 |
6 |

Update Department

7 |
8 |
9 |
10 | 15 |
16 | account_balance 17 | 18 | 19 | {{$errors->first('dept_name')}} 20 |
21 | @method('PUT') 22 | @csrf() 23 | 24 |
25 |
26 |
27 | Go Back 28 |
29 |
30 |
31 |
32 |
33 | @endsection -------------------------------------------------------------------------------- /public/index.php: -------------------------------------------------------------------------------- 1 | 8 | */ 9 | 10 | define('LARAVEL_START', microtime(true)); 11 | 12 | /* 13 | |-------------------------------------------------------------------------- 14 | | Register The Auto Loader 15 | |-------------------------------------------------------------------------- 16 | | 17 | | Composer provides a convenient, automatically generated class loader for 18 | | our application. We just need to utilize it! We'll simply require it 19 | | into the script here so that we don't have to worry about manual 20 | | loading any of our classes later on. It feels great to relax. 21 | | 22 | */ 23 | 24 | require __DIR__.'/../vendor/autoload.php'; 25 | 26 | /* 27 | |-------------------------------------------------------------------------- 28 | | Turn On The Lights 29 | |-------------------------------------------------------------------------- 30 | | 31 | | We need to illuminate PHP development, so let us turn on the lights. 32 | | This bootstraps the framework and gets it ready for use, then it 33 | | will load up this application so that we can run it and send 34 | | the responses back to the browser and delight our users. 35 | | 36 | */ 37 | 38 | $app = require_once __DIR__.'/../bootstrap/app.php'; 39 | 40 | /* 41 | |-------------------------------------------------------------------------- 42 | | Run The Application 43 | |-------------------------------------------------------------------------- 44 | | 45 | | Once we have the application, we can handle the incoming request 46 | | through the kernel, and send the associated response back to 47 | | the client's browser allowing them to enjoy the creative 48 | | and wonderful application we have prepared for them. 49 | | 50 | */ 51 | 52 | $kernel = $app->make(Illuminate\Contracts\Http\Kernel::class); 53 | 54 | $response = $kernel->handle( 55 | $request = Illuminate\Http\Request::capture() 56 | ); 57 | 58 | $response->send(); 59 | 60 | $kernel->terminate($request, $response); 61 | -------------------------------------------------------------------------------- /resources/views/sys_mg/cities/create.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | @section('content') 3 |
4 |
5 |
6 |

Add City

7 |
8 |
9 |
10 |
11 | location_city 12 | 13 | 14 | {{$errors->first('city_name')}} 15 |
16 |
17 | vpn_lock 18 | 19 | 20 | {{$errors->first('zip_code')}} 21 |
22 | @csrf() 23 | 24 |
25 |
26 |
27 |
28 | Go Back 29 |
30 |
31 |
32 |
33 | @endsection -------------------------------------------------------------------------------- /resources/views/sys_mg/cities/edit.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | @section('content') 3 |
4 |
5 |
6 |

Update City

7 |
8 |
9 |
10 |
11 | location_city 12 | 13 | 14 | {{$errors->first('city_name')}} 15 |
16 |
17 | vpn_lock 18 | 19 | 20 | {{$errors->first('zip_code')}} 21 |
22 | @method('PUT') 23 | @csrf() 24 | 25 |
26 |
27 |
28 | Go Back 29 |
30 |
31 |
32 |
33 |
34 | @endsection -------------------------------------------------------------------------------- /config/logging.php: -------------------------------------------------------------------------------- 1 | env('LOG_CHANNEL', 'stack'), 17 | 18 | /* 19 | |-------------------------------------------------------------------------- 20 | | Log Channels 21 | |-------------------------------------------------------------------------- 22 | | 23 | | Here you may configure the log channels for your application. Out of 24 | | the box, Laravel uses the Monolog PHP logging library. This gives 25 | | you a variety of powerful log handlers / formatters to utilize. 26 | | 27 | | Available Drivers: "single", "daily", "slack", "syslog", 28 | | "errorlog", "custom", "stack" 29 | | 30 | */ 31 | 32 | 'channels' => [ 33 | 'stack' => [ 34 | 'driver' => 'stack', 35 | 'channels' => ['single'], 36 | ], 37 | 38 | 'single' => [ 39 | 'driver' => 'single', 40 | 'path' => storage_path('logs/laravel.log'), 41 | 'level' => 'debug', 42 | ], 43 | 44 | 'daily' => [ 45 | 'driver' => 'daily', 46 | 'path' => storage_path('logs/laravel.log'), 47 | 'level' => 'debug', 48 | 'days' => 7, 49 | ], 50 | 51 | 'slack' => [ 52 | 'driver' => 'slack', 53 | 'url' => env('LOG_SLACK_WEBHOOK_URL'), 54 | 'username' => 'Laravel Log', 55 | 'emoji' => ':boom:', 56 | 'level' => 'critical', 57 | ], 58 | 59 | 'syslog' => [ 60 | 'driver' => 'syslog', 61 | 'level' => 'debug', 62 | ], 63 | 64 | 'errorlog' => [ 65 | 'driver' => 'errorlog', 66 | 'level' => 'debug', 67 | ], 68 | ], 69 | 70 | ]; 71 | -------------------------------------------------------------------------------- /resources/views/auth/index.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.auth') 2 | @section('content') 3 |
4 |
5 | 39 |
40 |
41 | @endsection -------------------------------------------------------------------------------- /app/Http/Kernel.php: -------------------------------------------------------------------------------- 1 | [ 31 | \App\Http\Middleware\EncryptCookies::class, 32 | \Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class, 33 | \Illuminate\Session\Middleware\StartSession::class, 34 | // \Illuminate\Session\Middleware\AuthenticateSession::class, 35 | \Illuminate\View\Middleware\ShareErrorsFromSession::class, 36 | \App\Http\Middleware\VerifyCsrfToken::class, 37 | \Illuminate\Routing\Middleware\SubstituteBindings::class, 38 | ], 39 | 40 | 'api' => [ 41 | 'throttle:60,1', 42 | 'bindings', 43 | ], 44 | ]; 45 | 46 | /** 47 | * The application's route middleware. 48 | * 49 | * These middleware may be assigned to groups or used individually. 50 | * 51 | * @var array 52 | */ 53 | protected $routeMiddleware = [ 54 | 'auth' => \Illuminate\Auth\Middleware\Authenticate::class, 55 | 'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class, 56 | 'bindings' => \Illuminate\Routing\Middleware\SubstituteBindings::class, 57 | 'cache.headers' => \Illuminate\Http\Middleware\SetCacheHeaders::class, 58 | 'can' => \Illuminate\Auth\Middleware\Authorize::class, 59 | 'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class, 60 | 'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class, 61 | ]; 62 | } 63 | -------------------------------------------------------------------------------- /config/filesystems.php: -------------------------------------------------------------------------------- 1 | env('FILESYSTEM_DRIVER', 'local'), 17 | 18 | /* 19 | |-------------------------------------------------------------------------- 20 | | Default Cloud Filesystem Disk 21 | |-------------------------------------------------------------------------- 22 | | 23 | | Many applications store files both locally and in the cloud. For this 24 | | reason, you may specify a default "cloud" driver here. This driver 25 | | will be bound as the Cloud disk implementation in the container. 26 | | 27 | */ 28 | 29 | 'cloud' => env('FILESYSTEM_CLOUD', 's3'), 30 | 31 | /* 32 | |-------------------------------------------------------------------------- 33 | | Filesystem Disks 34 | |-------------------------------------------------------------------------- 35 | | 36 | | Here you may configure as many filesystem "disks" as you wish, and you 37 | | may even configure multiple disks of the same driver. Defaults have 38 | | been setup for each driver as an example of the required options. 39 | | 40 | | Supported Drivers: "local", "ftp", "s3", "rackspace" 41 | | 42 | */ 43 | 44 | 'disks' => [ 45 | 46 | 'local' => [ 47 | 'driver' => 'local', 48 | 'root' => storage_path('app'), 49 | ], 50 | 51 | 'public' => [ 52 | 'driver' => 'local', 53 | 'root' => storage_path('app/public'), 54 | 'url' => env('APP_URL').'/storage', 55 | 'visibility' => 'public', 56 | ], 57 | 58 | 's3' => [ 59 | 'driver' => 's3', 60 | 'key' => env('AWS_ACCESS_KEY_ID'), 61 | 'secret' => env('AWS_SECRET_ACCESS_KEY'), 62 | 'region' => env('AWS_DEFAULT_REGION'), 63 | 'bucket' => env('AWS_BUCKET'), 64 | 'url' => env('AWS_URL'), 65 | ], 66 | 67 | ], 68 | 69 | ]; 70 | -------------------------------------------------------------------------------- /resources/views/auth/passwords/reset.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.auth') 2 | 3 | @section('content') 4 |
5 |
6 |
7 | 43 |
44 |
45 |
46 | @endsection 47 | -------------------------------------------------------------------------------- /database/migrations/2018_03_08_133020_create_employees_table.php: -------------------------------------------------------------------------------- 1 | increments('id'); 18 | $table->string('first_name'); 19 | $table->string('last_name'); 20 | $table->string('email'); 21 | $table->string('phone'); 22 | $table->mediumText('address'); 23 | 24 | /** 25 | * if we need add a foreign key constraint then 26 | * the column should be unsigned integer 27 | */ 28 | $table->integer('gender_id')->unsigned(); 29 | $table->date('join_date'); 30 | $table->date('birth_date'); 31 | $table->integer('dept_id')->unsigned(); 32 | $table->integer('country_id')->unsigned(); 33 | $table->integer('state_id')->unsigned(); 34 | $table->integer('city_id')->unsigned(); 35 | $table->integer('division_id')->unsigned(); 36 | $table->integer('salary_id')->unsigned(); 37 | $table->integer('age'); 38 | $table->string('picture'); 39 | 40 | /** 41 | * Add foreign key constraints to these columns 42 | */ 43 | $table->foreign('dept_id')->references('id')->on('departments'); 44 | $table->foreign('country_id')->references('id')->on('countries'); 45 | $table->foreign('state_id')->references('id')->on('states'); 46 | $table->foreign('city_id')->references('id')->on('cities'); 47 | $table->foreign('division_id')->references('id')->on('divisions'); 48 | $table->foreign('salary_id')->references('id')->on('salaries'); 49 | $table->foreign('gender_id')->references('id')->on('genders'); 50 | $table->timestamps(); 51 | 52 | /** 53 | * Add Soft Deletes. 54 | * 55 | * it just mean that if we are deleting a row, then 56 | * it will not delete row. it will just add a value to 57 | * deleted_at column. 58 | */ 59 | $table->softDeletes(); 60 | 61 | }); 62 | } 63 | 64 | /** 65 | * Reverse the migrations. 66 | * 67 | * @return void 68 | */ 69 | public function down() 70 | { 71 | Schema::dropIfExists('employees'); 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /config/queue.php: -------------------------------------------------------------------------------- 1 | env('QUEUE_DRIVER', 'sync'), 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Queue Connections 23 | |-------------------------------------------------------------------------- 24 | | 25 | | Here you may configure the connection information for each server that 26 | | is used by your application. A default configuration has been added 27 | | for each back-end shipped with Laravel. You are free to add more. 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 | ], 43 | 44 | 'beanstalkd' => [ 45 | 'driver' => 'beanstalkd', 46 | 'host' => 'localhost', 47 | 'queue' => 'default', 48 | 'retry_after' => 90, 49 | ], 50 | 51 | 'sqs' => [ 52 | 'driver' => 'sqs', 53 | 'key' => env('SQS_KEY', 'your-public-key'), 54 | 'secret' => env('SQS_SECRET', 'your-secret-key'), 55 | 'prefix' => env('SQS_PREFIX', 'https://sqs.us-east-1.amazonaws.com/your-account-id'), 56 | 'queue' => env('SQS_QUEUE', 'your-queue-name'), 57 | 'region' => env('SQS_REGION', 'us-east-1'), 58 | ], 59 | 60 | 'redis' => [ 61 | 'driver' => 'redis', 62 | 'connection' => 'default', 63 | 'queue' => 'default', 64 | 'retry_after' => 90, 65 | 'block_for' => null, 66 | ], 67 | 68 | ], 69 | 70 | /* 71 | |-------------------------------------------------------------------------- 72 | | Failed Queue Jobs 73 | |-------------------------------------------------------------------------- 74 | | 75 | | These options configure the behavior of failed queue job logging so you 76 | | can control which database and table are used to store the jobs that 77 | | have failed. You may change them to any database / table you wish. 78 | | 79 | */ 80 | 81 | 'failed' => [ 82 | 'database' => env('DB_CONNECTION', 'mysql'), 83 | 'table' => 'failed_jobs', 84 | ], 85 | 86 | ]; 87 | -------------------------------------------------------------------------------- /resources/views/sys_mg/departments/create.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | @section('content') 3 |
4 |
5 |
6 |

Add Department

7 |
8 |
9 | 19 |
20 |
21 | account_balance 22 | 28 | 29 | 30 | 36 | {{$errors->first('dept_name')}} 37 |
38 | @csrf() 39 | 40 |
41 |
42 |
43 |
44 | Go Back 45 |
46 |
47 |
48 |
49 | @endsection -------------------------------------------------------------------------------- /app/Http/Controllers/DashboardController.php: -------------------------------------------------------------------------------- 1 | middleware('auth'); 24 | } 25 | 26 | /** 27 | * Show Dashboard View 28 | * 29 | * @return View 30 | */ 31 | public function index(){ 32 | //get Current date and time 33 | $date_current = Carbon::now()->toDateTimeString(); 34 | //get date and time of previous month 35 | /** 36 | * subMonths() means it will subtract the month with 37 | * the given argument. 38 | */ 39 | $prev_date1 = $this->getPrevDate(1); 40 | $prev_date2 = $this->getPrevDate(2); 41 | $prev_date3 = $this->getPrevDate(3); 42 | $prev_date4 = $this->getPrevDate(4); 43 | 44 | /** 45 | * get count of employee between two given dates. 46 | */ 47 | $emp_count_1 = Employee::whereBetween('join_date',[$prev_date1,$date_current])->count(); 48 | $emp_count_2 = Employee::whereBetween('join_date',[$prev_date2,$prev_date1])->count(); 49 | $emp_count_3 = Employee::whereBetween('join_date',[$prev_date3,$prev_date2])->count(); 50 | $emp_count_4 = Employee::whereBetween('join_date',[$prev_date4,$prev_date3])->count(); 51 | 52 | $t_admins = Admin::all()->count(); 53 | $t_employees = Employee::all()->count(); 54 | $t_countries = Country::all()->count(); 55 | $t_states = State::all()->count(); 56 | $t_cities = City::all()->count(); 57 | $t_departments = Department::all()->count(); 58 | $t_divisions = Division::all()->count(); 59 | $t_salaries = Salary::all()->count(); 60 | 61 | 62 | return view('dashboard.index') 63 | ->with([ 64 | 'emp_count_1' => $emp_count_1, 65 | 'emp_count_2' => $emp_count_2, 66 | 'emp_count_3' => $emp_count_3, 67 | 'emp_count_4' => $emp_count_4, 68 | 't_employees' => $t_employees, 69 | 't_countries' => $t_countries, 70 | 't_cities' => $t_cities, 71 | 't_states' => $t_states, 72 | 't_salaries' => $t_salaries, 73 | 't_divisions' => $t_divisions, 74 | 't_departments' => $t_departments, 75 | 't_admins' => $t_admins 76 | ]); 77 | } 78 | 79 | /** 80 | * get the sub month of the given integer 81 | */ 82 | private function getPrevDate($num){ 83 | return Carbon::now()->subMonths($num)->toDateTimeString(); 84 | } 85 | } 86 | -------------------------------------------------------------------------------- /public/css/app.css: -------------------------------------------------------------------------------- 1 | .gradient-bg{ 2 | /*background:linear-gradient(to left,#0097A7 30%,#00ACC1,#00BCD4) !important;*/ 3 | background:linear-gradient(to left,#00838F,#0097A7,#00BCD4); 4 | } 5 | 6 | /* this is for sideNav that shows on large screens */ 7 | header, main, footer { 8 | padding-left: 300px; 9 | } 10 | 11 | .pl-0{ 12 | padding-left:0; 13 | } 14 | 15 | .txt-md{ 16 | font-size: 1em; 17 | } 18 | 19 | .txt-sm{ 20 | font-size: .85em; 21 | } 22 | .mt{ 23 | margin-top:65px !important; 24 | } 25 | 26 | .pl-15{ 27 | padding-left:15px !important; 28 | } 29 | 30 | .pt-5{ 31 | padding-top:5px; 32 | } 33 | 34 | .p5{ 35 | padding:5px; 36 | } 37 | 38 | .d-none{ 39 | display: none; 40 | } 41 | .mt-15{ 42 | margin-top:15px !important; 43 | } 44 | 45 | .mt-10{ 46 | margin-top:10px !important; 47 | } 48 | 49 | .mt-5{ 50 | margin-top:5px; 51 | } 52 | 53 | .mb-0{ 54 | margin-bottom:0; 55 | } 56 | 57 | .mt-0{ 58 | margin-top:0; 59 | } 60 | 61 | .mt-20{ 62 | margin-top:20px !important; 63 | } 64 | 65 | .mx-20{ 66 | margin-left:20px; 67 | margin-right:20px; 68 | } 69 | 70 | .bold{ 71 | font-weight: bold; 72 | } 73 | 74 | .no-padding{ 75 | padding:0; 76 | margin:0; 77 | } 78 | 79 | .emp-img{ 80 | height:35px; 81 | width:35px; 82 | } 83 | 84 | .emp-img-big{ 85 | height: 180px; 86 | width:100%; 87 | } 88 | 89 | .card-title{ 90 | font-weight: normal !important; 91 | } 92 | 93 | .card-mt-15{ 94 | /* vh is viewport.*/ 95 | margin-top:15vh; 96 | } 97 | 98 | .material-icons{ 99 | color:#616161; 100 | } 101 | 102 | body { 103 | display: flex; 104 | min-height: 100vh; 105 | flex-direction: column; 106 | } 107 | 108 | main { 109 | flex: 1 0 auto; 110 | } 111 | 112 | .no-margin{ 113 | margin:0 !important; 114 | } 115 | 116 | /* styles for login form */ 117 | .card-login{ 118 | margin-top:15%; 119 | } 120 | .card-title-login h5{ 121 | margin:0 !important; 122 | padding-bottom:8px !important; 123 | padding-top:8px !important; 124 | } 125 | 126 | .container-fluid{ 127 | margin:0 auto; 128 | width:90%; 129 | } 130 | 131 | .main-login{ 132 | width: 100%; 133 | min-height: 90vh; 134 | background:linear-gradient(180deg,#00838F,#00BCD4); 135 | background-size: cover; 136 | } 137 | /* login end */ 138 | 139 | .background{ 140 | background:linear-gradient(180deg,#00838F,#00BCD4); 141 | } 142 | @media only screen and (max-width : 992px) { 143 | header, main, footer { 144 | padding-left: 0; 145 | } 146 | .mx-med-20{ 147 | margin-left:10%; 148 | margin-right:10%; 149 | } 150 | } 151 | @media only screen and (max-width : 600px) { 152 | .card-login{ 153 | margin-top: 25%; 154 | } 155 | h4{ 156 | font-size:24px; 157 | } 158 | } 159 | 160 | @media only screen and (min-width : 1200px) { 161 | .ml-14{ 162 | margin-left:14% !important; 163 | } 164 | } -------------------------------------------------------------------------------- /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 | */ 30 | 31 | 'stores' => [ 32 | 33 | 'apc' => [ 34 | 'driver' => 'apc', 35 | ], 36 | 37 | 'array' => [ 38 | 'driver' => 'array', 39 | ], 40 | 41 | 'database' => [ 42 | 'driver' => 'database', 43 | 'table' => 'cache', 44 | 'connection' => null, 45 | ], 46 | 47 | 'file' => [ 48 | 'driver' => 'file', 49 | 'path' => storage_path('framework/cache/data'), 50 | ], 51 | 52 | 'memcached' => [ 53 | 'driver' => 'memcached', 54 | 'persistent_id' => env('MEMCACHED_PERSISTENT_ID'), 55 | 'sasl' => [ 56 | env('MEMCACHED_USERNAME'), 57 | env('MEMCACHED_PASSWORD'), 58 | ], 59 | 'options' => [ 60 | // Memcached::OPT_CONNECT_TIMEOUT => 2000, 61 | ], 62 | 'servers' => [ 63 | [ 64 | 'host' => env('MEMCACHED_HOST', '127.0.0.1'), 65 | 'port' => env('MEMCACHED_PORT', 11211), 66 | 'weight' => 100, 67 | ], 68 | ], 69 | ], 70 | 71 | 'redis' => [ 72 | 'driver' => 'redis', 73 | 'connection' => 'default', 74 | ], 75 | 76 | ], 77 | 78 | /* 79 | |-------------------------------------------------------------------------- 80 | | Cache Key Prefix 81 | |-------------------------------------------------------------------------- 82 | | 83 | | When utilizing a RAM based store such as APC or Memcached, there might 84 | | be other applications utilizing the same cache. So, we'll specify a 85 | | value to get prefixed to all our keys so we can avoid collisions. 86 | | 87 | */ 88 | 89 | 'prefix' => env( 90 | 'CACHE_PREFIX', 91 | str_slug(env('APP_NAME', 'laravel'), '_').'_cache' 92 | ), 93 | 94 | ]; 95 | -------------------------------------------------------------------------------- /resources/views/reports/report.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Employee Management System 9 | 23 | 24 | 25 |

Employee Hired Report

26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | @foreach($employees as $employee) 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | @endforeach 66 | 67 |
IDNameEmailPhoneZip CodeCountrySalaryCitySalaryDepartmentDivisionageaddressJoin DateBirth Date
{{$employee->id}}{{$employee->first_name}} {{$employee->last_name}}{{$employee->email}}{{$employee->phone}}{{$employee->empCity->zip_code}}{{$employee->empCountry->country_name}}{{$employee->empState->state_name}}{{$employee->empCity->city_name}}{{$employee->empSalary->s_amount}}{{$employee->empDepartment->dept_name}}{{$employee->empDivision->division_name}}{{$employee->age}}{{$employee->address}}{{$employee->join_date}}{{$employee->birth_date}}
68 | 69 | -------------------------------------------------------------------------------- /routes/web.php: -------------------------------------------------------------------------------- 1 | name('dashboard'); 25 | 26 | /** 27 | * Departments Route(s) 28 | * 29 | */ 30 | Route::resource('/departments','DepartmentsController'); 31 | Route::post('/departments/search','DepartmentsController@search')->name('departments.search'); 32 | 33 | /** 34 | * Countries Route(s) 35 | */ 36 | Route::resource('/countries','CountriesController'); 37 | Route::post('/countries/search','CountriesController@search')->name('countries.search'); 38 | 39 | /** 40 | * Cities Route(s) 41 | */ 42 | Route::resource('/cities','CitiesController'); 43 | Route::post('/cities/search','CitiesController@search')->name('cities.search'); 44 | 45 | /** 46 | * Salaries Route(s) 47 | */ 48 | Route::resource('/salaries','SalariesController'); 49 | Route::post('/salaries/search','SalariesController@search')->name('salaries.search'); 50 | 51 | /** 52 | * Divisions Route(s) 53 | */ 54 | Route::resource('/divisions','DivisionsController'); 55 | Route::post('/divisions/search','DivisionsController@search')->name('divisions.search'); 56 | 57 | /** 58 | * States Route(s) 59 | */ 60 | Route::resource('/states','StatesController'); 61 | Route::post('/states/search','StatesController@search')->name('states.search'); 62 | 63 | /** 64 | * States Route(s) 65 | */ 66 | Route::resource('/employees','EmployeesController'); 67 | 68 | Route::post('employees/search','EmployeesController@search')->name('employees.search'); 69 | 70 | /** 71 | * Admins Route(s) 72 | */ 73 | Route::resource('/admins','AdminsController'); 74 | Route::post('/admins','AdminsController@search')->name('admins.search'); 75 | Route::post('/admins/create','AdminsController@store')->name('admins.store'); 76 | 77 | /** 78 | * Auth Route(s) 79 | */ 80 | 81 | //show the login view 82 | Route::get('/','AuthController@index')->name('login')->middleware('guest'); 83 | 84 | //Authenticate a user 85 | Route::post('/','AuthController@authenticate')->name('auth.authenticate'); 86 | 87 | //logout the user 88 | Route::get('/logout','AuthController@logout')->name('auth.logout')->middleware('auth'); 89 | 90 | //show user details 91 | Route::get('/admin','AuthController@show')->name('auth.show')->middleware('auth'); 92 | 93 | Route::get('/password/reset','ResetPassword\ForgotPasswordController@showLinkRequestForm')->name('password.request'); 94 | Route::post('/password/email','ResetPassword\ForgotPasswordController@sendResetLinkEmail')->name('password.email'); 95 | Route::get('/password/reset/{token}','ResetPassword\ResetPasswordController@showResetForm')->name('password.reset'); 96 | Route::post('/password/reset','ResetPassword\ResetPasswordController@reset'); 97 | 98 | /** 99 | * Reports Route(s) 100 | */ 101 | 102 | //Show Reports View 103 | Route::get('/reports','ReportsController@index')->name('reports.index'); 104 | 105 | //Generate PDF 106 | Route::post('/reports/pdf','ReportsController@makeReport')->name('reports.make'); -------------------------------------------------------------------------------- /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 | ], 48 | ], 49 | 50 | /* 51 | |-------------------------------------------------------------------------- 52 | | User Providers 53 | |-------------------------------------------------------------------------- 54 | | 55 | | All authentication drivers have a user provider. This defines how the 56 | | users are actually retrieved out of your database or other storage 57 | | mechanisms used by this application to persist your user's data. 58 | | 59 | | If you have multiple user tables or models you may configure multiple 60 | | sources which represent each model / table. These sources may then 61 | | be assigned to any extra authentication guards you have defined. 62 | | 63 | | Supported: "database", "eloquent" 64 | | 65 | */ 66 | 67 | 'providers' => [ 68 | 'users' => [ 69 | 'driver' => 'eloquent', 70 | 'model' => App\Admin::class, 71 | ], 72 | 73 | // 'users' => [ 74 | // 'driver' => 'database', 75 | // 'table' => 'users', 76 | // ], 77 | ], 78 | 79 | /* 80 | |-------------------------------------------------------------------------- 81 | | Resetting Passwords 82 | |-------------------------------------------------------------------------- 83 | | 84 | | You may specify multiple password reset configurations if you have more 85 | | than one user table or model in the application and you want to have 86 | | separate password reset settings based on the specific user types. 87 | | 88 | | The expire time is the number of minutes that the reset token should be 89 | | considered valid. This security feature keeps tokens short-lived so 90 | | they have less time to be guessed. You may change this as needed. 91 | | 92 | */ 93 | 94 | 'passwords' => [ 95 | 'users' => [ 96 | 'provider' => 'users', 97 | 'table' => 'password_resets', 98 | 'expire' => 60, 99 | ], 100 | ], 101 | 102 | ]; 103 | -------------------------------------------------------------------------------- /storage/fonts/dompdf_font_family_cache.php: -------------------------------------------------------------------------------- 1 | array( 3 | 'normal' => $rootDir . '\lib\fonts\Helvetica', 4 | 'bold' => $rootDir . '\lib\fonts\Helvetica-Bold', 5 | 'italic' => $rootDir . '\lib\fonts\Helvetica-Oblique', 6 | 'bold_italic' => $rootDir . '\lib\fonts\Helvetica-BoldOblique', 7 | ), 8 | 'times' => array( 9 | 'normal' => $rootDir . '\lib\fonts\Times-Roman', 10 | 'bold' => $rootDir . '\lib\fonts\Times-Bold', 11 | 'italic' => $rootDir . '\lib\fonts\Times-Italic', 12 | 'bold_italic' => $rootDir . '\lib\fonts\Times-BoldItalic', 13 | ), 14 | 'times-roman' => array( 15 | 'normal' => $rootDir . '\lib\fonts\Times-Roman', 16 | 'bold' => $rootDir . '\lib\fonts\Times-Bold', 17 | 'italic' => $rootDir . '\lib\fonts\Times-Italic', 18 | 'bold_italic' => $rootDir . '\lib\fonts\Times-BoldItalic', 19 | ), 20 | 'courier' => array( 21 | 'normal' => $rootDir . '\lib\fonts\Courier', 22 | 'bold' => $rootDir . '\lib\fonts\Courier-Bold', 23 | 'italic' => $rootDir . '\lib\fonts\Courier-Oblique', 24 | 'bold_italic' => $rootDir . '\lib\fonts\Courier-BoldOblique', 25 | ), 26 | 'helvetica' => array( 27 | 'normal' => $rootDir . '\lib\fonts\Helvetica', 28 | 'bold' => $rootDir . '\lib\fonts\Helvetica-Bold', 29 | 'italic' => $rootDir . '\lib\fonts\Helvetica-Oblique', 30 | 'bold_italic' => $rootDir . '\lib\fonts\Helvetica-BoldOblique', 31 | ), 32 | 'zapfdingbats' => array( 33 | 'normal' => $rootDir . '\lib\fonts\ZapfDingbats', 34 | 'bold' => $rootDir . '\lib\fonts\ZapfDingbats', 35 | 'italic' => $rootDir . '\lib\fonts\ZapfDingbats', 36 | 'bold_italic' => $rootDir . '\lib\fonts\ZapfDingbats', 37 | ), 38 | 'symbol' => array( 39 | 'normal' => $rootDir . '\lib\fonts\Symbol', 40 | 'bold' => $rootDir . '\lib\fonts\Symbol', 41 | 'italic' => $rootDir . '\lib\fonts\Symbol', 42 | 'bold_italic' => $rootDir . '\lib\fonts\Symbol', 43 | ), 44 | 'serif' => array( 45 | 'normal' => $rootDir . '\lib\fonts\Times-Roman', 46 | 'bold' => $rootDir . '\lib\fonts\Times-Bold', 47 | 'italic' => $rootDir . '\lib\fonts\Times-Italic', 48 | 'bold_italic' => $rootDir . '\lib\fonts\Times-BoldItalic', 49 | ), 50 | 'monospace' => array( 51 | 'normal' => $rootDir . '\lib\fonts\Courier', 52 | 'bold' => $rootDir . '\lib\fonts\Courier-Bold', 53 | 'italic' => $rootDir . '\lib\fonts\Courier-Oblique', 54 | 'bold_italic' => $rootDir . '\lib\fonts\Courier-BoldOblique', 55 | ), 56 | 'fixed' => array( 57 | 'normal' => $rootDir . '\lib\fonts\Courier', 58 | 'bold' => $rootDir . '\lib\fonts\Courier-Bold', 59 | 'italic' => $rootDir . '\lib\fonts\Courier-Oblique', 60 | 'bold_italic' => $rootDir . '\lib\fonts\Courier-BoldOblique', 61 | ), 62 | 'dejavu sans' => array( 63 | 'bold' => $rootDir . '\lib\fonts\DejaVuSans-Bold', 64 | 'bold_italic' => $rootDir . '\lib\fonts\DejaVuSans-BoldOblique', 65 | 'italic' => $rootDir . '\lib\fonts\DejaVuSans-Oblique', 66 | 'normal' => $rootDir . '\lib\fonts\DejaVuSans', 67 | ), 68 | 'dejavu sans mono' => array( 69 | 'bold' => $rootDir . '\lib\fonts\DejaVuSansMono-Bold', 70 | 'bold_italic' => $rootDir . '\lib\fonts\DejaVuSansMono-BoldOblique', 71 | 'italic' => $rootDir . '\lib\fonts\DejaVuSansMono-Oblique', 72 | 'normal' => $rootDir . '\lib\fonts\DejaVuSansMono', 73 | ), 74 | 'dejavu serif' => array( 75 | 'bold' => $rootDir . '\lib\fonts\DejaVuSerif-Bold', 76 | 'bold_italic' => $rootDir . '\lib\fonts\DejaVuSerif-BoldItalic', 77 | 'italic' => $rootDir . '\lib\fonts\DejaVuSerif-Italic', 78 | 'normal' => $rootDir . '\lib\fonts\DejaVuSerif', 79 | ), 80 | 'material icons' => array( 81 | 'normal' => $fontDir . '\2df510fd6a1e9aab9c540b2adb81277a', 82 | ), 83 | ) ?> -------------------------------------------------------------------------------- /resources/views/inc/sidenav.blade.php: -------------------------------------------------------------------------------- 1 | 77 | -------------------------------------------------------------------------------- /app/Http/Controllers/SalariesController.php: -------------------------------------------------------------------------------- 1 | middleware('auth'); 15 | } 16 | 17 | /** 18 | * Display a listing of the resource. 19 | * 20 | * @return \Illuminate\Http\Response 21 | */ 22 | public function index() 23 | { 24 | /** 25 | * read all the comments from DepartmentsController 26 | * they are all the same. 27 | */ 28 | 29 | $salaries = Salary::paginate(5); 30 | return view('sys_mg.salaries.index')->with('salaries',$salaries); 31 | } 32 | 33 | /** 34 | * Show the form for creating a new resource. 35 | * 36 | * @return \Illuminate\Http\Response 37 | */ 38 | public function create() 39 | { 40 | return view('sys_mg.salaries.create'); 41 | } 42 | 43 | /** 44 | * Store a newly created resource in storage. 45 | * 46 | * @param \Illuminate\Http\Request $request 47 | * @return \Illuminate\Http\Response 48 | */ 49 | public function store(Request $request) 50 | { 51 | $this->validate($request,[ 52 | 's_amount' => 'required|min:3' 53 | ]); 54 | $salary = new Salary(); 55 | $salary->s_amount = $request->input('s_amount'); 56 | $salary->save(); 57 | return redirect('/salaries')->with('info','Salary has been created!'); 58 | } 59 | 60 | /** 61 | * Display the specified resource. 62 | * 63 | * @param int $id 64 | * @return \Illuminate\Http\Response 65 | */ 66 | public function show($id) 67 | { 68 | // 69 | } 70 | 71 | /** 72 | * Show the form for editing the specified resource. 73 | * 74 | * @param int $id 75 | * @return \Illuminate\Http\Response 76 | */ 77 | public function edit($id) 78 | { 79 | $salary = Salary::find($id); 80 | return view('sys_mg.salaries.edit')->with('salary',$salary); 81 | } 82 | 83 | /** 84 | * Update the specified resource in storage. 85 | * 86 | * @param \Illuminate\Http\Request $request 87 | * @param int $id 88 | * @return \Illuminate\Http\Response 89 | */ 90 | public function update(Request $request, $id) 91 | { 92 | $this->validate($request,[ 93 | 's_amount' => 'required|min:3' 94 | ]); 95 | $salary = Salary::find($id); 96 | $salary->s_amount = $request->input('s_amount'); 97 | $salary->save(); 98 | return redirect('/salaries')->with('info','Selected salary has been updated!'); 99 | } 100 | 101 | /** 102 | * Remove the specified resource from storage. 103 | * 104 | * @param int $id 105 | * @return \Illuminate\Http\Response 106 | */ 107 | public function destroy($id) 108 | { 109 | $salary = Salary::find($id); 110 | $salary->delete(); 111 | return redirect('/salaries')->with('info','Selected salary has been deleted!'); 112 | } 113 | 114 | /** 115 | * Search For Resource(s) 116 | * 117 | * @param \Illuminate\Http\Request $request 118 | * @return \Illuminate\Http\Response 119 | */ 120 | public function search(Request $request){ 121 | $this->validate($request,[ 122 | 'search' => 'required' 123 | ]); 124 | $str = $request->input('search'); 125 | $salaries = Salary::where( 's_amount' , 'LIKE' , '%'.$str.'%' ) 126 | ->orderBy('s_amount','asc') 127 | ->paginate(4); 128 | return view('sys_mg.salaries.index')->with([ 'salaries' => $salaries ,'search' => true ]); 129 | } 130 | } 131 | -------------------------------------------------------------------------------- /app/Http/Controllers/StatesController.php: -------------------------------------------------------------------------------- 1 | middleware('auth'); 15 | } 16 | 17 | /** 18 | * Display a listing of the resource. 19 | * 20 | * @return \Illuminate\Http\Response 21 | */ 22 | public function index() 23 | { 24 | /** 25 | * read all the comments from DepartmentsController 26 | * they are all the same. 27 | */ 28 | 29 | $states = State::Paginate(5); 30 | return view('sys_mg.states.index')->with('states',$states); 31 | } 32 | 33 | /** 34 | * Show the form for creating a new resource. 35 | * 36 | * @return \Illuminate\Http\Response 37 | */ 38 | public function create() 39 | { 40 | return view('sys_mg.states.create'); 41 | } 42 | 43 | /** 44 | * Store a newly created resource in storage. 45 | * 46 | * @param \Illuminate\Http\Request $request 47 | * @return \Illuminate\Http\Response 48 | */ 49 | public function store(Request $request) 50 | { 51 | $this->validate($request,[ 52 | 'state_name' => 'required|unique:states|min:3' 53 | ]); 54 | $state = new State(); 55 | $state->state_name = $request->input('state_name'); 56 | $state->save(); 57 | return redirect('/states')->with('info','New State has been created!'); 58 | } 59 | 60 | /** 61 | * Display the specified resource. 62 | * 63 | * @param int $id 64 | * @return \Illuminate\Http\Response 65 | */ 66 | public function show($id) 67 | { 68 | // 69 | } 70 | 71 | /** 72 | * Show the form for editing the specified resource. 73 | * 74 | * @param int $id 75 | * @return \Illuminate\Http\Response 76 | */ 77 | public function edit($id) 78 | { 79 | $state = State::find($id); 80 | return view('sys_mg.states.edit')->with('state',$state); 81 | } 82 | 83 | /** 84 | * Update the specified resource in storage. 85 | * 86 | * @param \Illuminate\Http\Request $request 87 | * @param int $id 88 | * @return \Illuminate\Http\Response 89 | */ 90 | public function update(Request $request, $id) 91 | { 92 | $this->validate($request,[ 93 | 'state_name' => 'required|min:3|unique:states' 94 | ]); 95 | 96 | $state = State::find($id); 97 | $state->state_name = $request->input('state_name'); 98 | $state->save(); 99 | return redirect('/states')->with('info','Selected State has been Updated!'); 100 | } 101 | 102 | /** 103 | * Remove the specified resource from storage. 104 | * 105 | * @param int $id 106 | * @return \Illuminate\Http\Response 107 | */ 108 | public function destroy($id) 109 | { 110 | $state = State::find($id); 111 | $state->delete(); 112 | return redirect('/states')->with('info','Selected State has been deleted!'); 113 | } 114 | 115 | /** 116 | * Search For Resource(s) 117 | * 118 | * @param \Illuminate\Http\Request $request 119 | * @return \Illuminate\Http\Response 120 | */ 121 | public function search(Request $request){ 122 | $this->validate($request,[ 123 | 'search' => 'required' 124 | ]); 125 | $str = $request->input('search'); 126 | $states = State::where( 'state_name' , 'LIKE' , '%'.$str.'%' ) 127 | ->orderBy('state_name','asc') 128 | ->paginate(4); 129 | return view('sys_mg.states.index')->with([ 'states' => $states ,'search' => true ]); 130 | } 131 | } 132 | -------------------------------------------------------------------------------- /app/Http/Controllers/CountriesController.php: -------------------------------------------------------------------------------- 1 | middleware('auth'); 15 | } 16 | 17 | /** 18 | * Display a listing of the resource. 19 | * 20 | * @return \Illuminate\Http\Response 21 | */ 22 | public function index() 23 | { 24 | /** 25 | * read all the comments from DepartmentsController 26 | * they are all the same. 27 | */ 28 | 29 | $countries = Country::Paginate(5); 30 | return view('sys_mg.countries.index')->with('countries',$countries); 31 | } 32 | 33 | /** 34 | * Show the form for creating a new resource. 35 | * 36 | * @return \Illuminate\Http\Response 37 | */ 38 | public function create() 39 | { 40 | return view('sys_mg.countries.create'); 41 | } 42 | 43 | /** 44 | * Store a newly created resource in storage. 45 | * 46 | * @param \Illuminate\Http\Request $request 47 | * @return \Illuminate\Http\Response 48 | */ 49 | public function store(Request $request) 50 | { 51 | $this->validate($request,[ 52 | 'country_name' => 'required|unique:countries|min:3' 53 | ]); 54 | $country = new Country(); 55 | $country->country_name = $request->input('country_name'); 56 | $country->save(); 57 | return redirect('/countries')->with('info','New Country has been created!'); 58 | } 59 | 60 | /** 61 | * Display the specified resource. 62 | * 63 | * @param int $id 64 | * @return \Illuminate\Http\Response 65 | */ 66 | public function show($id) 67 | { 68 | // 69 | } 70 | 71 | /** 72 | * Show the form for editing the specified resource. 73 | * 74 | * @param int $id 75 | * @return \Illuminate\Http\Response 76 | */ 77 | public function edit($id) 78 | { 79 | $country = Country::find($id); 80 | return view('sys_mg.countries.edit')->with('country',$country); 81 | } 82 | 83 | /** 84 | * Update the specified resource in storage. 85 | * 86 | * @param \Illuminate\Http\Request $request 87 | * @param int $id 88 | * @return \Illuminate\Http\Response 89 | */ 90 | public function update(Request $request, $id) 91 | { 92 | $this->validate($request,[ 93 | 'country_name' => 'required|min:3|unique:countries' 94 | ]); 95 | 96 | $country = Country::find($id); 97 | $country->country_name = $request->input('country_name'); 98 | $country->save(); 99 | return redirect('/countries')->with('info','Selected Country has been Updated!'); 100 | } 101 | 102 | /** 103 | * Remove the specified resource from storage. 104 | * 105 | * @param int $id 106 | * @return \Illuminate\Http\Response 107 | */ 108 | public function destroy($id) 109 | { 110 | $country = Country::find($id); 111 | $country->delete(); 112 | return redirect('/countries')->with('info','Selected Country has been deleted!'); 113 | } 114 | 115 | /** 116 | * Search For Resource(s) 117 | * 118 | * @param \Illuminate\Http\Request $request 119 | * @return \Illuminate\Http\Response 120 | */ 121 | public function search(Request $request){ 122 | $this->validate($request,[ 123 | 'search' => 'required' 124 | ]); 125 | $str = $request->input('search'); 126 | $countries = Country::where( 'country_name' , 'LIKE' , '%'.$str.'%' ) 127 | ->orderBy('country_name','asc') 128 | ->paginate(4); 129 | return view('sys_mg.countries.index')->with([ 'countries' => $countries ,'search' => true ]); 130 | } 131 | } 132 | -------------------------------------------------------------------------------- /app/Http/Controllers/DivisionsController.php: -------------------------------------------------------------------------------- 1 | middleware('auth'); 15 | } 16 | 17 | /** 18 | * Display a listing of the resource. 19 | * 20 | * @return \Illuminate\Http\Response 21 | */ 22 | public function index() 23 | { 24 | /** 25 | * read all the comments from DepartmentsController 26 | * they are all the same. 27 | */ 28 | 29 | $divisions = Division::paginate(5); 30 | return view('sys_mg.divisions.index')->with('divisions',$divisions); 31 | } 32 | 33 | /** 34 | * Show the form for creating a new resource. 35 | * 36 | * @return \Illuminate\Http\Response 37 | */ 38 | public function create() 39 | { 40 | return view('sys_mg.divisions.create'); 41 | } 42 | 43 | /** 44 | * Store a newly created resource in storage. 45 | * 46 | * @param \Illuminate\Http\Request $request 47 | * @return \Illuminate\Http\Response 48 | */ 49 | public function store(Request $request) 50 | { 51 | $this->validate($request,[ 52 | 'division_name' => 'required|min:3|unique:divisions' 53 | ]); 54 | $division = new Division(); 55 | $division->division_name = $request->input('division_name'); 56 | $division->save(); 57 | return redirect('/divisions')->with('info','New Division has been created!'); 58 | } 59 | 60 | /** 61 | * Display the specified resource. 62 | * 63 | * @param int $id 64 | * @return \Illuminate\Http\Response 65 | */ 66 | public function show($id) 67 | { 68 | // 69 | } 70 | 71 | /** 72 | * Show the form for editing the specified resource. 73 | * 74 | * @param int $id 75 | * @return \Illuminate\Http\Response 76 | */ 77 | public function edit($id) 78 | { 79 | $division = Division::find($id); 80 | return view('sys_mg.divisions.edit')->with('division',$division); 81 | } 82 | 83 | /** 84 | * Update the specified resource in storage. 85 | * 86 | * @param \Illuminate\Http\Request $request 87 | * @param int $id 88 | * @return \Illuminate\Http\Response 89 | */ 90 | public function update(Request $request, $id) 91 | { 92 | $this->validate($request,[ 93 | 'division_name' => 'required|min:3|unique:divisions' 94 | ]); 95 | $division = Division::find($id); 96 | $division->division_name = $request->input('division_name'); 97 | $division->save(); 98 | return redirect('/divisions')->with('info','Selected Division has been updated!'); 99 | } 100 | 101 | /** 102 | * Remove the specified resource from storage. 103 | * 104 | * @param int $id 105 | * @return \Illuminate\Http\Response 106 | */ 107 | public function destroy($id) 108 | { 109 | $division = Division::find($id); 110 | $division->delete(); 111 | return redirect('/divisions')->with('info','Selected Division has been deleted!'); 112 | } 113 | 114 | /** 115 | * Search For Resource(s) 116 | * 117 | * @param \Illuminate\Http\Request $request 118 | * @return \Illuminate\Http\Response 119 | */ 120 | public function search(Request $request){ 121 | $this->validate($request,[ 122 | 'search' => 'required' 123 | ]); 124 | $str = $request->input('search'); 125 | $divisions = Division::where( 'division_name' , 'LIKE' , '%'.$str.'%' ) 126 | ->orderBy('division_name','asc') 127 | ->paginate(4); 128 | return view('sys_mg.divisions.index')->with([ 'divisions' => $divisions ,'search' => true ]); 129 | } 130 | } 131 | -------------------------------------------------------------------------------- /app/Http/Controllers/CitiesController.php: -------------------------------------------------------------------------------- 1 | middleware('auth'); 15 | } 16 | 17 | /** 18 | * Display a listing of the resource. 19 | * 20 | * @return \Illuminate\Http\Response 21 | */ 22 | public function index() 23 | { 24 | /** 25 | * read all the comments from DepartmentsController 26 | * they are all the same. 27 | */ 28 | 29 | $cities = City::Paginate(5); 30 | return view('sys_mg.cities.index')->with('cities',$cities); 31 | } 32 | 33 | /** 34 | * Show the form for creating a new resource. 35 | * 36 | * @return \Illuminate\Http\Response 37 | */ 38 | public function create() 39 | { 40 | return view('sys_mg.cities.create'); 41 | } 42 | 43 | /** 44 | * Store a newly created resource in storage. 45 | * 46 | * @param \Illuminate\Http\Request $request 47 | * @return \Illuminate\Http\Response 48 | */ 49 | public function store(Request $request) 50 | { 51 | $this->validate($request,[ 52 | 'city_name' => 'required|min:2', 53 | 'zip_code' => 'required|min:4|unique:cities' 54 | ]); 55 | $city = new City(); 56 | $city->city_name = $request->input('city_name'); 57 | $city->zip_code = $request->input('zip_code'); 58 | $city->save(); 59 | return redirect('/cities')->with('info','City has been created!'); 60 | } 61 | 62 | /** 63 | * Display the specified resource. 64 | * 65 | * @param int $id 66 | * @return \Illuminate\Http\Response 67 | */ 68 | public function show($id) 69 | { 70 | 71 | } 72 | 73 | /** 74 | * Show the form for editing the specified resource. 75 | * 76 | * @param int $id 77 | * @return \Illuminate\Http\Response 78 | */ 79 | public function edit($id) 80 | { 81 | $city = City::find($id); 82 | return view('sys_mg.cities.edit')->with('city',$city); 83 | } 84 | 85 | /** 86 | * Update the specified resource in storage. 87 | * 88 | * @param \Illuminate\Http\Request $request 89 | * @param int $id 90 | * @return \Illuminate\Http\Response 91 | */ 92 | public function update(Request $request, $id) 93 | { 94 | $this->validate($request,[ 95 | 'city_name' => 'required|min:2', 96 | 'zip_code' => 'required|min:4|unique:cities,zip_code,'.$id 97 | ]); 98 | $city = City::find($id); 99 | $city->city_name = $request->input('city_name'); 100 | $city->zip_code = $request->input('zip_code'); 101 | $city->save(); 102 | return redirect('/cities')->with('info','Selected city has been updated!'); 103 | 104 | } 105 | 106 | /** 107 | * Remove the specified resource from storage. 108 | * 109 | * @param int $id 110 | * @return \Illuminate\Http\Response 111 | */ 112 | public function destroy($id) 113 | { 114 | $city = City::find($id); 115 | $city->delete(); 116 | return redirect('/cities')->with('info','Selected city has been deleted!'); 117 | } 118 | 119 | /** 120 | * Search For Resource(s) 121 | * 122 | * @param \Illuminate\Http\Request $request 123 | * @return \Illuminate\Http\Response 124 | */ 125 | public function search(Request $request){ 126 | $this->validate($request,[ 127 | 'search' => 'required' 128 | ]); 129 | $str = $request->input('search'); 130 | $cities = City::where( 'city_name' , 'LIKE' , '%'.$str.'%' ) 131 | ->orderBy('city_name','asc') 132 | ->paginate(4); 133 | return view('sys_mg.cities.index')->with([ 'cities' => $cities ,'search' => true ]); 134 | } 135 | } 136 | -------------------------------------------------------------------------------- /resources/views/reports/index.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | @section('content') 3 | 4 |
5 |

Generate Report

6 |
7 |
8 |
9 | @csrf() 10 |
11 | date_range 12 | 13 | 14 | {{$errors->has('date_from') ? $errors->first('date_from') : ''}} 15 |
16 |
17 | date_range 18 | 19 | 20 | {{$errors->has('date_to') ? $errors->first('date_to') : ''}} 21 |
22 |
23 | 24 |
25 |
26 |
27 | 28 | 29 |
30 |
31 |
32 |
Employee List
33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | @if($employees->count()) 49 | @foreach($employees as $employee) 50 | 51 | 52 | 55 | 56 | 57 | 58 | 59 | 62 | 63 | @endforeach 64 | @else 65 | {{-- if there are no employees then show this message --}} 66 | 67 | 68 | 69 | @endif 70 | 71 |
IDImageNameDepartmentDivisionJoin DateOptions
{{$employee->id}} 53 | 54 | {{$employee->first_name}} {{$employee->last_name}}{{$employee->empDepartment->dept_name}}{{$employee->empDivision->division_name}}{{$employee->join_date}} 60 | list 61 |
No Employees Found!
72 | 73 |
74 | 75 |
76 | {{$employees->links('vendor.pagination.default',['paginator' => $employees])}} 77 |
78 |
79 |
80 | 81 |
82 | 83 | @endsection -------------------------------------------------------------------------------- /resources/views/employee/show.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | @section('content') 3 |
4 |
5 |

Employee Details

6 |
7 |
8 | 9 |
10 |
11 | 12 |
13 |
14 |
15 |
{{$employee->first_name}} {{$employee->last_name}}
16 |

location_city{{$employee->address}}

17 |

location_on{{$employee->empCity->city_name}}, {{$employee->empState->state_name}}, {{$employee->empCountry->country_name}}

18 |

person_outline{{$employee->empGender->gender_name}}

19 |
20 | 21 |
22 | 23 |
24 |
25 |
26 |
27 |

Age :{{$employee->age}}

28 |
29 |
30 |

Phone :{{$employee->phone}}

31 |
32 |
33 |

Zip Code :{{$employee->empCity->zip_code}}

34 |
35 |
36 |

Department :{{$employee->empDepartment->dept_name}}

37 |
38 |
39 |

Division :{{$employee->empDivision->division_name}}

40 |
41 |
42 |

Email :{{$employee->email}}

43 |
44 |
45 |

Salary :${{$employee->empSalary->s_amount}}/-

46 |
47 |
48 |

Joined Date :{{$employee->join_date}}

49 |
50 |
51 |

Date of Birth :{{$employee->birth_date}}

52 |
53 |
54 |
55 | @method('DELETE') 56 | @csrf() 57 | 58 |
59 | Update 60 |
61 |
62 |
63 | @endsection -------------------------------------------------------------------------------- /resources/views/sys_mg/states/index.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | @section('content') 3 |
4 |

State Management

5 | 6 | {{-- Include the searh component with with title and route --}} 7 | @component('sys_mg.inc.search',['title' => 'State' , 'route' => 'states.search']) 8 | @endcomponent 9 | 10 |
11 | 12 |
13 |
14 |
15 |
States List
16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | @if($states->count()) 30 | @foreach($states as $state) 31 | 32 | 33 | 34 | 35 | 36 | 50 | 51 | @endforeach 52 | @else 53 | 54 | 55 | 56 | 57 | @endif 58 | @if(isset($search)) 59 | 60 | 63 | 64 | @endif 65 | 66 |
IDState NameCreated atUpdated atOptions
{{$state->id}}{{$state->state_name}}{{$state->created_at}}{{$state->updated_at}} 37 |
38 |
39 | mode_edit 40 |
41 |
42 |
43 | @method('DELETE') 44 | @csrf() 45 | 46 |
47 |
48 |
49 |
No States have been found yet!
61 | Show All 62 |
67 | 68 |
69 | 70 |
71 | {{$states->links('vendor.pagination.default',['paginator' => $states])}} 72 |
73 |
74 |
75 | 76 |
77 |
78 | 79 | 80 | 81 |
82 | 83 | add 84 | 85 |
86 | @endsection -------------------------------------------------------------------------------- /resources/views/sys_mg/countries/index.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | @section('content') 3 |
4 |

Country Management

5 | 6 | {{-- Include the searh component with with title and route --}} 7 | @component('sys_mg.inc.search',['title' => 'Country' , 'route' => 'countries.search']) 8 | @endcomponent 9 | 10 |
11 | 12 |
13 |
14 |
15 |
Countries List
16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | @if($countries->count()) 30 | @foreach($countries as $country) 31 | 32 | 33 | 34 | 35 | 36 | 50 | 51 | @endforeach 52 | @else 53 | 54 | 55 | 56 | 57 | @endif 58 | @if(isset($search)) 59 | 60 | 63 | 64 | @endif 65 | 66 |
IDCountry NameCreated atUpdated atOptions
{{$country->id}}{{$country->country_name}}{{$country->created_at}}{{$country->updated_at}} 37 |
38 |
39 | mode_edit 40 |
41 |
42 |
43 | @method('DELETE') 44 | @csrf() 45 | 46 |
47 |
48 |
49 |
No Countries Found!
61 | Show All 62 |
67 | 68 |
69 | 70 |
71 | {{$countries->links('vendor.pagination.default',['paginator' => $countries])}} 72 |
73 |
74 |
75 | 76 |
77 |
78 | 79 | 80 | 81 |
82 | 83 | add 84 | 85 |
86 | @endsection -------------------------------------------------------------------------------- /resources/views/sys_mg/salaries/index.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | @section('content') 3 |
4 |

Salary Management

5 | 6 | {{-- Include the searh component with with title and route --}} 7 | @component('sys_mg.inc.search',['title' => 'Salaries' , 'route' => 'salaries.search' , 'type' => 'number']) 8 | @endcomponent 9 | 10 |
11 | 12 |
13 |
14 |
15 |
Salaries List
16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | @if($salaries->count()) 30 | @foreach($salaries as $salary) 31 | 32 | 33 | 34 | 35 | 36 | 50 | 51 | @endforeach 52 | @else 53 | 54 | 55 | 56 | 57 | @endif 58 | @if(isset($search)) 59 | 60 | 63 | 64 | @endif 65 | 66 |
IDSalary AmountCreated atUpdated atOptions
{{$salary->id}}{{$salary->s_amount}}{{$salary->created_at}}{{$salary->updated_at}} 37 |
38 |
39 | mode_edit 40 |
41 |
42 |
43 | @method('DELETE') 44 | @csrf() 45 | 46 |
47 |
48 |
49 |
No Salaries found yet!
61 | Show All 62 |
67 | 68 |
69 | 70 |
71 | {{$salaries->links('vendor.pagination.default',['paginator' => $salaries])}} 72 |
73 |
74 |
75 | 76 |
77 |
78 | 79 | 80 | 81 |
82 | 83 | add 84 | 85 |
86 | @endsection -------------------------------------------------------------------------------- /resources/views/sys_mg/divisions/index.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | @section('content') 3 |
4 |

Division Management

5 | 6 | {{-- Include the searh component with with title and route --}} 7 | @component('sys_mg.inc.search',['title' => 'Division' , 'route' => 'divisions.search']) 8 | @endcomponent 9 | 10 |
11 | 12 |
13 |
14 |
15 |
Division List
16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | @if($divisions->count()) 30 | @foreach($divisions as $division) 31 | 32 | 33 | 34 | 35 | 36 | 50 | 51 | @endforeach 52 | @else 53 | 54 | 55 | 56 | 57 | @endif 58 | @if(isset($search)) 59 | 60 | 63 | 64 | @endif 65 | 66 |
IDDivision NameCreated atUpdated atOptions
{{$division->id}}{{$division->division_name}}{{$division->created_at}}{{$division->updated_at}} 37 |
38 |
39 | mode_edit 40 |
41 |
42 |
43 | @method('DELETE') 44 | @csrf() 45 | 46 |
47 |
48 |
49 |
No Divisions found yet!
61 | Show All 62 |
67 | 68 |
69 | 70 |
71 | {{$divisions->links('vendor.pagination.default',['paginator' => $divisions])}} 72 |
73 |
74 |
75 | 76 |
77 |
78 | 79 | 80 | 81 |
82 | 83 | add 84 | 85 |
86 | @endsection -------------------------------------------------------------------------------- /config/mail.php: -------------------------------------------------------------------------------- 1 | env('MAIL_DRIVER', 'smtp'), 20 | 21 | /* 22 | |-------------------------------------------------------------------------- 23 | | SMTP Host Address 24 | |-------------------------------------------------------------------------- 25 | | 26 | | Here you may provide the host address of the SMTP server used by your 27 | | applications. A default option is provided that is compatible with 28 | | the Mailgun mail service which will provide reliable deliveries. 29 | | 30 | */ 31 | 32 | 'host' => env('MAIL_HOST', 'smtp.mailgun.org'), 33 | 34 | /* 35 | |-------------------------------------------------------------------------- 36 | | SMTP Host Port 37 | |-------------------------------------------------------------------------- 38 | | 39 | | This is the SMTP port used by your application to deliver e-mails to 40 | | users of the application. Like the host we have set this value to 41 | | stay compatible with the Mailgun e-mail application by default. 42 | | 43 | */ 44 | 45 | 'port' => env('MAIL_PORT', 587), 46 | 47 | /* 48 | |-------------------------------------------------------------------------- 49 | | Global "From" Address 50 | |-------------------------------------------------------------------------- 51 | | 52 | | You may wish for all e-mails sent by your application to be sent from 53 | | the same address. Here, you may specify a name and address that is 54 | | used globally for all e-mails that are sent by your application. 55 | | 56 | */ 57 | 58 | 'from' => [ 59 | 'address' => env('MAIL_FROM_ADDRESS', 'hello@example.com'), 60 | 'name' => env('MAIL_FROM_NAME', 'Example'), 61 | ], 62 | 63 | /* 64 | |-------------------------------------------------------------------------- 65 | | E-Mail Encryption Protocol 66 | |-------------------------------------------------------------------------- 67 | | 68 | | Here you may specify the encryption protocol that should be used when 69 | | the application send e-mail messages. A sensible default using the 70 | | transport layer security protocol should provide great security. 71 | | 72 | */ 73 | 74 | 'encryption' => env('MAIL_ENCRYPTION', 'tls'), 75 | 76 | /* 77 | |-------------------------------------------------------------------------- 78 | | SMTP Server Username 79 | |-------------------------------------------------------------------------- 80 | | 81 | | If your SMTP server requires a username for authentication, you should 82 | | set it here. This will get used to authenticate with your server on 83 | | connection. You may also set the "password" value below this one. 84 | | 85 | */ 86 | 87 | 'username' => env('MAIL_USERNAME'), 88 | 89 | 'password' => env('MAIL_PASSWORD'), 90 | 91 | /* 92 | |-------------------------------------------------------------------------- 93 | | Sendmail System Path 94 | |-------------------------------------------------------------------------- 95 | | 96 | | When using the "sendmail" driver to send e-mails, we will need to know 97 | | the path to where Sendmail lives on this server. A default path has 98 | | been provided here, which will work well on most of your systems. 99 | | 100 | */ 101 | 102 | 'sendmail' => '/usr/sbin/sendmail -bs', 103 | 104 | /* 105 | |-------------------------------------------------------------------------- 106 | | Markdown Mail Settings 107 | |-------------------------------------------------------------------------- 108 | | 109 | | If you are using Markdown based email rendering, you may configure your 110 | | theme and component paths here, allowing you to customize the design 111 | | of the emails. Or, you may simply stick with the Laravel defaults! 112 | | 113 | */ 114 | 115 | 'markdown' => [ 116 | 'theme' => 'default', 117 | 118 | 'paths' => [ 119 | resource_path('views/vendor/mail'), 120 | ], 121 | ], 122 | 123 | ]; 124 | -------------------------------------------------------------------------------- /resources/views/sys_mg/cities/index.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | @section('content') 3 |
4 |

City Management

5 | 6 | {{-- Include the searh component with with title and route --}} 7 | @component('sys_mg.inc.search',['title' => 'City' , 'route' => 'cities.search']) 8 | @endcomponent 9 | 10 |
11 | 12 |
13 |
14 |
15 |
Cities List
16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | @if($cities->count()) 31 | @foreach($cities as $city) 32 | 33 | 34 | 35 | 36 | 37 | 38 | 52 | 53 | @endforeach 54 | @else 55 | 56 | 57 | 58 | 59 | @endif 60 | @if(isset($search)) 61 | 62 | 65 | 66 | @endif 67 | 68 |
IDCity NameZip CodeCreated atUpdated atOptions
{{$city->id}}{{$city->city_name}}{{$city->zip_code}}{{$city->created_at}}{{$city->updated_at}} 39 |
40 |
41 | mode_edit 42 |
43 |
44 |
45 | @method('DELETE') 46 | @csrf() 47 | 48 |
49 |
50 |
51 |
No Cities found!
63 | Show All 64 |
69 | 70 |
71 | 72 |
73 | {{$cities->links('vendor.pagination.default',['paginator' => $cities])}} 74 |
75 |
76 |
77 | 78 |
79 |
80 | 81 | 82 | 83 |
84 | 85 | add 86 | 87 |
88 | @endsection -------------------------------------------------------------------------------- /config/database.php: -------------------------------------------------------------------------------- 1 | env('DB_CONNECTION', 'mysql'), 17 | 18 | /* 19 | |-------------------------------------------------------------------------- 20 | | Database Connections 21 | |-------------------------------------------------------------------------- 22 | | 23 | | Here are each of the database connections setup for your application. 24 | | Of course, examples of configuring each database platform that is 25 | | supported by Laravel is shown below to make development simple. 26 | | 27 | | 28 | | All database work in Laravel is done through the PHP PDO facilities 29 | | so make sure you have the driver for your particular database of 30 | | choice installed on your machine before you begin development. 31 | | 32 | */ 33 | 34 | 'connections' => [ 35 | 36 | 'sqlite' => [ 37 | 'driver' => 'sqlite', 38 | 'database' => env('DB_DATABASE', database_path('database.sqlite')), 39 | 'prefix' => '', 40 | ], 41 | 42 | 'mysql' => [ 43 | 'driver' => 'mysql', 44 | 'host' => env('DB_HOST', '127.0.0.1'), 45 | 'port' => env('DB_PORT', '3306'), 46 | 'database' => env('DB_DATABASE', 'forge'), 47 | 'username' => env('DB_USERNAME', 'forge'), 48 | 'password' => env('DB_PASSWORD', ''), 49 | 'unix_socket' => env('DB_SOCKET', ''), 50 | 'charset' => 'utf8mb4', 51 | 'collation' => 'utf8mb4_unicode_ci', 52 | 'prefix' => '', 53 | 'strict' => true, 54 | 'engine' => null, 55 | 'modes' => [ 56 | 'ONLY_FULL_GROUP_BY', 57 | 'STRICT_TRANS_TABLES', 58 | 'NO_ZERO_IN_DATE', 59 | 'NO_ZERO_DATE', 60 | 'ERROR_FOR_DIVISION_BY_ZERO', 61 | 'NO_ENGINE_SUBSTITUTION', 62 | ], 63 | ], 64 | 65 | 'pgsql' => [ 66 | 'driver' => 'pgsql', 67 | 'host' => env('DB_HOST', '127.0.0.1'), 68 | 'port' => env('DB_PORT', '5432'), 69 | 'database' => env('DB_DATABASE', 'forge'), 70 | 'username' => env('DB_USERNAME', 'forge'), 71 | 'password' => env('DB_PASSWORD', ''), 72 | 'charset' => 'utf8', 73 | 'prefix' => '', 74 | 'schema' => 'public', 75 | 'sslmode' => 'prefer', 76 | ], 77 | 78 | 'sqlsrv' => [ 79 | 'driver' => 'sqlsrv', 80 | 'host' => env('DB_HOST', 'localhost'), 81 | 'port' => env('DB_PORT', '1433'), 82 | 'database' => env('DB_DATABASE', 'forge'), 83 | 'username' => env('DB_USERNAME', 'forge'), 84 | 'password' => env('DB_PASSWORD', ''), 85 | 'charset' => 'utf8', 86 | 'prefix' => '', 87 | ], 88 | 89 | ], 90 | 91 | /* 92 | |-------------------------------------------------------------------------- 93 | | Migration Repository Table 94 | |-------------------------------------------------------------------------- 95 | | 96 | | This table keeps track of all the migrations that have already run for 97 | | your application. Using this information, we can determine which of 98 | | the migrations on disk haven't actually been run in the database. 99 | | 100 | */ 101 | 102 | 'migrations' => 'migrations', 103 | 104 | /* 105 | |-------------------------------------------------------------------------- 106 | | Redis Databases 107 | |-------------------------------------------------------------------------- 108 | | 109 | | Redis is an open source, fast, and advanced key-value store that also 110 | | provides a richer set of commands than a typical key-value systems 111 | | such as APC or Memcached. Laravel makes it easy to dig right in. 112 | | 113 | */ 114 | 115 | 'redis' => [ 116 | 117 | 'client' => 'predis', 118 | 119 | 'default' => [ 120 | 'host' => env('REDIS_HOST', '127.0.0.1'), 121 | 'password' => env('REDIS_PASSWORD', null), 122 | 'port' => env('REDIS_PORT', 6379), 123 | 'database' => 0, 124 | ], 125 | 126 | ], 127 | 128 | ]; 129 | -------------------------------------------------------------------------------- /resources/views/admin/create.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | @section('content') 3 |
4 |
5 |
6 |
7 |

Create New Admin

8 |
9 |
10 |
11 |
12 |
13 |
14 | person_outline 15 | 16 | 17 | {{$errors->first('first_name')}} 18 |
19 |
20 | person_outline 21 | 22 | 23 | {{$errors->first('first_name')}} 24 |
25 |
26 | person 27 | 28 | 29 | {{$errors->first('username')}} 30 |
31 |
32 | lock 33 | 34 | 35 | {{$errors->has('password') ? $errors->first('password') : ''}} 36 |
37 |
38 | email 39 | 40 | 41 | {{$errors->has('email') ? $errors->first('email') : ''}} 42 |
43 |
44 |
45 | Picture 46 | 47 |
48 |
49 | 50 | {{$errors->has('picture') ? $errors->first('picture') : ''}} 51 |
52 |
53 |
54 | @csrf() 55 |
56 | 57 |
58 |
59 |
60 |
61 | Go Back 62 |
63 |
64 |
65 |
66 | @endsection -------------------------------------------------------------------------------- /resources/views/admin/edit.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | @section('content') 3 |
4 |
5 |
6 |
7 |

Update Admin

8 |
9 |
10 |
11 |
12 |
13 |
14 | person_outline 15 | 16 | 17 | {{$errors->first('first_name')}} 18 |
19 |
20 | person_outline 21 | 22 | 23 | {{$errors->first('first_name')}} 24 |
25 |
26 | person 27 | 28 | 29 | {{$errors->first('username')}} 30 |
31 |
32 | lock 33 | 34 | 35 | {{$errors->has('password') ? $errors->first('password') : ''}} 36 |
37 |
38 | email 39 | 40 | 41 | {{$errors->has('email') ? $errors->first('email') : ''}} 42 |
43 |
44 |
45 | Picture 46 | 47 |
48 |
49 | 50 | {{$errors->has('picture') ? $errors->first('picture') : ''}} 51 |
52 |
53 |
54 | @method('PUT') 55 | @csrf() 56 |
57 | 58 |
59 |
60 |
61 |
62 | Go Back 63 |
64 |
65 |
66 |
67 | @endsection -------------------------------------------------------------------------------- /resources/views/employee/index.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | @section('content') 3 |
4 |

Manage Employees

5 | {{-- Search --}} 6 |
7 | 40 |
41 | {{-- Search END --}} 42 | 43 |
44 |
45 |
46 |
Employee List
47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | @if($employees->count()) 63 | @foreach($employees as $employee) 64 | 65 | 66 | 69 | 70 | 71 | 72 | 73 | 76 | 77 | @endforeach 78 | @if(isset($search)) 79 | 80 | 83 | 84 | @endif 85 | @else 86 | {{-- if there are no employees then show this message --}} 87 | 88 | 89 | 90 | @endif 91 | 92 |
IDImageNameDepartmentDivisionJoin DateOptions
{{$employee->id}} 67 | 68 | {{$employee->first_name}} {{$employee->last_name}}{{$employee->empDepartment->dept_name}}{{$employee->empDivision->division_name}}{{$employee->join_date}} 74 | list 75 |
81 | Show All 82 |
No Employees Found!
93 | 94 |
95 | 96 |
97 | {{$employees->links('vendor.pagination.default',['paginator' => $employees])}} 98 |
99 |
100 |
101 | 102 |
103 | 104 |
105 | 106 | add 107 | 108 |
109 | @endsection --------------------------------------------------------------------------------