├── favicon.ico ├── HMS ├── app │ ├── Listeners │ │ └── .gitkeep │ ├── Policies │ │ └── .gitkeep │ ├── Events │ │ └── Event.php │ ├── Test.php │ ├── Setting.php │ ├── RoomFloor.php │ ├── RoleDetails.php │ ├── RoomLocation.php │ ├── ServiceType.php │ ├── RoomRequirement.php │ ├── RoomTypeRequirement.php │ ├── Http │ │ ├── Requests │ │ │ └── Request.php │ │ ├── Middleware │ │ │ ├── EncryptCookies.php │ │ │ ├── VerifyCsrfToken.php │ │ │ ├── RedirectIfAuthenticated.php │ │ │ └── Authenticate.php │ │ ├── Controllers │ │ │ ├── Controller.php │ │ │ ├── Manage │ │ │ │ ├── GuestController.php │ │ │ │ ├── ManageController.php │ │ │ │ ├── UserController.php │ │ │ │ ├── PaymentController.php │ │ │ │ ├── ReportController.php │ │ │ │ ├── CheckoutController.php │ │ │ │ ├── RoomController.php │ │ │ │ └── ServiceController.php │ │ │ └── Auth │ │ │ │ ├── PasswordController.php │ │ │ │ └── AuthController.php │ │ ├── Kernel.php │ │ └── routes.php │ ├── Role.php │ ├── RoomType.php │ ├── Service.php │ ├── RomeType.php │ ├── Guest.php │ ├── Checkout.php │ ├── Booking.php │ ├── Room.php │ ├── Providers │ │ ├── AppServiceProvider.php │ │ ├── AuthServiceProvider.php │ │ ├── EventServiceProvider.php │ │ └── RouteServiceProvider.php │ ├── Jobs │ │ └── Job.php │ ├── Console │ │ ├── Commands │ │ │ └── Inspire.php │ │ └── Kernel.php │ ├── User.php │ └── Exceptions │ │ └── Handler.php ├── database │ ├── seeds │ │ ├── .gitkeep │ │ ├── RoomTypeTableSeeder.php │ │ ├── UserTableSeeder.php │ │ ├── DatabaseSeeder.php │ │ └── RoleTableSeeder.php │ ├── migrations │ │ ├── .gitkeep │ │ ├── 2015_12_13_123237_create_service_types_table.php │ │ ├── 2015_12_13_121846_create_roles_table.php │ │ ├── 2015_12_14_065234_create_settings_table.php │ │ ├── 2014_10_12_100000_create_password_resets_table.php │ │ ├── 2015_12_14_070130_create_room_types_table.php │ │ ├── 2015_12_13_122325_create_role_details_table.php │ │ ├── 2015_12_13_123402_create_services_table.php │ │ ├── 2015_12_14_090244_create_room_locations_table.php │ │ ├── 2016_01_11_024847_create_checkout_table.php │ │ ├── 2016_01_10_100056_create_booking_table.php │ │ ├── 2015_12_14_074618_create_rooms_table.php │ │ ├── 2015_12_14_072328_create_room_type_requirements_table.php │ │ ├── 2015_12_14_070511_create_room_requirements_table.php │ │ ├── 2015_12_13_115404_create_guests_table.php │ │ └── 2014_10_12_000000_create_users_table.php │ ├── .gitignore │ └── factories │ │ └── ModelFactory.php ├── resources │ ├── views │ │ ├── vendor │ │ │ └── .gitkeep │ │ ├── default │ │ │ ├── detailUser.blade.php │ │ │ ├── listRoomByIcon.blade.php │ │ │ ├── listBooking.blade.php │ │ │ ├── listRoomType.blade.php │ │ │ ├── listGuest.blade.php │ │ │ ├── listUser.blade.php │ │ │ └── listRoom.blade.php │ │ ├── app.blade.php │ │ ├── receiption │ │ │ ├── viewRoom.blade.php │ │ │ ├── checkoutPreview.blade.php │ │ │ └── bookingroom.blade.php │ │ ├── welcome.blade.php │ │ ├── errors │ │ │ └── 503.blade.php │ │ ├── manage │ │ │ └── adduser.blade.php │ │ └── auth │ │ │ ├── login.blade.php │ │ │ └── login3.blade.php │ └── lang │ │ └── en │ │ ├── pagination.php │ │ ├── auth.php │ │ ├── passwords.php │ │ └── validation.php ├── storage │ ├── app │ │ └── .gitignore │ ├── logs │ │ └── .gitignore │ └── framework │ │ ├── cache │ │ └── .gitignore │ │ ├── sessions │ │ └── .gitignore │ │ ├── views │ │ └── .gitignore │ │ └── .gitignore ├── bootstrap │ ├── cache │ │ └── .gitignore │ ├── autoload.php │ └── app.php ├── .gitignore ├── .gitattributes ├── Nightly.lnk ├── phpspec.yml ├── package.json ├── .env ├── .env.example ├── .env.txt ├── tests │ ├── ExampleTest.php │ └── TestCase.php ├── gulpfile.js ├── server.php ├── phpunit.xml ├── config │ ├── compile.php │ ├── services.php │ ├── view.php │ ├── broadcasting.php │ ├── cache.php │ ├── auth.php │ ├── filesystems.php │ ├── queue.php │ ├── database.php │ ├── mail.php │ ├── session.php │ └── app.php ├── review │ └── huongdan.php ├── composer.json ├── artisan └── readme.md ├── robots.txt ├── .gitignore ├── assets ├── sass │ └── app.scss ├── fonts │ ├── metro.eot │ ├── metro.ttf │ └── metro.woff └── css │ ├── mystyle.css │ ├── metro-rtl.min.css │ ├── metro-rtl.css │ └── metro-responsive.min.css ├── 1312457_1312470.txt ├── HMS.iml ├── README.md ├── .htaccess └── index.php /favicon.ico: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /HMS/app/Listeners/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /HMS/app/Policies/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /HMS/database/seeds/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /HMS/database/migrations/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /HMS/database/.gitignore: -------------------------------------------------------------------------------- 1 | *.sqlite 2 | -------------------------------------------------------------------------------- /HMS/resources/views/vendor/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /HMS/storage/app/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore -------------------------------------------------------------------------------- /robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | Disallow: 3 | -------------------------------------------------------------------------------- /HMS/bootstrap/cache/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /HMS/storage/logs/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | HMS.iws 2 | node_modules 3 | bower_components -------------------------------------------------------------------------------- /HMS/storage/framework/cache/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore -------------------------------------------------------------------------------- /HMS/storage/framework/sessions/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /HMS/storage/framework/views/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /HMS/resources/views/default/detailUser.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layout') 2 | -------------------------------------------------------------------------------- /HMS/.gitignore: -------------------------------------------------------------------------------- 1 | /vendor 2 | /node_modules 3 | Homestead.yaml 4 | Homestead.json 5 | -------------------------------------------------------------------------------- /HMS/.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto 2 | *.css linguist-vendored 3 | *.less linguist-vendored 4 | -------------------------------------------------------------------------------- /HMS/Nightly.lnk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cdxf/Hotel-Management-System/HEAD/HMS/Nightly.lnk -------------------------------------------------------------------------------- /assets/sass/app.scss: -------------------------------------------------------------------------------- 1 | // @import "node_modules/bootstrap-sass/assets/stylesheets/bootstrap"; 2 | 3 | -------------------------------------------------------------------------------- /assets/fonts/metro.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cdxf/Hotel-Management-System/HEAD/assets/fonts/metro.eot -------------------------------------------------------------------------------- /assets/fonts/metro.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cdxf/Hotel-Management-System/HEAD/assets/fonts/metro.ttf -------------------------------------------------------------------------------- /assets/fonts/metro.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cdxf/Hotel-Management-System/HEAD/assets/fonts/metro.woff -------------------------------------------------------------------------------- /HMS/app/Events/Event.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /HMS/app/Service.php: -------------------------------------------------------------------------------- 1 | belongsTo('App\RoomType'); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /HMS/app/Http/Controllers/Controller.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | Options -MultiViews 4 | 5 | 6 | RewriteEngine On 7 | 8 | # Redirect Trailing Slashes If Not A Folder... 9 | RewriteCond %{REQUEST_FILENAME} !-d 10 | RewriteRule ^(.*)/$ /$1 [L,R=301] 11 | 12 | # Handle Front Controller... 13 | RewriteCond %{REQUEST_FILENAME} !-d 14 | RewriteCond %{REQUEST_FILENAME} !-f 15 | RewriteRule ^ index.php [L] 16 | 17 | -------------------------------------------------------------------------------- /HMS/database/seeds/RoomTypeTableSeeder.php: -------------------------------------------------------------------------------- 1 | insert([ 15 | 'name' => "vip", 16 | 'desc' => 'danh cho khach vip', 17 | 'price' => '122323', 18 | ]); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /HMS/tests/ExampleTest.php: -------------------------------------------------------------------------------- 1 | visit('/') 17 | ->see('Laravel 5'); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /HMS/database/seeds/UserTableSeeder.php: -------------------------------------------------------------------------------- 1 | insert([ 16 | 'name' => "testadmin", 17 | 'email' => 'admin@gmail.com', 18 | 'password' => bcrypt('admin'), 19 | ]); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /HMS/database/seeds/DatabaseSeeder.php: -------------------------------------------------------------------------------- 1 | call(UserTableSeeder::class); 18 | $this->call(RoleTableSeeder::class); 19 | $this->call(RoomTypeTableSeeder::class); 20 | 21 | Model::reguard(); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /HMS/app/Providers/AppServiceProvider.php: -------------------------------------------------------------------------------- 1 | insert([ 15 | 'name' => "director", 16 | 'desc' => 'Nguoi quan li có the them xoa sua', 17 | ]); 18 | DB::table('roles')->insert([ 19 | 'name' => "receiption", 20 | 'desc' => 'day la nguoi tiep tan chi dat phong', 21 | ]); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /HMS/app/Jobs/Job.php: -------------------------------------------------------------------------------- 1 | '« Previous', 17 | 'next' => 'Next »', 18 | 19 | ]; 20 | -------------------------------------------------------------------------------- /HMS/server.php: -------------------------------------------------------------------------------- 1 | 8 | */ 9 | 10 | $uri = urldecode( 11 | parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH) 12 | ); 13 | 14 | // This file allows us to emulate Apache's "mod_rewrite" functionality from the 15 | // built-in PHP web server. This provides a convenient way to test a Laravel 16 | // application without having installed a "real" web server software here. 17 | if ($uri !== '/' && file_exists(__DIR__.'/'.$uri)) { 18 | return false; 19 | } 20 | 21 | require_once __DIR__.'/index.php'; 22 | -------------------------------------------------------------------------------- /HMS/tests/TestCase.php: -------------------------------------------------------------------------------- 1 | make(Illuminate\Contracts\Console\Kernel::class)->bootstrap(); 22 | 23 | return $app; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /HMS/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 | -------------------------------------------------------------------------------- /HMS/database/factories/ModelFactory.php: -------------------------------------------------------------------------------- 1 | define(App\User::class, function (Faker\Generator $faker) { 15 | return [ 16 | 'name' => $faker->name, 17 | 'email' => $faker->email, 18 | 'password' => bcrypt(str_random(10)), 19 | 'remember_token' => str_random(10), 20 | ]; 21 | }); 22 | -------------------------------------------------------------------------------- /HMS/app/Console/Commands/Inspire.php: -------------------------------------------------------------------------------- 1 | comment(PHP_EOL.Inspiring::quote().PHP_EOL); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /HMS/app/Http/Controllers/Manage/GuestController.php: -------------------------------------------------------------------------------- 1 | except('_token'); 23 | Guest::where('id',$guest['id'])->update($guest); 24 | return redirect()->route('listguest_com'); 25 | } 26 | 27 | } 28 | -------------------------------------------------------------------------------- /HMS/app/Console/Kernel.php: -------------------------------------------------------------------------------- 1 | command('inspire') 28 | ->hourly(); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /HMS/database/migrations/2015_12_13_123237_create_service_types_table.php: -------------------------------------------------------------------------------- 1 | string('name'); 17 | $table->string('desc',4000); 18 | $table->primary('name'); 19 | }); 20 | } 21 | 22 | /** 23 | * Reverse the migrations. 24 | * 25 | * @return void 26 | */ 27 | public function down() 28 | { 29 | Schema::drop('service_types'); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /HMS/database/migrations/2015_12_13_121846_create_roles_table.php: -------------------------------------------------------------------------------- 1 | increments('id'); 17 | $table->string('name'); 18 | $table->string('desc',4000); 19 | $table->timestamps(); 20 | }); 21 | } 22 | 23 | /** 24 | * Reverse the migrations. 25 | * 26 | * @return void 27 | */ 28 | public function down() 29 | { 30 | Schema::drop('roles'); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /HMS/database/migrations/2015_12_14_065234_create_settings_table.php: -------------------------------------------------------------------------------- 1 | string('name'); 17 | $table->string('value',4000); 18 | $table->string('desc',4000); 19 | $table->primary('name'); 20 | }); 21 | //deafult 22 | 23 | } 24 | 25 | /** 26 | * Reverse the migrations. 27 | * 28 | * @return void 29 | */ 30 | public function down() 31 | { 32 | Schema::drop('settings'); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /HMS/database/migrations/2014_10_12_100000_create_password_resets_table.php: -------------------------------------------------------------------------------- 1 | string('email')->index(); 17 | $table->string('token')->index(); 18 | $table->timestamp('created_at'); 19 | }); 20 | } 21 | 22 | /** 23 | * Reverse the migrations. 24 | * 25 | * @return void 26 | */ 27 | public function down() 28 | { 29 | Schema::drop('password_resets'); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /HMS/database/migrations/2015_12_14_070130_create_room_types_table.php: -------------------------------------------------------------------------------- 1 | increments('id'); 17 | $table->string('name')->unique(); 18 | $table->double('price'); 19 | $table->string('desc',4000); 20 | $table->timestamps(); 21 | }); 22 | } 23 | 24 | /** 25 | * Reverse the migrations. 26 | * 27 | * @return void 28 | */ 29 | public function down() 30 | { 31 | Schema::drop('room_types'); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /HMS/app/Providers/AuthServiceProvider.php: -------------------------------------------------------------------------------- 1 | 'App\Policies\ModelPolicy', 17 | ]; 18 | 19 | /** 20 | * Register any application authentication / authorization services. 21 | * 22 | * @param \Illuminate\Contracts\Auth\Access\Gate $gate 23 | * @return void 24 | */ 25 | public function boot(GateContract $gate) 26 | { 27 | $this->registerPolicies($gate); 28 | 29 | // 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /HMS/database/migrations/2015_12_13_122325_create_role_details_table.php: -------------------------------------------------------------------------------- 1 | integer('role_id')->unsigned(); 17 | $table->string('has_role'); 18 | $table->primary(['role_id', 'has_role']); 19 | $table->foreign('role_id')->references('id')->on('roles'); 20 | }); 21 | } 22 | 23 | /** 24 | * Reverse the migrations. 25 | * 26 | * @return void 27 | */ 28 | public function down() 29 | { 30 | Schema::drop('role_details'); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /HMS/resources/views/welcome.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Laravel 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /HMS/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 | -------------------------------------------------------------------------------- /HMS/app/Providers/EventServiceProvider.php: -------------------------------------------------------------------------------- 1 | [ 17 | 'App\Listeners\EventListener', 18 | ], 19 | ]; 20 | 21 | /** 22 | * Register any other events for your application. 23 | * 24 | * @param \Illuminate\Contracts\Events\Dispatcher $events 25 | * @return void 26 | */ 27 | public function boot(DispatcherContract $events) 28 | { 29 | parent::boot($events); 30 | 31 | // 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /HMS/database/migrations/2015_12_13_123402_create_services_table.php: -------------------------------------------------------------------------------- 1 | increments('id'); 17 | $table->string('name'); 18 | $table->string('desc',4000); 19 | $table->string('service_type_name'); 20 | $table->decimal('rate',5,2); 21 | $table->foreign('service_type_name')->references('name')->on('service_types'); 22 | }); 23 | } 24 | 25 | /** 26 | * Reverse the migrations. 27 | * 28 | * @return void 29 | */ 30 | public function down() 31 | { 32 | Schema::drop('services'); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /HMS/database/migrations/2015_12_14_090244_create_room_locations_table.php: -------------------------------------------------------------------------------- 1 | integer('room_id')->unsigned(); 17 | $table->integer('floor')->unsigned(); 18 | $table->integer('ceil')->unsigned(); 19 | $table->primary('room_id'); 20 | $table->unique(array('floor','ceil')); 21 | $table->foreign('room_id')->references('id')->on('rooms'); 22 | }); 23 | } 24 | 25 | /** 26 | * Reverse the migrations. 27 | * 28 | * @return void 29 | */ 30 | public function down() 31 | { 32 | Schema::drop('room_locations'); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /HMS/app/Http/Middleware/RedirectIfAuthenticated.php: -------------------------------------------------------------------------------- 1 | auth = $auth; 26 | } 27 | 28 | /** 29 | * Handle an incoming request. 30 | * 31 | * @param \Illuminate\Http\Request $request 32 | * @param \Closure $next 33 | * @return mixed 34 | */ 35 | public function handle($request, Closure $next) 36 | { 37 | if ($this->auth->check()) { 38 | return redirect('/'); 39 | } 40 | 41 | return $next($request); 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /HMS/phpunit.xml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 13 | ./tests/ 14 | 15 | 16 | 17 | 18 | app/ 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /HMS/app/Http/Controllers/Auth/PasswordController.php: -------------------------------------------------------------------------------- 1 | middleware('guest'); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /HMS/database/migrations/2016_01_11_024847_create_checkout_table.php: -------------------------------------------------------------------------------- 1 | increments('id'); 18 | $table->integer('guest_id'); 19 | $table->string('room_name'); 20 | $table->double('service_price'); 21 | $table->double('total'); 22 | $table->string('receiption'); 23 | $table->timestamp('booking_time'); 24 | $table->timestamps(); 25 | }); 26 | } 27 | 28 | /** 29 | * Reverse the migrations. 30 | * 31 | * @return void 32 | */ 33 | public function down() 34 | { 35 | // 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /HMS/database/migrations/2016_01_10_100056_create_booking_table.php: -------------------------------------------------------------------------------- 1 | increments('id'); 17 | $table->integer('guest_id'); 18 | $table->string('room_name'); 19 | $table->integer('child_number'); 20 | $table->integer('adult_number'); 21 | $table->double('deposit'); 22 | $table->string('receiption'); 23 | $table->timestamp('checkout'); 24 | $table->timestamps(); 25 | }); 26 | } 27 | 28 | /** 29 | * Reverse the migrations. 30 | * 31 | * @return void 32 | */ 33 | public function down() 34 | { 35 | // 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /HMS/database/migrations/2015_12_14_074618_create_rooms_table.php: -------------------------------------------------------------------------------- 1 | increments('id'); 17 | $table->string('name')->unique(); 18 | $table->char('status',4)->default('A'); //B: busy, N: booked, A: avaiable 19 | $table->string('desc')->nullable(); 20 | $table->string('phone')->nullable(); 21 | $table->integer('room_type_id')->unsigned(); 22 | $table->foreign('room_type_id')->references('id')->on('room_types'); 23 | $table->timestamps(); 24 | }); 25 | } 26 | 27 | /** 28 | * Reverse the migrations. 29 | * 30 | * @return void 31 | */ 32 | public function down() 33 | { 34 | Schema::drop('rooms'); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /HMS/app/Http/Controllers/Manage/ManageController.php: -------------------------------------------------------------------------------- 1 | Auth::user()]); 19 | } 20 | else{ 21 | Session::put('redirect_url',$request->path()); 22 | return redirect()->route('login3'); 23 | } 24 | 25 | } 26 | public function login(Request $request){ 27 | //lay data tu input check xem co trong csdl khong 28 | 29 | // Session::push('user.name', ); 30 | // Session::put('user.role', ); 31 | return view('auth/login'); 32 | 33 | } 34 | public function loggout(){ 35 | return $this->auth->logout; 36 | } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /HMS/database/migrations/2015_12_14_072328_create_room_type_requirements_table.php: -------------------------------------------------------------------------------- 1 | integer('room_type_id')->unsigned(); 17 | $table->integer('requirement_id')->unsigned(); 18 | $table->integer('value')->unsigned(); 19 | $table->primary(array('room_type_id', 'requirement_id')); 20 | $table->foreign('room_type_id')->references('id')->on('room_types'); 21 | $table->foreign('requirement_id')->references('id')->on('room_requirements'); 22 | }); 23 | } 24 | 25 | /** 26 | * Reverse the migrations. 27 | * 28 | * @return void 29 | */ 30 | public function down() 31 | { 32 | Schema::drop('room_type_requirements'); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /HMS/database/migrations/2015_12_14_070511_create_room_requirements_table.php: -------------------------------------------------------------------------------- 1 | increments('id'); 17 | $table->string('name'); 18 | $table->string('desc'); 19 | /* 20 | 1 - integer 21 | 2 - boolean 22 | 3 - datestamp 23 | */ 24 | $table->tinyInteger('type'); 25 | /* 26 | 0 as no condtion (use for description); 27 | 1 as == 28 | 2 as > 29 | 3 as < 30 | 12 as >= 31 | 13 as <= 32 | */ 33 | $table->integer('condition'); 34 | }); 35 | } 36 | 37 | /** 38 | * Reverse the migrations. 39 | * 40 | * @return void 41 | */ 42 | public function down() 43 | { 44 | Schema::drop('room_requirements'); 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /HMS/app/Http/Middleware/Authenticate.php: -------------------------------------------------------------------------------- 1 | auth = $auth; 26 | } 27 | 28 | /** 29 | * Handle an incoming request. 30 | * 31 | * @param \Illuminate\Http\Request $request 32 | * @param \Closure $next 33 | * @return mixed 34 | */ 35 | public function handle($request, Closure $next) 36 | { 37 | if ($this->auth->guest()) { 38 | if ($request->ajax()) { 39 | return response('Unauthorized.', 401); 40 | } else { 41 | return redirect()->guest('auth/login'); 42 | } 43 | } 44 | 45 | return $next($request); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /HMS/app/Http/Kernel.php: -------------------------------------------------------------------------------- 1 | \App\Http\Middleware\Authenticate::class, 30 | 'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class, 31 | 'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class, 32 | ]; 33 | } 34 | -------------------------------------------------------------------------------- /HMS/config/compile.php: -------------------------------------------------------------------------------- 1 | [ 17 | // 18 | ], 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Compiled File Providers 23 | |-------------------------------------------------------------------------- 24 | | 25 | | Here you may list service providers which define a "compiles" function 26 | | that returns additional files that should be compiled, providing an 27 | | easy way to get common files from any packages you are utilizing. 28 | | 29 | */ 30 | 31 | 'providers' => [ 32 | // 33 | ], 34 | 35 | ]; 36 | -------------------------------------------------------------------------------- /HMS/config/services.php: -------------------------------------------------------------------------------- 1 | [ 18 | 'domain' => env('MAILGUN_DOMAIN'), 19 | 'secret' => env('MAILGUN_SECRET'), 20 | ], 21 | 22 | 'mandrill' => [ 23 | 'secret' => env('MANDRILL_SECRET'), 24 | ], 25 | 26 | 'ses' => [ 27 | 'key' => env('SES_KEY'), 28 | 'secret' => env('SES_SECRET'), 29 | 'region' => 'us-east-1', 30 | ], 31 | 32 | 'stripe' => [ 33 | 'model' => App\User::class, 34 | 'key' => env('STRIPE_KEY'), 35 | 'secret' => env('STRIPE_SECRET'), 36 | ], 37 | 38 | ]; 39 | -------------------------------------------------------------------------------- /HMS/config/view.php: -------------------------------------------------------------------------------- 1 | [ 17 | realpath(base_path('resources/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 | -------------------------------------------------------------------------------- /HMS/database/migrations/2015_12_13_115404_create_guests_table.php: -------------------------------------------------------------------------------- 1 | increments('id'); 17 | $table->string('name'); 18 | //National Identity Number 19 | $table->string('identify')->unique(); 20 | $table->string('nationality'); 21 | $table->string('address')->nullable(); 22 | $table->string('phone')->nullable(); 23 | /* ISO/IEC 5218 24 | 0 = not known, 25 | 1 = male, 26 | 2 = female 27 | */ 28 | $table->tinyInteger('sex'); 29 | $table->string('email')->unique()->nullable(); 30 | $table->string('receiption'); 31 | $table->timestamps(); 32 | //index 33 | }); 34 | } 35 | 36 | /** 37 | * Reverse the migrations. 38 | * 39 | * @return void 40 | */ 41 | public function down() 42 | { 43 | Schema::drop('guests'); 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /HMS/bootstrap/autoload.php: -------------------------------------------------------------------------------- 1 | group(['namespace' => $this->namespace], function ($router) { 41 | require app_path('Http/routes.php'); 42 | }); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /HMS/database/migrations/2014_10_12_000000_create_users_table.php: -------------------------------------------------------------------------------- 1 | increments('id'); 17 | $table->string('name')->unique(); 18 | $table->string('email')->unique(); 19 | $table->string('password', 60); 20 | $table->tinyInteger('role'); //0: receiption 1: director 21 | $table->tinyInteger('sex'); //0: nu 1: nam 22 | $table->string('phone', 60); 23 | $table->string('address',60); 24 | $table->date('birthday'); 25 | $table->rememberToken(); 26 | $table->timestamps(); 27 | 28 | // $table->foreign('role') 29 | // ->references('id')->on('role') 30 | // ->onDelete('cascade'); 31 | }); 32 | } 33 | 34 | /** 35 | * Reverse the migrations. 36 | * 37 | * @return void 38 | */ 39 | public function down() 40 | { 41 | Schema::drop('users'); 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /HMS/resources/views/errors/503.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Be right back. 5 | 6 | 7 | 8 | 39 | 40 | 41 |
42 |
43 |
Be right back.
44 |
45 |
46 | 47 | 48 | -------------------------------------------------------------------------------- /HMS/app/User.php: -------------------------------------------------------------------------------- 1 | //day la duong dan 5 | *
// cach nay co ve ngon hon 6 | * 7 | */ 8 | 9 | ========================================== 10 | Tao mot class de voi phuong thuc construct co middleware auth de moi route deu phai co authentication 11 | 12 | ========================================== 13 | /** 14 | * Với database seeding 15 | * - Muốn seeding cho từng bảng thì chạy lệnh 16 | * php artisan db:seed --class 17 | * - Nếu chỉ chạy db:seed thì phải gọi tới class trong DatabaseSeeder đã tạo mặc định 18 | * 19 | */ 20 | class DatabaseSeeder extends Seeder 21 | 22 | { 23 | 24 | public function run() 25 | { 26 | Model::unguard(); 27 | 28 | $this->call(UserTableSeeder::class); //call class 29 | 30 | Model::reguard(); 31 | } 32 | } 33 | 34 | ============================================ 35 | // truyen bien vao route 36 | {{ route('bookingroom_rec_get',$r->id) }} 37 | //cach khac la dung link truc tiep 38 | 39 | 40 | ================================================ 41 | /** 42 | * lam cho the input khong the chinh sua ma chi xem 43 | *
44 | */ -------------------------------------------------------------------------------- /HMS/app/Exceptions/Handler.php: -------------------------------------------------------------------------------- 1 | getMessage(), $e); 47 | } 48 | 49 | return parent::render($request, $e); 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /HMS/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": ">=5.5.9", 9 | "laravel/framework": "5.1.*", 10 | "barryvdh/laravel-ide-helper": "^2.1", 11 | "illuminate/html": "~5.0" 12 | }, 13 | "require-dev": { 14 | "fzaninotto/faker": "~1.4", 15 | "mockery/mockery": "0.9.*", 16 | "phpunit/phpunit": "~4.0", 17 | "phpspec/phpspec": "~2.1" 18 | }, 19 | "autoload": { 20 | "classmap": [ 21 | "database" 22 | ], 23 | "psr-4": { 24 | "App\\": "app/" 25 | } 26 | }, 27 | "autoload-dev": { 28 | "classmap": [ 29 | "tests/TestCase.php" 30 | ] 31 | }, 32 | "scripts": { 33 | "post-install-cmd": [ 34 | "php artisan clear-compiled", 35 | "php artisan optimize" 36 | ], 37 | "pre-update-cmd": [ 38 | "php artisan clear-compiled" 39 | ], 40 | "post-update-cmd": [ 41 | "php artisan optimize" 42 | ], 43 | "post-root-package-install": [ 44 | "php -r \"copy('.env.example', '.env');\"" 45 | ], 46 | "post-create-project-cmd": [ 47 | "php artisan key:generate" 48 | ] 49 | }, 50 | "config": { 51 | "preferred-install": "dist" 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /HMS/resources/views/default/listRoomByIcon.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layout') 2 | @section('title') 3 | {{ $title }} 4 | @stop 5 | @section('content') 6 | 7 | @foreach ($room_type as $r_type) 8 |

Phong:   {{ $r_type->name }}

9 |
10 | @foreach ($room as $r) 11 | @if ($r->room_type_id == $r_type->id) 12 |
13 |
14 |
15 | 16 | ROOM {{ $r->name }} 17 |
18 |
19 | Guest: Cao van quyen
20 | Status: booked
21 | Checkin: not
22 | @if ($r->status == 'N') 23 | 24 | @elseif($r->status == 'A') 25 | 26 | @endif 27 | 28 |
29 |
30 |
31 | 32 | @endif 33 | @endforeach 34 |
35 | @endforeach 36 | 37 | 38 | 39 | 40 | 41 | 46 | 47 | @stop -------------------------------------------------------------------------------- /HMS/config/broadcasting.php: -------------------------------------------------------------------------------- 1 | env('BROADCAST_DRIVER', 'pusher'), 17 | 18 | /* 19 | |-------------------------------------------------------------------------- 20 | | Broadcast Connections 21 | |-------------------------------------------------------------------------- 22 | | 23 | | Here you may define all of the broadcast connections that will be used 24 | | to broadcast events to other systems or over websockets. Samples of 25 | | each available type of connection are provided inside this array. 26 | | 27 | */ 28 | 29 | 'connections' => [ 30 | 31 | 'pusher' => [ 32 | 'driver' => 'pusher', 33 | 'key' => env('PUSHER_KEY'), 34 | 'secret' => env('PUSHER_SECRET'), 35 | 'app_id' => env('PUSHER_APP_ID'), 36 | 'options' => [ 37 | // 38 | ], 39 | ], 40 | 41 | 'redis' => [ 42 | 'driver' => 'redis', 43 | 'connection' => 'default', 44 | ], 45 | 46 | 'log' => [ 47 | 'driver' => 'log', 48 | ], 49 | 50 | ], 51 | 52 | ]; 53 | -------------------------------------------------------------------------------- /HMS/app/Http/Controllers/Manage/UserController.php: -------------------------------------------------------------------------------- 1 | all(); 35 | $user['password'] = bcrypt('123'); 36 | User::create($user); 37 | 38 | $data['title'] = "MANAGE USER"; 39 | $data['user'] = User::all(); 40 | return view('default/listUser',$data); 41 | } 42 | public function updateUser(Request $request){ 43 | $user = new User; 44 | $user = $request->except('_token'); 45 | User::where('id', $user['id'])->update($user); 46 | return redirect()->route('listuser_com'); 47 | 48 | } 49 | public function deleteUser($id){ 50 | User::where('id', $id)->delete(); 51 | return redirect()->route('listuser_com'); 52 | 53 | } 54 | 55 | 56 | } 57 | -------------------------------------------------------------------------------- /HMS/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 | -------------------------------------------------------------------------------- /HMS/artisan: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env php 2 | make(Illuminate\Contracts\Console\Kernel::class); 32 | 33 | $status = $kernel->handle( 34 | $input = new Symfony\Component\Console\Input\ArgvInput, 35 | new Symfony\Component\Console\Output\ConsoleOutput 36 | ); 37 | 38 | /* 39 | |-------------------------------------------------------------------------- 40 | | Shutdown The Application 41 | |-------------------------------------------------------------------------- 42 | | 43 | | Once Artisan has finished running. We will fire off the shutdown events 44 | | so that any final work may be done by the application before we shut 45 | | down the process. This is the last thing to happen to the request. 46 | | 47 | */ 48 | 49 | $kernel->terminate($input, $status); 50 | 51 | exit($status); 52 | -------------------------------------------------------------------------------- /HMS/app/Http/Controllers/Manage/PaymentController.php: -------------------------------------------------------------------------------- 1 | 8 | */ 9 | 10 | /* 11 | |-------------------------------------------------------------------------- 12 | | Register The Auto Loader 13 | |-------------------------------------------------------------------------- 14 | | 15 | | Composer provides a convenient, automatically generated class loader for 16 | | our application. We just need to utilize it! We'll simply require it 17 | | into the script here so that we don't have to worry about manual 18 | | loading any of our classes later on. It feels nice to relax. 19 | | 20 | */ 21 | 22 | require __DIR__.'/HMS/bootstrap/autoload.php'; 23 | 24 | /* 25 | |-------------------------------------------------------------------------- 26 | | Turn On The Lights 27 | |-------------------------------------------------------------------------- 28 | | 29 | | We need to illuminate PHP development, so let us turn on the lights. 30 | | This bootstraps the framework and gets it ready for use, then it 31 | | will load up this application so that we can run it and send 32 | | the responses back to the browser and delight our users. 33 | | 34 | */ 35 | 36 | $app = require_once __DIR__.'/HMS/bootstrap/app.php'; 37 | 38 | /* 39 | |-------------------------------------------------------------------------- 40 | | Run The Application 41 | |-------------------------------------------------------------------------- 42 | | 43 | | Once we have the application, we can handle the incoming request 44 | | through the kernel, and send the associated response back to 45 | | the client's browser allowing them to enjoy the creative 46 | | and wonderful application we have prepared for them. 47 | | 48 | */ 49 | 50 | $kernel = $app->make(Illuminate\Contracts\Http\Kernel::class); 51 | 52 | $response = $kernel->handle( 53 | $request = Illuminate\Http\Request::capture() 54 | ); 55 | 56 | $response->send(); 57 | 58 | $kernel->terminate($request, $response); 59 | -------------------------------------------------------------------------------- /HMS/app/Http/Controllers/Auth/AuthController.php: -------------------------------------------------------------------------------- 1 | redirectPath = Session::get('redirect_url',''); 40 | $this->middleware('guest', ['except' => 'getLogout']); 41 | } 42 | /** 43 | * Get a validator for an incoming registration request. 44 | * 45 | * @param array $data 46 | * @return \Illuminate\Contracts\Validation\Validator 47 | */ 48 | protected function validator(array $data) 49 | { 50 | return Validator::make($data, [ 51 | 'name' => 'required|max:255', 52 | 'email' => 'required|email|max:255|unique:users', 53 | 'password' => 'required|confirmed|min:6', 54 | ]); 55 | } 56 | 57 | /** 58 | * Create a new user instance after a valid registration. 59 | * 60 | * @param array $data 61 | * @return User 62 | */ 63 | protected function create(array $data) 64 | { 65 | return User::create([ 66 | 'name' => $data['name'], 67 | 'email' => $data['email'], 68 | 'password' => bcrypt($data['password']), 69 | ]); 70 | } 71 | 72 | } -------------------------------------------------------------------------------- /HMS/config/cache.php: -------------------------------------------------------------------------------- 1 | env('CACHE_DRIVER', 'file'), 17 | 18 | /* 19 | |-------------------------------------------------------------------------- 20 | | Cache Stores 21 | |-------------------------------------------------------------------------- 22 | | 23 | | Here you may define all of the cache "stores" for your application as 24 | | well as their drivers. You may even define multiple stores for the 25 | | same cache driver to group types of items stored in your caches. 26 | | 27 | */ 28 | 29 | 'stores' => [ 30 | 31 | 'apc' => [ 32 | 'driver' => 'apc', 33 | ], 34 | 35 | 'array' => [ 36 | 'driver' => 'array', 37 | ], 38 | 39 | 'database' => [ 40 | 'driver' => 'database', 41 | 'table' => 'cache', 42 | 'connection' => null, 43 | ], 44 | 45 | 'file' => [ 46 | 'driver' => 'file', 47 | 'path' => storage_path('framework/cache'), 48 | ], 49 | 50 | 'memcached' => [ 51 | 'driver' => 'memcached', 52 | 'servers' => [ 53 | [ 54 | 'host' => '127.0.0.1', 'port' => 11211, 'weight' => 100, 55 | ], 56 | ], 57 | ], 58 | 59 | 'redis' => [ 60 | 'driver' => 'redis', 61 | 'connection' => 'default', 62 | ], 63 | 64 | ], 65 | 66 | /* 67 | |-------------------------------------------------------------------------- 68 | | Cache Key Prefix 69 | |-------------------------------------------------------------------------- 70 | | 71 | | When utilizing a RAM based store such as APC or Memcached, there might 72 | | be other applications utilizing the same cache. So, we'll specify a 73 | | value to get prefixed to all our keys so we can avoid collisions. 74 | | 75 | */ 76 | 77 | 'prefix' => 'laravel', 78 | 79 | ]; 80 | -------------------------------------------------------------------------------- /HMS/app/Http/Controllers/Manage/CheckoutController.php: -------------------------------------------------------------------------------- 1 | first(); 25 | $data['guest'] = Guest::where('id', $booking['guest_id'])->first(); 26 | 27 | $data['total'] = 100; 28 | return view('receiption/checkoutPreview',$data); 29 | } 30 | public function listCheckout() 31 | { 32 | // 33 | } 34 | 35 | /** 36 | * add a checkout 37 | * @param Request $request [description] 38 | * @return [type] [description] 39 | */ 40 | public function addCheckout(Request $request) 41 | { 42 | $checkout = new Checkout; 43 | $checkout = $request->all(); 44 | Checkout::create($checkout); 45 | //update status room 46 | Room::where('name', $checkout['room_name'])->update(array('status'=> 'A')); 47 | return redirect()->route('listroom_com'); 48 | } 49 | 50 | /** 51 | * Display the specified resource. 52 | * 53 | * @param int $id 54 | * @return \Illuminate\Http\Response 55 | */ 56 | public function show($id) 57 | { 58 | // 59 | } 60 | 61 | /** 62 | * Show the form for editing the specified resource. 63 | * 64 | * @param int $id 65 | * @return \Illuminate\Http\Response 66 | */ 67 | public function edit($id) 68 | { 69 | // 70 | } 71 | 72 | /** 73 | * Update the specified resource in storage. 74 | * 75 | * @param \Illuminate\Http\Request $request 76 | * @param int $id 77 | * @return \Illuminate\Http\Response 78 | */ 79 | public function update(Request $request, $id) 80 | { 81 | // 82 | } 83 | 84 | /** 85 | * Remove the specified resource from storage. 86 | * 87 | * @param int $id 88 | * @return \Illuminate\Http\Response 89 | */ 90 | public function destroy($id) 91 | { 92 | // 93 | } 94 | } 95 | -------------------------------------------------------------------------------- /HMS/config/auth.php: -------------------------------------------------------------------------------- 1 | 'eloquent', 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Authentication Model 23 | |-------------------------------------------------------------------------- 24 | | 25 | | When using the "Eloquent" authentication driver, we need to know which 26 | | Eloquent model should be used to retrieve your users. Of course, it 27 | | is often just the "User" model but you may use whatever you like. 28 | | 29 | */ 30 | 31 | 'model' => App\User::class, 32 | 33 | /* 34 | |-------------------------------------------------------------------------- 35 | | Authentication Table 36 | |-------------------------------------------------------------------------- 37 | | 38 | | When using the "Database" authentication driver, we need to know which 39 | | table should be used to retrieve your users. We have chosen a basic 40 | | default value but you may easily change it to any table you like. 41 | | 42 | */ 43 | 44 | 'table' => 'users', 45 | 46 | /* 47 | |-------------------------------------------------------------------------- 48 | | Password Reset Settings 49 | |-------------------------------------------------------------------------- 50 | | 51 | | Here you may set the options for resetting passwords including the view 52 | | that is your password reset e-mail. You can also set the name of the 53 | | table that maintains all of the reset tokens for your application. 54 | | 55 | | The expire time is the number of minutes that the reset token should be 56 | | considered valid. This security feature keeps tokens short-lived so 57 | | they have less time to be guessed. You may change this as needed. 58 | | 59 | */ 60 | 61 | 'password' => [ 62 | 'email' => 'emails.password', 63 | 'table' => 'password_resets', 64 | 'expire' => 60, 65 | ], 66 | 67 | ]; 68 | -------------------------------------------------------------------------------- /HMS/app/Http/Controllers/Manage/RoomController.php: -------------------------------------------------------------------------------- 1 | all(); 43 | Room::create($room); 44 | return redirect()->route('listroom_com'); 45 | } 46 | public function addRoomType(Request $request){ 47 | $roomtype = new RoomType; 48 | $roomtype = $request->all(); 49 | RoomType::create($roomtype); 50 | return redirect()->route('listroomtype_com'); 51 | } 52 | public function updateRoom(Request $request){ 53 | $room = new Room; 54 | $room = $request->except('_token'); 55 | //var_dump($room);die(); 56 | Room::where('id', $room['id'])->update($room); 57 | return redirect()->route('listroom_com'); 58 | 59 | } 60 | public function updateRoomType(Request $request){ 61 | $roomtype = new RoomType; 62 | $roomtype = $request->except('_token'); 63 | RoomType::where('id',$roomtype['id'])->update($roomtype); 64 | return redirect()->route('listroomtype_com'); 65 | 66 | } 67 | public function deleteRoom($id){ 68 | Room::where('id',$id)->delete(); 69 | return redirect()->route('listroom_com'); 70 | 71 | } 72 | public function deleteRoomType($id){ 73 | RoomType::where('id', $id)->delete(); 74 | return redirect()->route('listroomtype_com'); 75 | 76 | 77 | } 78 | 79 | } 80 | -------------------------------------------------------------------------------- /HMS/resources/views/manage/adduser.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layout') 2 | @section('title') 3 | {{ $title }} 4 | @stop 5 | @section('content') 6 | 7 | 8 | 9 | {!! csrf_field() !!} 10 | 11 |
12 | 13 |
14 | 15 |
16 | 17 | 18 |
19 | 20 |
21 |
22 |
23 | 24 |
25 | 26 | 27 |
28 | 35 | 36 |
37 | 38 |
39 |
40 |
41 | 42 |
43 | 49 |
50 | 51 | 52 |
53 | 54 |
55 |
56 |
57 | 58 | 63 | 68 | 69 | 70 | 71 |
72 | 73 | 74 | 75 | 76 | 77 | 78 | @stop -------------------------------------------------------------------------------- /HMS/config/filesystems.php: -------------------------------------------------------------------------------- 1 | 'local', 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Default Cloud Filesystem Disk 23 | |-------------------------------------------------------------------------- 24 | | 25 | | Many applications store files both locally and in the cloud. For this 26 | | reason, you may specify a default "cloud" driver here. This driver 27 | | will be bound as the Cloud disk implementation in the container. 28 | | 29 | */ 30 | 31 | 'cloud' => 's3', 32 | 33 | /* 34 | |-------------------------------------------------------------------------- 35 | | Filesystem Disks 36 | |-------------------------------------------------------------------------- 37 | | 38 | | Here you may configure as many filesystem "disks" as you wish, and you 39 | | may even configure multiple disks of the same driver. Defaults have 40 | | been setup for each driver as an example of the required options. 41 | | 42 | */ 43 | 44 | 'disks' => [ 45 | 46 | 'local' => [ 47 | 'driver' => 'local', 48 | 'root' => storage_path('app'), 49 | ], 50 | 51 | 'ftp' => [ 52 | 'driver' => 'ftp', 53 | 'host' => 'ftp.example.com', 54 | 'username' => 'your-username', 55 | 'password' => 'your-password', 56 | 57 | // Optional FTP Settings... 58 | // 'port' => 21, 59 | // 'root' => '', 60 | // 'passive' => true, 61 | // 'ssl' => true, 62 | // 'timeout' => 30, 63 | ], 64 | 65 | 's3' => [ 66 | 'driver' => 's3', 67 | 'key' => 'your-key', 68 | 'secret' => 'your-secret', 69 | 'region' => 'your-region', 70 | 'bucket' => 'your-bucket', 71 | ], 72 | 73 | 'rackspace' => [ 74 | 'driver' => 'rackspace', 75 | 'username' => 'your-username', 76 | 'key' => 'your-key', 77 | 'container' => 'your-container', 78 | 'endpoint' => 'https://identity.api.rackspacecloud.com/v2.0/', 79 | 'region' => 'IAD', 80 | 'url_type' => 'publicURL', 81 | ], 82 | 83 | ], 84 | 85 | ]; 86 | -------------------------------------------------------------------------------- /HMS/config/queue.php: -------------------------------------------------------------------------------- 1 | env('QUEUE_DRIVER', 'sync'), 20 | 21 | /* 22 | |-------------------------------------------------------------------------- 23 | | Queue Connections 24 | |-------------------------------------------------------------------------- 25 | | 26 | | Here you may configure the connection information for each server that 27 | | is used by your application. A default configuration has been added 28 | | for each back-end shipped with Laravel. You are free to add more. 29 | | 30 | */ 31 | 32 | 'connections' => [ 33 | 34 | 'sync' => [ 35 | 'driver' => 'sync', 36 | ], 37 | 38 | 'database' => [ 39 | 'driver' => 'database', 40 | 'table' => 'jobs', 41 | 'queue' => 'default', 42 | 'expire' => 60, 43 | ], 44 | 45 | 'beanstalkd' => [ 46 | 'driver' => 'beanstalkd', 47 | 'host' => 'localhost', 48 | 'queue' => 'default', 49 | 'ttr' => 60, 50 | ], 51 | 52 | 'sqs' => [ 53 | 'driver' => 'sqs', 54 | 'key' => 'your-public-key', 55 | 'secret' => 'your-secret-key', 56 | 'queue' => 'your-queue-url', 57 | 'region' => 'us-east-1', 58 | ], 59 | 60 | 'iron' => [ 61 | 'driver' => 'iron', 62 | 'host' => 'mq-aws-us-east-1.iron.io', 63 | 'token' => 'your-token', 64 | 'project' => 'your-project-id', 65 | 'queue' => 'your-queue-name', 66 | 'encrypt' => true, 67 | ], 68 | 69 | 'redis' => [ 70 | 'driver' => 'redis', 71 | 'connection' => 'default', 72 | 'queue' => 'default', 73 | 'expire' => 60, 74 | ], 75 | 76 | ], 77 | 78 | /* 79 | |-------------------------------------------------------------------------- 80 | | Failed Queue Jobs 81 | |-------------------------------------------------------------------------- 82 | | 83 | | These options configure the behavior of failed queue job logging so you 84 | | can control which database and table are used to store the jobs that 85 | | have failed. You may change them to any database / table you wish. 86 | | 87 | */ 88 | 89 | 'failed' => [ 90 | 'database' => env('DB_CONNECTION', 'mysql'), 91 | 'table' => 'failed_jobs', 92 | ], 93 | 94 | ]; 95 | -------------------------------------------------------------------------------- /HMS/app/Http/Controllers/Manage/ServiceController.php: -------------------------------------------------------------------------------- 1 | middleware('auth'); 17 | } 18 | 19 | public function bookingRoomGet($name){ 20 | $data['title'] = "Make reservation"; 21 | $data['nameroom'] = $name; 22 | $data['receiption'] = User::where('role', '0')->get(); //0: receiption 1: director 23 | return view('receiption/bookingroom',$data); 24 | } 25 | public function bookingRoomPost(Request $request){ 26 | $data['title'] = "Make reservation"; 27 | //save to guest table 28 | $guest = new Guest; 29 | $guest = $request->all(); 30 | $guest_id = Guest::create($guest); 31 | 32 | //save to booking table 33 | $booking = new Booking; 34 | $booking = $request->all(); 35 | $booking['guest_id'] = $guest_id->id; 36 | Booking::create($booking); 37 | 38 | //update status room 39 | Room::where('name', $booking['room_name'])->update(array('status'=> 'N')); 40 | 41 | return redirect()->route('listbooking_com'); 42 | } 43 | public function listBooking(){ 44 | $data['title'] = "LIST BOOKING"; 45 | $data['booking'] = Booking::all(); 46 | return view('default/listBooking',$data); 47 | } 48 | /** 49 | * Show the form for creating a new resource. 50 | * 51 | * @return \Illuminate\Http\Response 52 | */ 53 | public function create() 54 | { 55 | //add new service 56 | } 57 | 58 | /** 59 | * Store a newly created resource in storage. 60 | * 61 | * @param \Illuminate\Http\Request $request 62 | * @return \Illuminate\Http\Response 63 | */ 64 | public function store(Request $request) 65 | { 66 | // 67 | } 68 | 69 | /** 70 | * Display the specified resource. 71 | * 72 | * @param int $id 73 | * @return \Illuminate\Http\Response 74 | */ 75 | public function show($id) 76 | { 77 | // 78 | } 79 | 80 | /** 81 | * Show the form for editing the specified resource. 82 | * 83 | * @param int $id 84 | * @return \Illuminate\Http\Response 85 | */ 86 | public function edit($id) 87 | { 88 | // 89 | } 90 | 91 | /** 92 | * Update the specified resource in storage. 93 | * 94 | * @param \Illuminate\Http\Request $request 95 | * @param int $id 96 | * @return \Illuminate\Http\Response 97 | */ 98 | public function update(Request $request, $id) 99 | { 100 | // 101 | } 102 | 103 | /** 104 | * Remove the specified resource from storage. 105 | * 106 | * @param int $id 107 | * @return \Illuminate\Http\Response 108 | */ 109 | public function destroy($id) 110 | { 111 | // 112 | } 113 | } 114 | -------------------------------------------------------------------------------- /assets/css/metro-rtl.min.css: -------------------------------------------------------------------------------- 1 | [dir=ltr],[dir=rtl]{unicode-bidi:embed}[dir=ltr],bdo[dir=ltr]{direction:ltr}bdo[dir=ltr],bdo[dir=rtl]{unicode-bidi:bidi-override}[dir=rtl]{direction:rtl}bdo[dir=rtl]{direction:rtl}[dir=rtl] ol,[dir=rtl] ul,ol[dir=rtl],ul[dir=rtl]{margin-right:.3125rem;margin-left:0;padding-right:.625rem}[dir=rtl] ol li ol,[dir=rtl] ol li ul,[dir=rtl] ul li ol,[dir=rtl] ul li ul,ol[dir=rtl] li ol,ol[dir=rtl] li ul,ul[dir=rtl] li ol,ul[dir=rtl] li ul{padding-right:1.5625rem;padding-left:0}[dir=rtl] dl dd,dl[dir=rtl] dd{margin-right:.9375rem;margin-left:0}[dir=rtl] dl.horizontal dt,dl[dir=rtl].horizontal dt{float:right;width:10rem;overflow:hidden;clear:left;text-align:right;text-overflow:ellipsis;white-space:nowrap}[dir=rtl] dl.horizontal dd,dl[dir=rtl].horizontal dd{margin-right:11.25rem;margin-left:0}[dir=rtl] blockquote,blockquote[dir=rtl]{margin:.625rem 0;padding:0 .625rem 0 0;border-left:none;border-right:.25rem #999 solid}.input-control[dir=rtl].email .button,.input-control[dir=rtl].email .button-group,.input-control[dir=rtl].file .button,.input-control[dir=rtl].file .button-group,.input-control[dir=rtl].number .button,.input-control[dir=rtl].number .button-group,.input-control[dir=rtl].password .button,.input-control[dir=rtl].password .button-group,.input-control[dir=rtl].select .button,.input-control[dir=rtl].select .button-group,.input-control[dir=rtl].tel .button,.input-control[dir=rtl].tel .button-group,.input-control[dir=rtl].text .button,.input-control[dir=rtl].text .button-group,[dir=rtl] .input-control.email .button,[dir=rtl] .input-control.email .button-group,[dir=rtl] .input-control.file .button,[dir=rtl] .input-control.file .button-group,[dir=rtl] .input-control.number .button,[dir=rtl] .input-control.number .button-group,[dir=rtl] .input-control.password .button,[dir=rtl] .input-control.password .button-group,[dir=rtl] .input-control.select .button,[dir=rtl] .input-control.select .button-group,[dir=rtl] .input-control.tel .button,[dir=rtl] .input-control.tel .button-group,[dir=rtl] .input-control.text .button,[dir=rtl] .input-control.text .button-group{right:auto;left:0}.input-control[dir=rtl].email .prepend-icon,.input-control[dir=rtl].file .prepend-icon,.input-control[dir=rtl].number .prepend-icon,.input-control[dir=rtl].password .prepend-icon,.input-control[dir=rtl].select .prepend-icon,.input-control[dir=rtl].tel .prepend-icon,.input-control[dir=rtl].text .prepend-icon,[dir=rtl] .input-control.email .prepend-icon,[dir=rtl] .input-control.file .prepend-icon,[dir=rtl] .input-control.number .prepend-icon,[dir=rtl] .input-control.password .prepend-icon,[dir=rtl] .input-control.select .prepend-icon,[dir=rtl] .input-control.tel .prepend-icon,[dir=rtl] .input-control.text .prepend-icon{left:auto;right:4px}.input-control[dir=rtl].email .prepend-icon~input,.input-control[dir=rtl].file .prepend-icon~input,.input-control[dir=rtl].number .prepend-icon~input,.input-control[dir=rtl].password .prepend-icon~input,.input-control[dir=rtl].select .prepend-icon~input,.input-control[dir=rtl].tel .prepend-icon~input,.input-control[dir=rtl].text .prepend-icon~input,[dir=rtl] .input-control.email .prepend-icon~input,[dir=rtl] .input-control.file .prepend-icon~input,[dir=rtl] .input-control.number .prepend-icon~input,[dir=rtl] .input-control.password .prepend-icon~input,[dir=rtl] .input-control.select .prepend-icon~input,[dir=rtl] .input-control.tel .prepend-icon~input,[dir=rtl] .input-control.text .prepend-icon~input{padding-left:0;padding-right:30px} -------------------------------------------------------------------------------- /HMS/app/Http/routes.php: -------------------------------------------------------------------------------- 1 | 'login',function () { 20 | // return view('auth/login'); 21 | // }]); 22 | 23 | 24 | // Authentication routes... 25 | Route::get('auth/login', 'Auth\AuthController@getLogin')->name('login_get'); 26 | Route::post('auth/login', 'Auth\AuthController@postLogin')->name('login_post'); 27 | Route::get('auth/logout', 'Auth\AuthController@getLogout')->name('logout'); 28 | 29 | 30 | 31 | Route::group(['namespace' => 'Manage'], function(){ 32 | Route::group(['prefix' => 'manage'], function () { 33 | 34 | Route::get('listguest', 'GuestController@listGuest')->name('listguest_com'); 35 | Route::post('updateguest', 'GuestController@updateGuest')->name('updateguest_com'); 36 | 37 | Route::get('listuser', 'UserController@listUser')->name('listuser_com'); 38 | Route::post('updateuser', 'UserController@updateUser')->name('updateuser_man'); 39 | Route::get('deleteuser/{id}', 'UserController@deleteUser')->name('deleteuser_man'); 40 | 41 | 42 | Route::get('listroom', 'RoomController@listRoom')->name('listroom_com'); 43 | Route::get('listroomtype', 'RoomController@listRoomType')->name('listroomtype_com'); 44 | Route::match(array('GET', 'POST'), 'addroomtype', 'RoomController@createRoomType')->name('addroomtype_man'); 45 | 46 | Route::get('listroombyicon', 'RoomController@listRoomByIcon')->name('listroombyicon_com'); 47 | 48 | Route::get('adduser', 'UserController@addUser')->name('adduser_man'); 49 | Route::post('adduser', 'UserController@addUserPost')->name('O'); 50 | 51 | Route::post('addroom', 'RoomController@addRoom')->name('addroom_man'); 52 | Route::post('addroomtype', 'RoomController@addRoomType')->name('addroomtype_man'); 53 | 54 | 55 | 56 | Route::get('updateuser', 'UserController@updateuser')->name('updateuser_man'); 57 | Route::post('updateroom', 'RoomController@updateRoom')->name('updateroom_man'); 58 | Route::post('updateroomtype', 'RoomController@updateRoomType')->name('updateroomtype_man'); 59 | 60 | Route::get('deleteroomtype/{id}', 'RoomController@deleteRoomType')->name('deleteroomtype_man'); 61 | Route::get('deleteroom/{id}', 'RoomController@deleteRoom')->name('deleteroom_man'); 62 | 63 | 64 | Route::get('listbooking', 'ServiceController@listBooking')->name('listbooking_com'); 65 | Route::get('bookingroom/{name}', 'ServiceController@bookingRoomGet')->name('bookingroom_rec_get'); 66 | Route::post('bookingroom', 'ServiceController@bookingRoomPost')->name('bookingroom_rec_post'); 67 | 68 | Route::get('checkout', 'ServiceController@checkout')->name('checkout_rec'); 69 | Route::get('checkoutpreview/{room}', 'CheckoutController@checkoutPreview')->name('checkoutpreview_rec'); 70 | Route::post('addcheckout', 'CheckoutController@addCheckout')->name('addcheckout_rec'); 71 | 72 | 73 | }); 74 | 75 | }); 76 | 77 | -------------------------------------------------------------------------------- /HMS/resources/views/default/listBooking.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layout') 2 | @section('title') 3 | {{ $title }} 4 | @stop 5 | 6 | @section('content') 7 | 8 | 9 | 10 |
11 | {{-- area to list booking --}} 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | @foreach ($booking as $b) 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 46 | 47 | @endforeach 48 | 49 | 50 |
IDGuestIDRoomChild_NumberAdult_NumberDepositCreated_atCheckoutSatusReceiptionAction
{{ $b->id }} {{ $b->guest_id }}{{ $b->room_name }}{{ $b->child_number }}{{ $b->adult_number }}{{ $b->deposit }}{{ $b->created_at }}{{ $b->checkout }}fix later{{ $b->receiption }} 43 | 44 | 45 |
51 | 52 | {{-- area for modal window update room type --}} 53 |
54 |
55 |

Edit Room Type

56 |

57 |

58 |
59 | 60 |
61 | 62 |
63 | 64 |
65 | 66 |
67 |
68 | 69 |
70 | 71 |

72 | 73 |
74 | 75 |
76 | 83 | 84 | @stop -------------------------------------------------------------------------------- /assets/css/metro-rtl.css: -------------------------------------------------------------------------------- 1 | *[dir=ltr] { 2 | direction: ltr; 3 | unicode-bidi: embed; 4 | } 5 | *[dir=rtl] { 6 | direction: rtl; 7 | unicode-bidi: embed; 8 | } 9 | bdo[dir=ltr] { 10 | direction: ltr; 11 | unicode-bidi: bidi-override; 12 | } 13 | bdo[dir=rtl] { 14 | direction: rtl; 15 | unicode-bidi: bidi-override; 16 | } 17 | *[dir=rtl] ul, 18 | *[dir=rtl] ol, 19 | ul[dir=rtl], 20 | ol[dir=rtl] { 21 | margin-right: .3125rem; 22 | margin-left: 0; 23 | padding-right: .625rem; 24 | } 25 | *[dir=rtl] ul li ul, 26 | *[dir=rtl] ol li ul, 27 | ul[dir=rtl] li ul, 28 | ol[dir=rtl] li ul, 29 | *[dir=rtl] ul li ol, 30 | *[dir=rtl] ol li ol, 31 | ul[dir=rtl] li ol, 32 | ol[dir=rtl] li ol { 33 | padding-right: 1.5625rem; 34 | padding-left: 0; 35 | } 36 | *[dir=rtl] dl dd, 37 | dl[dir=rtl] dd { 38 | margin-right: .9375rem; 39 | margin-left: 0; 40 | } 41 | *[dir=rtl] dl.horizontal dt, 42 | dl[dir=rtl].horizontal dt { 43 | float: right; 44 | width: 10rem; 45 | overflow: hidden; 46 | clear: left; 47 | text-align: right; 48 | text-overflow: ellipsis; 49 | white-space: nowrap; 50 | } 51 | *[dir=rtl] dl.horizontal dd, 52 | dl[dir=rtl].horizontal dd { 53 | margin-right: 11.25rem; 54 | margin-left: 0; 55 | } 56 | *[dir=rtl] blockquote, 57 | blockquote[dir=rtl] { 58 | margin: .625rem 0; 59 | padding: 0 .625rem 0 0; 60 | border-left: none; 61 | border-right: 0.25rem #999999 solid; 62 | } 63 | *[dir=rtl] .input-control.text .button, 64 | .input-control[dir=rtl].text .button, 65 | *[dir=rtl] .input-control.select .button, 66 | .input-control[dir=rtl].select .button, 67 | *[dir=rtl] .input-control.file .button, 68 | .input-control[dir=rtl].file .button, 69 | *[dir=rtl] .input-control.password .button, 70 | .input-control[dir=rtl].password .button, 71 | *[dir=rtl] .input-control.number .button, 72 | .input-control[dir=rtl].number .button, 73 | *[dir=rtl] .input-control.email .button, 74 | .input-control[dir=rtl].email .button, 75 | *[dir=rtl] .input-control.tel .button, 76 | .input-control[dir=rtl].tel .button, 77 | *[dir=rtl] .input-control.text .button-group, 78 | .input-control[dir=rtl].text .button-group, 79 | *[dir=rtl] .input-control.select .button-group, 80 | .input-control[dir=rtl].select .button-group, 81 | *[dir=rtl] .input-control.file .button-group, 82 | .input-control[dir=rtl].file .button-group, 83 | *[dir=rtl] .input-control.password .button-group, 84 | .input-control[dir=rtl].password .button-group, 85 | *[dir=rtl] .input-control.number .button-group, 86 | .input-control[dir=rtl].number .button-group, 87 | *[dir=rtl] .input-control.email .button-group, 88 | .input-control[dir=rtl].email .button-group, 89 | *[dir=rtl] .input-control.tel .button-group, 90 | .input-control[dir=rtl].tel .button-group { 91 | right: auto; 92 | left: 0; 93 | } 94 | *[dir=rtl] .input-control.text .prepend-icon, 95 | .input-control[dir=rtl].text .prepend-icon, 96 | *[dir=rtl] .input-control.select .prepend-icon, 97 | .input-control[dir=rtl].select .prepend-icon, 98 | *[dir=rtl] .input-control.file .prepend-icon, 99 | .input-control[dir=rtl].file .prepend-icon, 100 | *[dir=rtl] .input-control.password .prepend-icon, 101 | .input-control[dir=rtl].password .prepend-icon, 102 | *[dir=rtl] .input-control.number .prepend-icon, 103 | .input-control[dir=rtl].number .prepend-icon, 104 | *[dir=rtl] .input-control.email .prepend-icon, 105 | .input-control[dir=rtl].email .prepend-icon, 106 | *[dir=rtl] .input-control.tel .prepend-icon, 107 | .input-control[dir=rtl].tel .prepend-icon { 108 | left: auto; 109 | right: 4px; 110 | } 111 | *[dir=rtl] .input-control.text .prepend-icon ~ input, 112 | .input-control[dir=rtl].text .prepend-icon ~ input, 113 | *[dir=rtl] .input-control.select .prepend-icon ~ input, 114 | .input-control[dir=rtl].select .prepend-icon ~ input, 115 | *[dir=rtl] .input-control.file .prepend-icon ~ input, 116 | .input-control[dir=rtl].file .prepend-icon ~ input, 117 | *[dir=rtl] .input-control.password .prepend-icon ~ input, 118 | .input-control[dir=rtl].password .prepend-icon ~ input, 119 | *[dir=rtl] .input-control.number .prepend-icon ~ input, 120 | .input-control[dir=rtl].number .prepend-icon ~ input, 121 | *[dir=rtl] .input-control.email .prepend-icon ~ input, 122 | .input-control[dir=rtl].email .prepend-icon ~ input, 123 | *[dir=rtl] .input-control.tel .prepend-icon ~ input, 124 | .input-control[dir=rtl].tel .prepend-icon ~ input { 125 | padding-left: 0; 126 | padding-right: 30px; 127 | } 128 | -------------------------------------------------------------------------------- /HMS/resources/views/receiption/checkoutPreview.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layout') 2 | @section('title') 3 | {{ $title }} 4 | @stop 5 | @section('content') 6 | 7 | 8 | 9 |
10 | {!! csrf_field() !!} 11 | 12 |

Guest Detail

13 |
14 | 15 | 16 |
17 | 18 |
19 | 20 | 21 |
22 |
23 | 24 |
25 | 26 |
27 | 28 |
29 | 30 |
31 |
32 |
33 |
34 | 35 |
36 | 37 |
38 | 39 |
40 | 41 |
42 |
43 |
44 | 45 |
46 | 47 |
48 | 49 |
50 | 51 |
52 |
53 | 54 | 55 | 56 | 57 | 58 |
59 |
60 |

Booking Detail

61 |
62 |
63 | 64 |
65 | 66 | 67 |
68 | 69 |
70 | 71 | 72 |
73 | 81 |
82 |
83 | 84 |
85 | 86 |
87 | 88 |
89 | 90 |
91 |
92 |
93 | 94 |
95 | 96 |
97 | 98 |
99 | 100 |
101 |
102 |
103 | 104 |
105 | 106 |
107 | 108 |
109 |
110 | 111 |
112 | 113 |
114 |
115 | 116 | 117 | 118 | 119 | 120 | @stop -------------------------------------------------------------------------------- /HMS/resources/views/auth/login.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | Login form :: Metro UI CSS - The front-end framework for developing projects on the web in Windows Metro Style 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 40 | 41 | 55 | 56 | 57 | 102 | 103 | -------------------------------------------------------------------------------- /HMS/config/database.php: -------------------------------------------------------------------------------- 1 | PDO::FETCH_CLASS, 17 | 18 | /* 19 | |-------------------------------------------------------------------------- 20 | | Default Database Connection Name 21 | |-------------------------------------------------------------------------- 22 | | 23 | | Here you may specify which of the database connections below you wish 24 | | to use as your default connection for all database work. Of course 25 | | you may use many connections at once using the Database library. 26 | | 27 | */ 28 | 29 | 'default' => env('DB_CONNECTION', 'mysql'), 30 | 31 | /* 32 | |-------------------------------------------------------------------------- 33 | | Database Connections 34 | |-------------------------------------------------------------------------- 35 | | 36 | | Here are each of the database connections setup for your application. 37 | | Of course, examples of configuring each database platform that is 38 | | supported by Laravel is shown below to make development simple. 39 | | 40 | | 41 | | All database work in Laravel is done through the PHP PDO facilities 42 | | so make sure you have the driver for your particular database of 43 | | choice installed on your machine before you begin development. 44 | | 45 | */ 46 | 47 | 'connections' => [ 48 | 49 | 'sqlite' => [ 50 | 'driver' => 'sqlite', 51 | 'database' => database_path('database.sqlite'), 52 | 'prefix' => '', 53 | ], 54 | 55 | 'mysql' => [ 56 | 'driver' => 'mysql', 57 | 'host' => env('DB_HOST', 'localhost'), 58 | 'database' => env('DB_DATABASE', 'HMS'), 59 | 'username' => env('DB_USERNAME', 'root'), 60 | 'password' => env('DB_PASSWORD', ''), 61 | 'charset' => 'utf8', 62 | 'collation' => 'utf8_unicode_ci', 63 | 'prefix' => '', 64 | 'strict' => false, 65 | ], 66 | 67 | 'pgsql' => [ 68 | 'driver' => 'pgsql', 69 | 'host' => env('DB_HOST', 'localhost'), 70 | 'database' => env('DB_DATABASE', 'forge'), 71 | 'username' => env('DB_USERNAME', 'forge'), 72 | 'password' => env('DB_PASSWORD', ''), 73 | 'charset' => 'utf8', 74 | 'prefix' => '', 75 | 'schema' => 'public', 76 | ], 77 | 78 | 'sqlsrv' => [ 79 | 'driver' => 'sqlsrv', 80 | 'host' => env('DB_HOST', 'localhost'), 81 | 'database' => env('DB_DATABASE', 'forge'), 82 | 'username' => env('DB_USERNAME', 'forge'), 83 | 'password' => env('DB_PASSWORD', ''), 84 | 'charset' => 'utf8', 85 | 'prefix' => '', 86 | ], 87 | 88 | ], 89 | 90 | /* 91 | |-------------------------------------------------------------------------- 92 | | Migration Repository Table 93 | |-------------------------------------------------------------------------- 94 | | 95 | | This table keeps track of all the migrations that have already run for 96 | | your application. Using this information, we can determine which of 97 | | the migrations on disk haven't actually been run in the database. 98 | | 99 | */ 100 | 101 | 'migrations' => 'migrations', 102 | 103 | /* 104 | |-------------------------------------------------------------------------- 105 | | Redis Databases 106 | |-------------------------------------------------------------------------- 107 | | 108 | | Redis is an open source, fast, and advanced key-value store that also 109 | | provides a richer set of commands than a typical key-value systems 110 | | such as APC or Memcached. Laravel makes it easy to dig right in. 111 | | 112 | */ 113 | 114 | 'redis' => [ 115 | 116 | 'cluster' => false, 117 | 118 | 'default' => [ 119 | 'host' => '127.0.0.1', 120 | 'port' => 6379, 121 | 'database' => 0, 122 | ], 123 | 124 | ], 125 | 126 | ]; 127 | -------------------------------------------------------------------------------- /HMS/resources/views/auth/login3.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | Login form :: Metro UI CSS - The front-end framework for developing projects on the web in Windows Metro Style 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 39 | 40 | 70 | 71 | 72 | 104 | 105 | 110 | 111 | -------------------------------------------------------------------------------- /HMS/config/mail.php: -------------------------------------------------------------------------------- 1 | env('MAIL_DRIVER', 'smtp'), 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | SMTP Host Address 23 | |-------------------------------------------------------------------------- 24 | | 25 | | Here you may provide the host address of the SMTP server used by your 26 | | applications. A default option is provided that is compatible with 27 | | the Mailgun mail service which will provide reliable deliveries. 28 | | 29 | */ 30 | 31 | 'host' => env('MAIL_HOST', 'smtp.mailgun.org'), 32 | 33 | /* 34 | |-------------------------------------------------------------------------- 35 | | SMTP Host Port 36 | |-------------------------------------------------------------------------- 37 | | 38 | | This is the SMTP port used by your application to deliver e-mails to 39 | | users of the application. Like the host we have set this value to 40 | | stay compatible with the Mailgun e-mail application by default. 41 | | 42 | */ 43 | 44 | 'port' => env('MAIL_PORT', 587), 45 | 46 | /* 47 | |-------------------------------------------------------------------------- 48 | | Global "From" Address 49 | |-------------------------------------------------------------------------- 50 | | 51 | | You may wish for all e-mails sent by your application to be sent from 52 | | the same address. Here, you may specify a name and address that is 53 | | used globally for all e-mails that are sent by your application. 54 | | 55 | */ 56 | 57 | 'from' => ['address' => null, 'name' => null], 58 | 59 | /* 60 | |-------------------------------------------------------------------------- 61 | | E-Mail Encryption Protocol 62 | |-------------------------------------------------------------------------- 63 | | 64 | | Here you may specify the encryption protocol that should be used when 65 | | the application send e-mail messages. A sensible default using the 66 | | transport layer security protocol should provide great security. 67 | | 68 | */ 69 | 70 | 'encryption' => env('MAIL_ENCRYPTION', 'tls'), 71 | 72 | /* 73 | |-------------------------------------------------------------------------- 74 | | SMTP Server Username 75 | |-------------------------------------------------------------------------- 76 | | 77 | | If your SMTP server requires a username for authentication, you should 78 | | set it here. This will get used to authenticate with your server on 79 | | connection. You may also set the "password" value below this one. 80 | | 81 | */ 82 | 83 | 'username' => env('MAIL_USERNAME'), 84 | 85 | /* 86 | |-------------------------------------------------------------------------- 87 | | SMTP Server Password 88 | |-------------------------------------------------------------------------- 89 | | 90 | | Here you may set the password required by your SMTP server to send out 91 | | messages from your application. This will be given to the server on 92 | | connection so that the application will be able to send messages. 93 | | 94 | */ 95 | 96 | 'password' => env('MAIL_PASSWORD'), 97 | 98 | /* 99 | |-------------------------------------------------------------------------- 100 | | Sendmail System Path 101 | |-------------------------------------------------------------------------- 102 | | 103 | | When using the "sendmail" driver to send e-mails, we will need to know 104 | | the path to where Sendmail lives on this server. A default path has 105 | | been provided here, which will work well on most of your systems. 106 | | 107 | */ 108 | 109 | 'sendmail' => '/usr/sbin/sendmail -bs', 110 | 111 | /* 112 | |-------------------------------------------------------------------------- 113 | | Mail "Pretend" 114 | |-------------------------------------------------------------------------- 115 | | 116 | | When this option is enabled, e-mail will not actually be sent over the 117 | | web and will instead be written to your application's logs files so 118 | | you may inspect the message. This is great for local development. 119 | | 120 | */ 121 | 122 | 'pretend' => env('MAIL_PRETEND', false), 123 | 124 | ]; 125 | -------------------------------------------------------------------------------- /HMS/resources/views/receiption/bookingroom.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layout') 2 | @section('title') 3 | {{ $title }} 4 | @stop 5 | @section('content') 6 | 7 | 8 | 9 |
10 | {!! csrf_field() !!} 11 | 12 |

Guest Detail

13 |
14 | 15 |
16 | 17 |
18 | 19 |
20 | 21 |
22 | 23 |
24 |
25 |
26 |
27 | 28 |
29 | 30 |
31 | 32 |
33 | 38 |
39 |
40 |
41 | 42 |
43 | 44 |
45 | 46 |
47 | 48 |
49 |
50 | 51 |
52 | 53 | 59 | 64 | 65 | 66 | 67 |
68 |
69 |

Booking Detail

70 |
71 |
72 | 73 |
74 | 75 | 76 |
77 | 78 |
79 | 80 | 81 |
82 | 91 |
92 |
93 | 94 |
95 | 96 |
97 | 98 |
99 | 100 |
101 |
102 |
103 | 104 |
105 | 106 |
107 | 108 |
109 | 110 |
111 |
112 |
113 | 114 |
115 | 116 |
117 | 118 |
119 |
120 | 121 |
122 | 123 |
124 |
125 | 126 | 127 | 128 | 129 | 130 | 131 | @stop -------------------------------------------------------------------------------- /HMS/config/session.php: -------------------------------------------------------------------------------- 1 | env('SESSION_DRIVER', 'file'), 20 | 21 | /* 22 | |-------------------------------------------------------------------------- 23 | | Session Lifetime 24 | |-------------------------------------------------------------------------- 25 | | 26 | | Here you may specify the number of minutes that you wish the session 27 | | to be allowed to remain idle before it expires. If you want them 28 | | to immediately expire on the browser closing, set that option. 29 | | 30 | */ 31 | 32 | 'lifetime' => 120, 33 | 34 | 'expire_on_close' => false, 35 | 36 | /* 37 | |-------------------------------------------------------------------------- 38 | | Session Encryption 39 | |-------------------------------------------------------------------------- 40 | | 41 | | This option allows you to easily specify that all of your session data 42 | | should be encrypted before it is stored. All encryption will be run 43 | | automatically by Laravel and you can use the Session like normal. 44 | | 45 | */ 46 | 47 | 'encrypt' => false, 48 | 49 | /* 50 | |-------------------------------------------------------------------------- 51 | | Session File Location 52 | |-------------------------------------------------------------------------- 53 | | 54 | | When using the native session driver, we need a location where session 55 | | files may be stored. A default has been set for you but a different 56 | | location may be specified. This is only needed for file sessions. 57 | | 58 | */ 59 | 60 | 'files' => storage_path('framework/sessions'), 61 | 62 | /* 63 | |-------------------------------------------------------------------------- 64 | | Session Database Connection 65 | |-------------------------------------------------------------------------- 66 | | 67 | | When using the "database" or "redis" session drivers, you may specify a 68 | | connection that should be used to manage these sessions. This should 69 | | correspond to a connection in your database configuration options. 70 | | 71 | */ 72 | 73 | 'connection' => null, 74 | 75 | /* 76 | |-------------------------------------------------------------------------- 77 | | Session Database Table 78 | |-------------------------------------------------------------------------- 79 | | 80 | | When using the "database" session driver, you may specify the table we 81 | | should use to manage the sessions. Of course, a sensible default is 82 | | provided for you; however, you are free to change this as needed. 83 | | 84 | */ 85 | 86 | 'table' => 'sessions', 87 | 88 | /* 89 | |-------------------------------------------------------------------------- 90 | | Session Sweeping Lottery 91 | |-------------------------------------------------------------------------- 92 | | 93 | | Some session drivers must manually sweep their storage location to get 94 | | rid of old sessions from storage. Here are the chances that it will 95 | | happen on a given request. By default, the odds are 2 out of 100. 96 | | 97 | */ 98 | 99 | 'lottery' => [2, 100], 100 | 101 | /* 102 | |-------------------------------------------------------------------------- 103 | | Session Cookie Name 104 | |-------------------------------------------------------------------------- 105 | | 106 | | Here you may change the name of the cookie used to identify a session 107 | | instance by ID. The name specified here will get used every time a 108 | | new session cookie is created by the framework for every driver. 109 | | 110 | */ 111 | 112 | 'cookie' => 'laravel_session', 113 | 114 | /* 115 | |-------------------------------------------------------------------------- 116 | | Session Cookie Path 117 | |-------------------------------------------------------------------------- 118 | | 119 | | The session cookie path determines the path for which the cookie will 120 | | be regarded as available. Typically, this will be the root path of 121 | | your application but you are free to change this when necessary. 122 | | 123 | */ 124 | 125 | 'path' => '/', 126 | 127 | /* 128 | |-------------------------------------------------------------------------- 129 | | Session Cookie Domain 130 | |-------------------------------------------------------------------------- 131 | | 132 | | Here you may change the domain of the cookie used to identify a session 133 | | in your application. This will determine which domains the cookie is 134 | | available to in your application. A sensible default has been set. 135 | | 136 | */ 137 | 138 | 'domain' => null, 139 | 140 | /* 141 | |-------------------------------------------------------------------------- 142 | | HTTPS Only Cookies 143 | |-------------------------------------------------------------------------- 144 | | 145 | | By setting this option to true, session cookies will only be sent back 146 | | to the server if the browser has a HTTPS connection. This will keep 147 | | the cookie from being sent to you if it can not be done securely. 148 | | 149 | */ 150 | 151 | 'secure' => false, 152 | 153 | ]; 154 | -------------------------------------------------------------------------------- /HMS/resources/lang/en/validation.php: -------------------------------------------------------------------------------- 1 | 'The :attribute must be accepted.', 17 | 'active_url' => 'The :attribute is not a valid URL.', 18 | 'after' => 'The :attribute must be a date after :date.', 19 | 'alpha' => 'The :attribute may only contain letters.', 20 | 'alpha_dash' => 'The :attribute may only contain letters, numbers, and dashes.', 21 | 'alpha_num' => 'The :attribute may only contain letters and numbers.', 22 | 'array' => 'The :attribute must be an array.', 23 | 'before' => 'The :attribute must be a date before :date.', 24 | 'between' => [ 25 | 'numeric' => 'The :attribute must be between :min and :max.', 26 | 'file' => 'The :attribute must be between :min and :max kilobytes.', 27 | 'string' => 'The :attribute must be between :min and :max characters.', 28 | 'array' => 'The :attribute must have between :min and :max items.', 29 | ], 30 | 'boolean' => 'The :attribute field must be true or false.', 31 | 'confirmed' => 'The :attribute confirmation does not match.', 32 | 'date' => 'The :attribute is not a valid date.', 33 | 'date_format' => 'The :attribute does not match the format :format.', 34 | 'different' => 'The :attribute and :other must be different.', 35 | 'digits' => 'The :attribute must be :digits digits.', 36 | 'digits_between' => 'The :attribute must be between :min and :max digits.', 37 | 'email' => 'The :attribute must be a valid email address.', 38 | 'exists' => 'The selected :attribute is invalid.', 39 | 'filled' => 'The :attribute field is required.', 40 | 'image' => 'The :attribute must be an image.', 41 | 'in' => 'The selected :attribute is invalid.', 42 | 'integer' => 'The :attribute must be an integer.', 43 | 'ip' => 'The :attribute must be a valid IP address.', 44 | 'json' => 'The :attribute must be a valid JSON string.', 45 | 'max' => [ 46 | 'numeric' => 'The :attribute may not be greater than :max.', 47 | 'file' => 'The :attribute may not be greater than :max kilobytes.', 48 | 'string' => 'The :attribute may not be greater than :max characters.', 49 | 'array' => 'The :attribute may not have more than :max items.', 50 | ], 51 | 'mimes' => 'The :attribute must be a file of type: :values.', 52 | 'min' => [ 53 | 'numeric' => 'The :attribute must be at least :min.', 54 | 'file' => 'The :attribute must be at least :min kilobytes.', 55 | 'string' => 'The :attribute must be at least :min characters.', 56 | 'array' => 'The :attribute must have at least :min items.', 57 | ], 58 | 'not_in' => 'The selected :attribute is invalid.', 59 | 'numeric' => 'The :attribute must be a number.', 60 | 'regex' => 'The :attribute format is invalid.', 61 | 'required' => 'The :attribute field is required.', 62 | 'required_if' => 'The :attribute field is required when :other is :value.', 63 | 'required_unless' => 'The :attribute field is required unless :other is in :values.', 64 | 'required_with' => 'The :attribute field is required when :values is present.', 65 | 'required_with_all' => 'The :attribute field is required when :values is present.', 66 | 'required_without' => 'The :attribute field is required when :values is not present.', 67 | 'required_without_all' => 'The :attribute field is required when none of :values are present.', 68 | 'same' => 'The :attribute and :other must match.', 69 | 'size' => [ 70 | 'numeric' => 'The :attribute must be :size.', 71 | 'file' => 'The :attribute must be :size kilobytes.', 72 | 'string' => 'The :attribute must be :size characters.', 73 | 'array' => 'The :attribute must contain :size items.', 74 | ], 75 | 'string' => 'The :attribute must be a string.', 76 | 'timezone' => 'The :attribute must be a valid zone.', 77 | 'unique' => 'The :attribute has already been taken.', 78 | 'url' => 'The :attribute format is invalid.', 79 | 80 | /* 81 | |-------------------------------------------------------------------------- 82 | | Custom Validation Language Lines 83 | |-------------------------------------------------------------------------- 84 | | 85 | | Here you may specify custom validation messages for attributes using the 86 | | convention "attribute.rule" to name the lines. This makes it quick to 87 | | specify a specific custom language line for a given attribute rule. 88 | | 89 | */ 90 | 91 | 'custom' => [ 92 | 'attribute-name' => [ 93 | 'rule-name' => 'custom-message', 94 | ], 95 | ], 96 | 97 | /* 98 | |-------------------------------------------------------------------------- 99 | | Custom Validation Attributes 100 | |-------------------------------------------------------------------------- 101 | | 102 | | The following language lines are used to swap attribute place-holders 103 | | with something more reader friendly such as E-Mail Address instead 104 | | of "email". This simply helps us make messages a little cleaner. 105 | | 106 | */ 107 | 108 | 'attributes' => [], 109 | 110 | ]; 111 | -------------------------------------------------------------------------------- /HMS/resources/views/default/listRoomType.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layout') 2 | @section('title') 3 | {{ $title }} 4 | @stop 5 | 6 | @section('content') 7 | {{-- area to add new room type --}} 8 | 9 |
10 | {{-- area to list room type --}} 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | @foreach ($room_type as $type) 23 | 24 | 25 | 26 | 27 | 28 | 29 | 34 | 35 | {{-- area for modal window update room type --}} 36 |
37 |
38 |

Edit Room Type

39 |

40 |
41 | {!! csrf_field() !!} 42 | 43 |

44 | 45 |
46 | 47 |
48 | 49 |
50 | 51 |
52 |
53 |
54 | 55 |
56 | 57 |
58 | 59 |
60 | 61 |
62 |
63 | 64 | 65 | 66 | 67 |

68 | 69 |
70 | 71 |
72 | 73 | @endforeach 74 | 75 | 76 |
IDTypeNameDecriptionPriceAction
{{ $type->id }} {{ $type->name }} {{ $type->desc }} {{ $type->price }} 30 | 31 | 32 | 33 |
77 | 78 | 79 | {{-- area for modal add new room type --}} 80 |
81 |
82 |

Add Room Type

83 |

84 |

85 | {!! csrf_field() !!} 86 | 87 |
88 | 89 |
90 | 91 |
92 | 93 |
94 | 95 |
96 |
97 |
98 | 99 |
100 | 101 |
102 | 103 |
104 | 105 | 106 |
107 | 108 |

109 | 110 |
111 | 112 |
113 | {{-- end area for modal add new room type --}} 114 | 126 | 127 | @stop -------------------------------------------------------------------------------- /HMS/resources/views/default/listGuest.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layout') 2 | @section('title') 3 | {{ $title }} 4 | @stop 5 | @section('content') 6 | 7 | {{-- area to list all user--}} 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | @foreach ($guest as $g) 27 | 28 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | {{-- 38 | 0 = not known, 39 | 1 = male, 40 | 2 = female 41 | --}} 42 | 47 | 48 | 49 | 55 | 56 | 57 | 58 | 59 | {{-- area to display modal window edit user--}} 60 |
61 |
62 |

Edit Guest

63 |

64 |
65 | {!! csrf_field() !!} 66 | 67 |

68 | 69 |
70 | 71 |
72 |
73 |
74 | 75 |
76 | 77 |
78 | 79 |
80 | 81 |
82 |
83 | 84 |
85 | 86 |
87 | 88 |
89 | 90 |
91 | 92 |
93 |
94 | 95 |
96 | 97 |
98 | 99 |
100 | 101 |
102 | 103 |
104 |
105 |
106 | 107 | 113 | 118 |
119 | 120 | 121 | 122 | 123 | 124 |

125 | 126 |
127 | 128 |
129 | 142 | {{-- end -- area to display modal window edit user--}} 143 | {{-- every foreach create a ID for dialog which is special for one user ID so we can call it when click--}} 144 | 145 | @endforeach 146 | 147 |
IDNameIdentifyNationalityPhoneEmailAddressSexCreated_atAction
29 | {{ $g->id }} 30 | {{ $g->name }}{{ $g->identify }} {{ $g->nationality }} {{ $g->phone}} {{ $g->email }} {{ $g->address }} @if ( $g->sex == '1') 43 | Male 44 | @elseif ($g->sex == '2') 45 | Female 46 | @endif {{ $g->created_at }} 50 | 51 | 52 | 53 | 54 |
148 | 149 | 150 | 151 | @stop -------------------------------------------------------------------------------- /HMS/resources/views/default/listUser.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layout') 2 | @section('title') 3 | {{ $title }} 4 | @stop 5 | @section('content') 6 | 7 | {{-- area to list all user--}} 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | @foreach ($user as $ur) 26 | 27 | 30 | 31 | 32 | 38 | 39 | 40 | 45 | 46 | 47 | 53 | 54 | 55 | 56 | 57 | {{-- area to display modal window edit user--}} 58 |
59 |
60 |

Edit User

61 |

62 |
63 | {!! csrf_field() !!} 64 | 65 |

66 | 67 |
68 | 69 |
70 |
71 |
72 | 73 |
74 | 75 |
76 | 77 |
78 | 79 |
80 |
81 |
82 | 83 |
84 | 85 | 86 |
87 | 94 | 95 |
96 | 101 |
102 | 103 |
104 |
105 | 106 |
107 | 108 |
109 | 110 |
111 | 112 |
113 |
114 |
115 | 116 | 122 | 127 |
128 | 129 | 130 | 131 | 132 | 133 |

134 | 135 |
136 | 137 |
138 | 151 | {{-- end -- area to display modal window edit user--}} 152 | {{-- every foreach create a ID for dialog which is special for one user ID so we can call it when click--}} 153 | 154 | @endforeach 155 | 156 |
IDNamePhoneRoleEmailAddressSexCreated_atAction
28 | {{ $ur->id }} 29 | {{ $ur->name }}{{ $ur->phone }} @if ($ur->role == 1) 33 | Director 34 | @elseif ($ur->role ==0 ) 35 | receiption 36 | 37 | @endif {{ $ur->email }} {{ $ur->address }} @if ( $ur->sex == '1') 41 | Male 42 | @elseif ($ur->sex == '0') 43 | Female 44 | @endif {{ $ur->created_at }} 48 | 49 | 50 | 51 | 52 |
157 | 158 | 159 | 160 | @stop -------------------------------------------------------------------------------- /HMS/config/app.php: -------------------------------------------------------------------------------- 1 | env('APP_DEBUG', true), 17 | 18 | /* 19 | |-------------------------------------------------------------------------- 20 | | Application URL 21 | |-------------------------------------------------------------------------- 22 | | 23 | | This URL is used by the console to properly generate URLs when using 24 | | the Artisan command line tool. You should set this to the root of 25 | | your application so that it is used when running Artisan tasks. 26 | | 27 | */ 28 | 29 | 'url' => 'http://localhost', 30 | 31 | /* 32 | |-------------------------------------------------------------------------- 33 | | Application Timezone 34 | |-------------------------------------------------------------------------- 35 | | 36 | | Here you may specify the default timezone for your application, which 37 | | will be used by the PHP date and date-time functions. We have gone 38 | | ahead and set this to a sensible default for you out of the box. 39 | | 40 | */ 41 | 42 | 'timezone' => 'UTC', 43 | 44 | /* 45 | |-------------------------------------------------------------------------- 46 | | Application Locale Configuration 47 | |-------------------------------------------------------------------------- 48 | | 49 | | The application locale determines the default locale that will be used 50 | | by the translation service provider. You are free to set this value 51 | | to any of the locales which will be supported by the application. 52 | | 53 | */ 54 | 55 | 'locale' => 'en', 56 | 57 | /* 58 | |-------------------------------------------------------------------------- 59 | | Application Fallback Locale 60 | |-------------------------------------------------------------------------- 61 | | 62 | | The fallback locale determines the locale to use when the current one 63 | | is not available. You may change the value to correspond to any of 64 | | the language folders that are provided through your application. 65 | | 66 | */ 67 | 68 | 'fallback_locale' => 'en', 69 | 70 | /* 71 | |-------------------------------------------------------------------------- 72 | | Encryption Key 73 | |-------------------------------------------------------------------------- 74 | | 75 | | This key is used by the Illuminate encrypter service and should be set 76 | | to a random, 32 character string, otherwise these encrypted strings 77 | | will not be safe. Please do this before deploying an application! 78 | | 79 | */ 80 | 81 | 'key' => env('APP_KEY', 'viEImKRPKpIu61BuJju1hSkL5rluyiF5'), 82 | 83 | 'cipher' => 'AES-256-CBC', 84 | 85 | /* 86 | |-------------------------------------------------------------------------- 87 | | Logging Configuration 88 | |-------------------------------------------------------------------------- 89 | | 90 | | Here you may configure the log settings for your application. Out of 91 | | the box, Laravel uses the Monolog PHP logging library. This gives 92 | | you a variety of powerful log handlers / formatters to utilize. 93 | | 94 | | Available Settings: "single", "daily", "syslog", "errorlog" 95 | | 96 | */ 97 | 98 | 'log' => env('APP_LOG', 'single'), 99 | 100 | /* 101 | |-------------------------------------------------------------------------- 102 | | Autoloaded Service Providers 103 | |-------------------------------------------------------------------------- 104 | | 105 | | The service providers listed here will be automatically loaded on the 106 | | request to your application. Feel free to add your own services to 107 | | this array to grant expanded functionality to your applications. 108 | | 109 | */ 110 | 111 | 'providers' => [ 112 | 113 | /* 114 | * Laravel Framework Service Providers... 115 | */ 116 | Illuminate\Foundation\Providers\ArtisanServiceProvider::class, 117 | Illuminate\Auth\AuthServiceProvider::class, 118 | Illuminate\Broadcasting\BroadcastServiceProvider::class, 119 | Illuminate\Bus\BusServiceProvider::class, 120 | Illuminate\Cache\CacheServiceProvider::class, 121 | Illuminate\Foundation\Providers\ConsoleSupportServiceProvider::class, 122 | Illuminate\Routing\ControllerServiceProvider::class, 123 | Illuminate\Cookie\CookieServiceProvider::class, 124 | Illuminate\Database\DatabaseServiceProvider::class, 125 | Illuminate\Encryption\EncryptionServiceProvider::class, 126 | Illuminate\Filesystem\FilesystemServiceProvider::class, 127 | Illuminate\Foundation\Providers\FoundationServiceProvider::class, 128 | Illuminate\Hashing\HashServiceProvider::class, 129 | Illuminate\Mail\MailServiceProvider::class, 130 | Illuminate\Pagination\PaginationServiceProvider::class, 131 | Illuminate\Pipeline\PipelineServiceProvider::class, 132 | Illuminate\Queue\QueueServiceProvider::class, 133 | Illuminate\Redis\RedisServiceProvider::class, 134 | Illuminate\Auth\Passwords\PasswordResetServiceProvider::class, 135 | Illuminate\Session\SessionServiceProvider::class, 136 | Illuminate\Translation\TranslationServiceProvider::class, 137 | Illuminate\Validation\ValidationServiceProvider::class, 138 | Illuminate\View\ViewServiceProvider::class, 139 | Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider::class, 140 | Illuminate\Html\HtmlServiceProvider::class, //them de link file css 141 | 142 | /* 143 | * Application Service Providers... 144 | */ 145 | App\Providers\AppServiceProvider::class, 146 | App\Providers\AuthServiceProvider::class, 147 | App\Providers\EventServiceProvider::class, 148 | App\Providers\RouteServiceProvider::class, 149 | 150 | ], 151 | 152 | /* 153 | |-------------------------------------------------------------------------- 154 | | Class Aliases 155 | |-------------------------------------------------------------------------- 156 | | 157 | | This array of class aliases will be registered when this application 158 | | is started. However, feel free to register as many as you wish as 159 | | the aliases are "lazy" loaded so they don't hinder performance. 160 | | 161 | */ 162 | 163 | 'aliases' => [ 164 | 165 | 'App' => Illuminate\Support\Facades\App::class, 166 | 'Artisan' => Illuminate\Support\Facades\Artisan::class, 167 | 'Auth' => Illuminate\Support\Facades\Auth::class, 168 | 'Blade' => Illuminate\Support\Facades\Blade::class, 169 | 'Bus' => Illuminate\Support\Facades\Bus::class, 170 | 'Cache' => Illuminate\Support\Facades\Cache::class, 171 | 'Config' => Illuminate\Support\Facades\Config::class, 172 | 'Cookie' => Illuminate\Support\Facades\Cookie::class, 173 | 'Crypt' => Illuminate\Support\Facades\Crypt::class, 174 | 'DB' => Illuminate\Support\Facades\DB::class, 175 | 'Eloquent' => Illuminate\Database\Eloquent\Model::class, 176 | 'Event' => Illuminate\Support\Facades\Event::class, 177 | 'File' => Illuminate\Support\Facades\File::class, 178 | 'Gate' => Illuminate\Support\Facades\Gate::class, 179 | 'Hash' => Illuminate\Support\Facades\Hash::class, 180 | 'Input' => Illuminate\Support\Facades\Input::class, 181 | 'Lang' => Illuminate\Support\Facades\Lang::class, 182 | 'Log' => Illuminate\Support\Facades\Log::class, 183 | 'Mail' => Illuminate\Support\Facades\Mail::class, 184 | 'Password' => Illuminate\Support\Facades\Password::class, 185 | 'Queue' => Illuminate\Support\Facades\Queue::class, 186 | 'Redirect' => Illuminate\Support\Facades\Redirect::class, 187 | 'Redis' => Illuminate\Support\Facades\Redis::class, 188 | 'Request' => Illuminate\Support\Facades\Request::class, 189 | 'Response' => Illuminate\Support\Facades\Response::class, 190 | 'Route' => Illuminate\Support\Facades\Route::class, 191 | 'Schema' => Illuminate\Support\Facades\Schema::class, 192 | 'Session' => Illuminate\Support\Facades\Session::class, 193 | 'Storage' => Illuminate\Support\Facades\Storage::class, 194 | 'URL' => Illuminate\Support\Facades\URL::class, 195 | 'Validator' => Illuminate\Support\Facades\Validator::class, 196 | 'View' => Illuminate\Support\Facades\View::class, 197 | 'Form' => Illuminate\Html\FormFacade::class, 198 | 'Html' => Illuminate\Html\HtmlFacade::class, 199 | 200 | ], 201 | 202 | ]; 203 | -------------------------------------------------------------------------------- /HMS/resources/views/default/listRoom.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layout') 2 | @section('title') 3 | {{ $title }} 4 | @stop 5 | @section('content') 6 | 7 | {{-- area to list all user--}} 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | @foreach ($room as $r) 25 | 26 | 29 | 30 | 37 | 38 | 39 | 49 | 50 | 55 | 56 | 57 | 58 | 59 | {{-- area to display modal window edit room--}} 60 |
61 |
62 |

Edit Room

63 |

64 |
65 | {!! csrf_field() !!} 66 | 67 | 68 |

69 | 70 |
71 | 72 |
73 |
74 |
75 | 76 |
77 | 78 |
79 | 80 |
81 | 82 |
83 |
84 |
85 | 86 |
87 | 88 |
89 | 90 |
91 | 101 |
102 | 103 |
104 | 105 | 106 | 107 | 108 | 109 | 110 |

111 | 112 |
113 | 114 |
115 | 116 | {{-- end -- area to display modal window edit user--}} 117 | {{-- every foreach create a ID for dialog which is special for one user ID so we can call it when click--}} 118 | 119 | @endforeach 120 | {{-- area for addroom modal --}} 121 |
122 |
123 |

Add New Room

124 |

125 |
126 | {!! csrf_field() !!} 127 | 128 |

129 | 130 |
131 | 132 |
133 | 134 |
135 | 136 |
137 |
138 |
139 | 140 |
141 | 142 |
143 | 144 |
145 | 150 |
151 | 152 | 153 |
154 | 155 | 156 | 157 | 158 | 159 | 160 |

161 | 162 |
163 | 164 |
165 | 166 | 167 | 168 | {{-- area for addroom modal --}} 169 | 182 | 183 |
IDNameRoomRoomTypePhoneDescriptionStatusCreated_atAction
27 | {{ $r->id }} 28 | {{ $r->name }} 31 | @foreach ($room_type as $r_t) 32 | @if ($r_t->id == $r->room_type_id) 33 | {{ $r_t->name }} 34 | @endif 35 | @endforeach 36 | {{ $r->phone }} {{ $r->desc }} 40 | @if ($r->status == 'A') 41 | Avaiable 42 | @elseif ($r->status == 'N') 43 | Not Avaiable 44 | @elseif($r->status == 'B') 45 | Bussy 46 | @endif 47 | 48 | {{ $r->created_at }} 51 | 52 | 53 | 54 |
184 | 185 | 186 | 187 | @stop -------------------------------------------------------------------------------- /assets/css/metro-responsive.min.css: -------------------------------------------------------------------------------- 1 | .flexbox{display:-webkit-flex;display:flex}.flex-dir-row{-webkit-flex-direction:row;flex-direction:row}.flex-dir-row-reverse{-webkit-flex-direction:row-reverse;flex-direction:row-reverse}.flex-dir-column{-webkit-flex-direction:column;flex-direction:column}.flex-dir-column-reverse{-webkit-flex-direction:column-reverse;flex-direction:column-reverse}.flex-wrap{-webkit-flex-wrap:wrap;flex-wrap:wrap}.flex-wrap-reverse{-webkit-flex-wrap:wrap-reverse;flex-wrap:wrap-reverse}.flex-no-wrap{-webkit-flex-wrap:nowrap;flex-wrap:nowrap}.flex-just-start{-webkit-justify-content:flex-start;justify-content:flex-start}.flex-just-end{-webkit-justify-content:flex-end;justify-content:flex-end}.flex-just-center{-webkit-justify-content:center;justify-content:center}.flex-just-sa{-webkit-justify-content:space-around;justify-content:space-around}.flex-just-sb{-webkit-justify-content:space-between;justify-content:space-between}.flex-align-stretch{-webkit-align-items:stretch;align-items:stretch}.flex-align-start{-webkit-align-items:flex-start;align-items:flex-start}.flex-align-end{-webkit-align-items:flex-end;align-items:flex-end}.flex-align-center{-webkit-align-items:center;align-items:center}.flex-align-base{-webkit-align-items:baseline;align-items:baseline}.flex-content-stretch{-webkit-align-content:stretch;align-content:stretch}.flex-content-start{-webkit-align-content:flex-start;align-content:flex-start}.flex-content-end{-webkit-align-content:flex-end;align-content:flex-end}.flex-content-center{-webkit-align-content:center;align-content:center}.flex-content-sb{-webkit-align-content:space-between;align-content:space-between}.flex-content-sa{-webkit-align-content:space-around;align-content:space-around}.flex-self-auto{-webkit-align-self:auto;align-self:auto}.flex-self-start{-webkit-align-self:flex-start;align-self:flex-start}.flex-self-end{-webkit-align-self:flex-end;align-self:flex-end}.flex-self-center{-webkit-align-self:center;align-self:center}.flex-self-base{-webkit-align-self:baseline;align-self:baseline}.flex-self-stretch{-webkit-align-self:stretch;align-self:stretch}.no-shrink{-webkit-flex-shrink:0!important;flex-shrink:0!important}.no-grow{-webkit-flex-grow:0!important;flex-grow:0!important}.flex-size-auto{-webkit-flex:1 auto;flex:1 auto}.flex-size1{-webkit-flex-grow:1;flex-grow:1}.flex-size2{-webkit-flex-grow:2;flex-grow:2}.flex-size3{-webkit-flex-grow:3;flex-grow:3}.flex-size4{-webkit-flex-grow:4;flex-grow:4}.flex-size5{-webkit-flex-grow:5;flex-grow:5}.flex-size6{-webkit-flex-grow:6;flex-grow:6}.flex-size7{-webkit-flex-grow:7;flex-grow:7}.flex-size8{-webkit-flex-grow:8;flex-grow:8}.flex-size9{-webkit-flex-grow:9;flex-grow:9}.flex-size10{-webkit-flex-grow:10;flex-grow:10}.flex-size11{-webkit-flex-grow:11;flex-grow:11}.flex-size12{-webkit-flex-grow:12;flex-grow:12}.flex-size-p10{-webkit-flex:0 0 10%;flex:0 0 10%}.flex-size-p20{-webkit-flex:0 0 20%;flex:0 0 20%}.flex-size-p30{-webkit-flex:0 0 30%;flex:0 0 30%}.flex-size-p40{-webkit-flex:0 0 40%;flex:0 0 40%}.flex-size-p50{-webkit-flex:0 0 50%;flex:0 0 50%}.flex-size-p60{-webkit-flex:0 0 60%;flex:0 0 60%}.flex-size-p70{-webkit-flex:0 0 70%;flex:0 0 70%}.flex-size-p80{-webkit-flex:0 0 80%;flex:0 0 80%}.flex-size-p90{-webkit-flex:0 0 90%;flex:0 0 90%}.flex-size-p100{-webkit-flex:0 0 100%;flex:0 0 100%}.flex-size-x100{-webkit-flex:0 0 100px;flex:0 0 100px}.flex-size-x200{-webkit-flex:0 0 200px;flex:0 0 200px}.flex-size-x300{-webkit-flex:0 0 300px;flex:0 0 300px}.flex-size-x400{-webkit-flex:0 0 400px;flex:0 0 400px}.flex-size-x500{-webkit-flex:0 0 500px;flex:0 0 500px}.flex-size-x600{-webkit-flex:0 0 600px;flex:0 0 600px}.flex-size-x700{-webkit-flex:0 0 700px;flex:0 0 700px}.flex-size-x800{-webkit-flex:0 0 800px;flex:0 0 800px}.flex-size-x900{-webkit-flex:0 0 900px;flex:0 0 900px}.flex-size-x1000{-webkit-flex:0 0 1000px;flex:0 0 1000px}@media screen and (min-width:1401px){html{font-size:120%}}@media screen and (max-width:1400px){html{font-size:110%}}@media screen and (max-width:1200px){html{font-size:100%}}@media screen and (max-width:768px){html{font-size:100%}}@media screen and (max-width:640px){html{font-size:90%}}@media screen and (min-width:1401px){.container{width:1200px}}@media screen and (max-width:992px){.container{width:100%;padding:10px}}@media screen and (max-width:768px){.container{width:100%;padding:10px}}@media screen and (max-width:640px){.container{width:100%;padding:10px}}@media screen and (max-width:320px){html{font-size:80%}.container{width:100%;padding:5px}}@media only screen and (max-width:800px){.flex-grid .row{-webkit-flex-wrap:wrap;flex-wrap:wrap}.flex-grid .row .cell,.flex-grid .row .cell[class*=size]{-webkit-flex:0 0 50%;flex:0 0 50%}.flex-grid .row .cell:nth-child(1):last-child,.flex-grid .row .cell:nth-child(11):last-child,.flex-grid .row .cell:nth-child(3):last-child,.flex-grid .row .cell:nth-child(5):last-child,.flex-grid .row .cell:nth-child(7):last-child,.flex-grid .row .cell:nth-child(9):last-child,.flex-grid .row .cell[class*=size]:nth-child(1):last-child,.flex-grid .row .cell[class*=size]:nth-child(11):last-child,.flex-grid .row .cell[class*=size]:nth-child(3):last-child,.flex-grid .row .cell[class*=size]:nth-child(5):last-child,.flex-grid .row .cell[class*=size]:nth-child(7):last-child,.flex-grid .row .cell[class*=size]:nth-child(9):last-child{-webkit-flex-basis:100%;flex-basis:100%}}@media screen and (max-width:800px){h1,h2,h3,h4,h5,h6,p{margin:.625rem}.grid .row,.grid .row[class*=cells]{margin:0}.grid .row>.cell,.grid .row>.cell[class*=colspan],.grid .row[class*=cells]>.cell,.grid .row[class*=cells]>.cell[class*=colspan]{width:48.936175%;margin-bottom:10px}.grid .row>.cell:nth-child(odd),.grid .row>.cell[class*=colspan]:nth-child(odd),.grid .row[class*=cells]>.cell:nth-child(odd),.grid .row[class*=cells]>.cell[class*=colspan]:nth-child(odd){margin-left:0}.grid .row>.cell:nth-child(1):last-child,.grid .row>.cell:nth-child(11):last-child,.grid .row>.cell:nth-child(3):last-child,.grid .row>.cell:nth-child(5):last-child,.grid .row>.cell:nth-child(7):last-child,.grid .row>.cell:nth-child(9):last-child,.grid .row>.cell[class*=colspan]:nth-child(1):last-child,.grid .row>.cell[class*=colspan]:nth-child(11):last-child,.grid .row>.cell[class*=colspan]:nth-child(3):last-child,.grid .row>.cell[class*=colspan]:nth-child(5):last-child,.grid .row>.cell[class*=colspan]:nth-child(7):last-child,.grid .row>.cell[class*=colspan]:nth-child(9):last-child,.grid .row[class*=cells]>.cell:nth-child(1):last-child,.grid .row[class*=cells]>.cell:nth-child(11):last-child,.grid .row[class*=cells]>.cell:nth-child(3):last-child,.grid .row[class*=cells]>.cell:nth-child(5):last-child,.grid .row[class*=cells]>.cell:nth-child(7):last-child,.grid .row[class*=cells]>.cell:nth-child(9):last-child,.grid .row[class*=cells]>.cell[class*=colspan]:nth-child(1):last-child,.grid .row[class*=cells]>.cell[class*=colspan]:nth-child(11):last-child,.grid .row[class*=cells]>.cell[class*=colspan]:nth-child(3):last-child,.grid .row[class*=cells]>.cell[class*=colspan]:nth-child(5):last-child,.grid .row[class*=cells]>.cell[class*=colspan]:nth-child(7):last-child,.grid .row[class*=cells]>.cell[class*=colspan]:nth-child(9):last-child{width:100%}}@media screen and (max-width:640px){.grid .row,.grid .row[class*=cells]{margin:0}.grid .row>.cell,.grid .row>.cell[class*=colspan],.grid .row[class*=cells]>.cell,.grid .row[class*=cells]>.cell[class*=colspan]{width:100%;margin:.3125rem 0}}@media screen and (max-width:800px){.grid.condensed .row,.grid.condensed .row[class*=cells]{margin:0}.grid.condensed .row>.cell,.grid.condensed .row>.cell[class*=colspan],.grid.condensed .row[class*=cells]>.cell,.grid.condensed .row[class*=cells]>.cell[class*=colspan]{width:50%;margin-bottom:10px}.grid.condensed .row>.cell:nth-child(odd),.grid.condensed .row>.cell[class*=colspan]:nth-child(odd),.grid.condensed .row[class*=cells]>.cell:nth-child(odd),.grid.condensed .row[class*=cells]>.cell[class*=colspan]:nth-child(odd){margin-left:0}.grid.condensed .row>.cell:nth-child(1):last-child,.grid.condensed .row>.cell:nth-child(11):last-child,.grid.condensed .row>.cell:nth-child(3):last-child,.grid.condensed .row>.cell:nth-child(5):last-child,.grid.condensed .row>.cell:nth-child(7):last-child,.grid.condensed .row>.cell:nth-child(9):last-child,.grid.condensed .row>.cell[class*=colspan]:nth-child(1):last-child,.grid.condensed .row>.cell[class*=colspan]:nth-child(11):last-child,.grid.condensed .row>.cell[class*=colspan]:nth-child(3):last-child,.grid.condensed .row>.cell[class*=colspan]:nth-child(5):last-child,.grid.condensed .row>.cell[class*=colspan]:nth-child(7):last-child,.grid.condensed .row>.cell[class*=colspan]:nth-child(9):last-child,.grid.condensed .row[class*=cells]>.cell:nth-child(1):last-child,.grid.condensed .row[class*=cells]>.cell:nth-child(11):last-child,.grid.condensed .row[class*=cells]>.cell:nth-child(3):last-child,.grid.condensed .row[class*=cells]>.cell:nth-child(5):last-child,.grid.condensed .row[class*=cells]>.cell:nth-child(7):last-child,.grid.condensed .row[class*=cells]>.cell:nth-child(9):last-child,.grid.condensed .row[class*=cells]>.cell[class*=colspan]:nth-child(1):last-child,.grid.condensed .row[class*=cells]>.cell[class*=colspan]:nth-child(11):last-child,.grid.condensed .row[class*=cells]>.cell[class*=colspan]:nth-child(3):last-child,.grid.condensed .row[class*=cells]>.cell[class*=colspan]:nth-child(5):last-child,.grid.condensed .row[class*=cells]>.cell[class*=colspan]:nth-child(7):last-child,.grid.condensed .row[class*=cells]>.cell[class*=colspan]:nth-child(9):last-child{width:100%}}@media only screen and (max-width:640px){.flex-grid .row{-webkit-flex-direction:column;flex-direction:column}.grid.condensed .row,.grid.condensed .row[class*=cells]{margin:0}.grid.condensed .row>.cell,.grid.condensed .row>.cell[class*=colspan],.grid.condensed .row[class*=cells]>.cell,.grid.condensed .row[class*=cells]>.cell[class*=colspan]{width:100%;margin:.3125rem 0}.f-menu{-webkit-flex-direction:column;flex-direction:column}.f-menu>li .d-menu{position:relative;box-shadow:none;left:0}}@media screen and (max-width:800px){.sidebar{width:52px}.sidebar li>a{padding-right:0;padding-left:0;width:52px!important}.sidebar li>a>.title{display:none}.sidebar li>a>.counter{position:absolute;top:0;right:4px}}@media screen and (max-width:320px){.wizard2 .step:before{width:16px}}@media screen and (max-width:800px){.tile{width:120px;height:120px}.tile.small-tile{width:56px;height:56px}.tile.wide-tile{width:248px;height:120px}.tile.wide-tile-v{width:120px;height:248px}.tile.large-tile{width:248px;height:248px}.tile.big-tile{width:376px;height:376px}.tile.super-tile{width:504px;height:504px}.tile-square{width:120px;height:120px}.tile-small{width:56px;height:56px}.tile-wide{width:248px;height:120px}.tile-large{width:248px;height:248px}.tile-big{width:376px;height:376px}.tile-super{width:504px;height:504px}.tile-small-x{width:56px}.tile-square-x{width:120px}.tile-large-x,.tile-wide-x{width:248px}.tile-big-x{width:376px}.tile-super-x{width:504px}.tile-small-y{height:56px}.tile-square-y{height:120px}.tile-large-y,.tile-wide-y{height:248px}.tile-big-y{height:376px}.tile-super-y{height:504px}.tile-content.iconic .icon{width:51.2px;height:51.2px;margin-left:-25.6px;margin-top:-32px;font-size:51.2px}.tile-small .tile-content.iconic .icon{font-size:25.6px;width:25.6px;height:25.6px;margin-left:-12.8px;margin-top:-12.8px}}@media screen and (max-width:640px){.tile-area .tile-area-title,.tile-area .tile-group .tile-group-title{display:none}.tile-area{width:100%;padding:0}.tile-area .tile-group{margin:0;padding:0;float:none}.tile-container{width:100%}}@media screen and (max-width:320px){.tile-big,.tile-super,.tile.big-tile,.tile.super-tile{width:310px}}@media screen and (max-width:640px){.no-phone{display:none!important}}@media screen and (max-width:800px){.no-tablet{display:none!important}}@media screen and (min-width:900px){.no-pc{display:none!important}} --------------------------------------------------------------------------------