├── docker ├── php-fpm │ ├── added.conf │ ├── supervisord.conf │ ├── php.ini │ └── Dockerfile ├── misc │ └── conf.d │ │ └── docker.cnf └── nginx │ ├── Dockerfile │ ├── localhost.csr │ ├── server.conf │ ├── fastcgi.conf │ ├── localhost.crt │ ├── nginx.conf │ └── localhost.key ├── bootstrap ├── cache │ └── .gitignore └── app.php ├── storage ├── logs │ └── .gitignore ├── app │ ├── public │ │ └── .gitignore │ └── .gitignore └── framework │ ├── testing │ └── .gitignore │ ├── views │ └── .gitignore │ ├── cache │ ├── data │ │ └── .gitignore │ └── .gitignore │ ├── sessions │ └── .gitignore │ └── .gitignore ├── database ├── .gitignore ├── seeders │ ├── DatabaseSeeder.php │ ├── FirstEventTypeCreateSeeder.php │ ├── FirstDepartmentCreateSeeder.php │ ├── FirstBelongDepartmentCreateSeeder.php │ └── FirstUserCreateSeeder.php ├── migrations │ ├── 2019_09_06_145024_change_users_table.php │ ├── 2022_06_13_200110_oauth_clients_table.php │ ├── 2019_08_19_113302_change_departments_table.php │ ├── 2014_10_12_100000_create_password_resets_table.php │ ├── 2019_08_16_144132_change_common_groups_table.php │ ├── 2016_06_01_000005_create_oauth_personal_access_clients_table.php │ ├── 2019_08_09_152326_create_common_groups_table.php │ ├── 2019_09_12_113526_create_notifications_table.php │ ├── 2014_10_12_100000_create_change_emails_table.php │ ├── 2019_08_14_162006_create_belong_departments_table.php │ ├── 2019_08_08_102427_change_schedules_table.php │ ├── 2019_08_09_155919_create_belong_common_groups_table.php │ ├── 2016_06_01_000003_create_oauth_refresh_tokens_table.php │ ├── 2019_08_13_161544_create_departments_table.php │ ├── 2019_08_19_113326_change_belong_departments_table.php │ ├── 2019_08_16_144203_change_belong_common_groups_table.php │ ├── 2019_09_02_095644_create_holidays_table.php │ ├── 2016_06_01_000001_create_oauth_auth_codes_table.php │ ├── 2022_07_26_130819_change_column_users_table.php │ ├── 2019_08_05_135057_create_event_types_table.php │ ├── 2019_08_23_102312_create_reminders_overrides_table.php │ ├── 2019_08_22_120431_create_individual_groups_table.php │ ├── 2019_08_29_161707_create_recurrings_table.php │ ├── 2019_08_20_152015_create_default_reminders_table.php │ ├── 2019_08_22_125925_create_belong_individual_groups_table.php │ ├── 2016_06_01_000004_create_oauth_clients_table.php │ ├── 2016_06_01_000002_create_oauth_access_tokens_table.php │ ├── 2019_08_29_161232_change_schedules_table_add_delete_flag.php │ ├── 2014_10_12_000000_create_users_table.php │ ├── 2019_08_06_101328_create_attendees_table.php │ └── 2019_07_16_094111_create_calendarlists_table.php └── factories │ └── UserFactory.php ├── public ├── robots.txt └── index.php ├── resources ├── nuxt │ ├── static │ │ ├── v.png │ │ ├── favicon.ico │ │ └── README.md │ ├── assets │ │ ├── img │ │ │ └── logo.png │ │ ├── style │ │ │ └── app.styl │ │ └── README.md │ ├── .gitignore │ ├── components │ │ ├── layouts │ │ │ ├── common │ │ │ │ └── Footer.vue │ │ │ ├── noauth │ │ │ │ └── Header.vue │ │ │ └── default │ │ │ │ └── header │ │ │ │ └── AdminMenu.vue │ │ ├── label │ │ │ └── RequiredLabel.vue │ │ ├── README.md │ │ ├── ViewColor.vue │ │ ├── Loading.vue │ │ ├── MessageSnackbar.vue │ │ ├── dialogs │ │ │ ├── MessageDialog.vue │ │ │ ├── ConfirmDialog.vue │ │ │ ├── DataDestroy.vue │ │ │ └── RecurrenceDialog.vue │ │ ├── TreeDepartmentRadio.vue │ │ ├── buttons │ │ │ └── SingleSubmitButton.vue │ │ ├── NuxtLogo.vue │ │ ├── ReminderSetting.vue │ │ ├── EditColor.vue │ │ └── EventPublish.vue │ ├── layouts │ │ ├── README.md │ │ ├── noauth.vue │ │ ├── error.vue │ │ └── default.vue │ ├── pages │ │ ├── README.md │ │ ├── password │ │ │ ├── reset_email_sent.vue │ │ │ ├── reset.vue │ │ │ └── setting │ │ │ │ └── _token │ │ │ │ └── _email.vue │ │ └── mypage │ │ │ └── email │ │ │ └── check │ │ │ └── _token.vue │ ├── plugins │ │ ├── README.md │ │ ├── vee-validate.js │ │ ├── routerOption.js │ │ ├── variables.js │ │ ├── vuetify.js │ │ ├── acl.js │ │ └── axios.js │ ├── middleware │ │ └── README.md │ └── store │ │ ├── README.md │ │ ├── params.js │ │ ├── message.js │ │ └── index.js ├── sass │ ├── app.scss │ └── _variables.scss ├── views │ └── emails │ │ ├── reset.blade.php │ │ ├── change_email.blade.php │ │ └── reminder.blade.php └── lang │ ├── ja │ ├── pagination.php │ ├── auth.php │ └── passwords.php │ └── en │ ├── pagination.php │ ├── auth.php │ └── passwords.php ├── .gitattributes ├── app ├── Models │ ├── OauthAccessToken.php │ ├── ChangeEmail.php │ ├── RemindersOverride.php │ ├── Recurring.php │ ├── Calendarlist.php │ ├── Notification.php │ ├── CommonGroup.php │ ├── Department.php │ ├── EventType.php │ ├── Holiday.php │ ├── IndividualGroup.php │ ├── BelongDepartment.php │ ├── BelongCommonGroup.php │ ├── BelongIndividualGroup.php │ ├── DefaultReminder.php │ ├── Attendee.php │ ├── User.php │ └── Schedule.php ├── Http │ ├── Middleware │ │ ├── EncryptCookies.php │ │ ├── CheckForMaintenanceMode.php │ │ ├── TrimStrings.php │ │ ├── DBTransaction.php │ │ ├── Authenticate.php │ │ ├── VerifyCsrfToken.php │ │ ├── RedirectIfAuthenticated.php │ │ └── TrustProxies.php │ ├── Controllers │ │ ├── NuxtController.php │ │ ├── Auth │ │ │ ├── VerificationController.php │ │ │ ├── RegisterController.php │ │ │ └── ForgotPasswordController.php │ │ └── NotificationController.php │ └── Requests │ │ ├── User │ │ ├── PasswordUpdateRequest.php │ │ └── UserStoreRequest.php │ │ ├── Mypage │ │ ├── PasswordUpdateRequest.php │ │ ├── EmailUpdateRequest.php │ │ └── MySettingStoreRequest.php │ │ ├── EnableDisableUpdateRequest.php │ │ ├── Holiday │ │ └── HolidayStoreRequest.php │ │ ├── EventType │ │ └── EventTypeStoreRequest.php │ │ ├── CommonGroup │ │ └── CommonGroupStoreRequest.php │ │ ├── Department │ │ └── DepartmentStoreRequest.php │ │ ├── IndividualGroup │ │ └── IndividualGroupStoreRequest.php │ │ ├── Notification │ │ └── NotificationStoreRequest.php │ │ └── Schedule │ │ └── ScheduleStoreRequest.php ├── Providers │ ├── NuxtServiceProvider.php │ ├── BroadcastServiceProvider.php │ ├── AppServiceProvider.php │ ├── EventServiceProvider.php │ ├── AuthServiceProvider.php │ └── RouteServiceProvider.php ├── Console │ └── Kernel.php ├── Exceptions │ └── Handler.php └── Notifications │ ├── Reminder.php │ ├── ChangeEmail.php │ └── CustomPasswordReset.php ├── tests ├── TestCase.php ├── Unit │ └── ExampleTest.php ├── Feature │ └── ExampleTest.php └── CreatesApplication.php ├── .styleci.yml ├── .editorconfig ├── config ├── const.php ├── nuxt.php ├── view.php ├── services.php ├── hashing.php ├── cors.php ├── broadcasting.php ├── filesystems.php ├── queue.php └── logging.php ├── .gitignore ├── php.ini ├── routes ├── web.php ├── channels.php └── console.php ├── server.php ├── .eslintrc.json ├── copy └── .htaccess ├── .env.example ├── phpunit.xml ├── docker-compose.yml ├── artisan ├── package.json └── composer.json /docker/php-fpm/added.conf: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /bootstrap/cache/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/logs/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /database/.gitignore: -------------------------------------------------------------------------------- 1 | *.sqlite 2 | *.sqlite-journal 3 | -------------------------------------------------------------------------------- /public/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | Disallow: 3 | -------------------------------------------------------------------------------- /storage/app/public/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/app/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !public/ 3 | !.gitignore 4 | -------------------------------------------------------------------------------- /storage/framework/testing/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/views/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/cache/data/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/sessions/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/cache/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !data/ 3 | !.gitignore 4 | -------------------------------------------------------------------------------- /docker/php-fpm/supervisord.conf: -------------------------------------------------------------------------------- 1 | [program:cron] 2 | command=cron -f -L 15 3 | autostart=true 4 | autorestart=true -------------------------------------------------------------------------------- /resources/nuxt/static/v.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thinkingreed-inc/oss-calendar/HEAD/resources/nuxt/static/v.png -------------------------------------------------------------------------------- /resources/nuxt/assets/img/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thinkingreed-inc/oss-calendar/HEAD/resources/nuxt/assets/img/logo.png -------------------------------------------------------------------------------- /resources/nuxt/assets/style/app.styl: -------------------------------------------------------------------------------- 1 | // Import and define Vuetify color theme 2 | // https://vuetifyjs.com/en/style/colors 3 | 4 | -------------------------------------------------------------------------------- /resources/nuxt/static/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thinkingreed-inc/oss-calendar/HEAD/resources/nuxt/static/favicon.ico -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto 2 | *.css linguist-vendored 3 | *.scss linguist-vendored 4 | *.js linguist-vendored 5 | CHANGELOG.md export-ignore 6 | -------------------------------------------------------------------------------- /storage/framework/.gitignore: -------------------------------------------------------------------------------- 1 | config.php 2 | routes.php 3 | schedule-* 4 | compiled.php 5 | services.json 6 | events.scanned.php 7 | routes.scanned.php 8 | down 9 | -------------------------------------------------------------------------------- /resources/nuxt/.gitignore: -------------------------------------------------------------------------------- 1 | # dependencies 2 | node_modules 3 | 4 | # logs 5 | npm-debug.log 6 | 7 | # Nuxt build 8 | .nuxt 9 | 10 | # Nuxt generate 11 | dist 12 | 13 | .idea 14 | -------------------------------------------------------------------------------- /app/Models/OauthAccessToken.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | © 2019 ThinkingReed Inc. 4 | 5 | 6 | 7 | 14 | -------------------------------------------------------------------------------- /resources/nuxt/layouts/README.md: -------------------------------------------------------------------------------- 1 | # LAYOUTS 2 | 3 | This directory contains your Application Layouts. 4 | 5 | More information about the usage of this directory in the documentation: 6 | https://nuxtjs.org/guide/views#layouts 7 | 8 | **This directory is not required, you can delete it if you don't want to use it.** 9 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | end_of_line = lf 6 | insert_final_newline = true 7 | indent_style = space 8 | indent_size = 4 9 | trim_trailing_whitespace = true 10 | 11 | [*.md] 12 | trim_trailing_whitespace = false 13 | 14 | [*.{vue,js,json,html,scss,blade.php,yml}] 15 | indent_size = 2 16 | -------------------------------------------------------------------------------- /resources/nuxt/pages/README.md: -------------------------------------------------------------------------------- 1 | # PAGES 2 | 3 | This directory contains your Application Views and Routes. 4 | The framework reads all the .vue files inside this directory and create the router of your application. 5 | 6 | More information about the usage of this directory in the documentation: 7 | https://nuxtjs.org/guide/routing 8 | -------------------------------------------------------------------------------- /config/const.php: -------------------------------------------------------------------------------- 1 | 1, 5 | "REMINDER_SMS" => 2, 6 | "REMINDER_POPUP" => 3, 7 | 8 | // 休日設定CSV項目数 9 | "HOLIDAY_CSV_COLUMNS" => 3, 10 | // 休日設定予定カラー 11 | "HOLIDAY_EVENT_COLOR" => "#e84b64", 12 | "HOLIDAY_TEXT_COLOR" => "#ffffff", 13 | ); 14 | -------------------------------------------------------------------------------- /resources/views/emails/reset.blade.php: -------------------------------------------------------------------------------- 1 |

2 | 【{{$appName}}】{{ __('あなたのパスワードのリセット要求がありました。') }} 3 |

4 |

5 | {{ __('パスワードをリセットするには以下のボタンをクリックしてください。') }}
6 | {{ __('パスワードのリセットにお心当たりが無い場合はこのメールを無視してください。') }} 7 |

8 |

9 | {{ $actionText }}: {{ $actionUrl }} 10 |

