, or .
9 |
10 | .list-group {
11 | // No need to set list-style: none; since .list-group-item is block level
12 | margin-bottom: 20px;
13 | padding-left: 0; // reset padding because ul and ol
14 | }
15 |
16 |
17 | // Individual list items
18 | //
19 | // Use on `li`s or `div`s within the `.list-group` parent.
20 |
21 | .list-group-item {
22 | position: relative;
23 | display: block;
24 | padding: 10px 15px;
25 | // Place the border on the list items and negative margin up for better styling
26 | margin-bottom: -1px;
27 | background-color: @list-group-bg;
28 | border: 1px solid @list-group-border;
29 |
30 | // Round the first and last items
31 | &:first-child {
32 | .border-top-radius(@list-group-border-radius);
33 | }
34 | &:last-child {
35 | margin-bottom: 0;
36 | .border-bottom-radius(@list-group-border-radius);
37 | }
38 | }
39 |
40 |
41 | // Linked list items
42 | //
43 | // Use anchor elements instead of `li`s or `div`s to create linked list items.
44 | // Includes an extra `.active` modifier class for showing selected items.
45 |
46 | a.list-group-item {
47 | color: @list-group-link-color;
48 |
49 | .list-group-item-heading {
50 | color: @list-group-link-heading-color;
51 | }
52 |
53 | // Hover state
54 | &:hover,
55 | &:focus {
56 | text-decoration: none;
57 | color: @list-group-link-hover-color;
58 | background-color: @list-group-hover-bg;
59 | }
60 | }
61 |
62 | .list-group-item {
63 | // Disabled state
64 | &.disabled,
65 | &.disabled:hover,
66 | &.disabled:focus {
67 | background-color: @list-group-disabled-bg;
68 | color: @list-group-disabled-color;
69 | cursor: @cursor-disabled;
70 |
71 | // Force color to inherit for custom content
72 | .list-group-item-heading {
73 | color: inherit;
74 | }
75 | .list-group-item-text {
76 | color: @list-group-disabled-text-color;
77 | }
78 | }
79 |
80 | // Active class on item itself, not parent
81 | &.active,
82 | &.active:hover,
83 | &.active:focus {
84 | z-index: 2; // Place active items above their siblings for proper border styling
85 | color: @list-group-active-color;
86 | background-color: @list-group-active-bg;
87 | border-color: @list-group-active-border;
88 |
89 | // Force color to inherit for custom content
90 | .list-group-item-heading,
91 | .list-group-item-heading > small,
92 | .list-group-item-heading > .small {
93 | color: inherit;
94 | }
95 | .list-group-item-text {
96 | color: @list-group-active-text-color;
97 | }
98 | }
99 | }
100 |
101 |
102 | // Contextual variants
103 | //
104 | // Add modifier classes to change text and background color on individual items.
105 | // Organizationally, this must come after the `:hover` states.
106 |
107 | .list-group-item-variant(success; @state-success-bg; @state-success-text);
108 | .list-group-item-variant(info; @state-info-bg; @state-info-text);
109 | .list-group-item-variant(warning; @state-warning-bg; @state-warning-text);
110 | .list-group-item-variant(danger; @state-danger-bg; @state-danger-text);
111 |
112 |
113 | // Custom content options
114 | //
115 | // Extra classes for creating well-formatted content within `.list-group-item`s.
116 |
117 | .list-group-item-heading {
118 | margin-top: 0;
119 | margin-bottom: 5px;
120 | }
121 | .list-group-item-text {
122 | margin-bottom: 0;
123 | line-height: 1.3;
124 | }
125 |
--------------------------------------------------------------------------------
/resources/assets/less/bootstrap/mixins/grid.less:
--------------------------------------------------------------------------------
1 | // Grid system
2 | //
3 | // Generate semantic grid columns with these mixins.
4 |
5 | // Centered container element
6 | .container-fixed(@gutter: @grid-gutter-width) {
7 | margin-right: auto;
8 | margin-left: auto;
9 | padding-left: (@gutter / 2);
10 | padding-right: (@gutter / 2);
11 | &:extend(.clearfix all);
12 | }
13 |
14 | // Creates a wrapper for a series of columns
15 | .make-row(@gutter: @grid-gutter-width) {
16 | margin-left: (@gutter / -2);
17 | margin-right: (@gutter / -2);
18 | &:extend(.clearfix all);
19 | }
20 |
21 | // Generate the extra small columns
22 | .make-xs-column(@columns; @gutter: @grid-gutter-width) {
23 | position: relative;
24 | float: left;
25 | width: percentage((@columns / @grid-columns));
26 | min-height: 1px;
27 | padding-left: (@gutter / 2);
28 | padding-right: (@gutter / 2);
29 | }
30 | .make-xs-column-offset(@columns) {
31 | margin-left: percentage((@columns / @grid-columns));
32 | }
33 | .make-xs-column-push(@columns) {
34 | left: percentage((@columns / @grid-columns));
35 | }
36 | .make-xs-column-pull(@columns) {
37 | right: percentage((@columns / @grid-columns));
38 | }
39 |
40 | // Generate the small columns
41 | .make-sm-column(@columns; @gutter: @grid-gutter-width) {
42 | position: relative;
43 | min-height: 1px;
44 | padding-left: (@gutter / 2);
45 | padding-right: (@gutter / 2);
46 |
47 | @media (min-width: @screen-sm-min) {
48 | float: left;
49 | width: percentage((@columns / @grid-columns));
50 | }
51 | }
52 | .make-sm-column-offset(@columns) {
53 | @media (min-width: @screen-sm-min) {
54 | margin-left: percentage((@columns / @grid-columns));
55 | }
56 | }
57 | .make-sm-column-push(@columns) {
58 | @media (min-width: @screen-sm-min) {
59 | left: percentage((@columns / @grid-columns));
60 | }
61 | }
62 | .make-sm-column-pull(@columns) {
63 | @media (min-width: @screen-sm-min) {
64 | right: percentage((@columns / @grid-columns));
65 | }
66 | }
67 |
68 | // Generate the medium columns
69 | .make-md-column(@columns; @gutter: @grid-gutter-width) {
70 | position: relative;
71 | min-height: 1px;
72 | padding-left: (@gutter / 2);
73 | padding-right: (@gutter / 2);
74 |
75 | @media (min-width: @screen-md-min) {
76 | float: left;
77 | width: percentage((@columns / @grid-columns));
78 | }
79 | }
80 | .make-md-column-offset(@columns) {
81 | @media (min-width: @screen-md-min) {
82 | margin-left: percentage((@columns / @grid-columns));
83 | }
84 | }
85 | .make-md-column-push(@columns) {
86 | @media (min-width: @screen-md-min) {
87 | left: percentage((@columns / @grid-columns));
88 | }
89 | }
90 | .make-md-column-pull(@columns) {
91 | @media (min-width: @screen-md-min) {
92 | right: percentage((@columns / @grid-columns));
93 | }
94 | }
95 |
96 | // Generate the large columns
97 | .make-lg-column(@columns; @gutter: @grid-gutter-width) {
98 | position: relative;
99 | min-height: 1px;
100 | padding-left: (@gutter / 2);
101 | padding-right: (@gutter / 2);
102 |
103 | @media (min-width: @screen-lg-min) {
104 | float: left;
105 | width: percentage((@columns / @grid-columns));
106 | }
107 | }
108 | .make-lg-column-offset(@columns) {
109 | @media (min-width: @screen-lg-min) {
110 | margin-left: percentage((@columns / @grid-columns));
111 | }
112 | }
113 | .make-lg-column-push(@columns) {
114 | @media (min-width: @screen-lg-min) {
115 | left: percentage((@columns / @grid-columns));
116 | }
117 | }
118 | .make-lg-column-pull(@columns) {
119 | @media (min-width: @screen-lg-min) {
120 | right: percentage((@columns / @grid-columns));
121 | }
122 | }
123 |
--------------------------------------------------------------------------------
/app/Http/Controllers/Achievements/AchievementsController.php:
--------------------------------------------------------------------------------
1 | api = $api;
29 | }
30 |
31 | /**
32 | * Get achievements list or achievement by ID
33 | *
34 | * @param Request $request
35 | * @param int $id
36 | * @return Achievement|array
37 | */
38 | public function getAchievements(Request $request, $id = 0) {
39 |
40 | $result = Achievement::withExtra($request->has('no_extra_fields'));
41 |
42 | if ($id)
43 | $result = $result->findOrFail($id);
44 | else {
45 | if ($category = $request->get("category"))
46 | $result->where('category', '=', $category);
47 |
48 | if ($faction = $request->get('faction'))
49 | switch ($faction) {
50 | case "horde":
51 | $result->where('Faction', '!=', '1');
52 | break;
53 | case "alliance":
54 | $result->where('Faction', '!=', '0');
55 | break;
56 | }
57 |
58 | $result = $result->get();
59 | }
60 |
61 | return $result;
62 | }
63 |
64 | /**
65 | * Get achievements categories list or category by ID
66 | *
67 | * @param Request $request
68 | * @param int $id
69 | * @return AchievementCategory|array
70 | */
71 | public function getAchievementCategories(Request $request, $id = 0) {
72 |
73 | $result = AchievementCategory::withExtra($request->has('no_extra_fields'));
74 |
75 | //backward compatibility
76 | $id = $id ?: $request->get("id");
77 |
78 | if ($id)
79 | $result = $result->findOrFail($id);
80 | else {
81 | //TODO::Search by other fields
82 | $result = $result->get();
83 | }
84 |
85 | return $result;
86 | }
87 |
88 | /**
89 | * Get achievements dbc information
90 | *
91 | * @param Request $request
92 | * @param int $id
93 | * @return AchievementCategory|array
94 | */
95 | public function getDbcAchievements(Request $request, $id = 0) {
96 | switch ($this->api->getGameVersion()) {
97 | case "wod": {
98 | if ($id)
99 | $result = AchievementWod::findOrFail($id);
100 | else
101 | $result = AchievementWod::all();
102 |
103 | break;
104 | }
105 | case "wotlk": {
106 | if ($id)
107 | $result = AchievementWotlk::findOrFail($id);
108 | else
109 | $result = AchievementWotlk::all();
110 |
111 | break;
112 | }
113 | default:
114 | throw new UnsupportedVersion();
115 | }
116 |
117 | //TODO::Search by name and supporting translate
118 |
119 | return $result;
120 | }
121 | }
122 |
--------------------------------------------------------------------------------
/app/Models/Achievements/AchievementCategory.php:
--------------------------------------------------------------------------------
1 | select($extra ? [] : ['ID', 'ParentID', 'Name']);
67 | }
68 | }
69 |
--------------------------------------------------------------------------------
/INSTALL.md:
--------------------------------------------------------------------------------
1 | ## Requirements
2 |
3 | In order to install this API, your system must have:
4 |
5 | - **[TDB 335.59](https://github.com/TrinityCore/TrinityCore/releases/)** or newer
6 | - **PHP 5.5.9** or newer
7 | - **OpenSSL PHP Extension**
8 | - **PDO PHP Extension**
9 | - **Mbstring PHP Extensionn**
10 | - **Tokenizer PHP Extension**
11 | - **PHP Sqlite driver (php5-sqlite)**
12 |
13 | If you are installing it from sources you will also need:
14 |
15 | - **[Composer](https://getcomposer.org/)**
16 | - **[Laravel](http://laravel.com)**
17 |
18 | ### Installing requirements on Ubuntu 16.04
19 |
20 | To install the requirements you can type the following command on the terminal:
21 |
22 | `sudo apt install php-xml php-mbstring php-sqlite3`
23 |
24 | `sudo service apache2 restart`
25 |
26 | ## 1) [Easy] Get full version archive of latest release
27 |
28 | - Download latest "Full" version zip archive: https://github.com/ShinDarth/TC-JSON-API/releases/
29 | - Extract "TC-JSON-API" folder inside your server web directory
30 | - Go to 2)
31 |
32 | ## 1) [Developer] Install latest version from sources
33 |
34 | - Install all the required software. If you don't have Laravel yet, after you have installed composer, just run:
35 |
36 | `composer global require "laravel/installer=~1.1"`
37 |
38 | - Clone the TC-JSON-API inside your server web directory:
39 |
40 | `git clone https://github.com/ShinDarth/TC-JSON-API.git`
41 |
42 | if you don't have [git](http://git-scm.com/) installed, you can [download it directly](https://github.com/ShinDarth/TC-JSON-API/archive/master.zip).
43 |
44 | - Move inside the TC-JSON-API and run composer install:
45 |
46 | `cd TC-JSON-API`
47 |
48 | `composer install`
49 |
50 | - Copy the file **.env.example** to **.env**
51 |
52 | - Automatic encryption key generation:
53 |
54 | `php artisan key:generate`
55 |
56 | - Generate key for auth:
57 |
58 | `php artisan jwt:generate`
59 |
60 | ## 2) Configure the API
61 |
62 | - Create a new database that will contain all **dbc** data and import the file achievements.sql (in storage/database/achievements.sql) which contains all the dbc data of achievements.
63 |
64 | - Open **.env** with a text editor and set properly DB_* parameters, example:
65 |
66 | `DB_HOST=localhost`
67 |
68 | `DB_WORLD=world`
69 |
70 | `DB_CHARACTERS=characters`
71 |
72 | `DB_AUTH=auth`
73 |
74 | `DB_DBC=dbc`
75 |
76 | `DB_USERNAME=root`
77 |
78 | `DB_PASSWORD=yourpassword`
79 |
80 | Note: **setting all databases is not mandatory**, just set the databases that you need.
81 |
82 | - Run the follow command to generate the users table
83 |
84 | `php artisan migrate`
85 |
86 | If everything is ok you should be able to correctly open [http://localhost/TC-JSON-API/public/index.php](http://localhost/TC-JSON-API/public/index.php).
87 |
88 | From now on you can perform HTTP requests to the API at **http://localhost/TC-JSON-API/public/index.php/**.
89 |
90 | Check [our documentation](https://github.com/ShinDarth/TC-JSON-API/wiki) to see all possible requests.
91 |
92 | ## Enabling Debug mode
93 |
94 | `APP_ENV=production`
95 |
96 | `APP_DEBUG=false`
97 |
98 | Replace with:
99 |
100 | `APP_ENV=local`
101 |
102 | `APP_DEBUG=true`
103 |
104 | Now you can see error messages in your browser & logs too.
105 |
106 | **Be careful! Do not use debug mode on production server.**
107 |
108 | ## Developing environment
109 |
110 | You really don't need install apache or nginx on your local PC for developing, that easily to use integrated web server.
111 | Go to root project directory and run CLI command:
112 | `php artisan serve`
113 |
114 | ## Troubleshooting
115 |
116 | - Ensure that the entire folder TC-JSON-API (including all its files and subfolders) have the proper file permissions.
117 |
118 | - If you get white page or any error, check **storage/logs** to understand what happens.
119 |
120 | - If for some reasons the API is not able to read from .env file, you have to configure database manually in **config/database.php** file.
121 |
--------------------------------------------------------------------------------
/config/auth.php:
--------------------------------------------------------------------------------
1 | [
17 | 'guard' => 'web',
18 | 'passwords' => 'users',
19 | ],
20 |
21 | /*
22 | |--------------------------------------------------------------------------
23 | | Authentication Guards
24 | |--------------------------------------------------------------------------
25 | |
26 | | Next, you may define every authentication guard for your application.
27 | | Of course, a great default configuration has been defined for you
28 | | here which uses session storage and the Eloquent user provider.
29 | |
30 | | All authentication drivers have a user provider. This defines how the
31 | | users are actually retrieved out of your database or other storage
32 | | mechanisms used by this application to persist your user's data.
33 | |
34 | | Supported: "session", "token"
35 | |
36 | */
37 |
38 | 'guards' => [
39 | 'web' => [
40 | 'driver' => 'session',
41 | 'provider' => 'users',
42 | ],
43 |
44 | 'api' => [
45 | 'driver' => 'token',
46 | 'provider' => 'users',
47 | ],
48 | ],
49 |
50 | /*
51 | |--------------------------------------------------------------------------
52 | | User Providers
53 | |--------------------------------------------------------------------------
54 | |
55 | | All authentication drivers have a user provider. This defines how the
56 | | users are actually retrieved out of your database or other storage
57 | | mechanisms used by this application to persist your user's data.
58 | |
59 | | If you have multiple user tables or models you may configure multiple
60 | | sources which represent each model / table. These sources may then
61 | | be assigned to any extra authentication guards you have defined.
62 | |
63 | | Supported: "database", "eloquent"
64 | |
65 | */
66 |
67 | 'providers' => [
68 | 'users' => [
69 | 'driver' => 'trinitycore',
70 | 'model' => App\User::class,
71 | ],
72 |
73 | // 'users' => [
74 | // 'driver' => 'database',
75 | // 'table' => 'users',
76 | // ],
77 | ],
78 |
79 | /*
80 | |--------------------------------------------------------------------------
81 | | Resetting Passwords
82 | |--------------------------------------------------------------------------
83 | |
84 | | Here you may set the options for resetting passwords including the view
85 | | that is your password reset e-mail. You may also set the name of the
86 | | table that maintains all of the reset tokens for your application.
87 | |
88 | | You may specify multiple password reset configurations if you have more
89 | | than one user table or model in the application and you want to have
90 | | separate password reset settings based on the specific user types.
91 | |
92 | | The expire time is the number of minutes that the reset token should be
93 | | considered valid. This security feature keeps tokens short-lived so
94 | | they have less time to be guessed. You may change this as needed.
95 | |
96 | */
97 |
98 | 'passwords' => [
99 | 'users' => [
100 | 'provider' => 'users',
101 | 'email' => 'auth.emails.password',
102 | 'table' => 'password_resets',
103 | 'expire' => 60,
104 | ],
105 | ],
106 |
107 | ];
108 |
--------------------------------------------------------------------------------
/app/User.php:
--------------------------------------------------------------------------------
1 | sha_pass_hash;
92 | }
93 |
94 | /**
95 | * Getting username
96 | *
97 | * @return string
98 | */
99 | public function getAuthIdentifierName()
100 | {
101 | return $this->username;
102 | }
103 | }
104 |
--------------------------------------------------------------------------------
/resources/assets/less/bootstrap/popovers.less:
--------------------------------------------------------------------------------
1 | //
2 | // Popovers
3 | // --------------------------------------------------
4 |
5 |
6 | .popover {
7 | position: absolute;
8 | top: 0;
9 | left: 0;
10 | z-index: @zindex-popover;
11 | display: none;
12 | max-width: @popover-max-width;
13 | padding: 1px;
14 | // Reset font and text propertes given new insertion method
15 | font-family: @font-family-base;
16 | font-size: @font-size-base;
17 | font-weight: normal;
18 | line-height: @line-height-base;
19 | text-align: left;
20 | background-color: @popover-bg;
21 | background-clip: padding-box;
22 | border: 1px solid @popover-fallback-border-color;
23 | border: 1px solid @popover-border-color;
24 | border-radius: @border-radius-large;
25 | .box-shadow(0 5px 10px rgba(0,0,0,.2));
26 |
27 | // Overrides for proper insertion
28 | white-space: normal;
29 |
30 | // Offset the popover to account for the popover arrow
31 | &.top { margin-top: -@popover-arrow-width; }
32 | &.right { margin-left: @popover-arrow-width; }
33 | &.bottom { margin-top: @popover-arrow-width; }
34 | &.left { margin-left: -@popover-arrow-width; }
35 | }
36 |
37 | .popover-title {
38 | margin: 0; // reset heading margin
39 | padding: 8px 14px;
40 | font-size: @font-size-base;
41 | background-color: @popover-title-bg;
42 | border-bottom: 1px solid darken(@popover-title-bg, 5%);
43 | border-radius: (@border-radius-large - 1) (@border-radius-large - 1) 0 0;
44 | }
45 |
46 | .popover-content {
47 | padding: 9px 14px;
48 | }
49 |
50 | // Arrows
51 | //
52 | // .arrow is outer, .arrow:after is inner
53 |
54 | .popover > .arrow {
55 | &,
56 | &:after {
57 | position: absolute;
58 | display: block;
59 | width: 0;
60 | height: 0;
61 | border-color: transparent;
62 | border-style: solid;
63 | }
64 | }
65 | .popover > .arrow {
66 | border-width: @popover-arrow-outer-width;
67 | }
68 | .popover > .arrow:after {
69 | border-width: @popover-arrow-width;
70 | content: "";
71 | }
72 |
73 | .popover {
74 | &.top > .arrow {
75 | left: 50%;
76 | margin-left: -@popover-arrow-outer-width;
77 | border-bottom-width: 0;
78 | border-top-color: @popover-arrow-outer-fallback-color; // IE8 fallback
79 | border-top-color: @popover-arrow-outer-color;
80 | bottom: -@popover-arrow-outer-width;
81 | &:after {
82 | content: " ";
83 | bottom: 1px;
84 | margin-left: -@popover-arrow-width;
85 | border-bottom-width: 0;
86 | border-top-color: @popover-arrow-color;
87 | }
88 | }
89 | &.right > .arrow {
90 | top: 50%;
91 | left: -@popover-arrow-outer-width;
92 | margin-top: -@popover-arrow-outer-width;
93 | border-left-width: 0;
94 | border-right-color: @popover-arrow-outer-fallback-color; // IE8 fallback
95 | border-right-color: @popover-arrow-outer-color;
96 | &:after {
97 | content: " ";
98 | left: 1px;
99 | bottom: -@popover-arrow-width;
100 | border-left-width: 0;
101 | border-right-color: @popover-arrow-color;
102 | }
103 | }
104 | &.bottom > .arrow {
105 | left: 50%;
106 | margin-left: -@popover-arrow-outer-width;
107 | border-top-width: 0;
108 | border-bottom-color: @popover-arrow-outer-fallback-color; // IE8 fallback
109 | border-bottom-color: @popover-arrow-outer-color;
110 | top: -@popover-arrow-outer-width;
111 | &:after {
112 | content: " ";
113 | top: 1px;
114 | margin-left: -@popover-arrow-width;
115 | border-top-width: 0;
116 | border-bottom-color: @popover-arrow-color;
117 | }
118 | }
119 |
120 | &.left > .arrow {
121 | top: 50%;
122 | right: -@popover-arrow-outer-width;
123 | margin-top: -@popover-arrow-outer-width;
124 | border-right-width: 0;
125 | border-left-color: @popover-arrow-outer-fallback-color; // IE8 fallback
126 | border-left-color: @popover-arrow-outer-color;
127 | &:after {
128 | content: " ";
129 | right: 1px;
130 | border-right-width: 0;
131 | border-left-color: @popover-arrow-color;
132 | bottom: -@popover-arrow-width;
133 | }
134 | }
135 | }
136 |
--------------------------------------------------------------------------------
/resources/assets/less/bootstrap/modals.less:
--------------------------------------------------------------------------------
1 | //
2 | // Modals
3 | // --------------------------------------------------
4 |
5 | // .modal-open - body class for killing the scroll
6 | // .modal - container to scroll within
7 | // .modal-dialog - positioning shell for the actual modal
8 | // .modal-content - actual modal w/ bg and corners and shit
9 |
10 | // Kill the scroll on the body
11 | .modal-open {
12 | overflow: hidden;
13 | }
14 |
15 | // Container that the modal scrolls within
16 | .modal {
17 | display: none;
18 | overflow: hidden;
19 | position: fixed;
20 | top: 0;
21 | right: 0;
22 | bottom: 0;
23 | left: 0;
24 | z-index: @zindex-modal;
25 | -webkit-overflow-scrolling: touch;
26 |
27 | // Prevent Chrome on Windows from adding a focus outline. For details, see
28 | // https://github.com/twbs/bootstrap/pull/10951.
29 | outline: 0;
30 |
31 | // When fading in the modal, animate it to slide down
32 | &.fade .modal-dialog {
33 | .translate(0, -25%);
34 | .transition-transform(~"0.3s ease-out");
35 | }
36 | &.in .modal-dialog { .translate(0, 0) }
37 | }
38 | .modal-open .modal {
39 | overflow-x: hidden;
40 | overflow-y: auto;
41 | }
42 |
43 | // Shell div to position the modal with bottom padding
44 | .modal-dialog {
45 | position: relative;
46 | width: auto;
47 | margin: 10px;
48 | }
49 |
50 | // Actual modal
51 | .modal-content {
52 | position: relative;
53 | background-color: @modal-content-bg;
54 | border: 1px solid @modal-content-fallback-border-color; //old browsers fallback (ie8 etc)
55 | border: 1px solid @modal-content-border-color;
56 | border-radius: @border-radius-large;
57 | .box-shadow(0 3px 9px rgba(0,0,0,.5));
58 | background-clip: padding-box;
59 | // Remove focus outline from opened modal
60 | outline: 0;
61 | }
62 |
63 | // Modal background
64 | .modal-backdrop {
65 | position: absolute;
66 | top: 0;
67 | right: 0;
68 | left: 0;
69 | background-color: @modal-backdrop-bg;
70 | // Fade for backdrop
71 | &.fade { .opacity(0); }
72 | &.in { .opacity(@modal-backdrop-opacity); }
73 | }
74 |
75 | // Modal header
76 | // Top section of the modal w/ title and dismiss
77 | .modal-header {
78 | padding: @modal-title-padding;
79 | border-bottom: 1px solid @modal-header-border-color;
80 | min-height: (@modal-title-padding + @modal-title-line-height);
81 | }
82 | // Close icon
83 | .modal-header .close {
84 | margin-top: -2px;
85 | }
86 |
87 | // Title text within header
88 | .modal-title {
89 | margin: 0;
90 | line-height: @modal-title-line-height;
91 | }
92 |
93 | // Modal body
94 | // Where all modal content resides (sibling of .modal-header and .modal-footer)
95 | .modal-body {
96 | position: relative;
97 | padding: @modal-inner-padding;
98 | }
99 |
100 | // Footer (for actions)
101 | .modal-footer {
102 | padding: @modal-inner-padding;
103 | text-align: right; // right align buttons
104 | border-top: 1px solid @modal-footer-border-color;
105 | &:extend(.clearfix all); // clear it in case folks use .pull-* classes on buttons
106 |
107 | // Properly space out buttons
108 | .btn + .btn {
109 | margin-left: 5px;
110 | margin-bottom: 0; // account for input[type="submit"] which gets the bottom margin like all other inputs
111 | }
112 | // but override that for button groups
113 | .btn-group .btn + .btn {
114 | margin-left: -1px;
115 | }
116 | // and override it for block buttons as well
117 | .btn-block + .btn-block {
118 | margin-left: 0;
119 | }
120 | }
121 |
122 | // Measure scrollbar width for padding body during modal show/hide
123 | .modal-scrollbar-measure {
124 | position: absolute;
125 | top: -9999px;
126 | width: 50px;
127 | height: 50px;
128 | overflow: scroll;
129 | }
130 |
131 | // Scale up the modal
132 | @media (min-width: @screen-sm-min) {
133 | // Automatically set modal's width for larger viewports
134 | .modal-dialog {
135 | width: @modal-md;
136 | margin: 30px auto;
137 | }
138 | .modal-content {
139 | .box-shadow(0 5px 15px rgba(0,0,0,.5));
140 | }
141 |
142 | // Modal sizes
143 | .modal-sm { width: @modal-sm; }
144 | }
145 |
146 | @media (min-width: @screen-md-min) {
147 | .modal-lg { width: @modal-lg; }
148 | }
149 |
--------------------------------------------------------------------------------
/resources/assets/less/bootstrap/buttons.less:
--------------------------------------------------------------------------------
1 | //
2 | // Buttons
3 | // --------------------------------------------------
4 |
5 |
6 | // Base styles
7 | // --------------------------------------------------
8 |
9 | .btn {
10 | display: inline-block;
11 | margin-bottom: 0; // For input.btn
12 | font-weight: @btn-font-weight;
13 | text-align: center;
14 | vertical-align: middle;
15 | touch-action: manipulation;
16 | cursor: pointer;
17 | background-image: none; // Reset unusual Firefox-on-Android default style; see https://github.com/necolas/normalize.css/issues/214
18 | border: 1px solid transparent;
19 | white-space: nowrap;
20 | .button-size(@padding-base-vertical; @padding-base-horizontal; @font-size-base; @line-height-base; @border-radius-base);
21 | .user-select(none);
22 |
23 | &,
24 | &:active,
25 | &.active {
26 | &:focus,
27 | &.focus {
28 | .tab-focus();
29 | }
30 | }
31 |
32 | &:hover,
33 | &:focus,
34 | &.focus {
35 | color: @btn-default-color;
36 | text-decoration: none;
37 | }
38 |
39 | &:active,
40 | &.active {
41 | outline: 0;
42 | background-image: none;
43 | .box-shadow(inset 0 3px 5px rgba(0,0,0,.125));
44 | }
45 |
46 | &.disabled,
47 | &[disabled],
48 | fieldset[disabled] & {
49 | cursor: @cursor-disabled;
50 | pointer-events: none; // Future-proof disabling of clicks
51 | .opacity(.65);
52 | .box-shadow(none);
53 | }
54 | }
55 |
56 |
57 | // Alternate buttons
58 | // --------------------------------------------------
59 |
60 | .btn-default {
61 | .button-variant(@btn-default-color; @btn-default-bg; @btn-default-border);
62 | }
63 | .btn-primary {
64 | .button-variant(@btn-primary-color; @btn-primary-bg; @btn-primary-border);
65 | }
66 | // Success appears as green
67 | .btn-success {
68 | .button-variant(@btn-success-color; @btn-success-bg; @btn-success-border);
69 | }
70 | // Info appears as blue-green
71 | .btn-info {
72 | .button-variant(@btn-info-color; @btn-info-bg; @btn-info-border);
73 | }
74 | // Warning appears as orange
75 | .btn-warning {
76 | .button-variant(@btn-warning-color; @btn-warning-bg; @btn-warning-border);
77 | }
78 | // Danger and error appear as red
79 | .btn-danger {
80 | .button-variant(@btn-danger-color; @btn-danger-bg; @btn-danger-border);
81 | }
82 |
83 |
84 | // Link buttons
85 | // -------------------------
86 |
87 | // Make a button look and behave like a link
88 | .btn-link {
89 | color: @link-color;
90 | font-weight: normal;
91 | border-radius: 0;
92 |
93 | &,
94 | &:active,
95 | &.active,
96 | &[disabled],
97 | fieldset[disabled] & {
98 | background-color: transparent;
99 | .box-shadow(none);
100 | }
101 | &,
102 | &:hover,
103 | &:focus,
104 | &:active {
105 | border-color: transparent;
106 | }
107 | &:hover,
108 | &:focus {
109 | color: @link-hover-color;
110 | text-decoration: underline;
111 | background-color: transparent;
112 | }
113 | &[disabled],
114 | fieldset[disabled] & {
115 | &:hover,
116 | &:focus {
117 | color: @btn-link-disabled-color;
118 | text-decoration: none;
119 | }
120 | }
121 | }
122 |
123 |
124 | // Button Sizes
125 | // --------------------------------------------------
126 |
127 | .btn-lg {
128 | // line-height: ensure even-numbered height of button next to large input
129 | .button-size(@padding-large-vertical; @padding-large-horizontal; @font-size-large; @line-height-large; @border-radius-large);
130 | }
131 | .btn-sm {
132 | // line-height: ensure proper height of button next to small input
133 | .button-size(@padding-small-vertical; @padding-small-horizontal; @font-size-small; @line-height-small; @border-radius-small);
134 | }
135 | .btn-xs {
136 | .button-size(@padding-xs-vertical; @padding-xs-horizontal; @font-size-small; @line-height-small; @border-radius-small);
137 | }
138 |
139 |
140 | // Block button
141 | // --------------------------------------------------
142 |
143 | .btn-block {
144 | display: block;
145 | width: 100%;
146 | }
147 |
148 | // Vertically space out multiple block buttons
149 | .btn-block + .btn-block {
150 | margin-top: 5px;
151 | }
152 |
153 | // Specificity overrides
154 | input[type="submit"],
155 | input[type="reset"],
156 | input[type="button"] {
157 | &.btn-block {
158 | width: 100%;
159 | }
160 | }
161 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/resources/assets/less/bootstrap/mixins/gradients.less:
--------------------------------------------------------------------------------
1 | // Gradients
2 |
3 | #gradient {
4 |
5 | // Horizontal gradient, from left to right
6 | //
7 | // Creates two color stops, start and end, by specifying a color and position for each color stop.
8 | // Color stops are not available in IE9 and below.
9 | .horizontal(@start-color: #555; @end-color: #333; @start-percent: 0%; @end-percent: 100%) {
10 | background-image: -webkit-linear-gradient(left, @start-color @start-percent, @end-color @end-percent); // Safari 5.1-6, Chrome 10+
11 | background-image: -o-linear-gradient(left, @start-color @start-percent, @end-color @end-percent); // Opera 12
12 | background-image: linear-gradient(to right, @start-color @start-percent, @end-color @end-percent); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+
13 | background-repeat: repeat-x;
14 | filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=1)",argb(@start-color),argb(@end-color))); // IE9 and down
15 | }
16 |
17 | // Vertical gradient, from top to bottom
18 | //
19 | // Creates two color stops, start and end, by specifying a color and position for each color stop.
20 | // Color stops are not available in IE9 and below.
21 | .vertical(@start-color: #555; @end-color: #333; @start-percent: 0%; @end-percent: 100%) {
22 | background-image: -webkit-linear-gradient(top, @start-color @start-percent, @end-color @end-percent); // Safari 5.1-6, Chrome 10+
23 | background-image: -o-linear-gradient(top, @start-color @start-percent, @end-color @end-percent); // Opera 12
24 | background-image: linear-gradient(to bottom, @start-color @start-percent, @end-color @end-percent); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+
25 | background-repeat: repeat-x;
26 | filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)",argb(@start-color),argb(@end-color))); // IE9 and down
27 | }
28 |
29 | .directional(@start-color: #555; @end-color: #333; @deg: 45deg) {
30 | background-repeat: repeat-x;
31 | background-image: -webkit-linear-gradient(@deg, @start-color, @end-color); // Safari 5.1-6, Chrome 10+
32 | background-image: -o-linear-gradient(@deg, @start-color, @end-color); // Opera 12
33 | background-image: linear-gradient(@deg, @start-color, @end-color); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+
34 | }
35 | .horizontal-three-colors(@start-color: #00b3ee; @mid-color: #7a43b6; @color-stop: 50%; @end-color: #c3325f) {
36 | background-image: -webkit-linear-gradient(left, @start-color, @mid-color @color-stop, @end-color);
37 | background-image: -o-linear-gradient(left, @start-color, @mid-color @color-stop, @end-color);
38 | background-image: linear-gradient(to right, @start-color, @mid-color @color-stop, @end-color);
39 | background-repeat: no-repeat;
40 | filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=1)",argb(@start-color),argb(@end-color))); // IE9 and down, gets no color-stop at all for proper fallback
41 | }
42 | .vertical-three-colors(@start-color: #00b3ee; @mid-color: #7a43b6; @color-stop: 50%; @end-color: #c3325f) {
43 | background-image: -webkit-linear-gradient(@start-color, @mid-color @color-stop, @end-color);
44 | background-image: -o-linear-gradient(@start-color, @mid-color @color-stop, @end-color);
45 | background-image: linear-gradient(@start-color, @mid-color @color-stop, @end-color);
46 | background-repeat: no-repeat;
47 | filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)",argb(@start-color),argb(@end-color))); // IE9 and down, gets no color-stop at all for proper fallback
48 | }
49 | .radial(@inner-color: #555; @outer-color: #333) {
50 | background-image: -webkit-radial-gradient(circle, @inner-color, @outer-color);
51 | background-image: radial-gradient(circle, @inner-color, @outer-color);
52 | background-repeat: no-repeat;
53 | }
54 | .striped(@color: rgba(255,255,255,.15); @angle: 45deg) {
55 | background-image: -webkit-linear-gradient(@angle, @color 25%, transparent 25%, transparent 50%, @color 50%, @color 75%, transparent 75%, transparent);
56 | background-image: -o-linear-gradient(@angle, @color 25%, transparent 25%, transparent 50%, @color 50%, @color 75%, transparent 75%, transparent);
57 | background-image: linear-gradient(@angle, @color 25%, transparent 25%, transparent 50%, @color 50%, @color 75%, transparent 75%, transparent);
58 | }
59 | }
60 |
--------------------------------------------------------------------------------
/resources/assets/less/bootstrap/input-groups.less:
--------------------------------------------------------------------------------
1 | //
2 | // Input groups
3 | // --------------------------------------------------
4 |
5 | // Base styles
6 | // -------------------------
7 | .input-group {
8 | position: relative; // For dropdowns
9 | display: table;
10 | border-collapse: separate; // prevent input groups from inheriting border styles from table cells when placed within a table
11 |
12 | // Undo padding and float of grid classes
13 | &[class*="col-"] {
14 | float: none;
15 | padding-left: 0;
16 | padding-right: 0;
17 | }
18 |
19 | .form-control {
20 | // Ensure that the input is always above the *appended* addon button for
21 | // proper border colors.
22 | position: relative;
23 | z-index: 2;
24 |
25 | // IE9 fubars the placeholder attribute in text inputs and the arrows on
26 | // select elements in input groups. To fix it, we float the input. Details:
27 | // https://github.com/twbs/bootstrap/issues/11561#issuecomment-28936855
28 | float: left;
29 |
30 | width: 100%;
31 | margin-bottom: 0;
32 | }
33 | }
34 |
35 | // Sizing options
36 | //
37 | // Remix the default form control sizing classes into new ones for easier
38 | // manipulation.
39 |
40 | .input-group-lg > .form-control,
41 | .input-group-lg > .input-group-addon,
42 | .input-group-lg > .input-group-btn > .btn {
43 | .input-lg();
44 | }
45 | .input-group-sm > .form-control,
46 | .input-group-sm > .input-group-addon,
47 | .input-group-sm > .input-group-btn > .btn {
48 | .input-sm();
49 | }
50 |
51 |
52 | // Display as table-cell
53 | // -------------------------
54 | .input-group-addon,
55 | .input-group-btn,
56 | .input-group .form-control {
57 | display: table-cell;
58 |
59 | &:not(:first-child):not(:last-child) {
60 | border-radius: 0;
61 | }
62 | }
63 | // Addon and addon wrapper for buttons
64 | .input-group-addon,
65 | .input-group-btn {
66 | width: 1%;
67 | white-space: nowrap;
68 | vertical-align: middle; // Match the inputs
69 | }
70 |
71 | // Text input groups
72 | // -------------------------
73 | .input-group-addon {
74 | padding: @padding-base-vertical @padding-base-horizontal;
75 | font-size: @font-size-base;
76 | font-weight: normal;
77 | line-height: 1;
78 | color: @input-color;
79 | text-align: center;
80 | background-color: @input-group-addon-bg;
81 | border: 1px solid @input-group-addon-border-color;
82 | border-radius: @border-radius-base;
83 |
84 | // Sizing
85 | &.input-sm {
86 | padding: @padding-small-vertical @padding-small-horizontal;
87 | font-size: @font-size-small;
88 | border-radius: @border-radius-small;
89 | }
90 | &.input-lg {
91 | padding: @padding-large-vertical @padding-large-horizontal;
92 | font-size: @font-size-large;
93 | border-radius: @border-radius-large;
94 | }
95 |
96 | // Nuke default margins from checkboxes and radios to vertically center within.
97 | input[type="radio"],
98 | input[type="checkbox"] {
99 | margin-top: 0;
100 | }
101 | }
102 |
103 | // Reset rounded corners
104 | .input-group .form-control:first-child,
105 | .input-group-addon:first-child,
106 | .input-group-btn:first-child > .btn,
107 | .input-group-btn:first-child > .btn-group > .btn,
108 | .input-group-btn:first-child > .dropdown-toggle,
109 | .input-group-btn:last-child > .btn:not(:last-child):not(.dropdown-toggle),
110 | .input-group-btn:last-child > .btn-group:not(:last-child) > .btn {
111 | .border-right-radius(0);
112 | }
113 | .input-group-addon:first-child {
114 | border-right: 0;
115 | }
116 | .input-group .form-control:last-child,
117 | .input-group-addon:last-child,
118 | .input-group-btn:last-child > .btn,
119 | .input-group-btn:last-child > .btn-group > .btn,
120 | .input-group-btn:last-child > .dropdown-toggle,
121 | .input-group-btn:first-child > .btn:not(:first-child),
122 | .input-group-btn:first-child > .btn-group:not(:first-child) > .btn {
123 | .border-left-radius(0);
124 | }
125 | .input-group-addon:last-child {
126 | border-left: 0;
127 | }
128 |
129 | // Button input groups
130 | // -------------------------
131 | .input-group-btn {
132 | position: relative;
133 | // Jankily prevent input button groups from wrapping with `white-space` and
134 | // `font-size` in combination with `inline-block` on buttons.
135 | font-size: 0;
136 | white-space: nowrap;
137 |
138 | // Negative margin for spacing, position for bringing hovered/focused/actived
139 | // element above the siblings.
140 | > .btn {
141 | position: relative;
142 | + .btn {
143 | margin-left: -1px;
144 | }
145 | // Bring the "active" button to the front
146 | &:hover,
147 | &:focus,
148 | &:active {
149 | z-index: 2;
150 | }
151 | }
152 |
153 | // Negative margin to only have a 1px border between the two
154 | &:first-child {
155 | > .btn,
156 | > .btn-group {
157 | margin-right: -1px;
158 | }
159 | }
160 | &:last-child {
161 | > .btn,
162 | > .btn-group {
163 | margin-left: -1px;
164 | }
165 | }
166 | }
167 |
--------------------------------------------------------------------------------
/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' => 'world',
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 | 'world' => [
50 | 'driver' => 'mysql',
51 | 'host' => env('DB_HOST', 'localhost'),
52 | 'database' => env('DB_WORLD', 'world'),
53 | 'username' => env('DB_USERNAME', 'root'),
54 | 'password' => env('DB_PASSWORD', 'password'),
55 | 'charset' => 'utf8',
56 | 'collation' => 'utf8_unicode_ci',
57 | 'prefix' => '',
58 | 'strict' => false,
59 | ],
60 |
61 | 'characters' => [
62 | 'driver' => 'mysql',
63 | 'host' => env('DB_HOST', 'localhost'),
64 | 'database' => env('DB_CHARACTERS', 'characters'),
65 | 'username' => env('DB_USERNAME', 'root'),
66 | 'password' => env('DB_PASSWORD', 'password'),
67 | 'charset' => 'utf8',
68 | 'collation' => 'utf8_unicode_ci',
69 | 'prefix' => '',
70 | 'strict' => false,
71 | ],
72 |
73 | 'auth' => [
74 | 'driver' => 'mysql',
75 | 'host' => env('DB_HOST', 'localhost'),
76 | 'database' => env('DB_AUTH', 'auth'),
77 | 'username' => env('DB_USERNAME', 'root'),
78 | 'password' => env('DB_PASSWORD', 'password'),
79 | 'charset' => 'utf8',
80 | 'collation' => 'utf8_unicode_ci',
81 | 'prefix' => '',
82 | 'strict' => false,
83 | ],
84 |
85 | 'hotfixes' => [
86 | 'driver' => 'mysql',
87 | 'host' => env('DB_HOST', 'localhost'),
88 | 'database' => env('DB_HOTFIXES', 'hotfixes'),
89 | 'username' => env('DB_USERNAME', 'root'),
90 | 'password' => env('DB_PASSWORD', 'password'),
91 | 'charset' => 'utf8',
92 | 'collation' => 'utf8_unicode_ci',
93 | 'prefix' => '',
94 | 'strict' => false,
95 | ],
96 |
97 | 'dbc' => [
98 | 'driver' => 'mysql',
99 | 'host' => env('DB_HOST', 'localhost'),
100 | 'database' => env('DB_DBC', 'dbc'),
101 | 'username' => env('DB_USERNAME', 'root'),
102 | 'password' => env('DB_PASSWORD', 'password'),
103 | 'charset' => 'utf8',
104 | 'collation' => 'utf8_unicode_ci',
105 | 'prefix' => '',
106 | 'strict' => false,
107 | ],
108 |
109 | 'sqlite' => [
110 | 'driver' => 'sqlite',
111 | 'database' => storage_path() . '/database/sqlite_database.db',
112 | 'prefix' => '',
113 | ],
114 |
115 | 'itemdisplaydb' => [
116 | 'driver' => 'sqlite',
117 | 'database' => storage_path() . '/database/itemdisplay.db',
118 | 'prefix' => '',
119 | ],
120 | ],
121 |
122 | /*
123 | |--------------------------------------------------------------------------
124 | | Migration Repository Table
125 | |--------------------------------------------------------------------------
126 | |
127 | | This table keeps track of all the migrations that have already run for
128 | | your application. Using this information, we can determine which of
129 | | the migrations on disk haven't actually been run in the database.
130 | |
131 | */
132 |
133 | 'migrations' => 'migrations',
134 |
135 | ];
136 |
--------------------------------------------------------------------------------
/app/Providers/TrinityCoreUserProvider.php:
--------------------------------------------------------------------------------
1 | model = $model;
37 | $this->hasher = $hasher;
38 | }
39 |
40 | /**
41 | * Retrieve a user by their unique identifier.
42 | *
43 | * @param mixed $identifier
44 | * @return \Illuminate\Contracts\Auth\Authenticatable|null
45 | */
46 | public function retrieveById($identifier)
47 | {
48 | return $this->createModel()->newQuery()->find($identifier);
49 | }
50 |
51 | /**
52 | * Retrieve a user by their unique identifier and "remember me" token.
53 | *
54 | * @param mixed $identifier
55 | * @param string $token
56 | * @return \Illuminate\Contracts\Auth\Authenticatable|null
57 | */
58 | public function retrieveByToken($identifier, $token)
59 | {
60 | $model = $this->createModel();
61 |
62 | return $model->newQuery()
63 | ->where($model->getAuthIdentifierName(), $identifier)
64 | ->where($model->getRememberTokenName(), $token)
65 | ->first();
66 | }
67 |
68 | /**
69 | * Update the "remember me" token for the given user in storage.
70 | *
71 | * @param \Illuminate\Contracts\Auth\Authenticatable $user
72 | * @param string $token
73 | * @return void
74 | */
75 | public function updateRememberToken(UserContract $user, $token)
76 | {
77 | $user->setRememberToken($token);
78 |
79 | $user->save();
80 | }
81 |
82 | /**
83 | * Retrieve a user by the given credentials.
84 | *
85 | * @param array $credentials
86 | * @return \Illuminate\Contracts\Auth\Authenticatable|null
87 | */
88 | public function retrieveByCredentials(array $credentials)
89 | {
90 | if (empty($credentials)) {
91 | return;
92 | }
93 |
94 | // First we will add each credential element to the query as a where clause.
95 | // Then we can execute the query and, if we found a user, return it in a
96 | // Eloquent User "model" that will be utilized by the Guard instances.
97 | $query = $this->createModel()->newQuery();
98 |
99 | foreach ($credentials as $key => $value) {
100 | if (! Str::contains($key, 'password')) {
101 | $query->where($key, $value);
102 | }
103 | }
104 |
105 | return $query->first();
106 | }
107 |
108 | /**
109 | * Validate a user against the given credentials.
110 | *
111 | * @param \Illuminate\Contracts\Auth\Authenticatable $user
112 | * @param array $credentials
113 | * @return bool
114 | */
115 | public function validateCredentials(UserContract $user, array $credentials)
116 | {
117 | $plain = $credentials['username'] . ":" . $credentials['password'];
118 | return $this->hasher->check($plain, $user->getAuthPassword());
119 | }
120 |
121 | /**
122 | * Create a new instance of the model.
123 | *
124 | * @return \Illuminate\Database\Eloquent\Model
125 | */
126 | public function createModel()
127 | {
128 | $class = '\\'.ltrim($this->model, '\\');
129 |
130 | return new $class;
131 | }
132 |
133 | /**
134 | * Gets the hasher implementation.
135 | *
136 | * @return \Illuminate\Contracts\Hashing\Hasher
137 | */
138 | public function getHasher()
139 | {
140 | return $this->hasher;
141 | }
142 |
143 | /**
144 | * Sets the hasher implementation.
145 | *
146 | * @param \Illuminate\Contracts\Hashing\Hasher $hasher
147 | * @return $this
148 | */
149 | public function setHasher(HasherContract $hasher)
150 | {
151 | $this->hasher = $hasher;
152 |
153 | return $this;
154 | }
155 |
156 | /**
157 | * Gets the name of the Eloquent user model.
158 | *
159 | * @return string
160 | */
161 | public function getModel()
162 | {
163 | return $this->model;
164 | }
165 |
166 | /**
167 | * Sets the name of the Eloquent user model.
168 | *
169 | * @param string $model
170 | * @return $this
171 | */
172 | public function setModel($model)
173 | {
174 | $this->model = $model;
175 |
176 | return $this;
177 | }
178 | }
179 |
--------------------------------------------------------------------------------
/resources/assets/less/bootstrap/responsive-utilities.less:
--------------------------------------------------------------------------------
1 | //
2 | // Responsive: Utility classes
3 | // --------------------------------------------------
4 |
5 |
6 | // IE10 in Windows (Phone) 8
7 | //
8 | // Support for responsive views via media queries is kind of borked in IE10, for
9 | // Surface/desktop in split view and for Windows Phone 8. This particular fix
10 | // must be accompanied by a snippet of JavaScript to sniff the user agent and
11 | // apply some conditional CSS to *only* the Surface/desktop Windows 8. Look at
12 | // our Getting Started page for more information on this bug.
13 | //
14 | // For more information, see the following:
15 | //
16 | // Issue: https://github.com/twbs/bootstrap/issues/10497
17 | // Docs: http://getbootstrap.com/getting-started/#support-ie10-width
18 | // Source: http://timkadlec.com/2013/01/windows-phone-8-and-device-width/
19 | // Source: http://timkadlec.com/2012/10/ie10-snap-mode-and-responsive-design/
20 |
21 | @-ms-viewport {
22 | width: device-width;
23 | }
24 |
25 |
26 | // Visibility utilities
27 | // Note: Deprecated .visible-xs, .visible-sm, .visible-md, and .visible-lg as of v3.2.0
28 | .visible-xs,
29 | .visible-sm,
30 | .visible-md,
31 | .visible-lg {
32 | .responsive-invisibility();
33 | }
34 |
35 | .visible-xs-block,
36 | .visible-xs-inline,
37 | .visible-xs-inline-block,
38 | .visible-sm-block,
39 | .visible-sm-inline,
40 | .visible-sm-inline-block,
41 | .visible-md-block,
42 | .visible-md-inline,
43 | .visible-md-inline-block,
44 | .visible-lg-block,
45 | .visible-lg-inline,
46 | .visible-lg-inline-block {
47 | display: none !important;
48 | }
49 |
50 | .visible-xs {
51 | @media (max-width: @screen-xs-max) {
52 | .responsive-visibility();
53 | }
54 | }
55 | .visible-xs-block {
56 | @media (max-width: @screen-xs-max) {
57 | display: block !important;
58 | }
59 | }
60 | .visible-xs-inline {
61 | @media (max-width: @screen-xs-max) {
62 | display: inline !important;
63 | }
64 | }
65 | .visible-xs-inline-block {
66 | @media (max-width: @screen-xs-max) {
67 | display: inline-block !important;
68 | }
69 | }
70 |
71 | .visible-sm {
72 | @media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) {
73 | .responsive-visibility();
74 | }
75 | }
76 | .visible-sm-block {
77 | @media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) {
78 | display: block !important;
79 | }
80 | }
81 | .visible-sm-inline {
82 | @media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) {
83 | display: inline !important;
84 | }
85 | }
86 | .visible-sm-inline-block {
87 | @media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) {
88 | display: inline-block !important;
89 | }
90 | }
91 |
92 | .visible-md {
93 | @media (min-width: @screen-md-min) and (max-width: @screen-md-max) {
94 | .responsive-visibility();
95 | }
96 | }
97 | .visible-md-block {
98 | @media (min-width: @screen-md-min) and (max-width: @screen-md-max) {
99 | display: block !important;
100 | }
101 | }
102 | .visible-md-inline {
103 | @media (min-width: @screen-md-min) and (max-width: @screen-md-max) {
104 | display: inline !important;
105 | }
106 | }
107 | .visible-md-inline-block {
108 | @media (min-width: @screen-md-min) and (max-width: @screen-md-max) {
109 | display: inline-block !important;
110 | }
111 | }
112 |
113 | .visible-lg {
114 | @media (min-width: @screen-lg-min) {
115 | .responsive-visibility();
116 | }
117 | }
118 | .visible-lg-block {
119 | @media (min-width: @screen-lg-min) {
120 | display: block !important;
121 | }
122 | }
123 | .visible-lg-inline {
124 | @media (min-width: @screen-lg-min) {
125 | display: inline !important;
126 | }
127 | }
128 | .visible-lg-inline-block {
129 | @media (min-width: @screen-lg-min) {
130 | display: inline-block !important;
131 | }
132 | }
133 |
134 | .hidden-xs {
135 | @media (max-width: @screen-xs-max) {
136 | .responsive-invisibility();
137 | }
138 | }
139 | .hidden-sm {
140 | @media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) {
141 | .responsive-invisibility();
142 | }
143 | }
144 | .hidden-md {
145 | @media (min-width: @screen-md-min) and (max-width: @screen-md-max) {
146 | .responsive-invisibility();
147 | }
148 | }
149 | .hidden-lg {
150 | @media (min-width: @screen-lg-min) {
151 | .responsive-invisibility();
152 | }
153 | }
154 |
155 |
156 | // Print utilities
157 | //
158 | // Media queries are placed on the inside to be mixin-friendly.
159 |
160 | // Note: Deprecated .visible-print as of v3.2.0
161 | .visible-print {
162 | .responsive-invisibility();
163 |
164 | @media print {
165 | .responsive-visibility();
166 | }
167 | }
168 | .visible-print-block {
169 | display: none !important;
170 |
171 | @media print {
172 | display: block !important;
173 | }
174 | }
175 | .visible-print-inline {
176 | display: none !important;
177 |
178 | @media print {
179 | display: inline !important;
180 | }
181 | }
182 | .visible-print-inline-block {
183 | display: none !important;
184 |
185 | @media print {
186 | display: inline-block !important;
187 | }
188 | }
189 |
190 | .hidden-print {
191 | @media print {
192 | .responsive-invisibility();
193 | }
194 | }
195 |
--------------------------------------------------------------------------------
/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 | "filled" => "The :attribute field is required.",
39 | "exists" => "The selected :attribute is invalid.",
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 | "max" => [
45 | "numeric" => "The :attribute may not be greater than :max.",
46 | "file" => "The :attribute may not be greater than :max kilobytes.",
47 | "string" => "The :attribute may not be greater than :max characters.",
48 | "array" => "The :attribute may not have more than :max items.",
49 | ],
50 | "mimes" => "The :attribute must be a file of type: :values.",
51 | "min" => [
52 | "numeric" => "The :attribute must be at least :min.",
53 | "file" => "The :attribute must be at least :min kilobytes.",
54 | "string" => "The :attribute must be at least :min characters.",
55 | "array" => "The :attribute must have at least :min items.",
56 | ],
57 | "not_in" => "The selected :attribute is invalid.",
58 | "numeric" => "The :attribute must be a number.",
59 | "regex" => "The :attribute format is invalid.",
60 | "required" => "The :attribute field is required.",
61 | "required_if" => "The :attribute field is required when :other is :value.",
62 | "required_with" => "The :attribute field is required when :values is present.",
63 | "required_with_all" => "The :attribute field is required when :values is present.",
64 | "required_without" => "The :attribute field is required when :values is not present.",
65 | "required_without_all" => "The :attribute field is required when none of :values are present.",
66 | "same" => "The :attribute and :other must match.",
67 | "size" => [
68 | "numeric" => "The :attribute must be :size.",
69 | "file" => "The :attribute must be :size kilobytes.",
70 | "string" => "The :attribute must be :size characters.",
71 | "array" => "The :attribute must contain :size items.",
72 | ],
73 | "unique" => "The :attribute has already been taken.",
74 | "url" => "The :attribute format is invalid.",
75 | "timezone" => "The :attribute must be a valid zone.",
76 |
77 | /*
78 | |--------------------------------------------------------------------------
79 | | Custom Validation Language Lines
80 | |--------------------------------------------------------------------------
81 | |
82 | | Here you may specify custom validation messages for attributes using the
83 | | convention "attribute.rule" to name the lines. This makes it quick to
84 | | specify a specific custom language line for a given attribute rule.
85 | |
86 | */
87 |
88 | 'custom' => [
89 | 'attribute-name' => [
90 | 'rule-name' => 'custom-message',
91 | ],
92 | ],
93 |
94 | /*
95 | |--------------------------------------------------------------------------
96 | | Custom Validation Attributes
97 | |--------------------------------------------------------------------------
98 | |
99 | | The following language lines are used to swap attribute place-holders
100 | | with something more reader friendly such as E-Mail Address instead
101 | | of "email". This simply helps us make messages a little cleaner.
102 | |
103 | */
104 |
105 | 'attributes' => [],
106 |
107 | ];
108 |
--------------------------------------------------------------------------------