Skip to content
This repository has been archived by the owner on Jul 5, 2023. It is now read-only.

Commit

Permalink
Merge pull request #27 from Saibamen/laravel_5.6
Browse files Browse the repository at this point in the history
Laravel 5.6, Bootstrap 4
  • Loading branch information
Saibamen authored Dec 8, 2020
2 parents 8a45b98 + 3c08dd5 commit 2faa70e
Show file tree
Hide file tree
Showing 55 changed files with 2,270 additions and 1,129 deletions.
16 changes: 16 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
root = true

[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
indent_style = space
indent_size = 4
trim_trailing_whitespace = true

[*.md]
trim_trailing_whitespace = false

[*.yml]
indent_style = space
indent_size = 2
6 changes: 5 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@ APP_NAME=Laravel
APP_ENV=local
APP_KEY=
APP_DEBUG=true
APP_LOG_LEVEL=debug
APP_URL=http://localhost

LOG_CHANNEL=daily

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
Expand Down Expand Up @@ -33,3 +34,6 @@ PUSHER_APP_ID=
PUSHER_APP_KEY=
PUSHER_APP_SECRET=
PUSHER_APP_CLUSTER=mt1

MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,14 @@
/storage/*.key
/vendor
/.idea
/.vscode
/.vagrant
Homestead.json
Homestead.yaml
npm-debug.log
yarn-error.log
.env
.phpunit.result.cache

# Created by https://www.gitignore.io/api/sublimetext,notepadpp,windows

Expand Down Expand Up @@ -141,8 +143,6 @@ sh.exe.stackdump

### Own rules ###
/_ide_helper.php
bootstrap/cache/*
!bootstrap/cache/.gitkeep

### Yarn 2
.yarn/*
Expand Down
9 changes: 5 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
language: php

dist: trusty
dist: trusty # TODO: Migrate to xenial: https://docs.travis-ci.com/user/trusty-to-xenial-migration-guide

cache:
directories:
Expand All @@ -12,7 +12,6 @@ os:
#- osx

php:
- 7.0
- 7.1
- 7.2
- 7.3
Expand All @@ -36,11 +35,12 @@ env:

matrix:
include:
- php: 7.0.0
# Minimum PHP version for Laravel 5.6 is 7.1.3
- php: 7.1.3
dist: precise
env: DB=sqlite DB_CONNECTION=sqlite

- php: 7.0.0
- php: 7.1.3
dist: precise
env: DB=postgres DB_CONNECTION=pgsql

Expand All @@ -50,6 +50,7 @@ addons:
mariadb: '10.0'

before_install:
#- sudo mount -o remount,size=50% /var/ramfs # https://docs.travis-ci.com/user/trusty-to-xenial-migration-guide
- sh -c "if [ '$DB' = 'sqlite' ]; then echo 'Creating database'; touch database/database.sqlite; fi"
- sh -c "if [ '$DB' = 'postgres' ]; then psql -c 'DROP DATABASE IF EXISTS homestead_test;' -U postgres; fi"
- sh -c "if [ '$DB' = 'postgres' ]; then psql -c 'CREATE DATABASE homestead_test;' -U postgres; fi"
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@
[![SymfonyInsight](https://insight.symfony.com/projects/37d84994-c778-4373-94f2-a3218c22f96d/mini.svg)](https://insight.symfony.com/projects/37d84994-c778-4373-94f2-a3218c22f96d)
[![codecov](https://codecov.io/gh/Saibamen/HotelManager/branch/master/graph/badge.svg)](https://codecov.io/gh/Saibamen/HotelManager)

Web application for managing hotel rooms, guests and reservations with flexible and responsive frontend written in [Laravel](https://laravel.com) 5.5
Web application for managing hotel rooms, guests and reservations with flexible and responsive frontend written in [Laravel](https://laravel.com) 5.6

![All reservations](github_images/all_reservations.PNG)

## Requirements

* [PHP](http://php.net) >= 7.0.0
* [PHP](http://php.net) >= 7.1.3
* OpenSSL PHP Extension
* PDO PHP Extension
* Mbstring PHP Extension
Expand Down
2 changes: 0 additions & 2 deletions app/Exceptions/Handler.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@ class Handler extends ExceptionHandler
/**
* Report or log an exception.
*
* This is a great spot to send exceptions to Sentry, Bugsnag, etc.
*
* @param \Exception $exception
*
* @return void
Expand Down
18 changes: 10 additions & 8 deletions app/Http/Kernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class Kernel extends HttpKernel
* @var array
*/
protected $middleware = [
\Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode::class,
\App\Http\Middleware\CheckForMaintenanceMode::class,
\Illuminate\Foundation\Http\Middleware\ValidatePostSize::class,
\App\Http\Middleware\TrimStrings::class,
\Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull::class,
Expand Down Expand Up @@ -51,12 +51,14 @@ class Kernel extends HttpKernel
* @var array
*/
protected $routeMiddleware = [
'auth' => \Illuminate\Auth\Middleware\Authenticate::class,
'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class,
'bindings' => \Illuminate\Routing\Middleware\SubstituteBindings::class,
'can' => \Illuminate\Auth\Middleware\Authorize::class,
'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class,
'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class,
'admin' => \App\Http\Middleware\Admin::class,
'auth' => \Illuminate\Auth\Middleware\Authenticate::class,
'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class,
'bindings' => \Illuminate\Routing\Middleware\SubstituteBindings::class,
'cache.headers' => \Illuminate\Http\Middleware\SetCacheHeaders::class,
'can' => \Illuminate\Auth\Middleware\Authorize::class,
'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class,
'signed' => \Illuminate\Routing\Middleware\ValidateSignature::class,
'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class,
'admin' => \App\Http\Middleware\Admin::class,
];
}
17 changes: 17 additions & 0 deletions app/Http/Middleware/CheckForMaintenanceMode.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?php

namespace App\Http\Middleware;

use Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode as Middleware;

class CheckForMaintenanceMode extends Middleware
{
/**
* The URIs that should be reachable while maintenance mode is enabled.
*
* @var array
*/
protected $except = [
//
];
}
12 changes: 3 additions & 9 deletions app/Http/Middleware/TrustProxies.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,9 @@ class TrustProxies extends Middleware
protected $proxies;

/**
* The current proxy header mappings.
* The headers that should be used to detect proxies.
*
* @var array
* @var int
*/
protected $headers = [
Request::HEADER_FORWARDED => 'FORWARDED',
Request::HEADER_X_FORWARDED_FOR => 'X_FORWARDED_FOR',
Request::HEADER_X_FORWARDED_HOST => 'X_FORWARDED_HOST',
Request::HEADER_X_FORWARDED_PORT => 'X_FORWARDED_PORT',
Request::HEADER_X_FORWARDED_PROTO => 'X_FORWARDED_PROTO',
];
protected $headers = Request::HEADER_X_FORWARDED_ALL;
}
25 changes: 15 additions & 10 deletions app/Models/Guest.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,23 @@
* @property \Illuminate\Support\Carbon $updated_at
* @property-read string $full_name
* @property-read \Illuminate\Database\Eloquent\Collection|\App\Models\Reservation[] $reservations
* @property-read int|null $reservations_count
* @property-read \Illuminate\Database\Eloquent\Collection|\App\Models\Room[] $rooms
* @property-read int|null $rooms_count
*
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Guest whereAddress($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Guest whereContact($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Guest whereCreatedAt($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Guest whereFirstName($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Guest whereId($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Guest whereLastName($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Guest wherePESEL($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Guest wherePlace($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Guest whereUpdatedAt($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Guest whereZipCode($value)
* @method static \Illuminate\Database\Eloquent\Builder|Guest newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|Guest newQuery()
* @method static \Illuminate\Database\Eloquent\Builder|Guest query()
* @method static \Illuminate\Database\Eloquent\Builder|Guest whereAddress($value)
* @method static \Illuminate\Database\Eloquent\Builder|Guest whereContact($value)
* @method static \Illuminate\Database\Eloquent\Builder|Guest whereCreatedAt($value)
* @method static \Illuminate\Database\Eloquent\Builder|Guest whereFirstName($value)
* @method static \Illuminate\Database\Eloquent\Builder|Guest whereId($value)
* @method static \Illuminate\Database\Eloquent\Builder|Guest whereLastName($value)
* @method static \Illuminate\Database\Eloquent\Builder|Guest wherePESEL($value)
* @method static \Illuminate\Database\Eloquent\Builder|Guest wherePlace($value)
* @method static \Illuminate\Database\Eloquent\Builder|Guest whereUpdatedAt($value)
* @method static \Illuminate\Database\Eloquent\Builder|Guest whereZipCode($value)
* @mixin \Eloquent
*/
class Guest extends Model
Expand Down
23 changes: 13 additions & 10 deletions app/Models/Reservation.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,19 @@
* @property-read \App\Models\Guest $guest
* @property-read \App\Models\Room $room
*
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Reservation getCurrentReservations()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Reservation getFutureReservations()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Reservation whereCreatedAt($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Reservation whereDateEnd($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Reservation whereDateStart($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Reservation whereGuestId($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Reservation whereId($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Reservation wherePeople($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Reservation whereRoomId($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Reservation whereUpdatedAt($value)
* @method static \Illuminate\Database\Eloquent\Builder|Reservation getCurrentReservations()
* @method static \Illuminate\Database\Eloquent\Builder|Reservation getFutureReservations()
* @method static \Illuminate\Database\Eloquent\Builder|Reservation newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|Reservation newQuery()
* @method static \Illuminate\Database\Eloquent\Builder|Reservation query()
* @method static \Illuminate\Database\Eloquent\Builder|Reservation whereCreatedAt($value)
* @method static \Illuminate\Database\Eloquent\Builder|Reservation whereDateEnd($value)
* @method static \Illuminate\Database\Eloquent\Builder|Reservation whereDateStart($value)
* @method static \Illuminate\Database\Eloquent\Builder|Reservation whereGuestId($value)
* @method static \Illuminate\Database\Eloquent\Builder|Reservation whereId($value)
* @method static \Illuminate\Database\Eloquent\Builder|Reservation wherePeople($value)
* @method static \Illuminate\Database\Eloquent\Builder|Reservation whereRoomId($value)
* @method static \Illuminate\Database\Eloquent\Builder|Reservation whereUpdatedAt($value)
* @mixin \Eloquent
*/
class Reservation extends Model
Expand Down
27 changes: 16 additions & 11 deletions app/Models/Room.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,24 @@
* @property \Illuminate\Support\Carbon $created_at
* @property \Illuminate\Support\Carbon $updated_at
* @property-read \Illuminate\Database\Eloquent\Collection|\App\Models\Guest[] $guests
* @property-read int|null $guests_count
* @property-read \Illuminate\Database\Eloquent\Collection|\App\Models\Reservation[] $reservations
* @property-read int|null $reservations_count
*
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Room currentlyFreeRooms()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Room currentlyOccupiedRooms()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Room freeRoomsForReservation($dateStart, $dateEnd, $people)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Room whereCapacity($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Room whereComment($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Room whereCreatedAt($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Room whereFloor($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Room whereId($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Room whereNumber($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Room wherePrice($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Room whereUpdatedAt($value)
* @method static \Illuminate\Database\Eloquent\Builder|Room currentlyFreeRooms()
* @method static \Illuminate\Database\Eloquent\Builder|Room currentlyOccupiedRooms()
* @method static \Illuminate\Database\Eloquent\Builder|Room freeRoomsForReservation($dateStart, $dateEnd, $people)
* @method static \Illuminate\Database\Eloquent\Builder|Room newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|Room newQuery()
* @method static \Illuminate\Database\Eloquent\Builder|Room query()
* @method static \Illuminate\Database\Eloquent\Builder|Room whereCapacity($value)
* @method static \Illuminate\Database\Eloquent\Builder|Room whereComment($value)
* @method static \Illuminate\Database\Eloquent\Builder|Room whereCreatedAt($value)
* @method static \Illuminate\Database\Eloquent\Builder|Room whereFloor($value)
* @method static \Illuminate\Database\Eloquent\Builder|Room whereId($value)
* @method static \Illuminate\Database\Eloquent\Builder|Room whereNumber($value)
* @method static \Illuminate\Database\Eloquent\Builder|Room wherePrice($value)
* @method static \Illuminate\Database\Eloquent\Builder|Room whereUpdatedAt($value)
* @mixin \Eloquent
*/
class Room extends Model
Expand Down
20 changes: 12 additions & 8 deletions app/Models/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,19 @@
* @property \Illuminate\Support\Carbon $created_at
* @property \Illuminate\Support\Carbon $updated_at
* @property-read \Illuminate\Notifications\DatabaseNotificationCollection|\Illuminate\Notifications\DatabaseNotification[] $notifications
* @property-read int|null $notifications_count
*
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\User whereCreatedAt($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\User whereEmail($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\User whereId($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\User whereIsAdmin($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\User whereName($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\User wherePassword($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\User whereRememberToken($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\User whereUpdatedAt($value)
* @method static \Illuminate\Database\Eloquent\Builder|User newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|User newQuery()
* @method static \Illuminate\Database\Eloquent\Builder|User query()
* @method static \Illuminate\Database\Eloquent\Builder|User whereCreatedAt($value)
* @method static \Illuminate\Database\Eloquent\Builder|User whereEmail($value)
* @method static \Illuminate\Database\Eloquent\Builder|User whereId($value)
* @method static \Illuminate\Database\Eloquent\Builder|User whereIsAdmin($value)
* @method static \Illuminate\Database\Eloquent\Builder|User whereName($value)
* @method static \Illuminate\Database\Eloquent\Builder|User wherePassword($value)
* @method static \Illuminate\Database\Eloquent\Builder|User whereRememberToken($value)
* @method static \Illuminate\Database\Eloquent\Builder|User whereUpdatedAt($value)
* @mixin \Eloquent
*/
class User extends Authenticatable
Expand Down
File renamed without changes.
Empty file removed bootstrap/cache/.gitkeep
Empty file.
25 changes: 14 additions & 11 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,24 @@
"license": "MIT",
"type": "project",
"require": {
"php": ">=7.0.0",
"fideloper/proxy": "~3.3",
"fzaninotto/faker": "~1.4",
"laravel/framework": "5.5.*",
"laravel/tinker": "~1.0",
"laravelcollective/html": "^5.5.0"
"php": "^7.1.3",
"fideloper/proxy": "^4.0",
"fzaninotto/faker": "^1.4",
"laravel/framework": "5.6.*",
"laravel/tinker": "^1.0",
"laravelcollective/html": "^5.6.0"
},
"require-dev": {
"barryvdh/laravel-debugbar": "^3.0",
"barryvdh/laravel-ide-helper": "^2.4",
"codacy/coverage": "dev-master",
"doctrine/dbal": "~2.3",
"filp/whoops": "~2.0",
"laravel/browser-kit-testing": "2.*",
"mockery/mockery": "~1.0",
"filp/whoops": "^2.0",
"nunomaduro/collision": "^2.0",
"laravel/browser-kit-testing": "4.*",
"mockery/mockery": "^1.0",
"neronmoon/scriptsdev": "^0.1.1",
"phpunit/phpunit": "~6.0"
"phpunit/phpunit": "^7.0"
},
"autoload": {
"classmap": [
Expand Down Expand Up @@ -68,5 +69,7 @@
"preferred-install": "dist",
"sort-packages": true,
"optimize-autoloader": true
}
},
"minimum-stability": "dev",
"prefer-stable": true
}
Loading

0 comments on commit 2faa70e

Please sign in to comment.