11 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /node_modules 2 | /storage/*.key 3 | /vendor 4 | .env 5 | composer.lock 6 | .phpunit.result.cache 7 | Homestead.json 8 | Homestead.yaml 9 | npm-debug.log 10 | yarn-error.log 11 | .idea 12 | _ide_helper.php 13 | .nuxt 14 | public/_nuxt 15 | public/.htaccess 16 | 17 | #docker 18 | docker/misc/data 19 | docker/sessions/* 20 | 21 | .vscode -------------------------------------------------------------------------------- /resources/nuxt/assets/README.md: -------------------------------------------------------------------------------- 1 | # ASSETS 2 | 3 | This directory contains your un-compiled assets such as LESS, SASS, or JavaScript. 4 | 5 | More information about the usage of this directory in the documentation: 6 | https://nuxtjs.org/guide/assets#webpacked 7 | 8 | **This directory is not required, you can delete it if you don't want to use it.** 9 | -------------------------------------------------------------------------------- /docker/nginx/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM nginx 2 | 3 | ADD nginx.conf /etc/nginx/nginx.conf 4 | ADD fastcgi.conf /etc/nginx/fastcgi.conf 5 | ADD server.conf /etc/nginx/conf.d/default.conf 6 | ADD localhost.key /etc/ssl/private/localhost.key 7 | ADD localhost.crt /etc/ssl/certs/localhost.crt 8 | 9 | RUN echo "export LANG=ja_JP.UTF-8" >> /root/.bashrc 10 | 11 | -------------------------------------------------------------------------------- /resources/views/emails/change_email.blade.php: -------------------------------------------------------------------------------- 1 |

2 | {{ config('app.name') }} 3 |

4 |

5 | {{ __('最後のステップです') }} 6 |

7 |

8 | {{ __('メールアドレスを変更するには以下のボタンをクリックして、メールアドレスの確認を行ってください。') }}
9 |

10 |

11 | {{ $actionText }}: {{ $actionUrl }} 12 |

13 | -------------------------------------------------------------------------------- /resources/nuxt/plugins/README.md: -------------------------------------------------------------------------------- 1 | # PLUGINS 2 | 3 | This directory contains your Javascript plugins that you want to run before instantiating the root vue.js application. 4 | 5 | More information about the usage of this directory in the documentation: 6 | https://nuxtjs.org/guide/plugins 7 | 8 | **This directory is not required, you can delete it if you don't want to use it.** 9 | -------------------------------------------------------------------------------- /app/Models/ChangeEmail.php: -------------------------------------------------------------------------------- 1 | env('NUXT_URL', public_path('_nuxt/index.html')), 12 | 13 | ]; 14 | -------------------------------------------------------------------------------- /app/Http/Middleware/EncryptCookies.php: -------------------------------------------------------------------------------- 1 | mergeConfigFrom(config_path('nuxt.php'), 'nuxt'); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /tests/Unit/ExampleTest.php: -------------------------------------------------------------------------------- 1 | assertTrue(true); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /resources/nuxt/components/label/RequiredLabel.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 15 | 16 | 21 | -------------------------------------------------------------------------------- /resources/nuxt/static/README.md: -------------------------------------------------------------------------------- 1 | # STATIC 2 | 3 | This directory contains your static files. 4 | Each file inside this directory is mapped to /. 5 | 6 | Example: /static/robots.txt is mapped as /robots.txt. 7 | 8 | More information about the usage of this directory in the documentation: 9 | https://nuxtjs.org/guide/assets#static 10 | 11 | **This directory is not required, you can delete it if you don't want to use it.** 12 | -------------------------------------------------------------------------------- /resources/sass/_variables.scss: -------------------------------------------------------------------------------- 1 | // Body 2 | $body-bg: #f8fafc; 3 | 4 | // Typography 5 | $font-family-sans-serif: 'Nunito', sans-serif; 6 | $font-size-base: 0.9rem; 7 | $line-height-base: 1.6; 8 | 9 | // Colors 10 | $blue: #3490dc; 11 | $indigo: #6574cd; 12 | $purple: #9561e2; 13 | $pink: #f66d9b; 14 | $red: #e3342f; 15 | $orange: #f6993f; 16 | $yellow: #ffed4a; 17 | $green: #38c172; 18 | $teal: #4dc0b5; 19 | $cyan: #6cb2eb; 20 | -------------------------------------------------------------------------------- /resources/nuxt/middleware/README.md: -------------------------------------------------------------------------------- 1 | # MIDDLEWARE 2 | 3 | This directory contains your Application Middleware. 4 | The middleware lets you define custom function to be ran before rendering a page or a group of pages (layouts). 5 | 6 | More information about the usage of this directory in the documentation: 7 | https://nuxtjs.org/guide/routing#middleware 8 | 9 | **This directory is not required, you can delete it if you don't want to use it.** 10 | -------------------------------------------------------------------------------- /app/Http/Middleware/CheckForMaintenanceMode.php: -------------------------------------------------------------------------------- 1 | get('/'); 18 | 19 | $response->assertStatus(200); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /app/Models/RemindersOverride.php: -------------------------------------------------------------------------------- 1 | exception) { 14 | \DB::rollBack(); 15 | } else { 16 | \DB::commit(); 17 | } 18 | 19 | return $response; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /app/Models/Recurring.php: -------------------------------------------------------------------------------- 1 | belongsTo('App\Models\Schedule'); 21 | } 22 | } 23 | 24 | -------------------------------------------------------------------------------- /resources/lang/ja/pagination.php: -------------------------------------------------------------------------------- 1 | '« 前', 17 | 'next' => '次 »', 18 | 19 | ]; 20 | -------------------------------------------------------------------------------- /resources/views/emails/reminder.blade.php: -------------------------------------------------------------------------------- 1 |
2 |

3 | 【予定通知】{{ $options["summary"] }} 4 |

5 |

6 | 時間:{{ $options["start_date"]->format('Y/m/d H:i') }} ~ {{ $options["end_date"]->format('Y/m/d H:i') }} 7 |

8 |

9 | 場所:{{ $options["location"] }} 10 |

11 |
12 |

13 | {!! nl2br(e($options["description"])) !!} 14 |

15 |
-------------------------------------------------------------------------------- /resources/nuxt/components/README.md: -------------------------------------------------------------------------------- 1 | # COMPONENTS 2 | 3 | The components directory contains your Vue.js Components. 4 | Nuxt.js doesn't supercharge these components. 5 | 6 | **This directory is not required, you can delete it if you don't want to use it.** 7 | 8 | ## Install 9 | 10 | npm install -g @vue/cli 11 | npm install -g npm-check-updates 12 | 13 | * ncuコマンドだけだと、変更前と変更後のリストが表示されるだけで、package.jsonはまだ書き替わらないので安心。 14 | 15 | ncu 16 | * -uオプションをつけるとpackage.jsonが更新される 17 | ncu -u 18 | npm install 19 | -------------------------------------------------------------------------------- /resources/nuxt/plugins/vee-validate.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import VeeValidate, { Validator } from 'vee-validate' 3 | import ja from 'vee-validate/dist/locale/ja' 4 | 5 | Vue.use(VeeValidate) 6 | Validator.localize('ja', ja) 7 | Validator.localize({ 8 | ja: { 9 | attributes: { 10 | email: 'メールアドレス', 11 | password: 'パスワード', 12 | password_confirmation: '再度入力したパスワード', 13 | username: 'ユーザー名', 14 | lastname: '苗字', 15 | firstname: '名前' 16 | } 17 | } 18 | }) 19 | -------------------------------------------------------------------------------- /tests/CreatesApplication.php: -------------------------------------------------------------------------------- 1 | make(Kernel::class)->bootstrap(); 19 | 20 | return $app; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /app/Providers/BroadcastServiceProvider.php: -------------------------------------------------------------------------------- 1 | 'ログイン情報が登録されていません。', 17 | 'throttle' => 'ログインに続けて失敗しています。:seconds秒後に再度お試しください。', 18 | 19 | ]; 20 | -------------------------------------------------------------------------------- /resources/nuxt/plugins/routerOption.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | 3 | export default async ({ app, store }) => { 4 | // ページ遷移後に処理する 5 | app.router.afterEach((to, from) => { 6 | const params = store.getters['params/getParams'] 7 | // 画面遷移前から遷移後のページに渡すパラメータ 8 | Vue.prototype.transferParams = params 9 | store.dispatch('params/clearParams') 10 | }) 11 | 12 | // ページ遷移前に処理する 13 | app.router.beforeEach((to, from, next) => { 14 | Vue.prototype.transferParams = {} 15 | next() 16 | }) 17 | } 18 | -------------------------------------------------------------------------------- /routes/web.php: -------------------------------------------------------------------------------- 1 | where('uri', '.*'); 16 | -------------------------------------------------------------------------------- /app/Models/Calendarlist.php: -------------------------------------------------------------------------------- 1 | ({ 2 | params: {} 3 | }) 4 | 5 | export const getters = { 6 | getParams(state) { 7 | return state.params 8 | } 9 | } 10 | 11 | export const mutations = { 12 | setParams(state, params) { 13 | state.params = params 14 | }, 15 | clearParams(state) { 16 | state.params = {} 17 | } 18 | } 19 | 20 | export const actions = { 21 | setParams({ commit }, params) { 22 | commit('setParams', params) 23 | }, 24 | clearParams({ commit }) { 25 | commit('clearParams') 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /app/Http/Middleware/Authenticate.php: -------------------------------------------------------------------------------- 1 | expectsJson()) { 18 | return route('login'); 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /routes/channels.php: -------------------------------------------------------------------------------- 1 | id === (int) $id; 16 | }); 17 | -------------------------------------------------------------------------------- /database/seeders/DatabaseSeeder.php: -------------------------------------------------------------------------------- 1 | call(FirstUserCreateSeeder::class); 17 | $this->call(FirstDepartmentCreateSeeder::class); 18 | $this->call(FirstEventTypeCreateSeeder::class); 19 | $this->call(FirstBelongDepartmentCreateSeeder::class); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /app/Http/Middleware/VerifyCsrfToken.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 25 | -------------------------------------------------------------------------------- /resources/lang/en/pagination.php: -------------------------------------------------------------------------------- 1 | '« Previous', 17 | 'next' => 'Next »', 18 | 19 | ]; 20 | -------------------------------------------------------------------------------- /routes/console.php: -------------------------------------------------------------------------------- 1 | comment(Inspiring::quote()); 18 | })->describe('Display an inspiring quote'); 19 | -------------------------------------------------------------------------------- /docker/php-fpm/php.ini: -------------------------------------------------------------------------------- 1 | default_charset = "UTF-8" 2 | date.timezone = "Asia/Tokyo" 3 | error_reporting = E_ALL | E_STRICT 4 | display_errors = On 5 | log_errors = On 6 | access.log = /proc/self/fd/2 7 | error_log = /proc/self/fd/2 8 | extension=mcrypt 9 | extension=fileinfo 10 | extension=gd2 11 | post_max_size = 20M 12 | upload_max_filesize = 20M 13 | max_execution_time = 600; 14 | SMTP = smtp 15 | smtp_port = 1025 16 | ; xdebug settings 17 | xdebug.remote_enable=1 18 | xdebug.remote_handler=dbgp 19 | xdebug.remote_mode=req 20 | xdebug.remote_host=192.168.10.125 21 | xdebug.remote_connect_back=0 22 | xdebug.remote_port=9000 23 | xdebug.remote_autostart=true -------------------------------------------------------------------------------- /server.php: -------------------------------------------------------------------------------- 1 | 8 | */ 9 | 10 | $uri = urldecode( 11 | parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH) 12 | ); 13 | 14 | // This file allows us to emulate Apache's "mod_rewrite" functionality from the 15 | // built-in PHP web server. This provides a convenient way to test a Laravel 16 | // application without having installed a "real" web server software here. 17 | if ($uri !== '/' && file_exists(__DIR__.'/public'.$uri)) { 18 | return false; 19 | } 20 | 21 | require_once __DIR__.'/public/index.php'; 22 | -------------------------------------------------------------------------------- /resources/lang/ja/passwords.php: -------------------------------------------------------------------------------- 1 | 'パスワードは最低6文字で、確認項目と一致している必要があります。', 17 | 'reset' => 'パスワードをリセットしました。', 18 | 'sent' => 'パスワードリセットメールを送信しました。', 19 | 'token' => 'このパスワードリセットトークンは無効です。', 20 | 'user' => "メールアドレスに一致するユーザーは存在していません。", 21 | 22 | ]; 23 | -------------------------------------------------------------------------------- /resources/nuxt/components/ViewColor.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 31 | -------------------------------------------------------------------------------- /resources/nuxt/plugins/variables.js: -------------------------------------------------------------------------------- 1 | export default ({ app }, inject) => { 2 | let calendar = null 3 | const setCalendar = cal => { 4 | calendar = cal 5 | } 6 | const getCalendar = () => { 7 | return calendar 8 | } 9 | inject('setCalendar', cal => { 10 | setCalendar(cal) 11 | }) 12 | inject('getCalendar', () => { 13 | return getCalendar() 14 | }) 15 | 16 | // モバイル判定をwidthで行う 17 | let mobileFlag = null 18 | const isMobile = () => { 19 | const w = window.innerWidth 20 | mobileFlag = w > 700 ? false : true 21 | return mobileFlag 22 | } 23 | inject('isMobile', () => { 24 | return isMobile() 25 | }) 26 | } 27 | -------------------------------------------------------------------------------- /app/Http/Controllers/NuxtController.php: -------------------------------------------------------------------------------- 1 | expectsJson()) { 14 | abort(404); 15 | } 16 | 17 | // In production, this will display the precompiled nuxt page. 18 | // In development, this will fetch and display the page from the nuxt's dev server. 19 | return file_get_contents(config('nuxt.page')); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /app/Http/Middleware/RedirectIfAuthenticated.php: -------------------------------------------------------------------------------- 1 | check()) { 21 | return redirect('/home'); 22 | } 23 | 24 | return $next($request); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /app/Models/Notification.php: -------------------------------------------------------------------------------- 1 | hasMany('\App\Models\OauthAccessToken'); 24 | } 25 | 26 | } 27 | -------------------------------------------------------------------------------- /resources/nuxt/layouts/error.vue: -------------------------------------------------------------------------------- 1 | 16 | 28 | -------------------------------------------------------------------------------- /app/Http/Requests/User/PasswordUpdateRequest.php: -------------------------------------------------------------------------------- 1 | 'required|min:5', 28 | ]; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /app/Http/Requests/Mypage/PasswordUpdateRequest.php: -------------------------------------------------------------------------------- 1 | 'required|min:5', 28 | ]; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "root": true, 3 | "env": { 4 | "browser": true, 5 | "node": true 6 | }, 7 | "parser": "vue-eslint-parser", 8 | "parserOptions": {}, 9 | "extends": [ 10 | "prettier", 11 | "plugin:prettier/recommended", 12 | "plugin:vue/recommended", 13 | "@vue/prettier" 14 | ], 15 | "plugins": [ 16 | "vue" 17 | ], 18 | "rules": { 19 | "semi": [ 20 | 2, 21 | "never" 22 | ], 23 | "no-unused-vars": [ 24 | "error", 25 | { 26 | "args": "none" 27 | } 28 | ], 29 | "prettier/prettier": [ 30 | "error", 31 | { 32 | "singleQuote": true, 33 | "semi": false 34 | } 35 | ] 36 | } 37 | } -------------------------------------------------------------------------------- /app/Http/Requests/EnableDisableUpdateRequest.php: -------------------------------------------------------------------------------- 1 | 'boolean', 29 | ]; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /resources/nuxt/components/layouts/noauth/Header.vue: -------------------------------------------------------------------------------- 1 | 10 | 11 | 31 | -------------------------------------------------------------------------------- /app/Http/Middleware/TrustProxies.php: -------------------------------------------------------------------------------- 1 | { 11 | const vuetify = new Vuetify({ 12 | lang: { 13 | locales: { ja }, 14 | current: 'ja' 15 | }, 16 | theme: { 17 | themes: { 18 | light: { 19 | primary: '#e84b64', //ピンク 20 | secondary: '#202020' //黒系 21 | } 22 | } 23 | }, 24 | icons: { 25 | iconfont: 'mdi' // iconを指定しないとチェックボックス等が正常に表示されない 26 | } 27 | }) 28 | 29 | ctx.app.vuetify = vuetify 30 | ctx.$vuetify = vuetify.framework 31 | } 32 | -------------------------------------------------------------------------------- /copy/.htaccess: -------------------------------------------------------------------------------- 1 | DirectoryIndex index.htm index.html index.php 2 | DirectorySlash Off 3 | 4 | 5 | 6 | Options -MultiViews -Indexes 7 | 8 | 9 | RewriteEngine On 10 | RewriteBase base_path 11 | 12 | # Handle Authorization Header 13 | RewriteCond %{HTTP:Authorization} . 14 | RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] 15 | 16 | # Redirect Trailing Slashes If Not A Folder... 17 | RewriteCond %{REQUEST_FILENAME} !-d 18 | RewriteCond %{REQUEST_URI} (.+)/$ 19 | RewriteRule ^ %1 [L,R=301] 20 | 21 | # Handle Front Controller... 22 | RewriteCond %{REQUEST_FILENAME} !-d 23 | RewriteCond %{REQUEST_FILENAME} !-f 24 | RewriteRule ^ index.php [L] 25 | 26 | -------------------------------------------------------------------------------- /app/Providers/AppServiceProvider.php: -------------------------------------------------------------------------------- 1 | id) { 30 | } 31 | /* 32 | * 新規登録画面の時 33 | */ 34 | else { 35 | } 36 | 37 | return [ 38 | ]; 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /database/migrations/2019_09_06_145024_change_users_table.php: -------------------------------------------------------------------------------- 1 | dropColumn('default_department_id'); 18 | }); 19 | } 20 | 21 | /** 22 | * Reverse the migrations. 23 | * 24 | * @return void 25 | */ 26 | public function down() 27 | { 28 | Schema::table('users', function (Blueprint $table) { 29 | $table->integer('default_department_id')->default(1); 30 | }); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /app/Http/Requests/EventType/EventTypeStoreRequest.php: -------------------------------------------------------------------------------- 1 | id) { 30 | } 31 | /* 32 | * 新規登録画面の時 33 | */ 34 | else { 35 | } 36 | 37 | return [ 38 | ]; 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /app/Http/Requests/CommonGroup/CommonGroupStoreRequest.php: -------------------------------------------------------------------------------- 1 | id) { 30 | } 31 | /* 32 | * 新規登録画面の時 33 | */ 34 | else { 35 | } 36 | 37 | return [ 38 | ]; 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /app/Http/Requests/Department/DepartmentStoreRequest.php: -------------------------------------------------------------------------------- 1 | id) { 30 | } 31 | /* 32 | * 新規登録画面の時 33 | */ 34 | else { 35 | } 36 | 37 | return [ 38 | ]; 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /app/Models/CommonGroup.php: -------------------------------------------------------------------------------- 1 | "boolean" 29 | ]; 30 | 31 | public function AauthAcessToken(){ 32 | return $this->hasMany('\App\Models\OauthAccessToken'); 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /database/migrations/2022_06_13_200110_oauth_clients_table.php: -------------------------------------------------------------------------------- 1 | string('provider')->after('secret')->nullable(); 18 | }); 19 | } 20 | 21 | /** 22 | * Reverse the migrations. 23 | * 24 | * @return void 25 | */ 26 | public function down() 27 | { 28 | Schema::table('oauth_clients', function (Blueprint $table) { 29 | $table->dropColumn('provider'); 30 | }); 31 | } 32 | }; 33 | -------------------------------------------------------------------------------- /database/migrations/2019_08_19_113302_change_departments_table.php: -------------------------------------------------------------------------------- 1 | boolean('is_enable')->default(1)->comment('有効 1:有効 0:無効'); 18 | }); 19 | } 20 | 21 | /** 22 | * Reverse the migrations. 23 | * 24 | * @return void 25 | */ 26 | public function down() 27 | { 28 | Schema::table('departments', function (Blueprint $table) { 29 | $table->dropColumn('is_enable'); 30 | }); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /app/Models/Department.php: -------------------------------------------------------------------------------- 1 | "boolean" 29 | ]; 30 | 31 | public function AauthAcessToken(){ 32 | return $this->hasMany('\App\Models\OauthAccessToken'); 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /app/Http/Requests/IndividualGroup/IndividualGroupStoreRequest.php: -------------------------------------------------------------------------------- 1 | id) { 30 | } 31 | /* 32 | * 新規登録画面の時 33 | */ 34 | else { 35 | } 36 | 37 | return [ 38 | ]; 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /app/Models/EventType.php: -------------------------------------------------------------------------------- 1 | "boolean" 29 | ]; 30 | 31 | public function AauthAcessToken(){ 32 | return $this->hasMany('\App\Models\OauthAccessToken'); 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /app/Models/Holiday.php: -------------------------------------------------------------------------------- 1 | "boolean" 29 | ]; 30 | 31 | public function AauthAcessToken(){ 32 | return $this->hasMany('\App\Models\OauthAccessToken'); 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /app/Models/IndividualGroup.php: -------------------------------------------------------------------------------- 1 | "boolean" 29 | ]; 30 | 31 | public function AauthAcessToken(){ 32 | return $this->hasMany('\App\Models\OauthAccessToken'); 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /database/migrations/2014_10_12_100000_create_password_resets_table.php: -------------------------------------------------------------------------------- 1 | string('email')->index(); 18 | $table->string('token'); 19 | $table->timestamp('created_at')->nullable(); 20 | }); 21 | } 22 | 23 | /** 24 | * Reverse the migrations. 25 | * 26 | * @return void 27 | */ 28 | public function down() 29 | { 30 | Schema::dropIfExists('password_resets'); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /database/migrations/2019_08_16_144132_change_common_groups_table.php: -------------------------------------------------------------------------------- 1 | boolean('is_enable')->default(1)->comment('有効 1:有効 0:無効'); 18 | }); 19 | } 20 | 21 | /** 22 | * Reverse the migrations. 23 | * 24 | * @return void 25 | */ 26 | public function down() 27 | { 28 | Schema::table('common_groups', function (Blueprint $table) { 29 | $table->dropColumn('is_enable'); 30 | }); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /app/Providers/EventServiceProvider.php: -------------------------------------------------------------------------------- 1 | [ 19 | SendEmailVerificationNotification::class, 20 | ], 21 | ]; 22 | 23 | /** 24 | * Register any events for your application. 25 | * 26 | * @return void 27 | */ 28 | public function boot() 29 | { 30 | parent::boot(); 31 | 32 | // 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /app/Models/BelongDepartment.php: -------------------------------------------------------------------------------- 1 | "boolean" 29 | ]; 30 | 31 | public function AauthAcessToken(){ 32 | return $this->hasMany('\App\Models\OauthAccessToken'); 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /resources/lang/en/passwords.php: -------------------------------------------------------------------------------- 1 | 'Passwords must be at least eight 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 | -------------------------------------------------------------------------------- /app/Http/Requests/Mypage/EmailUpdateRequest.php: -------------------------------------------------------------------------------- 1 | id) { // 編集画面の時 27 | $unique = 'unique:items,name,' . $this -> id . ',id'; 28 | } else { // 新規登録画面の時 29 | $unique = 'unique:items,name'; 30 | } 31 | 32 | return [ 33 | 'email' => 'required|min:5', 34 | ]; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /app/Models/BelongCommonGroup.php: -------------------------------------------------------------------------------- 1 | "boolean" 29 | ]; 30 | 31 | public function AauthAcessToken(){ 32 | return $this->hasMany('\App\Models\OauthAccessToken'); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /app/Models/BelongIndividualGroup.php: -------------------------------------------------------------------------------- 1 | "boolean" 29 | ]; 30 | 31 | public function AauthAcessToken(){ 32 | return $this->hasMany('\App\Models\OauthAccessToken'); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /app/Models/DefaultReminder.php: -------------------------------------------------------------------------------- 1 | "boolean" 29 | ]; 30 | 31 | public function AauthAcessToken(){ 32 | return $this->hasMany('\App\Models\OauthAccessToken'); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /database/migrations/2016_06_01_000005_create_oauth_personal_access_clients_table.php: -------------------------------------------------------------------------------- 1 | increments('id'); 18 | $table->unsignedInteger('client_id')->index(); 19 | $table->timestamps(); 20 | }); 21 | } 22 | 23 | /** 24 | * Reverse the migrations. 25 | * 26 | * @return void 27 | */ 28 | public function down() 29 | { 30 | Schema::dropIfExists('oauth_personal_access_clients'); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /database/migrations/2019_08_09_152326_create_common_groups_table.php: -------------------------------------------------------------------------------- 1 | increments('id'); 18 | $table->string('name',500); 19 | $table->integer('rank'); 20 | $table->softDeletes(); 21 | $table->timestamps(); 22 | }); 23 | } 24 | 25 | /** 26 | * Reverse the migrations. 27 | * 28 | * @return void 29 | */ 30 | public function down() 31 | { 32 | Schema::dropIfExists('common_groups'); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /database/migrations/2019_09_12_113526_create_notifications_table.php: -------------------------------------------------------------------------------- 1 | increments('id'); 18 | $table->integer('schedule_id')->nullable(false); 19 | $table->integer('user_id')->nullable(false); 20 | $table->timestamps(); 21 | }); 22 | } 23 | 24 | /** 25 | * Reverse the migrations. 26 | * 27 | * @return void 28 | */ 29 | public function down() 30 | { 31 | Schema::dropIfExists('notifications'); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /database/migrations/2014_10_12_100000_create_change_emails_table.php: -------------------------------------------------------------------------------- 1 | integer('user_id')->index()->nullable(); 18 | $table->string('email')->index(); 19 | $table->string('token'); 20 | $table->timestamp('created_at')->nullable(); 21 | }); 22 | } 23 | 24 | /** 25 | * Reverse the migrations. 26 | * 27 | * @return void 28 | */ 29 | public function down() 30 | { 31 | Schema::dropIfExists('change_emails'); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /app/Http/Requests/Notification/NotificationStoreRequest.php: -------------------------------------------------------------------------------- 1 | id) { 30 | } 31 | /* 32 | * 新規登録画面の時 33 | */ 34 | else { 35 | } 36 | 37 | return [ 38 | 'schedule_id' => 'required', 39 | 'user_id' => 'required', 40 | ]; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /database/migrations/2019_08_14_162006_create_belong_departments_table.php: -------------------------------------------------------------------------------- 1 | increments('id'); 18 | $table->integer('user_id'); 19 | $table->integer('department_id'); 20 | $table->integer('rank'); 21 | $table->timestamps(); 22 | }); 23 | } 24 | 25 | /** 26 | * Reverse the migrations. 27 | * 28 | * @return void 29 | */ 30 | public function down() 31 | { 32 | Schema::dropIfExists('belong_departments'); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /database/migrations/2019_08_08_102427_change_schedules_table.php: -------------------------------------------------------------------------------- 1 | foreign('event_type_id') 19 | ->references('id') 20 | ->on('event_types'); 21 | }); 22 | } 23 | 24 | /** 25 | * Reverse the migrations. 26 | * 27 | * @return void 28 | */ 29 | public function down() 30 | { 31 | Schema::table('schedules', function (Blueprint $table) { 32 | $table->dropForeign('schedules_event_type_id_foreign'); 33 | }); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /database/migrations/2019_08_09_155919_create_belong_common_groups_table.php: -------------------------------------------------------------------------------- 1 | increments('id'); 18 | $table->integer('user_id'); 19 | $table->integer('common_group_id'); 20 | $table->integer('rank'); 21 | $table->timestamps(); 22 | }); 23 | } 24 | 25 | /** 26 | * Reverse the migrations. 27 | * 28 | * @return void 29 | */ 30 | public function down() 31 | { 32 | Schema::dropIfExists('belong_common_groups'); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /database/migrations/2016_06_01_000003_create_oauth_refresh_tokens_table.php: -------------------------------------------------------------------------------- 1 | string('id', 100)->primary(); 18 | $table->string('access_token_id', 100)->index(); 19 | $table->boolean('revoked'); 20 | $table->dateTime('expires_at')->nullable(); 21 | }); 22 | } 23 | 24 | /** 25 | * Reverse the migrations. 26 | * 27 | * @return void 28 | */ 29 | public function down() 30 | { 31 | Schema::dropIfExists('oauth_refresh_tokens'); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /database/migrations/2019_08_13_161544_create_departments_table.php: -------------------------------------------------------------------------------- 1 | increments('id'); 18 | $table->string('name', 100); 19 | $table->integer('parent_id')->default(0); 20 | $table->integer('rank'); 21 | $table->softDeletes(); 22 | $table->timestamps(); 23 | }); 24 | } 25 | 26 | /** 27 | * Reverse the migrations. 28 | * 29 | * @return void 30 | */ 31 | public function down() 32 | { 33 | Schema::dropIfExists('departments'); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /database/migrations/2019_08_19_113326_change_belong_departments_table.php: -------------------------------------------------------------------------------- 1 | boolean('is_enable')->default(1)->comment('有効 1:有効 0:無効'); 18 | $table->softDeletes(); 19 | }); 20 | } 21 | 22 | /** 23 | * Reverse the migrations. 24 | * 25 | * @return void 26 | */ 27 | public function down() 28 | { 29 | Schema::table('belong_departments', function (Blueprint $table) { 30 | $table->dropColumn('is_enable'); 31 | $table->dropSoftDeletes(); 32 | }); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /resources/nuxt/components/Loading.vue: -------------------------------------------------------------------------------- 1 | 17 | 18 | 42 | -------------------------------------------------------------------------------- /database/migrations/2019_08_16_144203_change_belong_common_groups_table.php: -------------------------------------------------------------------------------- 1 | boolean('is_enable')->default(1)->comment('有効 1:有効 0:無効'); 18 | $table->softDeletes(); 19 | }); 20 | } 21 | 22 | /** 23 | * Reverse the migrations. 24 | * 25 | * @return void 26 | */ 27 | public function down() 28 | { 29 | Schema::table('belong_common_groups', function (Blueprint $table) { 30 | $table->dropColumn('is_enable'); 31 | $table->dropSoftDeletes(); 32 | }); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /database/factories/UserFactory.php: -------------------------------------------------------------------------------- 1 | define(User::class, function (Faker $faker) { 20 | return [ 21 | 'name' => $faker->name, 22 | 'email' => $faker->unique()->safeEmail, 23 | 'email_verified_at' => now(), 24 | 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', // password 25 | 'remember_token' => Str::random(10), 26 | ]; 27 | }); 28 | -------------------------------------------------------------------------------- /database/migrations/2019_09_02_095644_create_holidays_table.php: -------------------------------------------------------------------------------- 1 | increments('id'); 18 | $table->date('holiday'); 19 | $table->string('summary',500); 20 | $table->integer('rank'); 21 | $table->boolean('is_enable')->default(1)->comment('有効 1:有効 0:無効'); 22 | $table->softDeletes(); 23 | $table->timestamps(); 24 | }); 25 | } 26 | 27 | /** 28 | * Reverse the migrations. 29 | * 30 | * @return void 31 | */ 32 | public function down() 33 | { 34 | Schema::drop('holidays'); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /.env.example: -------------------------------------------------------------------------------- 1 | APP_NAME=OSSCalendar 2 | APP_ENV=local 3 | APP_KEY= 4 | APP_DEBUG=true 5 | APP_URL=http://localhost 6 | 7 | CLIENT_URL=http://localhost:3000 8 | 9 | LOG_CHANNEL=stack 10 | 11 | DB_CONNECTION=mysql 12 | DB_HOST=mysql 13 | DB_PORT=3306 14 | DB_DATABASE=osscalendar 15 | DB_USERNAME=username 16 | DB_PASSWORD=userpass 17 | 18 | BROADCAST_DRIVER=log 19 | CACHE_DRIVER=file 20 | QUEUE_CONNECTION=sync 21 | SESSION_DRIVER=file 22 | SESSION_LIFETIME=120 23 | 24 | REDIS_HOST=127.0.0.1 25 | REDIS_PASSWORD=null 26 | REDIS_PORT=6379 27 | 28 | MAIL_DRIVER=smtp 29 | MAIL_HOST=smtp.mailtrap.io 30 | MAIL_PORT=2525 31 | MAIL_USERNAME=null 32 | MAIL_PASSWORD=null 33 | MAIL_ENCRYPTION=null 34 | MAIL_FROM_ADDRESS=null 35 | MAIL_FROM_NAME="シンキングリード" 36 | 37 | AWS_ACCESS_KEY_ID= 38 | AWS_SECRET_ACCESS_KEY= 39 | AWS_DEFAULT_REGION=us-east-1 40 | AWS_BUCKET= 41 | 42 | PUSHER_APP_ID= 43 | PUSHER_APP_KEY= 44 | PUSHER_APP_SECRET= 45 | PUSHER_APP_CLUSTER=mt1 46 | 47 | MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}" 48 | MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}" 49 | -------------------------------------------------------------------------------- /database/migrations/2016_06_01_000001_create_oauth_auth_codes_table.php: -------------------------------------------------------------------------------- 1 | string('id', 100)->primary(); 18 | $table->integer('user_id'); 19 | $table->unsignedInteger('client_id'); 20 | $table->text('scopes')->nullable(); 21 | $table->boolean('revoked'); 22 | $table->dateTime('expires_at')->nullable(); 23 | }); 24 | } 25 | 26 | /** 27 | * Reverse the migrations. 28 | * 29 | * @return void 30 | */ 31 | public function down() 32 | { 33 | Schema::dropIfExists('oauth_auth_codes'); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /database/migrations/2022_07_26_130819_change_column_users_table.php: -------------------------------------------------------------------------------- 1 | dropUnique('users_username_unique'); 20 | $table->dropUnique('users_email_unique'); 21 | }); 22 | } 23 | 24 | /** 25 | * Reverse the migrations. 26 | * 27 | * @return void 28 | */ 29 | public function down() 30 | { 31 | Schema::table('users', function (Blueprint $table) { 32 | $table->unique('username'); 33 | $table->unique('email'); 34 | }); 35 | } 36 | }; 37 | -------------------------------------------------------------------------------- /database/migrations/2019_08_05_135057_create_event_types_table.php: -------------------------------------------------------------------------------- 1 | increments('id'); 18 | $table->string('name',500); 19 | $table->string('color',500); 20 | $table->integer('rank'); 21 | $table->boolean('is_enable')->default(1)->comment('有効 1:有効 0:無効'); 22 | $table->softDeletes(); 23 | $table->timestamps(); 24 | }); 25 | } 26 | 27 | /** 28 | * Reverse the migrations. 29 | * 30 | * @return void 31 | */ 32 | public function down() 33 | { 34 | Schema::dropIfExists('event_types'); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /database/migrations/2019_08_23_102312_create_reminders_overrides_table.php: -------------------------------------------------------------------------------- 1 | increments('id'); 18 | $table->integer('schedule_id'); 19 | $table->integer('user_id'); 20 | $table->integer('overrides_method_id')->nullable(); 21 | $table->integer('overrides_minutes')->nullable(); 22 | $table->timestamps(); 23 | }); 24 | } 25 | 26 | /** 27 | * Reverse the migrations. 28 | * 29 | * @return void 30 | */ 31 | public function down() 32 | { 33 | Schema::drop('reminders_overrides'); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /app/Http/Requests/Mypage/MySettingStoreRequest.php: -------------------------------------------------------------------------------- 1 | id) { 30 | $reminderRule = 'required_if:default_reminders_method_id, 1'; 31 | } 32 | /* 33 | * 新規登録画面の時 34 | */ 35 | else { 36 | $reminderRule = 'required_if:default_reminders_method_id, 1'; 37 | } 38 | 39 | return [ 40 | 'overrides_minutes' => $reminderRule, 41 | ]; 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /database/migrations/2019_08_22_120431_create_individual_groups_table.php: -------------------------------------------------------------------------------- 1 | increments('id'); 18 | $table->integer('user_id'); 19 | $table->string('name',500); 20 | $table->integer('rank'); 21 | $table->boolean('is_enable')->default(1)->comment('有効 1:有効 0:無効'); 22 | $table->softDeletes(); 23 | $table->timestamps(); 24 | }); 25 | } 26 | 27 | /** 28 | * Reverse the migrations. 29 | * 30 | * @return void 31 | */ 32 | public function down() 33 | { 34 | Schema::drop('individual_groups'); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /app/Http/Requests/Schedule/ScheduleStoreRequest.php: -------------------------------------------------------------------------------- 1 | id) { 30 | $reminderRule = 'required_if:reminder, 1'; 31 | } 32 | /* 33 | * 新規登録画面の時 34 | */ 35 | else { 36 | $reminderRule = 'required_if:reminder, 1'; 37 | } 38 | 39 | return [ 40 | 'users' => 'required', 41 | 'reminder_minutes' => $reminderRule, 42 | ]; 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /resources/nuxt/store/message.js: -------------------------------------------------------------------------------- 1 | export const state = () => ({ 2 | message: '', 3 | color: 'info' 4 | }) 5 | 6 | export const getters = { 7 | getMessage: state => state.message, 8 | getColor: state => state.color, 9 | existsMessage: state => state.message !== '' 10 | } 11 | 12 | export const mutations = { 13 | setMessage(state, message) { 14 | state.message = message 15 | }, 16 | setColor(state, color) { 17 | state.color = color 18 | }, 19 | clearMessage(state) { 20 | state.message = '' 21 | state.color = '' 22 | } 23 | } 24 | 25 | export const actions = { 26 | setMessage({ commit }, message) { 27 | commit('setMessage', message) 28 | }, 29 | setError({ commit }) { 30 | commit('setColor', 'error') 31 | }, 32 | setWarning({ commit }) { 33 | commit('setColor', 'warning') 34 | }, 35 | setInfo({ commit }) { 36 | commit('setColor', 'info') 37 | }, 38 | setSuccess({ commit }) { 39 | commit('setColor', 'success') 40 | }, 41 | clearMessage({ commit }) { 42 | commit('clearMessage') 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /app/Models/Attendee.php: -------------------------------------------------------------------------------- 1 | "boolean" 36 | ]; 37 | 38 | public function schedule() 39 | { 40 | return $this->belongsTo('App\Models\Schedule'); 41 | } 42 | 43 | public function user() 44 | { 45 | return $this->belongsTo('App\Models\User'); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /database/migrations/2019_08_29_161707_create_recurrings_table.php: -------------------------------------------------------------------------------- 1 | bigIncrements('id'); 18 | $table->integer('schedule_id'); 19 | $table->date('start_date'); 20 | $table->date('end_date'); 21 | $table->string('frequency'); 22 | $table->integer('parent_id')->nullable(); 23 | $table->boolean('deleted'); 24 | $table->timestamps(); 25 | }); 26 | } 27 | 28 | /** 29 | * Reverse the migrations. 30 | * 31 | * @return void 32 | */ 33 | public function down() 34 | { 35 | Schema::dropIfExists('recurrings'); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /app/Console/Kernel.php: -------------------------------------------------------------------------------- 1 | command('inspire') 29 | // ->hourly(); 30 | } 31 | 32 | /** 33 | * Register the commands for the application. 34 | * 35 | * @return void 36 | */ 37 | protected function commands() 38 | { 39 | $this->load(__DIR__.'/Commands'); 40 | 41 | require base_path('routes/console.php'); 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /app/Providers/AuthServiceProvider.php: -------------------------------------------------------------------------------- 1 | 'App\Policies\ModelPolicy', 18 | ]; 19 | 20 | /** 21 | * Register any authentication / authorization services. 22 | * 23 | * @return void 24 | */ 25 | public function boot() 26 | { 27 | $this->registerPolicies(); 28 | 29 | Passport::routes(); 30 | 31 | // ログインユーザに許可 32 | Gate::define('user', function ($user) { 33 | return ($user->role_id == 1 || $user->role_id == 2); 34 | }); 35 | // 管理者に許可 36 | Gate::define('admin', function ($user) { 37 | return ($user->role_id == 1); 38 | }); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /database/migrations/2019_08_20_152015_create_default_reminders_table.php: -------------------------------------------------------------------------------- 1 | increments('id'); 18 | $table->integer('calendarlist_id'); 19 | $table->integer('default_reminders_method_id'); 20 | $table->integer('overrides_minutes'); 21 | $table->boolean('is_enable')->default(1)->comment('有効 1:有効 0:無効'); 22 | $table->softDeletes(); 23 | $table->timestamps(); 24 | }); 25 | } 26 | 27 | /** 28 | * Reverse the migrations. 29 | * 30 | * @return void 31 | */ 32 | public function down() 33 | { 34 | Schema::drop('default_reminders'); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /database/migrations/2019_08_22_125925_create_belong_individual_groups_table.php: -------------------------------------------------------------------------------- 1 | increments('id'); 18 | $table->integer('user_id'); 19 | $table->integer('individual_group_id'); 20 | $table->integer('rank'); 21 | $table->boolean('is_enable')->default(1)->comment('有効 1:有効 0:無効'); 22 | $table->softDeletes(); 23 | $table->timestamps(); 24 | }); 25 | } 26 | 27 | /** 28 | * Reverse the migrations. 29 | * 30 | * @return void 31 | */ 32 | public function down() 33 | { 34 | Schema::drop('belong_individual_groups'); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /docker/nginx/localhost.csr: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE REQUEST----- 2 | MIICzTCCAbUCAQAwgYcxCzAJBgNVBAYTAkpQMQ4wDAYDVQQIEwVUb0t5bzETMBEG 3 | A1UEBxMKU2hpYnV5YS1rdTEYMBYGA1UEChMPQXV0b1NjYWxlLCBJbmMuMRIwEAYD 4 | VQQDEwlsb2NhbGhvc3QxJTAjBgkqhkiG9w0BCQEWFm0ua29uaXNoaUBhdXRvc2Nh 5 | bGUuanAwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCVWHl65ilb8iTP 6 | jvDGVLpyxSfBdx1/j2J/bNmNyZGL3KTsv0KFE7v11IdJ+znW0Wjw5axVJz6XOZye 7 | BnIVu6lGqXO3EqvEhXYx9/C8OLEM8C81284t6T7QSZDvKLgroB/3tdpw7SycClQb 8 | NW4Bhnzn6oi/Z6kNzYjU1qseYCTxpzd2+5huhFbwScGiOJ4PAG5gsBzitaZdFeGi 9 | IiNF+K+pIJdpvU9F7gC1QfW05+TBai0W6W3+woj/P+c9z1mwxrNnt3zaUW8c9wJs 10 | HQaCV3wMTpVYOrIMtMKRAJweruHK59Ta1BgzbOPacorv7oEYqLeTguzxTfjcAZhe 11 | HmymmjfbAgMBAAGgADANBgkqhkiG9w0BAQUFAAOCAQEAYjrydsI0X1qV/GAhvHkU 12 | joOfK8HfKMjFIm6pzabhTkTOP+XEtzJY/B0BHhqFSbm0cnkCr39k9Gs8jtxHQ3fd 13 | EjTN7dVDEN1aAu7RMInPn+7gIlcY2EDF8OQV6BcR2J96d+IDHdH2WDwqAh1l++rt 14 | xjerKv0PS0ek9S1rpAZu0iAD6z5jqKAzOVazWBK6dEoI2RSp3dCLOyj+cyuTWxcd 15 | fYB83CMzZ/YA+oza476msNNo4OW1M7ptSK08SQ6FUIsgwZiqWLB+KVaXZTXnKjf2 16 | xiU+XswP5s8Y2hb++vfAbf0+wTuT7CQF4RuwJKb1qM6zMYvjG6GoK8z5w9o+bThv 17 | hw== 18 | -----END CERTIFICATE REQUEST----- 19 | -------------------------------------------------------------------------------- /database/migrations/2016_06_01_000004_create_oauth_clients_table.php: -------------------------------------------------------------------------------- 1 | increments('id'); 18 | $table->integer('user_id')->index()->nullable(); 19 | $table->string('name'); 20 | $table->string('secret', 100); 21 | $table->text('redirect'); 22 | $table->boolean('personal_access_client'); 23 | $table->boolean('password_client'); 24 | $table->boolean('revoked'); 25 | $table->timestamps(); 26 | }); 27 | } 28 | 29 | /** 30 | * Reverse the migrations. 31 | * 32 | * @return void 33 | */ 34 | public function down() 35 | { 36 | Schema::dropIfExists('oauth_clients'); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /database/migrations/2016_06_01_000002_create_oauth_access_tokens_table.php: -------------------------------------------------------------------------------- 1 | string('id', 100)->primary(); 18 | $table->integer('user_id')->index()->nullable(); 19 | $table->unsignedInteger('client_id'); 20 | $table->string('name')->nullable(); 21 | $table->text('scopes')->nullable(); 22 | $table->boolean('revoked'); 23 | $table->timestamps(); 24 | $table->dateTime('expires_at')->nullable(); 25 | }); 26 | } 27 | 28 | /** 29 | * Reverse the migrations. 30 | * 31 | * @return void 32 | */ 33 | public function down() 34 | { 35 | Schema::dropIfExists('oauth_access_tokens'); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /resources/nuxt/components/MessageSnackbar.vue: -------------------------------------------------------------------------------- 1 | 9 | 10 | 48 | -------------------------------------------------------------------------------- /database/seeders/FirstEventTypeCreateSeeder.php: -------------------------------------------------------------------------------- 1 | truncate(); 22 | 23 | DB::statement('SET FOREIGN_KEY_CHECKS=1;'); 24 | Model::reguard(); 25 | 26 | $model = new EventType(); 27 | $model->name = '外出'; 28 | $model->color = '#9F9F9FFF'; 29 | $model->rank = '1'; 30 | $model->save(); 31 | 32 | $model = new EventType(); 33 | $model->name = '会議'; 34 | $model->color = '#FFB400FF'; 35 | $model->rank = '2'; 36 | $model->save(); 37 | 38 | $model = new EventType(); 39 | $model->name = '電話'; 40 | $model->color = '#0000FFFF'; 41 | $model->rank = '3'; 42 | $model->save(); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /resources/nuxt/plugins/acl.js: -------------------------------------------------------------------------------- 1 | export default ({ app }, inject) => { 2 | const ADMIN = 1 3 | const USER = 2 4 | const acl = { 5 | /* 6 | article: { 7 | list: (user) => { 8 | if (!user) return false 9 | return true 10 | }, 11 | create: (user) => { 12 | if (!user) return false 13 | if (user.role_id === USER) return false 14 | return true 15 | }, 16 | edit: (user, article) => { 17 | if (!user) return false 18 | if (user.role_id === ADMIN) return true 19 | if (user.role_id === USER && user.id === article.user_id) return true 20 | return false 21 | } 22 | }, 23 | */ 24 | adminMenu: { 25 | show: user => { 26 | if (!user) return false 27 | if (user.role_id === USER) return false 28 | if (user.role_id === ADMIN) return true 29 | return false 30 | } 31 | } 32 | } 33 | const can = (user, verb, subject, ...args) => { 34 | return acl[subject][verb](user, ...args) 35 | } 36 | inject('can', (verb, subject, ...args) => { 37 | const user = app.store.state.auth.user 38 | return can(user, verb, subject, ...args) 39 | }) 40 | } 41 | -------------------------------------------------------------------------------- /config/view.php: -------------------------------------------------------------------------------- 1 | [ 17 | resource_path('views'), 18 | ], 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Compiled View Path 23 | |-------------------------------------------------------------------------- 24 | | 25 | | This option determines where all the compiled Blade templates will be 26 | | stored for your application. Typically, this is within the storage 27 | | directory. However, as usual, you are free to change this value. 28 | | 29 | */ 30 | 31 | 'compiled' => env( 32 | 'VIEW_COMPILED_PATH', 33 | realpath(storage_path('framework/views')) 34 | ), 35 | 36 | ]; 37 | -------------------------------------------------------------------------------- /database/seeders/FirstDepartmentCreateSeeder.php: -------------------------------------------------------------------------------- 1 | truncate(); 22 | 23 | DB::statement('SET FOREIGN_KEY_CHECKS=1;'); 24 | Model::reguard(); 25 | 26 | $department = new Department(); 27 | $department->name = '管理部'; 28 | $department->parent_id = 0; 29 | $department->rank = 1; 30 | $department->save(); 31 | 32 | $department = new Department(); 33 | $department->name = '営業部'; 34 | $department->parent_id = 0; 35 | $department->rank = 2; 36 | $department->save(); 37 | 38 | $department = new Department(); 39 | $department->name = '開発部'; 40 | $department->parent_id = 0; 41 | $department->rank = 3; 42 | $department->save(); 43 | 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /resources/nuxt/components/layouts/default/header/AdminMenu.vue: -------------------------------------------------------------------------------- 1 | 18 | 49 | -------------------------------------------------------------------------------- /docker/nginx/server.conf: -------------------------------------------------------------------------------- 1 | server{ 2 | listen 80; 3 | server_name localhost _; 4 | 5 | root /var/www/html/public; 6 | access_log /var/log/nginx/access.log; 7 | error_log /var/log/nginx/error.log warn; 8 | index index.php; 9 | client_max_body_size 30m; 10 | add_header X-Frame-Options SAMEORIGIN; 11 | add_header X-XSS-Protection "1; mode=block"; 12 | add_header X-Content-Type-Options nosniff; 13 | add_header Cache-Control public; 14 | 15 | location ~* \.(ico|css|js|gif|jpe?g|png)(\?[0-9]+)?$ { 16 | expires max; 17 | log_not_found off; 18 | access_log off; 19 | } 20 | location / { 21 | index index.php; 22 | try_files $uri $uri/ /index.php$is_args$args; 23 | 24 | # add_header Access-Control-Allow-Origin '*'; 25 | # add_header Access-Control-Allow-Methods 'GET, POST, PUT, DELETE'; 26 | # add_header Access-Control-Allow-Headers 'Origin, Authorization, Accept, Content-Type'; 27 | # add_header Access-Control-Max-Age 3600; 28 | 29 | # add_header Content-Type 'text/plain charset=UTF-8'; 30 | # add_header Content-Length 0; 31 | 32 | } 33 | location ~* \.php$ { 34 | fastcgi_pass web:9000; 35 | include fastcgi.conf; 36 | fastcgi_index index.php; 37 | fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; 38 | 39 | } 40 | 41 | } 42 | -------------------------------------------------------------------------------- /resources/nuxt/components/dialogs/MessageDialog.vue: -------------------------------------------------------------------------------- 1 | 16 | 17 | 54 | -------------------------------------------------------------------------------- /app/Http/Controllers/Auth/VerificationController.php: -------------------------------------------------------------------------------- 1 | middleware('auth'); 38 | $this->middleware('signed')->only('verify'); 39 | $this->middleware('throttle:6,1')->only('verify', 'resend'); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /phpunit.xml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 13 | ./tests/Unit 14 | 15 | 16 | 17 | ./tests/Feature 18 | 19 | 20 | 21 | 22 | ./app 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /app/Exceptions/Handler.php: -------------------------------------------------------------------------------- 1 | boolean('recurring')->default(0); 19 | $table->integer('recurring_id')->nullable(); 20 | $table->integer('parent_id')->nullable(); 21 | $table->integer('parent_uid')->nullable(); 22 | $table->boolean('deleted')->default(0); 23 | }); 24 | } 25 | 26 | /** 27 | * Reverse the migrations. 28 | * 29 | * @return void 30 | */ 31 | public function down() 32 | { 33 | Schema::table('schedules', function (Blueprint $table) { 34 | $table->dropColumn('recurring'); 35 | $table->dropColumn('recurring_id'); 36 | $table->dropColumn('parent_id'); 37 | $table->dropColumn('parent_uid'); 38 | $table->dropColumn('deleted'); 39 | }); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /docker/nginx/fastcgi.conf: -------------------------------------------------------------------------------- 1 | fastcgi_param QUERY_STRING $query_string; 2 | fastcgi_param REQUEST_METHOD $request_method; 3 | fastcgi_param CONTENT_TYPE $content_type; 4 | fastcgi_param CONTENT_LENGTH $content_length; 5 | 6 | fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; 7 | fastcgi_param SCRIPT_NAME $fastcgi_script_name; 8 | fastcgi_param PATH_INFO $fastcgi_path_info; 9 | fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info; 10 | fastcgi_param REQUEST_URI $request_uri; 11 | fastcgi_param DOCUMENT_URI $document_uri; 12 | fastcgi_param DOCUMENT_ROOT $document_root; 13 | fastcgi_param SERVER_PROTOCOL $server_protocol; 14 | fastcgi_param REQUEST_SCHEME $scheme; 15 | fastcgi_param HTTPS $https if_not_empty; 16 | 17 | fastcgi_param GATEWAY_INTERFACE CGI/1.1; 18 | fastcgi_param SERVER_SOFTWARE nginx/$nginx_version; 19 | 20 | fastcgi_param REMOTE_ADDR $remote_addr; 21 | fastcgi_param REMOTE_PORT $remote_port; 22 | fastcgi_param SERVER_ADDR $server_addr; 23 | fastcgi_param SERVER_PORT $server_port; 24 | fastcgi_param SERVER_NAME $host; 25 | 26 | fastcgi_buffers 8 64k; 27 | fastcgi_buffer_size 32k; 28 | -------------------------------------------------------------------------------- /docker/nginx/localhost.crt: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIDjDCCAnQCCQCGfl8x7lSCKTANBgkqhkiG9w0BAQUFADCBhzELMAkGA1UEBhMC 3 | SlAxDjAMBgNVBAgTBVRvS3lvMRMwEQYDVQQHEwpTaGlidXlhLWt1MRgwFgYDVQQK 4 | Ew9BdXRvU2NhbGUsIEluYy4xEjAQBgNVBAMTCWxvY2FsaG9zdDElMCMGCSqGSIb3 5 | DQEJARYWbS5rb25pc2hpQGF1dG9zY2FsZS5qcDAeFw0xNzAxMjExNTUzMzJaFw0y 6 | NzAxMTkxNTUzMzJaMIGHMQswCQYDVQQGEwJKUDEOMAwGA1UECBMFVG9LeW8xEzAR 7 | BgNVBAcTClNoaWJ1eWEta3UxGDAWBgNVBAoTD0F1dG9TY2FsZSwgSW5jLjESMBAG 8 | A1UEAxMJbG9jYWxob3N0MSUwIwYJKoZIhvcNAQkBFhZtLmtvbmlzaGlAYXV0b3Nj 9 | YWxlLmpwMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAlVh5euYpW/Ik 10 | z47wxlS6csUnwXcdf49if2zZjcmRi9yk7L9ChRO79dSHSfs51tFo8OWsVSc+lzmc 11 | ngZyFbupRqlztxKrxIV2MffwvDixDPAvNdvOLek+0EmQ7yi4K6Af97XacO0snApU 12 | GzVuAYZ85+qIv2epDc2I1NarHmAk8ac3dvuYboRW8EnBojieDwBuYLAc4rWmXRXh 13 | oiIjRfivqSCXab1PRe4AtUH1tOfkwWotFult/sKI/z/nPc9ZsMazZ7d82lFvHPcC 14 | bB0Ggld8DE6VWDqyDLTCkQCcHq7hyufU2tQYM2zj2nKK7+6BGKi3k4Ls8U343AGY 15 | Xh5sppo32wIDAQABMA0GCSqGSIb3DQEBBQUAA4IBAQCQkkdwe2SO4A6ZTe1FYNnI 16 | 0fntmelF8yw0rli59GaeaC4Mz2k75u7crkEBL+0D+5sgsQs8LtZo6P+Q18SXL06z 17 | HmEOTYSCj6KLA53Xm/vnoCHaH2c9GieE3fMF7dnaCYWYyeaPYSf2suq0PbxdAoyZ 18 | Luu38TxE8IahdJCEVZIbtR/8ao6U0CAMDTbV4WMR7LvBmWzeC0/EEjzV0vrgV5uU 19 | t4ywk/JEPlfoZeAu38KFwtL794lQJDEbUq763GyGVngFRtsdANBTx/hTkGgZjVCP 20 | p7vkbsVCER7V2JzFKq8bWbHezbvcojd5GyS6fdGqNS3go1KPTNoRm7S8Xy4jGL+h 21 | -----END CERTIFICATE----- 22 | -------------------------------------------------------------------------------- /resources/nuxt/store/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 状態を保持したい変数の管理 3 | * Mutations以外から更新されることは無い。 4 | * Stateを取得するためにはgettersを使う。 5 | */ 6 | export const state = () => ({ 7 | title: 'OSSカレンダー', 8 | drawer: false, 9 | fixed: true, 10 | miniVariant: false, 11 | csrfToken: '' 12 | }) 13 | 14 | // 同期処理 15 | /** 16 | * mutationsは値の移り変わりの処理を実装 17 | * stateを更新するにはMutationsからcommitをする。 18 | * Mutationsは同期処理でなければならない。 19 | */ 20 | export const mutations = { 21 | toggleDrawer(state) { 22 | state.drawer = !state.drawer 23 | }, 24 | toggleFixed(state) { 25 | console.log(state.fixed) 26 | state.fixed = !state.fixed 27 | console.log(state.fixed) 28 | }, 29 | toggleMiniVariant(state) { 30 | state.miniVariant = !state.miniVariant 31 | }, 32 | setDrawer(state, val) { 33 | state.drawer = val 34 | } 35 | } 36 | 37 | // 非同期処理 38 | /** 39 | * actionsはmutationsを利用して,アクションの処理を実装 40 | * データの加工や非同期処理はActionsで行い、Mutationsからcommitして更新をする。 41 | * Actionsの呼び出しにはdispatchをする。 42 | */ 43 | export const actions = {} 44 | 45 | /** 46 | * gettersはstateの値を取得するのに利用 47 | */ 48 | export const getters = { 49 | getTitle(state) { 50 | return state.title 51 | }, 52 | getDrawer(state) { 53 | return state.drawer 54 | }, 55 | getFixed(state) { 56 | return state.fixed 57 | }, 58 | getMiniVariant(state) { 59 | return state.miniVariant 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /database/seeders/FirstBelongDepartmentCreateSeeder.php: -------------------------------------------------------------------------------- 1 | truncate(); 22 | 23 | DB::statement('SET FOREIGN_KEY_CHECKS=1;'); 24 | Model::reguard(); 25 | 26 | $belong_department = new BelongDepartment(); 27 | $belong_department->user_id = 1; 28 | $belong_department->department_id = 1; 29 | $belong_department->rank = 1; 30 | $belong_department->save(); 31 | 32 | $belong_department = new BelongDepartment(); 33 | $belong_department->user_id = 1; 34 | $belong_department->department_id = 2; 35 | $belong_department->rank = 1; 36 | $belong_department->save(); 37 | 38 | $belong_department = new BelongDepartment(); 39 | $belong_department->user_id = 1; 40 | $belong_department->department_id = 3; 41 | $belong_department->rank = 1; 42 | $belong_department->save(); 43 | 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /resources/nuxt/pages/password/reset_email_sent.vue: -------------------------------------------------------------------------------- 1 | 33 | 34 | 53 | -------------------------------------------------------------------------------- /config/services.php: -------------------------------------------------------------------------------- 1 | [ 18 | 'domain' => env('MAILGUN_DOMAIN'), 19 | 'secret' => env('MAILGUN_SECRET'), 20 | 'endpoint' => env('MAILGUN_ENDPOINT', 'api.mailgun.net'), 21 | ], 22 | 23 | 'postmark' => [ 24 | 'token' => env('POSTMARK_TOKEN'), 25 | ], 26 | 27 | 'ses' => [ 28 | 'key' => env('AWS_ACCESS_KEY_ID'), 29 | 'secret' => env('AWS_SECRET_ACCESS_KEY'), 30 | 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'), 31 | ], 32 | 33 | 'sparkpost' => [ 34 | 'secret' => env('SPARKPOST_SECRET'), 35 | ], 36 | 37 | 'stripe' => [ 38 | 'model' => App\Models\User::class, 39 | 'key' => env('STRIPE_KEY'), 40 | 'secret' => env('STRIPE_SECRET'), 41 | 'webhook' => [ 42 | 'secret' => env('STRIPE_WEBHOOK_SECRET'), 43 | 'tolerance' => env('STRIPE_WEBHOOK_TOLERANCE', 300), 44 | ], 45 | ], 46 | 47 | ]; 48 | -------------------------------------------------------------------------------- /app/Http/Requests/User/UserStoreRequest.php: -------------------------------------------------------------------------------- 1 | id) { 30 | $usernameRule = 'required|unique:users,username,' . $this -> id . ',id,deleted_at,NULL'; 31 | $emailRule = 'email|unique:users,email,' . $this -> id . ',id,deleted_at,NULL'; 32 | $reminderRule = 'required_if:default_reminders_method_id, 1'; 33 | } 34 | /* 35 | * 新規登録画面の時 36 | */ 37 | else { 38 | $usernameRule = 'required|unique:users,username,deleted_at,NULL'; 39 | $emailRule = 'email|unique:users,email,deleted_at,NULL'; 40 | $reminderRule = 'required_if:default_reminders_method_id, 1'; 41 | } 42 | 43 | return [ 44 | 'username' => $usernameRule, 45 | 'email' => $emailRule, 46 | 'lastname' => 'required', 47 | 'firstname' => 'required', 48 | 'overrides_minutes' => $reminderRule, 49 | ]; 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /docker/php-fpm/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM php:8.1-fpm 2 | 3 | ADD php.ini /usr/local/etc/php/conf.d/php.ini 4 | ADD added.conf /usr/local/etc/php-fpm.d/added.conf 5 | 6 | RUN apt-get update \ 7 | && apt-get install -y \ 8 | libmemcached-dev zlib1g-dev vim libmcrypt-dev \ 9 | libfreetype6-dev \ 10 | libjpeg62-turbo-dev \ 11 | libpng-dev \ 12 | libexif-dev \ 13 | cron \ 14 | default-mysql-client \ 15 | dos2unix \ 16 | git \ 17 | libonig-dev \ 18 | libzip-dev 19 | RUN apt-get install -y build-essential 20 | RUN apt-get install -y autoconf 21 | RUN pecl install mcrypt-1.0.5 22 | RUN docker-php-ext-install -j$(nproc) pdo_mysql mysqli exif gd iconv 23 | RUN docker-php-ext-configure gd --with-freetype=/usr/include/ --with-jpeg=/usr/include/ 24 | RUN docker-php-ext-install -j$(nproc) gd zip 25 | # RUN pecl install memcached-2.2.0 26 | # RUN docker-php-ext-enable memcache 27 | # RUN pecl install xdebug-2.5.5 28 | # RUN docker-php-ext-enable xdebug mcrypt 29 | RUN docker-php-ext-enable mcrypt 30 | 31 | RUN \ 32 | apt-get autoremove && \ 33 | apt-get autoclean && \ 34 | apt-get clean && \ 35 | rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* 36 | 37 | #Composer install 38 | COPY --from=composer /usr/bin/composer /usr/bin/composer 39 | 40 | ENV COMPOSER_ALLOW_SUPERUSER 1 41 | ENV COMPOSER_HOME /composer 42 | ENV PATH $PATH:/composer/vendor/bin 43 | 44 | 45 | ADD supervisord.conf /etc/supervisor/conf.d/cron.conf 46 | 47 | RUN echo "export LANG=ja_JP.UTF-8" >> /root/.bashrc 48 | 49 | ARG PUID=1000 50 | ARG PGID=1000 51 | 52 | RUN groupmod -o -g $PGID www-data && \ 53 | usermod -o -u $PUID -g www-data www-data -------------------------------------------------------------------------------- /resources/nuxt/pages/mypage/email/check/_token.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 51 | -------------------------------------------------------------------------------- /app/Notifications/Reminder.php: -------------------------------------------------------------------------------- 1 | options = $options; 24 | } 25 | 26 | /** 27 | * Get the notification's delivery channels. 28 | * 29 | * @param mixed $notifiable 30 | * @return array 31 | */ 32 | public function via($notifiable) 33 | { 34 | return ['mail']; 35 | } 36 | 37 | /** 38 | * Get the mail representation of the notification. 39 | * 40 | * @param mixed $notifiable 41 | * @return \Illuminate\Notifications\Messages\MailMessage 42 | */ 43 | public function toMail($notifiable) 44 | { 45 | return (new MailMessage) 46 | ->subject('通知:'.$this->options["summary"].' - '.$this->options["start_date"]->format('Y/m/d H:i').'〜') 47 | ->view('emails.reminder', [ 48 | 'options' => $this->options, 49 | ]); 50 | } 51 | 52 | /** 53 | * Get the array representation of the notification. 54 | * 55 | * @param mixed $notifiable 56 | * @return array 57 | */ 58 | public function toArray($notifiable) 59 | { 60 | return [ 61 | // 62 | ]; 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /database/migrations/2014_10_12_000000_create_users_table.php: -------------------------------------------------------------------------------- 1 | increments('id'); 18 | $table->string('username')->unique()->comment('ログインID'); 19 | $table->string('email')->unique(); 20 | $table->timestamp('email_verified_at')->nullable(); 21 | $table->string('password')->nullable(); 22 | $table->string('lastname', 500)->nullable(); 23 | $table->string('firstname', 500)->nullable(); 24 | $table->integer('home_page_id')->default(1); 25 | $table->integer('calendarlist_id')->default(1); 26 | $table->integer('setting_id')->default(1); 27 | $table->integer('default_department_id')->default(1); 28 | $table->boolean('is_enable')->default(1)->comment('有効 1:有効 0:無効'); 29 | $table->integer('role_id')->default(1)->comment('権限 1:admin 2:一般'); 30 | $table->rememberToken(); 31 | $table->softDeletes(); 32 | $table->timestamps(); 33 | }); 34 | } 35 | 36 | /** 37 | * Reverse the migrations. 38 | * 39 | * @return void 40 | */ 41 | public function down() 42 | { 43 | Schema::dropIfExists('users'); 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /app/Notifications/ChangeEmail.php: -------------------------------------------------------------------------------- 1 | token = $token; 24 | } 25 | 26 | /** 27 | * Get the notification's delivery channels. 28 | * 29 | * @param mixed $notifiable 30 | * @return array 31 | */ 32 | public function via($notifiable) 33 | { 34 | return ['mail']; 35 | } 36 | 37 | /** 38 | * Get the mail representation of the notification. 39 | * 40 | * @param mixed $notifiable 41 | * @return \Illuminate\Notifications\Messages\MailMessage 42 | */ 43 | public function toMail($notifiable) 44 | { 45 | $url = config('app.client_url') . "/mypage/email/check/{$this->token}"; 46 | return (new MailMessage) 47 | ->subject('メールアドレスの変更') 48 | ->view('emails.change_email') 49 | ->action('メールアドレスの変更URL', $url); 50 | } 51 | 52 | /** 53 | * Get the array representation of the notification. 54 | * 55 | * @param mixed $notifiable 56 | * @return array 57 | */ 58 | public function toArray($notifiable) 59 | { 60 | return [ 61 | // 62 | ]; 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /resources/nuxt/components/TreeDepartmentRadio.vue: -------------------------------------------------------------------------------- 1 | 26 | 27 | 63 | -------------------------------------------------------------------------------- /database/seeders/FirstUserCreateSeeder.php: -------------------------------------------------------------------------------- 1 | truncate(); 26 | DB::table('calendarlists')->truncate(); 27 | DB::table('users')->truncate(); 28 | 29 | DB::statement('SET FOREIGN_KEY_CHECKS=1;'); 30 | Model::reguard(); 31 | 32 | $user = new User(); 33 | $user->username = 'admin'; 34 | $user->password = Hash::make('admin'); 35 | $user->remember_token = Str::random(10); 36 | $user->email = 'admin@example.com'; 37 | $user->lastname = '管理者'; 38 | $user->firstname = '管理者'; 39 | $user->home_page_id = 1; 40 | $user->calendarlist_id = 1; 41 | $user->setting_id = 1; 42 | $user->role_id = 1; 43 | $user->save(); 44 | 45 | $calendarlist = new Calendarlist(); 46 | $calendarlist->user_id = $user->id; 47 | $calendarlist->save(); 48 | 49 | $remindar = new DefaultReminder(); 50 | $remindar->calendarlist_id = 1; 51 | $remindar->default_reminders_method_id = 1; 52 | $remindar->overrides_minutes = 10; 53 | $remindar->save(); 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /docker/nginx/nginx.conf: -------------------------------------------------------------------------------- 1 | user nginx; 2 | pid /var/run/nginx.pid; 3 | 4 | worker_processes 4; 5 | worker_rlimit_nofile 100000; 6 | 7 | error_log /var/log/nginx/error.log; 8 | 9 | events { 10 | worker_connections 1024; 11 | multi_accept on; 12 | use epoll; 13 | } 14 | 15 | 16 | http { 17 | include /etc/nginx/mime.types; 18 | default_type application/octet-stream; 19 | 20 | log_format ltsv "$time_iso8601" 21 | "\tcache:$upstream_cache_status" 22 | "\t$request_time" 23 | "\t$status" 24 | "\t$request_method" 25 | "\t$host" 26 | "\t$request_uri" 27 | "\tSentByte:$body_bytes_sent" 28 | "\tReferer:$http_referer" 29 | "\tUA:$http_user_agent" 30 | "\tHost:$remote_addr" 31 | "\tptime:$upstream_response_time" 32 | ; 33 | 34 | access_log /var/log/nginx/access.log ltsv; 35 | 36 | sendfile on; 37 | tcp_nopush on; 38 | tcp_nodelay on; 39 | 40 | keepalive_timeout 10; 41 | client_header_timeout 10; 42 | client_body_timeout 10; 43 | reset_timedout_connection on; 44 | send_timeout 10; 45 | 46 | gzip on; 47 | gzip_types text/plain text/css application/x-javascript text/xml application/xml application/xml+rss text/javascript application/javascript application/json; 48 | gzip_min_length 1000; 49 | gzip_comp_level 6; 50 | gzip_vary on; 51 | 52 | server_tokens off; 53 | 54 | open_file_cache max=100000 inactive=20s; 55 | open_file_cache_valid 30s; 56 | open_file_cache_min_uses 2; 57 | open_file_cache_errors on; 58 | 59 | include /etc/nginx/conf.d/*.conf; 60 | 61 | } 62 | -------------------------------------------------------------------------------- /resources/nuxt/components/buttons/SingleSubmitButton.vue: -------------------------------------------------------------------------------- 1 | 11 | 12 | 46 | 84 | -------------------------------------------------------------------------------- /resources/nuxt/layouts/default.vue: -------------------------------------------------------------------------------- 1 | 30 | 31 | 57 | -------------------------------------------------------------------------------- /docker/nginx/localhost.key: -------------------------------------------------------------------------------- 1 | -----BEGIN RSA PRIVATE KEY----- 2 | MIIEpAIBAAKCAQEAlVh5euYpW/Ikz47wxlS6csUnwXcdf49if2zZjcmRi9yk7L9C 3 | hRO79dSHSfs51tFo8OWsVSc+lzmcngZyFbupRqlztxKrxIV2MffwvDixDPAvNdvO 4 | Lek+0EmQ7yi4K6Af97XacO0snApUGzVuAYZ85+qIv2epDc2I1NarHmAk8ac3dvuY 5 | boRW8EnBojieDwBuYLAc4rWmXRXhoiIjRfivqSCXab1PRe4AtUH1tOfkwWotFult 6 | /sKI/z/nPc9ZsMazZ7d82lFvHPcCbB0Ggld8DE6VWDqyDLTCkQCcHq7hyufU2tQY 7 | M2zj2nKK7+6BGKi3k4Ls8U343AGYXh5sppo32wIDAQABAoIBAFilxK37sq8eI1WE 8 | nkzLfESl3HxM7RiLjsbeYKB19kvTs53HxX9igF5iQc/bLLDjamwbmFiPS+rNyrZO 9 | UyetVcRYzxPrJEQpiEgOyTmgWQ+5/fv1NgQwgBV4pWwgenmCuZb6vefsEF+rDdN8 10 | uohzQO8UWwlqSYGk78SOi9Ii9aruU6/qmNPBTicJR2O96DktPGrY9eofdriKB5YY 11 | 8JLpA1T6WCRwL6k2LGlsDZHwbSYz3BXqHUuzp9JogSntb2clZlD3ReTGzhVBmUx4 12 | L+0qcdOKAmN1dHQ3X4XwPH9UyzuT4jmGeHvSDbmW8ndRGkCTWI8e/QyFKYgeVwiK 13 | YMOxP+kCgYEAxCxXyQzOEBYIkpe/aBl262iJxerk3BmOPdjOO1XAbYEZjEC2dzzi 14 | ftyjkOM7GdtjMKKoOVFfAqp+YKaUoy9+n+ftSM5ndeZJROFuAQ4wRJMbqY3q9B7+ 15 | 9v3SiCv0TPeNYGPZz9uBq9GBo1B1W2/R0uWAM2mUDIGBdBycjSLpUo0CgYEAwuQz 16 | f0O9/XYNapPMwR3ISDISUN34Y0mL3STX9Wq2B3tgJZ3Vewhhofnw3VOsGduGNgSX 17 | GoofXtUolYGvuV0kG+g0Iq+gbxNQxQltRRTLevQBI0G/YslaMSyIvSTBFFiWbVkk 18 | bQ/7AK30+lmlqZtZ9lv6LoU7Ej50OQhDxkvaTgcCgYEAjiu00zg8ftv5CoR/a2pJ 19 | DQKOFqnNgtXiiF//1nCnLLVLVqHvmyq820P8Jp0H0A13LWA0mpWmTcBSJqmTP1DE 20 | bA8hoIo14PQsVYcqugkWYhxbB96aUKHGFiqN0bJJMx6Vjy3ORR3INEV5tmoxIzs+ 21 | zaEV8Cyr5wRUVVoG+yI6BmECgYBsaVTcLmq5W7oK1zzHEDIhNvlJUrChSoAq/BvF 22 | wR6Q+uh5BFuEnRzyZX6/H5RUrfDyi4sikELzFdAFmqaNjmpPu9OEl/2+zBfaA2xt 23 | SSwHsUQQwLod0bQCNqu5y4A8OSs0mKnSoVkW/62Otd+ZgXmBuZhp2GMLuwIb16Ub 24 | 4YYGcQKBgQCRlgSxGoD5g0nWSTuNP1N3KsZbr12lOSeT/bNe1e6qLN4a1tAeC57S 25 | mkmGXnkS7R1PWYVpeic6yU81/qRmDIS4pYL8ihn+VQoA05exMlflFKI4ZMGyFCNe 26 | ORrOXEzE2KJGLTY4540JjrD5wKhXqBkoDKe+a7aiLlxsm8VoBjUHHA== 27 | -----END RSA PRIVATE KEY----- 28 | -------------------------------------------------------------------------------- /config/hashing.php: -------------------------------------------------------------------------------- 1 | 'bcrypt', 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Bcrypt Options 23 | |-------------------------------------------------------------------------- 24 | | 25 | | Here you may specify the configuration options that should be used when 26 | | passwords are hashed using the Bcrypt algorithm. This will allow you 27 | | to control the amount of time it takes to hash the given password. 28 | | 29 | */ 30 | 31 | 'bcrypt' => [ 32 | 'rounds' => env('BCRYPT_ROUNDS', 10), 33 | ], 34 | 35 | /* 36 | |-------------------------------------------------------------------------- 37 | | Argon Options 38 | |-------------------------------------------------------------------------- 39 | | 40 | | Here you may specify the configuration options that should be used when 41 | | passwords are hashed using the Argon algorithm. These will allow you 42 | | to control the amount of time it takes to hash the given password. 43 | | 44 | */ 45 | 46 | 'argon' => [ 47 | 'memory' => 1024, 48 | 'threads' => 2, 49 | 'time' => 2, 50 | ], 51 | 52 | ]; 53 | -------------------------------------------------------------------------------- /bootstrap/app.php: -------------------------------------------------------------------------------- 1 | singleton( 30 | Illuminate\Contracts\Http\Kernel::class, 31 | App\Http\Kernel::class 32 | ); 33 | 34 | $app->singleton( 35 | Illuminate\Contracts\Console\Kernel::class, 36 | App\Console\Kernel::class 37 | ); 38 | 39 | $app->singleton( 40 | Illuminate\Contracts\Debug\ExceptionHandler::class, 41 | App\Exceptions\Handler::class 42 | ); 43 | 44 | /* 45 | |-------------------------------------------------------------------------- 46 | | Return The Application 47 | |-------------------------------------------------------------------------- 48 | | 49 | | This script returns the application instance. The instance is given to 50 | | the calling script so we can separate the building of the instances 51 | | from the actual running of the application and sending responses. 52 | | 53 | */ 54 | 55 | return $app; 56 | -------------------------------------------------------------------------------- /config/cors.php: -------------------------------------------------------------------------------- 1 | ['*'], 25 | 26 | /* 27 | * Matches the request method. `['*']` allows all methods. 28 | */ 29 | 'allowed_methods' => ['*'], 30 | 31 | /* 32 | * Matches the request origin. `['*']` allows all origins. Wildcards can be used, eg `*.mydomain.com` 33 | */ 34 | 'allowed_origins' => ['*'], 35 | 36 | /* 37 | * Patterns that can be used with `preg_match` to match the origin. 38 | */ 39 | 'allowed_origins_patterns' => [], 40 | 41 | /* 42 | * Sets the Access-Control-Allow-Headers response header. `['*']` allows all headers. 43 | */ 44 | 'allowed_headers' => ['*'], 45 | 46 | /* 47 | * Sets the Access-Control-Expose-Headers response header with these headers. 48 | */ 49 | 'exposed_headers' => [], 50 | 51 | /* 52 | * Sets the Access-Control-Max-Age response header when > 0. 53 | */ 54 | 'max_age' => 0, 55 | 56 | /* 57 | * Sets the Access-Control-Allow-Credentials header. 58 | */ 59 | 'supports_credentials' => false, 60 | ]; 61 | -------------------------------------------------------------------------------- /docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | services: 3 | mysql: 4 | image: mysql:8 5 | command: mysqld --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci 6 | environment: 7 | MYSQL_ALLOW_EMPTY_PASSWORD: "yes" 8 | MYSQL_DATABASE: osscalendar 9 | MYSQL_USER: username 10 | MYSQL_PASSWORD: userpass 11 | TZ: Asia/Tokyo #`ls -la /etc/localtime | cut -d/ -f8-9 12 | ports: 13 | - "3306:3306" 14 | volumes: 15 | - ./docker/misc/data:/var/lib/mysql 16 | - ./docker/misc/conf.d/docker.cnf:/etc/mysql/conf.d/docker.cnf:ro 17 | container_name: osscal-db 18 | restart: always 19 | 20 | nginx: 21 | build: ./docker/nginx 22 | ports: 23 | - "80:80" 24 | - "443:443" 25 | volumes: 26 | - ./:/var/www/html:cached 27 | - ./.bash_profile:/root/.bash_profile:ro 28 | - ./docker/nginx/server.conf://.bash_profile:ro 29 | links: 30 | - web 31 | container_name: osscal-nginx 32 | environment: 33 | LANG: ja_JP.UTF-8 34 | LANGUAGE: ja_JP:ja 35 | LC_ALL: ja_JP.UTF-8 36 | TZ: Asia/Tokyo #`ls -la /etc/localtime | cut -d/ -f8-9 37 | restart: always 38 | 39 | web: 40 | build: ./docker/php-fpm 41 | volumes: 42 | - ./:/var/www/html:cached 43 | links: 44 | - mysql 45 | - mailcatcher 46 | environment: 47 | DATABASE_HOST: mysql 48 | DATABASE_NAME: crmdb 49 | DATABASE_USER: root 50 | DATABASE_PASSWORD: 51 | TZ: Asia/Tokyo #`ls -la /etc/localtime | cut -d/ -f8-9 52 | XDEBUG_CONFIG: remote_host=docker.for.mac.localhosts 53 | dns: 8.8.8.8 54 | container_name: osscal-web 55 | restart: always 56 | 57 | mailcatcher: 58 | image: schickling/mailcatcher 59 | ports: 60 | - "1080:1080" 61 | - "1025:1025" 62 | container_name: osscal-mc 63 | -------------------------------------------------------------------------------- /app/Notifications/CustomPasswordReset.php: -------------------------------------------------------------------------------- 1 | token = $token; 25 | } 26 | 27 | /** 28 | * Get the notification's delivery channels. 29 | * 30 | * @param mixed $notifiable 31 | * @return array 32 | */ 33 | public function via($notifiable) 34 | { 35 | return ['mail']; 36 | } 37 | 38 | /** 39 | * Get the mail representation of the notification. 40 | * 41 | * @param mixed $notifiable 42 | * @return \Illuminate\Notifications\Messages\MailMessage 43 | */ 44 | public function toMail($notifiable) 45 | { 46 | $url = config('app.client_url') . "/password/setting/{$this->token}/{$notifiable->getEmailForPasswordReset()}"; 47 | return (new MailMessage) 48 | ->subject('【'.config('app.name').'】パスワードのリセット') 49 | ->view('emails.reset', [ 50 | 'appName' => config('app.name'), 51 | ]) 52 | ->action('パスワードリセットURL', $url); 53 | } 54 | 55 | /** 56 | * Get the array representation of the notification. 57 | * 58 | * @param mixed $notifiable 59 | * @return array 60 | */ 61 | public function toArray($notifiable) 62 | { 63 | return [ 64 | // 65 | ]; 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /config/broadcasting.php: -------------------------------------------------------------------------------- 1 | env('BROADCAST_DRIVER', 'null'), 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Broadcast Connections 23 | |-------------------------------------------------------------------------- 24 | | 25 | | Here you may define all of the broadcast connections that will be used 26 | | to broadcast events to other systems or over websockets. Samples of 27 | | each available type of connection are provided inside this array. 28 | | 29 | */ 30 | 31 | 'connections' => [ 32 | 33 | 'pusher' => [ 34 | 'driver' => 'pusher', 35 | 'key' => env('PUSHER_APP_KEY'), 36 | 'secret' => env('PUSHER_APP_SECRET'), 37 | 'app_id' => env('PUSHER_APP_ID'), 38 | 'options' => [ 39 | 'cluster' => env('PUSHER_APP_CLUSTER'), 40 | 'encrypted' => true, 41 | ], 42 | ], 43 | 44 | 'redis' => [ 45 | 'driver' => 'redis', 46 | 'connection' => 'default', 47 | ], 48 | 49 | 'log' => [ 50 | 'driver' => 'log', 51 | ], 52 | 53 | 'null' => [ 54 | 'driver' => 'null', 55 | ], 56 | 57 | ], 58 | 59 | ]; 60 | -------------------------------------------------------------------------------- /resources/nuxt/components/NuxtLogo.vue: -------------------------------------------------------------------------------- 1 | 9 | 10 | 80 | -------------------------------------------------------------------------------- /app/Providers/RouteServiceProvider.php: -------------------------------------------------------------------------------- 1 | mapApiRoutes(); 39 | 40 | $this->mapWebRoutes(); 41 | 42 | // 43 | } 44 | 45 | /** 46 | * Define the "web" routes for the application. 47 | * 48 | * These routes all receive session state, CSRF protection, etc. 49 | * 50 | * @return void 51 | */ 52 | protected function mapWebRoutes() 53 | { 54 | Route::middleware('web') 55 | ->namespace($this->namespace) 56 | ->group(base_path('routes/web.php')); 57 | } 58 | 59 | /** 60 | * Define the "api" routes for the application. 61 | * 62 | * These routes are typically stateless. 63 | * 64 | * @return void 65 | */ 66 | protected function mapApiRoutes() 67 | { 68 | Route::prefix('api') 69 | ->middleware('api') 70 | ->namespace($this->namespace) 71 | ->group(base_path('routes/api.php')); 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /artisan: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env php 2 | make(Illuminate\Contracts\Console\Kernel::class); 34 | 35 | $status = $kernel->handle( 36 | $input = new Symfony\Component\Console\Input\ArgvInput, 37 | new Symfony\Component\Console\Output\ConsoleOutput 38 | ); 39 | 40 | /* 41 | |-------------------------------------------------------------------------- 42 | | Shutdown The Application 43 | |-------------------------------------------------------------------------- 44 | | 45 | | Once Artisan has finished running, we will fire off the shutdown events 46 | | so that any final work may be done by the application before we shut 47 | | down the process. This is the last thing to happen to the request. 48 | | 49 | */ 50 | 51 | $kernel->terminate($input, $status); 52 | 53 | exit($status); 54 | -------------------------------------------------------------------------------- /database/migrations/2019_08_06_101328_create_attendees_table.php: -------------------------------------------------------------------------------- 1 | increments('id'); 18 | $table->bigInteger('schedule_id')->unsigned(); 19 | $table->integer('user_id')->unsigned(); 20 | $table->string('attendee_id',500)->nullable(); 21 | $table->string('email',500)->nullable(); 22 | $table->string('display_name',500)->nullable(); 23 | $table->boolean('organizer')->nullable(); 24 | $table->boolean('self')->nullable(); 25 | $table->boolean('resource')->nullable(); 26 | $table->boolean('optional')->nullable(); 27 | $table->integer('response_status_id')->nullable(); 28 | $table->string('comment',500)->nullable(); 29 | $table->integer('additional_guests')->nullable(); 30 | $table->timestamps(); 31 | 32 | $table->foreign('user_id') 33 | ->references('id') 34 | ->on('users') 35 | ->onUpdate('cascade') 36 | ->onDelete('cascade'); 37 | 38 | $table->foreign('schedule_id') 39 | ->references('id') 40 | ->on('schedules') 41 | ->onUpdate('cascade') 42 | ->onDelete('cascade'); 43 | }); 44 | } 45 | 46 | /** 47 | * Reverse the migrations. 48 | * 49 | * @return void 50 | */ 51 | public function down() 52 | { 53 | Schema::drop('attendees'); 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "oss-calendar", 3 | "version": "1.0.0", 4 | "description": "oss-calendar project", 5 | "scripts": { 6 | "dev": "nuxt", 7 | "build": "nuxt build", 8 | "start": "nuxt start", 9 | "generate": "nuxt generate", 10 | "lint": "eslint --ext .js,.vue --ignore-path .gitignore .", 11 | "lintfix": "eslint --fix --ext .js,.vue --ignore-path .gitignore ." 12 | }, 13 | "dependencies": { 14 | "@fullcalendar/core": "4.3.1", 15 | "@fullcalendar/daygrid": "4.3.0", 16 | "@fullcalendar/interaction": "4.3.0", 17 | "@fullcalendar/moment": "4.3.0", 18 | "@fullcalendar/resource-timeline": "4.3.0", 19 | "@fullcalendar/rrule": "4.3.0", 20 | "@fullcalendar/timegrid": "4.3.0", 21 | "@fullcalendar/vue": "4.3.1", 22 | "@nuxtjs/auth": "^4.8.4", 23 | "@nuxtjs/axios": "^5.6.0", 24 | "@nuxtjs/dotenv": "^1.4.1", 25 | "axios": "^0.21.4", 26 | "babel-polyfill": "^6.26.0", 27 | "fs-extra": "^8.1.0", 28 | "moment": "^2.29.4", 29 | "nuxt": "^2.9.2", 30 | "rrule": "^2.6.2", 31 | "sass-loader": "^10.0.0", 32 | "url": "^0.11.0", 33 | "vee-validate": "2.2.15", 34 | "vuetify": "2.1.1" 35 | }, 36 | "devDependencies": { 37 | "@mdi/font": "^6.7.96", 38 | "@vue/eslint-config-prettier": "^7.0.0", 39 | "babel-eslint": "^10.1.0", 40 | "eslint": "^8.17.0", 41 | "eslint-config-prettier": "^6.7.0", 42 | "eslint-config-standard": "^17.0.0", 43 | "eslint-config-vuetify": "^0.6.1", 44 | "eslint-plugin-html": "^6.2.0", 45 | "eslint-plugin-import": "^2.26.0", 46 | "eslint-plugin-node": "^11.1.0", 47 | "eslint-plugin-prettier": "^4.0.0", 48 | "eslint-plugin-promise": "^6.0.0", 49 | "eslint-plugin-standard": "^4.1.0", 50 | "eslint-plugin-vue": "^9.1.1", 51 | "node-sass": "^6.0.1", 52 | "prettier": "^2.6.2", 53 | "stylus": "^0.58.1", 54 | "stylus-loader": "^4.3.3" 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /app/Models/User.php: -------------------------------------------------------------------------------- 1 | 'datetime', 43 | "is_enable" => "boolean" 44 | ]; 45 | 46 | public function AauthAcessToken(){ 47 | return $this->hasMany('\App\Models\OauthAccessToken'); 48 | } 49 | 50 | /** 51 | * パスワードリセット通知の送信 52 | * 53 | * @param string $token 54 | * @return void 55 | */ 56 | public function sendPasswordResetNotification($token) 57 | { 58 | $this->notify(new CustomPasswordReset($token)); 59 | } 60 | 61 | /** 62 | * メールアドレス変更通知の送信 63 | * 64 | * @param string $token 65 | * @return void 66 | */ 67 | public function sendEmailChangeNotification($token) 68 | { 69 | $this->notify(new ChangeEmail($token)); 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /database/migrations/2019_07_16_094111_create_calendarlists_table.php: -------------------------------------------------------------------------------- 1 | increments('id'); 18 | $table->integer('user_id')->unsigned()->comment('ユーザID'); 19 | $table->string('kind',500)->nullable(); 20 | $table->string('etag',500)->nullable(); 21 | $table->string('summary',500)->nullable(); 22 | $table->string('description',500)->nullable(); 23 | $table->string('location',500)->nullable(); 24 | $table->string('time_zone',500)->nullable(); 25 | $table->string('summary_override',500)->nullable(); 26 | $table->string('color_id',500)->nullable(); 27 | $table->string('background_color',500)->nullable(); 28 | $table->string('foreground_color',500)->nullable(); 29 | $table->boolean('hidden')->nullable(); 30 | $table->boolean('selected')->nullable(); 31 | $table->string('access_role',500)->nullable(); 32 | $table->boolean('primary')->nullable(); 33 | $table->boolean('deleted')->nullable(); 34 | $table->timestamps(); 35 | 36 | $table->foreign('user_id') 37 | ->references('id') 38 | ->on('users') 39 | ->onUpdate('cascade') 40 | ->onDelete('cascade'); 41 | }); 42 | } 43 | 44 | /** 45 | * Reverse the migrations. 46 | * 47 | * @return void 48 | */ 49 | public function down() 50 | { 51 | Schema::dropIfExists('calendarlists'); 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /app/Models/Schedule.php: -------------------------------------------------------------------------------- 1 | hasMany('App\Models\Attendee')->orderBy("user_id", "asc"); 72 | } 73 | public function recurrence() 74 | { 75 | return $this->hasOne('App\Models\Recurring'); 76 | } 77 | public function event_type() 78 | { 79 | return $this->belongsTo('App\Models\EventType'); 80 | } 81 | } 82 | -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "laravel/laravel", 3 | "type": "project", 4 | "description": "The Laravel Framework.", 5 | "keywords": [ 6 | "framework", 7 | "laravel" 8 | ], 9 | "license": "MIT", 10 | "require": { 11 | "php": "^8.1", 12 | "fruitcake/laravel-cors": "^3.0", 13 | "laravel/framework": "9.*", 14 | "laravel/helpers": "^1.5", 15 | "laravel/legacy-factories": "^1.3", 16 | "laravel/passport": "10.*", 17 | "laravel/tinker": "^2.0", 18 | "laravel/ui": "^3.0", 19 | "lcobucci/jwt": "4.*", 20 | "simshaun/recurr": "^5.0", 21 | "symfony/http-client": "^6.1", 22 | "symfony/mailgun-mailer": "^6.1" 23 | }, 24 | "require-dev": { 25 | "barryvdh/laravel-ide-helper": "^2.12", 26 | "beyondcode/laravel-dump-server": "^1.8", 27 | "filp/whoops": "^2.14", 28 | "fzaninotto/faker": "^1.9", 29 | "mockery/mockery": "^1.5", 30 | "nunomaduro/collision": "^6.1", 31 | "phpunit/phpunit": "^9.0" 32 | }, 33 | "config": { 34 | "optimize-autoloader": true, 35 | "preferred-install": "dist", 36 | "sort-packages": true 37 | }, 38 | "extra": { 39 | "laravel": { 40 | "dont-discover": [] 41 | } 42 | }, 43 | "autoload": { 44 | "psr-4": { 45 | "App\\": "app/", 46 | "Database\\Factories\\": "database/factories/", 47 | "Database\\Seeders\\": "database/seeders/" 48 | } 49 | }, 50 | "autoload-dev": { 51 | "psr-4": { 52 | "Tests\\": "tests/" 53 | } 54 | }, 55 | "minimum-stability": "dev", 56 | "prefer-stable": true, 57 | "scripts": { 58 | "post-autoload-dump": [ 59 | "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump", 60 | "@php artisan package:discover --ansi" 61 | ], 62 | "post-root-package-install": [ 63 | "@php -r \"file_exists('.env') || copy('.env.example', '.env');\"" 64 | ], 65 | "post-create-project-cmd": [ 66 | "@php artisan key:generate --ansi" 67 | ] 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /public/index.php: -------------------------------------------------------------------------------- 1 | 8 | */ 9 | 10 | define('LARAVEL_START', microtime(true)); 11 | 12 | if (file_exists(__DIR__.'/../storage/framework/maintenance.php')) { 13 | require __DIR__.'/../storage/framework/maintenance.php'; 14 | } 15 | 16 | /* 17 | |-------------------------------------------------------------------------- 18 | | Register The Auto Loader 19 | |-------------------------------------------------------------------------- 20 | | 21 | | Composer provides a convenient, automatically generated class loader for 22 | | our application. We just need to utilize it! We'll simply require it 23 | | into the script here so that we don't have to worry about manual 24 | | loading any of our classes later on. It feels great to relax. 25 | | 26 | */ 27 | 28 | require __DIR__.'/../vendor/autoload.php'; 29 | 30 | /* 31 | |-------------------------------------------------------------------------- 32 | | Turn On The Lights 33 | |-------------------------------------------------------------------------- 34 | | 35 | | We need to illuminate PHP development, so let us turn on the lights. 36 | | This bootstraps the framework and gets it ready for use, then it 37 | | will load up this application so that we can run it and send 38 | | the responses back to the browser and delight our users. 39 | | 40 | */ 41 | 42 | $app = require_once __DIR__.'/../bootstrap/app.php'; 43 | 44 | /* 45 | |-------------------------------------------------------------------------- 46 | | Run The Application 47 | |-------------------------------------------------------------------------- 48 | | 49 | | Once we have the application, we can handle the incoming request 50 | | through the kernel, and send the associated response back to 51 | | the client's browser allowing them to enjoy the creative 52 | | and wonderful application we have prepared for them. 53 | | 54 | */ 55 | 56 | $kernel = $app->make(Illuminate\Contracts\Http\Kernel::class); 57 | 58 | $response = $kernel->handle( 59 | $request = Illuminate\Http\Request::capture() 60 | ); 61 | 62 | $response->send(); 63 | 64 | $kernel->terminate($request, $response); 65 | -------------------------------------------------------------------------------- /resources/nuxt/components/ReminderSetting.vue: -------------------------------------------------------------------------------- 1 | 17 | 18 | 78 | -------------------------------------------------------------------------------- /app/Http/Controllers/Auth/RegisterController.php: -------------------------------------------------------------------------------- 1 | middleware('guest'); 41 | } 42 | 43 | /** 44 | * Get a validator for an incoming registration request. 45 | * 46 | * @param array $data 47 | * @return \Illuminate\Contracts\Validation\Validator 48 | */ 49 | protected function validator(array $data) 50 | { 51 | return Validator::make($data, [ 52 | 'name' => ['required', 'string', 'max:255'], 53 | 'email' => ['required', 'string', 'email', 'max:255', 'unique:users'], 54 | 'password' => ['required', 'string', 'min:8', 'confirmed'], 55 | ]); 56 | } 57 | 58 | /** 59 | * Create a new user instance after a valid registration. 60 | * 61 | * @param array $data 62 | * @return \App\Models\User 63 | */ 64 | protected function create(array $data) 65 | { 66 | return User::create([ 67 | 'name' => $data['name'], 68 | 'email' => $data['email'], 69 | 'password' => Hash::make($data['password']), 70 | ]); 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /app/Http/Controllers/Auth/ForgotPasswordController.php: -------------------------------------------------------------------------------- 1 | middleware('guest'); 33 | } 34 | 35 | /** 36 | * Send a reset link to the given user. 37 | * 38 | * @param \Illuminate\Http\Request $request 39 | * @return \Illuminate\Http\RedirectResponse|\Illuminate\Http\JsonResponse 40 | */ 41 | public function sendResetLinkEmail(Request $request) 42 | { 43 | $this->validateEmail($request); 44 | 45 | // We will send the password reset link to this user. Once we have attempted 46 | // to send the link, we will examine the response then see the message we 47 | // need to show to the user. Finally, we'll send out a proper response. 48 | $response = $this->broker()->sendResetLink( 49 | $this->credentials($request) 50 | ); 51 | 52 | return $response == Password::RESET_LINK_SENT 53 | ? response()->json(['message' => 'Reset link sent to your email.', 'status' => true], 201) 54 | : response()->json(['message' => 'Unable to send reset link', 'status' => false], 401); 55 | } 56 | 57 | protected function validateEmail(Request $request) 58 | { 59 | $this->validate($request, ['email' => 'required|email|exists:users,email']); 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /resources/nuxt/components/EditColor.vue: -------------------------------------------------------------------------------- 1 | 31 | 32 | 85 | -------------------------------------------------------------------------------- /resources/nuxt/components/dialogs/ConfirmDialog.vue: -------------------------------------------------------------------------------- 1 | 23 | 24 | 92 | -------------------------------------------------------------------------------- /resources/nuxt/plugins/axios.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | 3 | Vue.mixin({ 4 | methods: { 5 | async serverSideValidate() { 6 | //this.$validator.errors.clear() 7 | for (let key in Vue.prototype.serverSideErrors) { 8 | // APIサーバ側のバリデートエラーをクライアントバリデートにセットする 9 | this.$validator.errors.add({ 10 | field: key, 11 | msg: Vue.prototype.serverSideErrors[key] 12 | }) 13 | } 14 | Vue.prototype.serverSideErrors = {} 15 | console.log('serverSideValidated') 16 | }, 17 | 18 | async localValidate() { 19 | await this.$validator.validate().then(valid => { 20 | if (!valid) { 21 | var e = new Error('ローカルバリデーションエラー') 22 | e.response = { 23 | data: this.$validator.errors 24 | } 25 | throw e 26 | } 27 | }) 28 | }, 29 | 30 | initialValidate() { 31 | Vue.prototype.serverSideErrors = {} 32 | this.$validator.errors.clear() 33 | this.$validator.reset() 34 | } 35 | } 36 | }) 37 | 38 | export default function({ $axios, $validator, store }) { 39 | $axios.onRequest(config => { 40 | console.log('Making request to ' + config.url) 41 | }) 42 | 43 | $axios.onResponse(response => { 44 | console.log(response.config.data) 45 | }) 46 | 47 | $axios.onError(error => { 48 | let message = null 49 | // リクエストしてレスポンスが返ってきたときのエラー処理 50 | if (error.response) { 51 | const data = error.response.data 52 | const status = error.response.status 53 | if ((status === 422 || status === 429) && error.response.data.errors) { 54 | // APIサーバ側でのバリデートエラーをセットする。 55 | Vue.prototype.serverSideErrors = error.response.data.errors 56 | } else if ( 57 | (status === 422 || status === 429) && 58 | error.response.data.errors 59 | ) { 60 | // APIサーバ側でのバリデートエラーをセットする。 61 | Vue.prototype.serverSideErrors = error.response.data.errors 62 | } else { 63 | message = data.message 64 | } 65 | } 66 | // リクエストしてレスポンスを受け取ることができなかったときのエラー処理 67 | else if (error.request) { 68 | message = 'このリクエストは、サーバ側で処理できませんでした。' 69 | } 70 | // リクエストもレスポンスもできなかったときのエラー処理 71 | else { 72 | message = 73 | 'リクエストの設定中に何らかの問題が発生し、エラーが発生しました。' 74 | } 75 | 76 | if (message !== null) { 77 | store.commit('message/setMessage', message) 78 | } 79 | }) 80 | } 81 | -------------------------------------------------------------------------------- /config/filesystems.php: -------------------------------------------------------------------------------- 1 | env('FILESYSTEM_DRIVER', 'local'), 17 | 18 | /* 19 | |-------------------------------------------------------------------------- 20 | | Default Cloud Filesystem Disk 21 | |-------------------------------------------------------------------------- 22 | | 23 | | Many applications store files both locally and in the cloud. For this 24 | | reason, you may specify a default "cloud" driver here. This driver 25 | | will be bound as the Cloud disk implementation in the container. 26 | | 27 | */ 28 | 29 | 'cloud' => env('FILESYSTEM_CLOUD', 's3'), 30 | 31 | /* 32 | |-------------------------------------------------------------------------- 33 | | Filesystem Disks 34 | |-------------------------------------------------------------------------- 35 | | 36 | | Here you may configure as many filesystem "disks" as you wish, and you 37 | | may even configure multiple disks of the same driver. Defaults have 38 | | been setup for each driver as an example of the required options. 39 | | 40 | | Supported Drivers: "local", "ftp", "sftp", "s3", "rackspace" 41 | | 42 | */ 43 | 44 | 'disks' => [ 45 | 46 | 'local' => [ 47 | 'driver' => 'local', 48 | 'root' => storage_path('app'), 49 | ], 50 | 51 | 'public' => [ 52 | 'driver' => 'local', 53 | 'root' => storage_path('app/public'), 54 | 'url' => env('APP_URL').'/storage', 55 | 'visibility' => 'public', 56 | ], 57 | 58 | 's3' => [ 59 | 'driver' => 's3', 60 | 'key' => env('AWS_ACCESS_KEY_ID'), 61 | 'secret' => env('AWS_SECRET_ACCESS_KEY'), 62 | 'region' => env('AWS_DEFAULT_REGION'), 63 | 'bucket' => env('AWS_BUCKET'), 64 | 'url' => env('AWS_URL'), 65 | ], 66 | 67 | ], 68 | 69 | ]; 70 | -------------------------------------------------------------------------------- /resources/nuxt/pages/password/reset.vue: -------------------------------------------------------------------------------- 1 | 50 | 51 | 81 | -------------------------------------------------------------------------------- /app/Http/Controllers/NotificationController.php: -------------------------------------------------------------------------------- 1 | get(); 19 | return $notifications; 20 | } 21 | 22 | /** 23 | * Store a newly created resource in storage. 24 | * 25 | * @param NotificationStoreRequest $request 26 | * @return \Illuminate\Http\Response 27 | */ 28 | public function store(NotificationStoreRequest $request) 29 | { 30 | return $this->save($request); 31 | } 32 | 33 | /** 34 | * Display the specified resource. 35 | * 36 | * @param int $id 37 | * @return \Illuminate\Http\Response 38 | */ 39 | public function show($id) 40 | { 41 | // 42 | $notification = Notification::where('id', $id)->first(); 43 | return $notification ?? abort(404); 44 | 45 | } 46 | 47 | /** 48 | * Update the specified resource in storage. 49 | * 50 | * @param NotificationStoreRequest $request 51 | * @param int $id 52 | * @return \Illuminate\Http\Response 53 | */ 54 | public function update(NotificationStoreRequest $request, $id) 55 | { 56 | return $this->save($request, $id); 57 | } 58 | 59 | /** 60 | * Remove the specified resource from storage. 61 | * 62 | * @param int $id 63 | * @return \Illuminate\Http\Response 64 | */ 65 | public function destroy($id) 66 | { 67 | // 68 | Notification::destroy($id); 69 | } 70 | 71 | /** 72 | * @param \Illuminate\Http\Request $request 73 | * @param null $id 74 | * @return mixed 75 | */ 76 | private function save(Request $request, $id = null){ 77 | 78 | if($id == null){ 79 | // 登録 80 | $notification = new Notification(); 81 | $notification->fill($request->all())->save(); 82 | $notification->save(); 83 | }else{ 84 | // 更新 85 | $notification = Notification::where('id', $id)->first(); 86 | $notification->fill($request->all())->save(); 87 | } 88 | 89 | return $notification; 90 | } 91 | 92 | } 93 | -------------------------------------------------------------------------------- /resources/nuxt/components/dialogs/DataDestroy.vue: -------------------------------------------------------------------------------- 1 | 25 | 26 | 104 | -------------------------------------------------------------------------------- /resources/nuxt/components/dialogs/RecurrenceDialog.vue: -------------------------------------------------------------------------------- 1 | 28 | 29 | 105 | -------------------------------------------------------------------------------- /config/queue.php: -------------------------------------------------------------------------------- 1 | env('QUEUE_CONNECTION', 'sync'), 17 | 18 | /* 19 | |-------------------------------------------------------------------------- 20 | | Queue Connections 21 | |-------------------------------------------------------------------------- 22 | | 23 | | Here you may configure the connection information for each server that 24 | | is used by your application. A default configuration has been added 25 | | for each back-end shipped with Laravel. You are free to add more. 26 | | 27 | | Drivers: "sync", "database", "beanstalkd", "sqs", "redis", "null" 28 | | 29 | */ 30 | 31 | 'connections' => [ 32 | 33 | 'sync' => [ 34 | 'driver' => 'sync', 35 | ], 36 | 37 | 'database' => [ 38 | 'driver' => 'database', 39 | 'table' => 'jobs', 40 | 'queue' => 'default', 41 | 'retry_after' => 90, 42 | ], 43 | 44 | 'beanstalkd' => [ 45 | 'driver' => 'beanstalkd', 46 | 'host' => 'localhost', 47 | 'queue' => 'default', 48 | 'retry_after' => 90, 49 | 'block_for' => 0, 50 | ], 51 | 52 | 'sqs' => [ 53 | 'driver' => 'sqs', 54 | 'key' => env('AWS_ACCESS_KEY_ID'), 55 | 'secret' => env('AWS_SECRET_ACCESS_KEY'), 56 | 'prefix' => env('SQS_PREFIX', 'https://sqs.us-east-1.amazonaws.com/your-account-id'), 57 | 'queue' => env('SQS_QUEUE', 'your-queue-name'), 58 | 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'), 59 | ], 60 | 61 | 'redis' => [ 62 | 'driver' => 'redis', 63 | 'connection' => 'default', 64 | 'queue' => env('REDIS_QUEUE', 'default'), 65 | 'retry_after' => 90, 66 | 'block_for' => null, 67 | ], 68 | 69 | ], 70 | 71 | /* 72 | |-------------------------------------------------------------------------- 73 | | Failed Queue Jobs 74 | |-------------------------------------------------------------------------- 75 | | 76 | | These options configure the behavior of failed queue job logging so you 77 | | can control which database and table are used to store the jobs that 78 | | have failed. You may change them to any database / table you wish. 79 | | 80 | */ 81 | 82 | 'failed' => [ 83 | 'database' => env('DB_CONNECTION', 'mysql'), 84 | 'table' => 'failed_jobs', 85 | ], 86 | 87 | ]; 88 | -------------------------------------------------------------------------------- /config/logging.php: -------------------------------------------------------------------------------- 1 | env('LOG_CHANNEL', 'stack'), 20 | 21 | /* 22 | |-------------------------------------------------------------------------- 23 | | Log Channels 24 | |-------------------------------------------------------------------------- 25 | | 26 | | Here you may configure the log channels for your application. Out of 27 | | the box, Laravel uses the Monolog PHP logging library. This gives 28 | | you a variety of powerful log handlers / formatters to utilize. 29 | | 30 | | Available Drivers: "single", "daily", "slack", "syslog", 31 | | "errorlog", "monolog", 32 | | "custom", "stack" 33 | | 34 | */ 35 | 36 | 'channels' => [ 37 | 'stack' => [ 38 | 'driver' => 'stack', 39 | 'channels' => ['daily'], 40 | 'ignore_exceptions' => false, 41 | ], 42 | 43 | 'single' => [ 44 | 'driver' => 'single', 45 | 'path' => storage_path('logs/laravel.log'), 46 | 'level' => 'debug', 47 | ], 48 | 49 | 'daily' => [ 50 | 'driver' => 'daily', 51 | 'path' => storage_path('logs/laravel.log'), 52 | 'level' => 'debug', 53 | 'days' => 14, 54 | ], 55 | 56 | 'slack' => [ 57 | 'driver' => 'slack', 58 | 'url' => env('LOG_SLACK_WEBHOOK_URL'), 59 | 'username' => 'Laravel Log', 60 | 'emoji' => ':boom:', 61 | 'level' => 'critical', 62 | ], 63 | 64 | 'papertrail' => [ 65 | 'driver' => 'monolog', 66 | 'level' => 'debug', 67 | 'handler' => SyslogUdpHandler::class, 68 | 'handler_with' => [ 69 | 'host' => env('PAPERTRAIL_URL'), 70 | 'port' => env('PAPERTRAIL_PORT'), 71 | ], 72 | ], 73 | 74 | 'stderr' => [ 75 | 'driver' => 'monolog', 76 | 'handler' => StreamHandler::class, 77 | 'formatter' => env('LOG_STDERR_FORMATTER'), 78 | 'with' => [ 79 | 'stream' => 'php://stderr', 80 | ], 81 | ], 82 | 83 | 'syslog' => [ 84 | 'driver' => 'syslog', 85 | 'level' => 'debug', 86 | ], 87 | 88 | 'errorlog' => [ 89 | 'driver' => 'errorlog', 90 | 'level' => 'debug', 91 | ], 92 | ], 93 | 94 | ]; 95 | -------------------------------------------------------------------------------- /resources/nuxt/pages/password/setting/_token/_email.vue: -------------------------------------------------------------------------------- 1 | 53 | 54 | 98 | -------------------------------------------------------------------------------- /resources/nuxt/components/EventPublish.vue: -------------------------------------------------------------------------------- 1 | 34 | 35 | 107 | --------------------------------------------------------------------------------