Develop by Nafies Luthfi with Laravel 5.5.
95 |├── .env.example
├── .gitattributes
├── .gitignore
├── .travis.yml
├── LICENSE
├── README.md
├── app
├── Console
│ └── Kernel.php
├── Exceptions
│ └── Handler.php
├── Group.php
├── Helpers
│ └── functions.php
├── Http
│ ├── Controllers
│ │ ├── Auth
│ │ │ ├── ChangePasswordController.php
│ │ │ ├── ForgotPasswordController.php
│ │ │ ├── LoginController.php
│ │ │ ├── RegisterController.php
│ │ │ └── ResetPasswordController.php
│ │ ├── Controller.php
│ │ ├── DashboardController.php
│ │ ├── Groups
│ │ │ ├── MeetingsController.php
│ │ │ ├── MembersController.php
│ │ │ └── PaymentsController.php
│ │ ├── GroupsController.php
│ │ └── MeetingsController.php
│ ├── Kernel.php
│ └── Middleware
│ │ ├── EncryptCookies.php
│ │ ├── RedirectIfAuthenticated.php
│ │ ├── TrimStrings.php
│ │ ├── TrustProxies.php
│ │ └── VerifyCsrfToken.php
├── Meeting.php
├── Membership.php
├── Payment.php
├── Policies
│ └── GroupPolicy.php
├── Providers
│ ├── AppServiceProvider.php
│ ├── AuthServiceProvider.php
│ ├── BroadcastServiceProvider.php
│ ├── EventServiceProvider.php
│ └── RouteServiceProvider.php
└── User.php
├── artisan
├── bootstrap
├── app.php
└── cache
│ └── .gitignore
├── composer.json
├── composer.lock
├── config
├── app.php
├── auth.php
├── broadcasting.php
├── cache.php
├── database.php
├── filesystems.php
├── mail.php
├── queue.php
├── services.php
├── session.php
├── simple-crud.php
└── view.php
├── database
├── .gitignore
├── factories
│ ├── GroupFactory.php
│ ├── MeetingFactory.php
│ ├── PaymentFactory.php
│ └── UserFactory.php
├── migrations
│ ├── 2014_10_12_000000_create_users_table.php
│ ├── 2014_10_12_100000_create_password_resets_table.php
│ ├── 2018_04_26_195126_create_groups_table.php
│ ├── 2018_04_27_103238_create_group_members_table.php
│ ├── 2018_04_29_171702_create_meetings_table.php
│ └── 2018_05_06_110520_create_payments_table.php
└── seeds
│ └── DatabaseSeeder.php
├── package.json
├── phpunit.xml
├── public
├── .htaccess
├── css
│ ├── app.css
│ └── plugins
│ │ └── jquery.datetimepicker.css
├── favicon.ico
├── index.php
├── js
│ ├── app.js
│ └── plugins
│ │ ├── jquery.datetimepicker.js
│ │ └── noty.js
├── mix-manifest.json
├── robots.txt
├── screenshots
│ ├── dashboard-01.jpg
│ ├── group-detail-01.jpg
│ ├── group-meeting-list-01.jpg
│ ├── group-members-01.jpg
│ ├── group-outstanding-payments-01.jpg
│ └── meeting-detail-01.jpg
└── web.config
├── resources
├── assets
│ ├── js
│ │ ├── app.js
│ │ └── bootstrap.js
│ └── sass
│ │ ├── _bootstrap-theme.css
│ │ ├── _custom.scss
│ │ ├── _variables.scss
│ │ └── app.scss
├── lang
│ ├── en
│ │ ├── auth.php
│ │ ├── pagination.php
│ │ ├── passwords.php
│ │ └── validation.php
│ └── id
│ │ ├── app.php
│ │ ├── auth.php
│ │ ├── group.php
│ │ ├── meeting.php
│ │ ├── nav_menu.php
│ │ ├── payment.php
│ │ └── user.php
└── views
│ ├── auth
│ ├── login.blade.php
│ ├── passwords
│ │ ├── change.blade.php
│ │ ├── email.blade.php
│ │ └── reset.blade.php
│ └── register.blade.php
│ ├── groups
│ ├── create.blade.php
│ ├── edit.blade.php
│ ├── index.blade.php
│ ├── meetings.blade.php
│ ├── members.blade.php
│ ├── outstanding-payments.blade.php
│ ├── partials
│ │ └── nav-tabs.blade.php
│ ├── show.blade.php
│ └── wip.blade.php
│ ├── home.blade.php
│ ├── layouts
│ ├── app.blade.php
│ ├── group.blade.php
│ └── partials
│ │ ├── noty.blade.php
│ │ └── top-nav.blade.php
│ ├── meetings
│ ├── partials
│ │ ├── edit-meeting.blade.php
│ │ ├── set-meeting.blade.php
│ │ ├── set-winner.blade.php
│ │ └── stats.blade.php
│ └── show.blade.php
│ └── welcome.blade.php
├── routes
├── api.php
├── channels.php
├── console.php
└── web.php
├── server.php
├── storage
├── app
│ ├── .gitignore
│ └── public
│ │ └── .gitignore
├── debugbar
│ └── .gitignore
├── framework
│ ├── .gitignore
│ ├── cache
│ │ └── .gitignore
│ ├── sessions
│ │ └── .gitignore
│ ├── testing
│ │ └── .gitignore
│ └── views
│ │ └── .gitignore
└── logs
│ └── .gitignore
├── tests
├── CreatesApplication.php
├── Feature
│ ├── Auth
│ │ ├── ChangePasswordTest.php
│ │ ├── LoginTest.php
│ │ ├── RegistrationTest.php
│ │ └── ResetPasswordTest.php
│ ├── Groups
│ │ ├── GroupDateEntryTest.php
│ │ ├── GroupMemberEntryTest.php
│ │ └── MeetingEntryTest.php
│ ├── ManageGroupsTest.php
│ └── Meetings
│ │ ├── MeetingWinnerTest.php
│ │ └── PaymentEntryTest.php
├── TestCase.php
└── Unit
│ ├── Models
│ ├── GroupTest.php
│ ├── MeetingTest.php
│ ├── MembershipTest.php
│ └── UserTest.php
│ └── Policies
│ └── GroupPolicyTest.php
├── webpack.mix.js
└── yarn.lock
/.env.example:
--------------------------------------------------------------------------------
1 | APP_NAME=Laravel
2 | APP_ENV=local
3 | APP_KEY=
4 | APP_DEBUG=true
5 | APP_LOG_LEVEL=debug
6 | APP_URL=http://localhost
7 |
8 | DB_CONNECTION=mysql
9 | DB_HOST=127.0.0.1
10 | DB_PORT=3306
11 | DB_DATABASE=homestead
12 | DB_USERNAME=homestead
13 | DB_PASSWORD=secret
14 |
15 | BROADCAST_DRIVER=log
16 | CACHE_DRIVER=file
17 | SESSION_DRIVER=file
18 | SESSION_LIFETIME=120
19 | QUEUE_DRIVER=sync
20 |
21 | REDIS_HOST=127.0.0.1
22 | REDIS_PASSWORD=null
23 | REDIS_PORT=6379
24 |
25 | MAIL_DRIVER=smtp
26 | MAIL_HOST=smtp.mailtrap.io
27 | MAIL_PORT=2525
28 | MAIL_USERNAME=null
29 | MAIL_PASSWORD=null
30 | MAIL_ENCRYPTION=null
31 |
32 | PUSHER_APP_ID=
33 | PUSHER_APP_KEY=
34 | PUSHER_APP_SECRET=
35 | PUSHER_APP_CLUSTER=mt1
36 |
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
1 | * text=auto
2 | *.css linguist-vendored
3 | *.scss linguist-vendored
4 | *.js linguist-vendored
5 | CHANGELOG.md export-ignore
6 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | /node_modules
2 | /public/hot
3 | /public/storage
4 | /storage/*.key
5 | /vendor
6 | /.idea
7 | /.vscode
8 | /.vagrant
9 | Homestead.json
10 | Homestead.yaml
11 | npm-debug.log
12 | yarn-error.log
13 | .env
14 |
--------------------------------------------------------------------------------
/.travis.yml:
--------------------------------------------------------------------------------
1 | language: php
2 |
3 | php:
4 | - 7.2
5 |
6 | before_script:
7 | - travis_retry composer self-update
8 | - travis_retry composer install --prefer-source --no-interaction --dev
9 | - cp .env.example .env
10 | - php artisan key:generate
11 |
12 | script:
13 | - vendor/bin/phpunit
14 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2018 Nafies Luthfi
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Arisan
2 |
3 | Arisan adalah sebuah sistem pengelolaan grup arisan berbasis web yang dibangun dengan framework Laravel 5.
4 |
5 | ## Tujuan
6 | Arisan bertujuan untuk mempermudah pengelola arisan dalam mengatur pertemuan dan mengelola pembayaran anggota.
7 |
8 | ## Konsep
9 |
10 | Untuk mencapai tujuan di atas, berikut adalah konsep yang akan diterapkan pada sistem ini :
11 |
12 | - [x] Setiap user dapat mendaftar.
13 | - [x] Setiap user dapat membuat grup arisan (satu atau lebih).
14 | - [x] Setiap grup arisan dapat diisi sejumlah anggota (user) dengan kapasitas tertentu (limit 20 anggota).
15 | - [x] Satu user boleh sebagai lebih dari 1 anggota di dalam satu grup.
16 | - [x] Setiap grup arisan ada list pertemuan sesuai jumlah anggota.
17 | - [x] Setiap grup ada pengaturan currency/mata uang, jumlah iuran arisan, dan kapasitas anggota.
18 | - [ ] Setiap satu pertemuan ada tanggal, tempat, nama anggota yg dapat arisan, rekening yang dapat arisan, list anggota belum bayar iuran.
19 | - [ ] Pada list pembayaran ada jumlah yang dibayar, tanggal, user tujuan bayar (dibayar ke siapa), cara bayar.
20 |
21 | Sementara itu dulu konsepnya, jika ada perkembangan, akan diupdate kembali.
22 |
23 | ## Cara Install
24 |
25 | #### Spesifikasi minimum server
26 | 1. PHP 7.2 (dan memenuhi [server requirement Laravel 5.5](https://laravel.com/docs/5.5#server-requirements)),
27 | 2. MySQL 5.7 atau MariaDB 10.2,
28 | 3. SQlite (untuk automated testing).
29 |
30 | > Jika menggunakan MySQL < 5.7 atau MariaDB < 10.2, silakan [cek solusi ini](https://github.com/nafiesl/arisan/issues/2#issuecomment-392324454).
31 |
32 | #### Tahap Install
33 |
34 | 1. Clone Repo, pada terminal : `$ git clone https://github.com/nafiesl/arisan.git nama-folder`
35 | 2. `$ cd arisan`
36 | 3. `$ composer install`
37 | 4. `$ cp .env.example .env` (Duplikat file `.env.example` menjadi `.env`)
38 | 5. `$ php artisan key:generate`
39 | 6. Buat **database pada mysql** untuk aplikasi ini
40 | 7. **Setting database** pada file `.env`
41 | 8. `$ php artisan migrate`
42 | 9. `$ php artisan serve`
43 | 10. Selesai (Register user baru untuk mulai mengisi arisan).
44 |
45 | ## Testing
46 |
47 | ```bash
48 | $ vendor/bin/phpunit
49 | ```
50 |
51 | ## Screenshot
52 |
53 | #### Dashboard
54 |
55 | Setiap member/anggota grup yang login akan melihat daftar grup arisan, dengan list tunggakan pembayaran per grupnya.
56 |
57 | 
58 |
59 | #### Detail Grup Arisan
60 |
61 | Setiap member dapat melihat detail grup arisan yang diikutinya.
62 |
63 | 
64 |
65 | #### List Pertemuan Grup
66 |
67 | 
68 |
69 | #### List Pembayaran Terlambat Grup
70 |
71 | 
72 |
73 | #### List Anggota Grup
74 |
75 | 
76 |
77 |
78 | ## Lisensi
79 |
80 | Project Arisan merupakan software free dan open source di bawah [lisensi MIT](LICENSE).
--------------------------------------------------------------------------------
/app/Console/Kernel.php:
--------------------------------------------------------------------------------
1 | command('inspire')
28 | // ->hourly();
29 | }
30 |
31 | /**
32 | * Register the commands for the application.
33 | *
34 | * @return void
35 | */
36 | protected function commands()
37 | {
38 | $this->load(__DIR__.'/Commands');
39 |
40 | require base_path('routes/console.php');
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/app/Exceptions/Handler.php:
--------------------------------------------------------------------------------
1 | name, [$this], [
19 | 'title' => trans(
20 | 'app.show_detail_title',
21 | ['name' => $this->name, 'type' => trans('group.group')]
22 | ),
23 | ]);
24 | }
25 |
26 | public function members()
27 | {
28 | return $this->belongsToMany(User::class, 'group_members')->withPivot(['id']);
29 | }
30 |
31 | public function addMember(User $user)
32 | {
33 | if ($this->members()->count() < $this->capacity) {
34 | $this->members()->attach($user);
35 |
36 | return $user;
37 | }
38 |
39 | return false;
40 | }
41 |
42 | public function isFull()
43 | {
44 | return $this->capacity == $this->members->count();
45 | }
46 |
47 | public function removeMember(int $groupMemberId)
48 | {
49 | return \DB::table('group_members')->delete($groupMemberId);
50 | }
51 |
52 | public function creator()
53 | {
54 | return $this->belongsTo(User::class);
55 | }
56 |
57 | public function getStatusCodeAttribute()
58 | {
59 | if ($this->isActive()) {
60 | return 'active';
61 | }
62 |
63 | if ($this->isClosed()) {
64 | return 'closed';
65 | }
66 |
67 | return 'planned';
68 | }
69 |
70 | public function getStatusAttribute()
71 | {
72 | return trans('group.'.$this->status_code);
73 | }
74 |
75 | public function isPlanned()
76 | {
77 | return is_null($this->start_date) && is_null($this->end_date);
78 | }
79 |
80 | public function isActive()
81 | {
82 | return $this->start_date && is_null($this->end_date);
83 | }
84 |
85 | public function isClosed()
86 | {
87 | return $this->start_date && $this->end_date;
88 | }
89 |
90 | public function meetings()
91 | {
92 | return $this->hasMany(Meeting::class);
93 | }
94 |
95 | public function getWinnerPayoffAttribute()
96 | {
97 | return $this->members->count() * $this->payment_amount;
98 | }
99 | }
100 |
--------------------------------------------------------------------------------
/app/Helpers/functions.php:
--------------------------------------------------------------------------------
1 | flash('flash_notification.message', $message);
16 | $session->flash('flash_notification.level', $level);
17 | }
18 | }
19 |
20 | /**
21 | * Indonesian Number Format.
22 | *
23 | * @param int $number
24 | *
25 | * @return string Number in Indonesian format.
26 | */
27 | function formatNo($number)
28 | {
29 | return number_format($number, 0, ',', '.');
30 | }
31 |
32 | /**
33 | * Rupiah Format.
34 | *
35 | * @param int $number Money in integer format.
36 | *
37 | * @return string Money in string format.
38 | */
39 | function formatRp($number)
40 | {
41 | if ($number == 0) {
42 | return '-';
43 | }
44 |
45 | return 'Rp. '.formatNo($number);
46 | }
47 |
48 | /**
49 | * Indonesian Decimal Format.
50 | *
51 | * @param float $number Decimal number in Indonesian format.
52 | *
53 | * @return string Decimal number in Indonesian format.
54 | */
55 | function formatDecimal($number)
56 | {
57 | return number_format($number, 2, ',', '.');
58 | }
59 |
60 | /**
61 | * Convert file size to have unit string.
62 | *
63 | * @param int $bytes File size.
64 | *
65 | * @return string Converted file size with unit.
66 | */
67 | function formatSizeUnits($bytes)
68 | {
69 | if ($bytes >= 1073741824) {
70 | $bytes = number_format($bytes / 1073741824, 2).' GB';
71 | } elseif ($bytes >= 1048576) {
72 | $bytes = number_format($bytes / 1048576, 2).' MB';
73 | } elseif ($bytes >= 1024) {
74 | $bytes = number_format($bytes / 1024, 2).' KB';
75 | } elseif ($bytes > 1) {
76 | $bytes = $bytes.' bytes';
77 | } elseif ($bytes == 1) {
78 | $bytes = $bytes.' byte';
79 | } else {
80 | $bytes = '0 bytes';
81 | }
82 |
83 | return $bytes;
84 | }
85 |
--------------------------------------------------------------------------------
/app/Http/Controllers/Auth/ChangePasswordController.php:
--------------------------------------------------------------------------------
1 | middleware('auth');
18 | }
19 |
20 | public function show()
21 | {
22 | return view('auth.passwords.change');
23 | }
24 |
25 | protected function update(Request $request)
26 | {
27 | $input = $request->validate([
28 | 'old_password' => 'required',
29 | 'password' => 'required|between:6,15|confirmed',
30 | 'password_confirmation' => 'required',
31 | ], [
32 | 'old_password.required' => 'Password lama harus diisi.',
33 | 'password.required' => 'Password baru harus diisi.',
34 | 'password.between' => 'Password baru harus antara 6 - 15 karakter.',
35 | 'password.confirmed' => 'Konfirmasi password baru tidak sesuai.',
36 | 'password_confirmation.required' => 'Konfirmasi password baru harus diisi.',
37 | ]);
38 |
39 | if (app('hash')->check($input['old_password'], auth()->user()->password)) {
40 | $user = auth()->user();
41 | $user->password = bcrypt($input['password']);
42 | $user->save();
43 |
44 | flash(trans('auth.password_changed'), 'success');
45 |
46 | return back();
47 | }
48 |
49 | flash(trans('auth.old_password_failed'), 'error');
50 |
51 | return back();
52 | }
53 | }
54 |
--------------------------------------------------------------------------------
/app/Http/Controllers/Auth/ForgotPasswordController.php:
--------------------------------------------------------------------------------
1 | middleware('guest');
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/app/Http/Controllers/Auth/LoginController.php:
--------------------------------------------------------------------------------
1 | middleware('guest')->except('logout');
39 | }
40 |
41 | /**
42 | * The user has been authenticated.
43 | *
44 | * @param \Illuminate\Http\Request $request
45 | * @param mixed $user
46 | * @return mixed
47 | */
48 | protected function authenticated(Request $request, $user)
49 | {
50 | if ($user->is_active == 0) {
51 | $this->guard()->logout();
52 | $request->session()->flush();
53 | $request->session()->regenerate();
54 |
55 | flash(trans('auth.user_inactive'), 'error');
56 |
57 | return redirect()->route('login');
58 | }
59 |
60 | flash(trans('auth.welcome', ['name' => $user->name]));
61 | }
62 | }
63 |
--------------------------------------------------------------------------------
/app/Http/Controllers/Auth/RegisterController.php:
--------------------------------------------------------------------------------
1 | middleware('guest');
40 | }
41 |
42 | /**
43 | * Get a validator for an incoming registration request.
44 | *
45 | * @param array $data
46 | * @return \Illuminate\Contracts\Validation\Validator
47 | */
48 | protected function validator(array $data)
49 | {
50 | return Validator::make($data, [
51 | 'name' => 'required|string|max:255',
52 | 'email' => 'required|string|email|max:255|unique:users',
53 | 'password' => 'required|string|min:6|confirmed',
54 | ]);
55 | }
56 |
57 | /**
58 | * Create a new user instance after a valid registration.
59 | *
60 | * @param array $data
61 | * @return \App\User
62 | */
63 | protected function create(array $data)
64 | {
65 | return User::create([
66 | 'name' => $data['name'],
67 | 'email' => $data['email'],
68 | 'password' => bcrypt($data['password']),
69 | ]);
70 | }
71 | }
72 |
--------------------------------------------------------------------------------
/app/Http/Controllers/Auth/ResetPasswordController.php:
--------------------------------------------------------------------------------
1 | middleware('guest');
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/app/Http/Controllers/Controller.php:
--------------------------------------------------------------------------------
1 | user()->groups;
17 | $membershipIds = [];
18 | foreach ($groups as $group) {
19 | $membershipIds[$group->id] = $group->pivot->id;
20 | }
21 | $outstandingPayments = $this->getUserOutstandingPayments(auth()->user());
22 |
23 | return view('home', compact('groups', 'membershipIds', 'outstandingPayments'));
24 | }
25 |
26 | public function getUserOutstandingPayments(User $user)
27 | {
28 | $userGroups = $user->groups->load('meetings.payments');
29 | $meetings = $userGroups->pluck('meetings')->flatten()->sortBy('number');
30 |
31 | return $meetings;
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/app/Http/Controllers/Groups/MeetingsController.php:
--------------------------------------------------------------------------------
1 | meetings;
15 | $number = (int) request('number');
16 | $acceptableNumber = $this->getAcceptableGroupMeetingNumber($group, $number);
17 |
18 | return view('groups.meetings', compact('group', 'meetings', 'acceptableNumber'));
19 | }
20 |
21 | public function store(Request $request, Group $group)
22 | {
23 | $this->authorize('update', $group);
24 |
25 | $newMeeting = $request->validate([
26 | 'number' => 'required|numeric|max:'.$group->members()->count(),
27 | 'date' => 'required|date|date_format:Y-m-d',
28 | 'place' => 'nullable|string|max:255',
29 | 'notes' => 'nullable|string|max:255',
30 | ]);
31 | $newMeeting['group_id'] = $group->id;
32 | $newMeeting['creator_id'] = auth()->id();
33 |
34 | Meeting::create($newMeeting);
35 |
36 | flash(__('meeting.created', [
37 | 'number' => $newMeeting['number'],
38 | 'date' => $newMeeting['date'],
39 | 'place' => $newMeeting['place'],
40 | ]), 'success');
41 |
42 | return redirect()->route('groups.meetings.index', $group);
43 | }
44 |
45 | private function getAcceptableGroupMeetingNumber(Group $group, $number)
46 | {
47 | $groupMembersCount = $group->members()->count();
48 | $existingMeetingNumbers = $group->meetings->pluck('number')->all();
49 |
50 | if ($number && $number <= $groupMembersCount && !in_array($number, $existingMeetingNumbers)) {
51 | return $number;
52 | }
53 | }
54 | }
55 |
--------------------------------------------------------------------------------
/app/Http/Controllers/Groups/MembersController.php:
--------------------------------------------------------------------------------
1 | meetings;
15 |
16 | return view('groups.members', compact('group', 'meetings'));
17 | }
18 |
19 | public function store(Request $request, Group $group)
20 | {
21 | $userData = $request->validate([
22 | 'email' => 'required|email',
23 | ]);
24 |
25 | $user = User::firstOrNew(['email' => $userData['email']]);
26 |
27 | if (!$user->exists) {
28 | $newUserName = explode('@', $userData['email']);
29 | $user->name = $newUserName[0];
30 | $user->password = '$2y$10$TKh8H1.PfQx37YgCzwiKb.KjNyWgaHb9cbcoQgdIVFlYg7B77UdFm';
31 | $user->save();
32 | }
33 |
34 | if ($group->addMember($user) == false) {
35 | flash(__('group.member_add_failed'), 'error');
36 | } else {
37 | flash(__('group.member_added', ['name' => $user->name]), 'success');
38 | }
39 |
40 | return back();
41 | }
42 |
43 | public function destroy(Request $request, Group $group, User $member)
44 | {
45 | $request->validate([
46 | 'group_member_id' => 'required|numeric|exists:group_members,id',
47 | ]);
48 | $group->removeMember($request->get('group_member_id'));
49 |
50 | flash(__('group.member_removed', ['name' => $member->name]), 'warning');
51 |
52 | return back();
53 | }
54 | }
55 |
--------------------------------------------------------------------------------
/app/Http/Controllers/Groups/PaymentsController.php:
--------------------------------------------------------------------------------
1 | members;
13 | $meetings = $group->meetings()->whereNotNull('winner_id')->orderBy('number')->get();
14 |
15 | return view('groups.outstanding-payments', compact('group', 'members', 'meetings'));
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/app/Http/Controllers/GroupsController.php:
--------------------------------------------------------------------------------
1 | where('name', 'like', '%'.request('q').'%');
19 | })
20 | ->where('creator_id', auth()->id())
21 | ->withCount('members')
22 | ->paginate();
23 |
24 | return view('groups.index', compact('groups'));
25 | }
26 |
27 | /**
28 | * Show the form for creating a new group.
29 | *
30 | * @return \Illuminate\Http\Response
31 | */
32 | public function create()
33 | {
34 | $this->authorize('create', new Group);
35 |
36 | return view('groups.create');
37 | }
38 |
39 | /**
40 | * Store a newly created group in storage.
41 | *
42 | * @param \Illuminate\Http\Request $request
43 | * @return \Illuminate\Http\Response
44 | */
45 | public function store(Request $request)
46 | {
47 | $this->authorize('create', new Group);
48 |
49 | $newGroup = $request->validate([
50 | 'name' => 'required|max:60',
51 | 'capacity' => 'required|numeric',
52 | 'currency' => 'required|string',
53 | 'payment_amount' => 'required|numeric',
54 | 'description' => 'nullable|max:255',
55 | ]);
56 | $newGroup['creator_id'] = auth()->id();
57 |
58 | $group = Group::create($newGroup);
59 |
60 | return redirect()->route('groups.show', $group);
61 | }
62 |
63 | /**
64 | * Display the specified group.
65 | *
66 | * @param \App\Group $group
67 | * @return \Illuminate\Http\Response
68 | */
69 | public function show(Group $group)
70 | {
71 | $this->authorize('view', $group);
72 |
73 | return view('groups.show', compact('group'));
74 | }
75 |
76 | /**
77 | * Show the form for editing the specified group.
78 | *
79 | * @param \App\Group $group
80 | * @return \Illuminate\Http\Response
81 | */
82 | public function edit(Group $group)
83 | {
84 | $this->authorize('update', $group);
85 |
86 | return view('groups.edit', compact('group'));
87 | }
88 |
89 | /**
90 | * Update the specified group in storage.
91 | *
92 | * @param \Illuminate\Http\Request $request
93 | * @param \App\Group $group
94 | * @return \Illuminate\Http\Response
95 | */
96 | public function update(Request $request, Group $group)
97 | {
98 | $this->authorize('update', $group);
99 |
100 | $groupData = $request->validate([
101 | 'name' => 'required|max:60',
102 | 'capacity' => 'required|numeric',
103 | 'currency' => 'required|string',
104 | 'payment_amount' => 'required|numeric',
105 | 'start_date' => 'nullable|date|date_format:Y-m-d',
106 | 'end_date' => 'nullable|date|date_format:Y-m-d',
107 | 'description' => 'nullable|max:255',
108 | ]);
109 |
110 | $group->update($groupData);
111 |
112 | return redirect()->route('groups.show', $group);
113 | }
114 |
115 | /**
116 | * Remove the specified group from storage.
117 | *
118 | * @param \App\Group $group
119 | * @return \Illuminate\Http\Response
120 | */
121 | public function destroy(Group $group)
122 | {
123 | $this->authorize('delete', $group);
124 |
125 | $this->validate(request(), [
126 | 'group_id' => 'required',
127 | ]);
128 |
129 | $routeParam = request()->only('page', 'q');
130 |
131 | if (request('group_id') == $group->id && $group->delete()) {
132 | return redirect()->route('groups.index', $routeParam);
133 | }
134 |
135 | return back();
136 | }
137 |
138 | public function setStartDate(Request $request, Group $group)
139 | {
140 | $this->authorize('update', $group);
141 | $request->validate(['start_date' => 'required|date|date_format:Y-m-d']);
142 |
143 | $group->start_date = $request->get('start_date');
144 | $group->save();
145 |
146 | flash(trans('group.started'), 'success');
147 |
148 | return back();
149 | }
150 |
151 | public function setEndDate(Request $request, Group $group)
152 | {
153 | $this->authorize('update', $group);
154 | $request->validate(['end_date' => 'required|date|date_format:Y-m-d']);
155 |
156 | $group->end_date = $request->get('end_date');
157 | $group->save();
158 |
159 | flash(trans('group.ended'), 'success');
160 |
161 | return back();
162 | }
163 | }
164 |
--------------------------------------------------------------------------------
/app/Http/Controllers/MeetingsController.php:
--------------------------------------------------------------------------------
1 | group;
16 | $members = $group->members;
17 | $payments = $meeting->payments;
18 | $winnerCadidateList = $this->getWinnerCandidates($meeting, $members);
19 |
20 | return view('meetings.show', compact('meeting', 'group', 'members', 'payments', 'winnerCadidateList'));
21 | }
22 |
23 | private function getWinnerCandidates(Meeting $meeting, Collection $members)
24 | {
25 | $winnerCandidateList = [];
26 |
27 | $winnerMemberIds = Meeting::where('id', '!=', $meeting->id)->pluck('winner_id')->all();
28 |
29 | foreach ($members as $member) {
30 | $memberId = $member->pivot->id;
31 |
32 | if (in_array($memberId, $winnerMemberIds) == false) {
33 | $winnerCandidateList[$memberId] = $member->name;
34 | }
35 | }
36 |
37 | return $winnerCandidateList;
38 | }
39 |
40 | public function update(Request $request, Meeting $meeting)
41 | {
42 | $this->authorize('update', $meeting->group);
43 |
44 | $meetingData = $request->validate([
45 | 'date' => 'required|date|date_format:Y-m-d',
46 | 'place' => 'nullable|string|max:255',
47 | 'notes' => 'nullable|string|max:255',
48 | ]);
49 |
50 | $meeting->update($meetingData);
51 |
52 | flash(__('meeting.updated', [
53 | 'number' => $meeting->number,
54 | 'date' => $meetingData['date'],
55 | 'place' => $meetingData['place'],
56 | ]), 'success');
57 |
58 | return redirect()->route('meetings.show', $meeting);
59 | }
60 |
61 | public function paymentEntry(Request $request, Meeting $meeting)
62 | {
63 | $this->authorize('update', $meeting->group);
64 |
65 | $paymentData = $request->validate([
66 | 'membership_id' => 'required|numeric|exists:group_members,id',
67 | 'amount' => 'required|numeric',
68 | 'date' => 'required|date|date_format:Y-m-d',
69 | 'payment_receiver_id' => 'required|numeric|exists:users,id',
70 | ]);
71 |
72 | $payment = Payment::firstOrNew([
73 | 'membership_id' => $paymentData['membership_id'],
74 | 'meeting_id' => $meeting->id,
75 | ]);
76 |
77 | $payment->amount = $paymentData['amount'];
78 | $payment->date = $paymentData['date'];
79 | $payment->payment_receiver_id = $paymentData['payment_receiver_id'];
80 | $payment->creator_id = auth()->id();
81 | $payment->save();
82 |
83 | flash(__('payment.updated'), 'success');
84 |
85 | return back();
86 | }
87 |
88 | public function setWinner(Request $request, Meeting $meeting)
89 | {
90 | $winnerData = $request->validate(['winner_id' => 'required|numeric|exists:group_members,id']);
91 |
92 | $meeting->winner_id = $winnerData['winner_id'];
93 | $meeting->save();
94 |
95 | $userId = \DB::table('group_members')->where('id', $winnerData['winner_id'])->first()->user_id;
96 | $user = User::find($userId);
97 |
98 | flash(__('meeting.winner_set', ['name' => $user->name]), 'success');
99 |
100 | return redirect()->route('meetings.show', $meeting);
101 | }
102 | }
103 |
--------------------------------------------------------------------------------
/app/Http/Kernel.php:
--------------------------------------------------------------------------------
1 | [
31 | \App\Http\Middleware\EncryptCookies::class,
32 | \Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
33 | \Illuminate\Session\Middleware\StartSession::class,
34 | // \Illuminate\Session\Middleware\AuthenticateSession::class,
35 | \Illuminate\View\Middleware\ShareErrorsFromSession::class,
36 | \App\Http\Middleware\VerifyCsrfToken::class,
37 | \Illuminate\Routing\Middleware\SubstituteBindings::class,
38 | ],
39 |
40 | 'api' => [
41 | 'throttle:60,1',
42 | 'bindings',
43 | ],
44 | ];
45 |
46 | /**
47 | * The application's route middleware.
48 | *
49 | * These middleware may be assigned to groups or used individually.
50 | *
51 | * @var array
52 | */
53 | protected $routeMiddleware = [
54 | 'auth' => \Illuminate\Auth\Middleware\Authenticate::class,
55 | 'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class,
56 | 'bindings' => \Illuminate\Routing\Middleware\SubstituteBindings::class,
57 | 'can' => \Illuminate\Auth\Middleware\Authorize::class,
58 | 'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class,
59 | 'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class,
60 | ];
61 | }
62 |
--------------------------------------------------------------------------------
/app/Http/Middleware/EncryptCookies.php:
--------------------------------------------------------------------------------
1 | check()) {
21 | return redirect('/home');
22 | }
23 |
24 | return $next($request);
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/app/Http/Middleware/TrimStrings.php:
--------------------------------------------------------------------------------
1 | 'FORWARDED',
24 | Request::HEADER_X_FORWARDED_FOR => 'X_FORWARDED_FOR',
25 | Request::HEADER_X_FORWARDED_HOST => 'X_FORWARDED_HOST',
26 | Request::HEADER_X_FORWARDED_PORT => 'X_FORWARDED_PORT',
27 | Request::HEADER_X_FORWARDED_PROTO => 'X_FORWARDED_PROTO',
28 | ];
29 | }
30 |
--------------------------------------------------------------------------------
/app/Http/Middleware/VerifyCsrfToken.php:
--------------------------------------------------------------------------------
1 | belongsTo(Group::class);
18 | }
19 |
20 | public function creator()
21 | {
22 | return $this->belongsTo(User::class);
23 | }
24 |
25 | public function winner()
26 | {
27 | return $this->belongsTo(Membership::class)->withDefault(['user' => '-']);
28 | }
29 |
30 | public function payments()
31 | {
32 | return $this->hasMany(Payment::class);
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/app/Membership.php:
--------------------------------------------------------------------------------
1 | belongsTo(User::class);
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/app/Payment.php:
--------------------------------------------------------------------------------
1 | creator_id == $user->id || $group->members->contains($user->id);
24 | }
25 |
26 | /**
27 | * Determine whether the user can create projects.
28 | *
29 | * @param \App\User $user
30 | * @param \App\Group $group
31 | * @return mixed
32 | */
33 | public function create(User $user, Group $group)
34 | {
35 | // Update $user authorization to create $group here.
36 | return true;
37 | }
38 |
39 | /**
40 | * Determine whether the user can update the project.
41 | *
42 | * @param \App\User $user
43 | * @param \App\Group $group
44 | * @return mixed
45 | */
46 | public function update(User $user, Group $group)
47 | {
48 | // Update $user authorization to update $group here.
49 | return $user->id == $group->creator_id;
50 | }
51 |
52 | /**
53 | * Determine whether the user can delete the project.
54 | *
55 | * @param \App\User $user
56 | * @param \App\Group $group
57 | * @return mixed
58 | */
59 | public function delete(User $user, Group $group)
60 | {
61 | // Update $user authorization to delete $group here.
62 | return $user->id == $group->creator_id;
63 | }
64 | }
65 |
--------------------------------------------------------------------------------
/app/Providers/AppServiceProvider.php:
--------------------------------------------------------------------------------
1 | 'App\Policies\GroupPolicy',
16 | 'App\Model' => 'App\Policies\ModelPolicy',
17 | ];
18 |
19 | /**
20 | * Register any authentication / authorization services.
21 | *
22 | * @return void
23 | */
24 | public function boot()
25 | {
26 | $this->registerPolicies();
27 |
28 | //
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/app/Providers/BroadcastServiceProvider.php:
--------------------------------------------------------------------------------
1 | [
17 | 'App\Listeners\EventListener',
18 | ],
19 | ];
20 |
21 | /**
22 | * Register any events for your application.
23 | *
24 | * @return void
25 | */
26 | public function boot()
27 | {
28 | parent::boot();
29 |
30 | //
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/app/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 |
--------------------------------------------------------------------------------
/app/User.php:
--------------------------------------------------------------------------------
1 | belongsToMany(Group::class, 'group_members')->withPivot(['id']);
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/bootstrap/cache/.gitignore:
--------------------------------------------------------------------------------
1 | *
2 | !.gitignore
3 |
--------------------------------------------------------------------------------
/composer.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "laravel/laravel",
3 | "description": "The Laravel Framework.",
4 | "keywords": ["framework", "laravel"],
5 | "license": "MIT",
6 | "type": "project",
7 | "require": {
8 | "php": "^7.2",
9 | "fideloper/proxy": "~3.3",
10 | "laravel/framework": "5.5.*",
11 | "laravel/tinker": "~1.0",
12 | "luthfi/formfield": "^0.2.7"
13 | },
14 | "require-dev": {
15 | "barryvdh/laravel-debugbar": "^3.1",
16 | "filp/whoops": "~2.0",
17 | "fzaninotto/faker": "~1.4",
18 | "luthfi/simple-crud-generator": "^1.1",
19 | "mockery/mockery": "~1.0",
20 | "phpunit/phpunit": "~6.0"
21 | },
22 | "autoload": {
23 | "classmap": [
24 | "database/seeds",
25 | "database/factories"
26 | ],
27 | "psr-4": {
28 | "App\\": "app/"
29 | }
30 | },
31 | "autoload-dev": {
32 | "psr-4": {
33 | "Tests\\": "tests/"
34 | }
35 | },
36 | "extra": {
37 | "laravel": {
38 | "dont-discover": [
39 | ]
40 | }
41 | },
42 | "scripts": {
43 | "post-root-package-install": [
44 | "@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
45 | ],
46 | "post-create-project-cmd": [
47 | "@php artisan key:generate"
48 | ],
49 | "post-autoload-dump": [
50 | "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
51 | "@php artisan package:discover"
52 | ]
53 | },
54 | "config": {
55 | "preferred-install": "dist",
56 | "sort-packages": true,
57 | "optimize-autoloader": true
58 | }
59 | }
60 |
--------------------------------------------------------------------------------
/config/auth.php:
--------------------------------------------------------------------------------
1 | [
17 | 'guard' => 'web',
18 | 'passwords' => 'users',
19 | ],
20 |
21 | /*
22 | |--------------------------------------------------------------------------
23 | | Authentication Guards
24 | |--------------------------------------------------------------------------
25 | |
26 | | Next, you may define every authentication guard for your application.
27 | | Of course, a great default configuration has been defined for you
28 | | here which uses session storage and the Eloquent user provider.
29 | |
30 | | All authentication drivers have a user provider. This defines how the
31 | | users are actually retrieved out of your database or other storage
32 | | mechanisms used by this application to persist your user's data.
33 | |
34 | | Supported: "session", "token"
35 | |
36 | */
37 |
38 | 'guards' => [
39 | 'web' => [
40 | 'driver' => 'session',
41 | 'provider' => 'users',
42 | ],
43 |
44 | 'api' => [
45 | 'driver' => 'token',
46 | 'provider' => 'users',
47 | ],
48 | ],
49 |
50 | /*
51 | |--------------------------------------------------------------------------
52 | | User Providers
53 | |--------------------------------------------------------------------------
54 | |
55 | | All authentication drivers have a user provider. This defines how the
56 | | users are actually retrieved out of your database or other storage
57 | | mechanisms used by this application to persist your user's data.
58 | |
59 | | If you have multiple user tables or models you may configure multiple
60 | | sources which represent each model / table. These sources may then
61 | | be assigned to any extra authentication guards you have defined.
62 | |
63 | | Supported: "database", "eloquent"
64 | |
65 | */
66 |
67 | 'providers' => [
68 | 'users' => [
69 | 'driver' => 'eloquent',
70 | 'model' => App\User::class,
71 | ],
72 |
73 | // 'users' => [
74 | // 'driver' => 'database',
75 | // 'table' => 'users',
76 | // ],
77 | ],
78 |
79 | /*
80 | |--------------------------------------------------------------------------
81 | | Resetting Passwords
82 | |--------------------------------------------------------------------------
83 | |
84 | | You may specify multiple password reset configurations if you have more
85 | | than one user table or model in the application and you want to have
86 | | separate password reset settings based on the specific user types.
87 | |
88 | | The expire time is the number of minutes that the reset token should be
89 | | considered valid. This security feature keeps tokens short-lived so
90 | | they have less time to be guessed. You may change this as needed.
91 | |
92 | */
93 |
94 | 'passwords' => [
95 | 'users' => [
96 | 'provider' => 'users',
97 | 'table' => 'password_resets',
98 | 'expire' => 60,
99 | ],
100 | ],
101 |
102 | ];
103 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/config/cache.php:
--------------------------------------------------------------------------------
1 | env('CACHE_DRIVER', 'file'),
19 |
20 | /*
21 | |--------------------------------------------------------------------------
22 | | Cache Stores
23 | |--------------------------------------------------------------------------
24 | |
25 | | Here you may define all of the cache "stores" for your application as
26 | | well as their drivers. You may even define multiple stores for the
27 | | same cache driver to group types of items stored in your caches.
28 | |
29 | */
30 |
31 | 'stores' => [
32 |
33 | 'apc' => [
34 | 'driver' => 'apc',
35 | ],
36 |
37 | 'array' => [
38 | 'driver' => 'array',
39 | ],
40 |
41 | 'database' => [
42 | 'driver' => 'database',
43 | 'table' => 'cache',
44 | 'connection' => null,
45 | ],
46 |
47 | 'file' => [
48 | 'driver' => 'file',
49 | 'path' => storage_path('framework/cache/data'),
50 | ],
51 |
52 | 'memcached' => [
53 | 'driver' => 'memcached',
54 | 'persistent_id' => env('MEMCACHED_PERSISTENT_ID'),
55 | 'sasl' => [
56 | env('MEMCACHED_USERNAME'),
57 | env('MEMCACHED_PASSWORD'),
58 | ],
59 | 'options' => [
60 | // Memcached::OPT_CONNECT_TIMEOUT => 2000,
61 | ],
62 | 'servers' => [
63 | [
64 | 'host' => env('MEMCACHED_HOST', '127.0.0.1'),
65 | 'port' => env('MEMCACHED_PORT', 11211),
66 | 'weight' => 100,
67 | ],
68 | ],
69 | ],
70 |
71 | 'redis' => [
72 | 'driver' => 'redis',
73 | 'connection' => 'default',
74 | ],
75 |
76 | ],
77 |
78 | /*
79 | |--------------------------------------------------------------------------
80 | | Cache Key Prefix
81 | |--------------------------------------------------------------------------
82 | |
83 | | When utilizing a RAM based store such as APC or Memcached, there might
84 | | be other applications utilizing the same cache. So, we'll specify a
85 | | value to get prefixed to all our keys so we can avoid collisions.
86 | |
87 | */
88 |
89 | 'prefix' => env(
90 | 'CACHE_PREFIX',
91 | str_slug(env('APP_NAME', 'laravel'), '_').'_cache'
92 | ),
93 |
94 | ];
95 |
--------------------------------------------------------------------------------
/config/database.php:
--------------------------------------------------------------------------------
1 | env('DB_CONNECTION', 'mysql'),
17 |
18 | /*
19 | |--------------------------------------------------------------------------
20 | | Database Connections
21 | |--------------------------------------------------------------------------
22 | |
23 | | Here are each of the database connections setup for your application.
24 | | Of course, examples of configuring each database platform that is
25 | | supported by Laravel is shown below to make development simple.
26 | |
27 | |
28 | | All database work in Laravel is done through the PHP PDO facilities
29 | | so make sure you have the driver for your particular database of
30 | | choice installed on your machine before you begin development.
31 | |
32 | */
33 |
34 | 'connections' => [
35 |
36 | 'sqlite' => [
37 | 'driver' => 'sqlite',
38 | 'database' => env('DB_DATABASE', database_path('database.sqlite')),
39 | 'prefix' => '',
40 | ],
41 |
42 | 'mysql' => [
43 | 'driver' => 'mysql',
44 | 'host' => env('DB_HOST', '127.0.0.1'),
45 | 'port' => env('DB_PORT', '3306'),
46 | 'database' => env('DB_DATABASE', 'forge'),
47 | 'username' => env('DB_USERNAME', 'forge'),
48 | 'password' => env('DB_PASSWORD', ''),
49 | 'unix_socket' => env('DB_SOCKET', ''),
50 | 'charset' => 'utf8mb4',
51 | 'collation' => 'utf8mb4_unicode_ci',
52 | 'prefix' => '',
53 | 'strict' => true,
54 | 'engine' => null,
55 | ],
56 |
57 | 'pgsql' => [
58 | 'driver' => 'pgsql',
59 | 'host' => env('DB_HOST', '127.0.0.1'),
60 | 'port' => env('DB_PORT', '5432'),
61 | 'database' => env('DB_DATABASE', 'forge'),
62 | 'username' => env('DB_USERNAME', 'forge'),
63 | 'password' => env('DB_PASSWORD', ''),
64 | 'charset' => 'utf8',
65 | 'prefix' => '',
66 | 'schema' => 'public',
67 | 'sslmode' => 'prefer',
68 | ],
69 |
70 | 'sqlsrv' => [
71 | 'driver' => 'sqlsrv',
72 | 'host' => env('DB_HOST', 'localhost'),
73 | 'port' => env('DB_PORT', '1433'),
74 | 'database' => env('DB_DATABASE', 'forge'),
75 | 'username' => env('DB_USERNAME', 'forge'),
76 | 'password' => env('DB_PASSWORD', ''),
77 | 'charset' => 'utf8',
78 | 'prefix' => '',
79 | ],
80 |
81 | ],
82 |
83 | /*
84 | |--------------------------------------------------------------------------
85 | | Migration Repository Table
86 | |--------------------------------------------------------------------------
87 | |
88 | | This table keeps track of all the migrations that have already run for
89 | | your application. Using this information, we can determine which of
90 | | the migrations on disk haven't actually been run in the database.
91 | |
92 | */
93 |
94 | 'migrations' => 'migrations',
95 |
96 | /*
97 | |--------------------------------------------------------------------------
98 | | Redis Databases
99 | |--------------------------------------------------------------------------
100 | |
101 | | Redis is an open source, fast, and advanced key-value store that also
102 | | provides a richer set of commands than a typical key-value systems
103 | | such as APC or Memcached. Laravel makes it easy to dig right in.
104 | |
105 | */
106 |
107 | 'redis' => [
108 |
109 | 'client' => 'predis',
110 |
111 | 'default' => [
112 | 'host' => env('REDIS_HOST', '127.0.0.1'),
113 | 'password' => env('REDIS_PASSWORD', null),
114 | 'port' => env('REDIS_PORT', 6379),
115 | 'database' => 0,
116 | ],
117 |
118 | ],
119 |
120 | ];
121 |
--------------------------------------------------------------------------------
/config/filesystems.php:
--------------------------------------------------------------------------------
1 | env('FILESYSTEM_DRIVER', 'local'),
17 |
18 | /*
19 | |--------------------------------------------------------------------------
20 | | Default Cloud Filesystem Disk
21 | |--------------------------------------------------------------------------
22 | |
23 | | Many applications store files both locally and in the cloud. For this
24 | | reason, you may specify a default "cloud" driver here. This driver
25 | | will be bound as the Cloud disk implementation in the container.
26 | |
27 | */
28 |
29 | 'cloud' => env('FILESYSTEM_CLOUD', 's3'),
30 |
31 | /*
32 | |--------------------------------------------------------------------------
33 | | Filesystem Disks
34 | |--------------------------------------------------------------------------
35 | |
36 | | Here you may configure as many filesystem "disks" as you wish, and you
37 | | may even configure multiple disks of the same driver. Defaults have
38 | | been setup for each driver as an example of the required options.
39 | |
40 | | Supported Drivers: "local", "ftp", "s3", "rackspace"
41 | |
42 | */
43 |
44 | 'disks' => [
45 |
46 | 'local' => [
47 | 'driver' => 'local',
48 | 'root' => storage_path('app'),
49 | ],
50 |
51 | 'public' => [
52 | 'driver' => 'local',
53 | 'root' => storage_path('app/public'),
54 | 'url' => env('APP_URL').'/storage',
55 | 'visibility' => 'public',
56 | ],
57 |
58 | 's3' => [
59 | 'driver' => 's3',
60 | 'key' => env('AWS_ACCESS_KEY_ID'),
61 | 'secret' => env('AWS_SECRET_ACCESS_KEY'),
62 | 'region' => env('AWS_DEFAULT_REGION'),
63 | 'bucket' => env('AWS_BUCKET'),
64 | ],
65 |
66 | ],
67 |
68 | ];
69 |
--------------------------------------------------------------------------------
/config/mail.php:
--------------------------------------------------------------------------------
1 | env('MAIL_DRIVER', 'smtp'),
20 |
21 | /*
22 | |--------------------------------------------------------------------------
23 | | SMTP Host Address
24 | |--------------------------------------------------------------------------
25 | |
26 | | Here you may provide the host address of the SMTP server used by your
27 | | applications. A default option is provided that is compatible with
28 | | the Mailgun mail service which will provide reliable deliveries.
29 | |
30 | */
31 |
32 | 'host' => env('MAIL_HOST', 'smtp.mailgun.org'),
33 |
34 | /*
35 | |--------------------------------------------------------------------------
36 | | SMTP Host Port
37 | |--------------------------------------------------------------------------
38 | |
39 | | This is the SMTP port used by your application to deliver e-mails to
40 | | users of the application. Like the host we have set this value to
41 | | stay compatible with the Mailgun e-mail application by default.
42 | |
43 | */
44 |
45 | 'port' => env('MAIL_PORT', 587),
46 |
47 | /*
48 | |--------------------------------------------------------------------------
49 | | Global "From" Address
50 | |--------------------------------------------------------------------------
51 | |
52 | | You may wish for all e-mails sent by your application to be sent from
53 | | the same address. Here, you may specify a name and address that is
54 | | used globally for all e-mails that are sent by your application.
55 | |
56 | */
57 |
58 | 'from' => [
59 | 'address' => env('MAIL_FROM_ADDRESS', 'hello@example.com'),
60 | 'name' => env('MAIL_FROM_NAME', 'Example'),
61 | ],
62 |
63 | /*
64 | |--------------------------------------------------------------------------
65 | | E-Mail Encryption Protocol
66 | |--------------------------------------------------------------------------
67 | |
68 | | Here you may specify the encryption protocol that should be used when
69 | | the application send e-mail messages. A sensible default using the
70 | | transport layer security protocol should provide great security.
71 | |
72 | */
73 |
74 | 'encryption' => env('MAIL_ENCRYPTION', 'tls'),
75 |
76 | /*
77 | |--------------------------------------------------------------------------
78 | | SMTP Server Username
79 | |--------------------------------------------------------------------------
80 | |
81 | | If your SMTP server requires a username for authentication, you should
82 | | set it here. This will get used to authenticate with your server on
83 | | connection. You may also set the "password" value below this one.
84 | |
85 | */
86 |
87 | 'username' => env('MAIL_USERNAME'),
88 |
89 | 'password' => env('MAIL_PASSWORD'),
90 |
91 | /*
92 | |--------------------------------------------------------------------------
93 | | Sendmail System Path
94 | |--------------------------------------------------------------------------
95 | |
96 | | When using the "sendmail" driver to send e-mails, we will need to know
97 | | the path to where Sendmail lives on this server. A default path has
98 | | been provided here, which will work well on most of your systems.
99 | |
100 | */
101 |
102 | 'sendmail' => '/usr/sbin/sendmail -bs',
103 |
104 | /*
105 | |--------------------------------------------------------------------------
106 | | Markdown Mail Settings
107 | |--------------------------------------------------------------------------
108 | |
109 | | If you are using Markdown based email rendering, you may configure your
110 | | theme and component paths here, allowing you to customize the design
111 | | of the emails. Or, you may simply stick with the Laravel defaults!
112 | |
113 | */
114 |
115 | 'markdown' => [
116 | 'theme' => 'default',
117 |
118 | 'paths' => [
119 | resource_path('views/vendor/mail'),
120 | ],
121 | ],
122 |
123 | ];
124 |
--------------------------------------------------------------------------------
/config/queue.php:
--------------------------------------------------------------------------------
1 | env('QUEUE_DRIVER', 'sync'),
19 |
20 | /*
21 | |--------------------------------------------------------------------------
22 | | Queue Connections
23 | |--------------------------------------------------------------------------
24 | |
25 | | Here you may configure the connection information for each server that
26 | | is used by your application. A default configuration has been added
27 | | for each back-end shipped with Laravel. You are free to add more.
28 | |
29 | */
30 |
31 | 'connections' => [
32 |
33 | 'sync' => [
34 | 'driver' => 'sync',
35 | ],
36 |
37 | 'database' => [
38 | 'driver' => 'database',
39 | 'table' => 'jobs',
40 | 'queue' => 'default',
41 | 'retry_after' => 90,
42 | ],
43 |
44 | 'beanstalkd' => [
45 | 'driver' => 'beanstalkd',
46 | 'host' => 'localhost',
47 | 'queue' => 'default',
48 | 'retry_after' => 90,
49 | ],
50 |
51 | 'sqs' => [
52 | 'driver' => 'sqs',
53 | 'key' => env('SQS_KEY', 'your-public-key'),
54 | 'secret' => env('SQS_SECRET', 'your-secret-key'),
55 | 'prefix' => env('SQS_PREFIX', 'https://sqs.us-east-1.amazonaws.com/your-account-id'),
56 | 'queue' => env('SQS_QUEUE', 'your-queue-name'),
57 | 'region' => env('SQS_REGION', 'us-east-1'),
58 | ],
59 |
60 | 'redis' => [
61 | 'driver' => 'redis',
62 | 'connection' => 'default',
63 | 'queue' => 'default',
64 | 'retry_after' => 90,
65 | ],
66 |
67 | ],
68 |
69 | /*
70 | |--------------------------------------------------------------------------
71 | | Failed Queue Jobs
72 | |--------------------------------------------------------------------------
73 | |
74 | | These options configure the behavior of failed queue job logging so you
75 | | can control which database and table are used to store the jobs that
76 | | have failed. You may change them to any database / table you wish.
77 | |
78 | */
79 |
80 | 'failed' => [
81 | 'database' => env('DB_CONNECTION', 'mysql'),
82 | 'table' => 'failed_jobs',
83 | ],
84 |
85 | ];
86 |
--------------------------------------------------------------------------------
/config/services.php:
--------------------------------------------------------------------------------
1 | [
18 | 'domain' => env('MAILGUN_DOMAIN'),
19 | 'secret' => env('MAILGUN_SECRET'),
20 | ],
21 |
22 | 'ses' => [
23 | 'key' => env('SES_KEY'),
24 | 'secret' => env('SES_SECRET'),
25 | 'region' => 'us-east-1',
26 | ],
27 |
28 | 'sparkpost' => [
29 | 'secret' => env('SPARKPOST_SECRET'),
30 | ],
31 |
32 | 'stripe' => [
33 | 'model' => App\User::class,
34 | 'key' => env('STRIPE_KEY'),
35 | 'secret' => env('STRIPE_SECRET'),
36 | ],
37 |
38 | ];
39 |
--------------------------------------------------------------------------------
/config/simple-crud.php:
--------------------------------------------------------------------------------
1 | 'layouts.app',
15 |
16 | /*
17 | |--------------------------------------------------------------------------
18 | | Base Test Class Path
19 | |--------------------------------------------------------------------------
20 | |
21 | | Base TestCase Path on Laravel application
22 | |
23 | */
24 |
25 | 'base_test_path' => 'tests/TestCase.php',
26 |
27 | /*
28 | |--------------------------------------------------------------------------
29 | | Base Test Class
30 | |--------------------------------------------------------------------------
31 | |
32 | | Base Test Class that used on Laravel application
33 | | according to 'base_test_path' config above
34 | |
35 | */
36 |
37 | 'base_test_class' => 'Tests\TestCase',
38 |
39 | ];
40 |
--------------------------------------------------------------------------------
/config/view.php:
--------------------------------------------------------------------------------
1 | [
17 | resource_path('views'),
18 | ],
19 |
20 | /*
21 | |--------------------------------------------------------------------------
22 | | Compiled View Path
23 | |--------------------------------------------------------------------------
24 | |
25 | | This option determines where all the compiled Blade templates will be
26 | | stored for your application. Typically, this is within the storage
27 | | directory. However, as usual, you are free to change this value.
28 | |
29 | */
30 |
31 | 'compiled' => realpath(storage_path('framework/views')),
32 |
33 | ];
34 |
--------------------------------------------------------------------------------
/database/.gitignore:
--------------------------------------------------------------------------------
1 | *.sqlite
2 |
--------------------------------------------------------------------------------
/database/factories/GroupFactory.php:
--------------------------------------------------------------------------------
1 | define(Group::class, function (Faker $faker) {
8 | return [
9 | 'name' => $faker->words(2, true),
10 | 'capacity' => 20,
11 | 'currency' => 'IDR',
12 | 'payment_amount' => 50000,
13 | 'description' => $faker->sentence,
14 | 'creator_id' => function () {
15 | return factory(User::class)->create()->id;
16 | },
17 | ];
18 | });
19 |
--------------------------------------------------------------------------------
/database/factories/MeetingFactory.php:
--------------------------------------------------------------------------------
1 | define(Meeting::class, function (Faker $faker) {
9 | return [
10 | 'group_id' => function () {
11 | return factory(Group::class)->create()->id;
12 | },
13 | 'number' => 1,
14 | 'date' => today(),
15 | 'place' => 'Inter Cafe',
16 | 'creator_id' => function () {
17 | return factory(User::class)->create()->id;
18 | },
19 | ];
20 | });
21 |
--------------------------------------------------------------------------------
/database/factories/PaymentFactory.php:
--------------------------------------------------------------------------------
1 | define(Payment::class, function (Faker $faker) {
9 | return [
10 | 'membership_id' => 1,
11 | 'meeting_id' => function () {
12 | return factory(Meeting::class)->create()->id;
13 | },
14 | 'amount' => 999,
15 | 'date' => today(),
16 | 'payment_receiver_id' => function () {
17 | return factory(User::class)->create()->id;
18 | },
19 | 'creator_id' => function () {
20 | return factory(User::class)->create()->id;
21 | },
22 | ];
23 | });
24 |
--------------------------------------------------------------------------------
/database/factories/UserFactory.php:
--------------------------------------------------------------------------------
1 | define(App\User::class, function (Faker $faker) {
17 | return [
18 | 'name' => $faker->name,
19 | 'email' => $faker->unique()->safeEmail,
20 | 'password' => '$2y$10$TKh8H1.PfQx37YgCzwiKb.KjNyWgaHb9cbcoQgdIVFlYg7B77UdFm', // secret
21 | 'remember_token' => str_random(10),
22 | ];
23 | });
24 |
--------------------------------------------------------------------------------
/database/migrations/2014_10_12_000000_create_users_table.php:
--------------------------------------------------------------------------------
1 | increments('id');
18 | $table->string('name');
19 | $table->string('email')->unique();
20 | $table->string('password');
21 | $table->boolean('is_active')->default(1);
22 | $table->rememberToken();
23 | $table->timestamps();
24 | });
25 | }
26 |
27 | /**
28 | * Reverse the migrations.
29 | *
30 | * @return void
31 | */
32 | public function down()
33 | {
34 | Schema::dropIfExists('users');
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/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/2018_04_26_195126_create_groups_table.php:
--------------------------------------------------------------------------------
1 | increments('id');
18 | $table->string('name', 60);
19 | $table->unsignedTinyInteger('capacity');
20 | $table->string('currency', 10);
21 | $table->unsignedInteger('payment_amount');
22 | $table->string('description')->nullable();
23 | $table->date('start_date')->nullable();
24 | $table->date('end_date')->nullable();
25 | $table->unsignedInteger('creator_id');
26 | $table->timestamps();
27 | });
28 | }
29 |
30 | /**
31 | * Reverse the migrations.
32 | *
33 | * @return void
34 | */
35 | public function down()
36 | {
37 | Schema::dropIfExists('groups');
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/database/migrations/2018_04_27_103238_create_group_members_table.php:
--------------------------------------------------------------------------------
1 | increments('id');
18 | $table->unsignedInteger('group_id');
19 | $table->unsignedInteger('user_id');
20 | $table->timestamps();
21 | });
22 | }
23 |
24 | /**
25 | * Reverse the migrations.
26 | *
27 | * @return void
28 | */
29 | public function down()
30 | {
31 | Schema::dropIfExists('group_members');
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/database/migrations/2018_04_29_171702_create_meetings_table.php:
--------------------------------------------------------------------------------
1 | increments('id');
18 | $table->unsignedInteger('group_id');
19 | $table->unsignedInteger('winner_id')->nullable();
20 | $table->unsignedTinyInteger('number');
21 | $table->date('date');
22 | $table->string('place')->nullable();
23 | $table->string('notes')->nullable();
24 | $table->unsignedInteger('creator_id');
25 | $table->timestamps();
26 | });
27 | }
28 |
29 | /**
30 | * Reverse the migrations.
31 | *
32 | * @return void
33 | */
34 | public function down()
35 | {
36 | Schema::dropIfExists('meetings');
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/database/migrations/2018_05_06_110520_create_payments_table.php:
--------------------------------------------------------------------------------
1 | increments('id');
18 | $table->unsignedInteger('membership_id');
19 | $table->unsignedInteger('meeting_id');
20 | $table->unsignedInteger('amount');
21 | $table->date('date');
22 | $table->unsignedInteger('payment_receiver_id');
23 | $table->unsignedInteger('creator_id');
24 | $table->timestamps();
25 | });
26 | }
27 |
28 | /**
29 | * Reverse the migrations.
30 | *
31 | * @return void
32 | */
33 | public function down()
34 | {
35 | Schema::dropIfExists('payments');
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/database/seeds/DatabaseSeeder.php:
--------------------------------------------------------------------------------
1 | call(UsersTableSeeder::class);
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "private": true,
3 | "scripts": {
4 | "dev": "npm run development",
5 | "development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
6 | "watch": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
7 | "watch-poll": "npm run watch -- --watch-poll",
8 | "hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js",
9 | "prod": "npm run production",
10 | "production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --no-progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js"
11 | },
12 | "devDependencies": {
13 | "axios": "^0.28",
14 | "bootstrap-sass": "^3.4.1",
15 | "cross-env": "^5.1",
16 | "jquery": "^3.5",
17 | "laravel-mix": "^2.0",
18 | "lodash": "^4.17.21"
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/phpunit.xml:
--------------------------------------------------------------------------------
1 |
2 | :password
',
52 | ];
53 |
--------------------------------------------------------------------------------
/resources/views/auth/login.blade.php:
--------------------------------------------------------------------------------
1 | @extends('layouts.app')
2 |
3 | @section('title', __('auth.login'))
4 |
5 | @section('content')
6 |
{{ $group->name }}
16 | 17 |{{ $group->members()->count() }}
18 | 19 |{{ $group->currency }}
20 | 21 |{{ $group->status }}
22 | 23 |{{ $group->description }}
24 | {!! $errors->first('group_id', ':message') !!} 25 |{{ trans('app.table_no') }} | 29 |{{ trans('group.name') }} | 30 |{{ trans('group.members') }} | 31 |{{ trans('group.payment_amount') }} | 32 |{{ trans('app.status') }} | 33 |{{ trans('group.creator') }} | 34 |{{ trans('app.action') }} | 35 |
---|---|---|---|---|---|---|
{{ $groups->firstItem() + $key }} | 41 |{{ $group->nameLink() }} | 42 |{{ $group->members_count }} | 43 |{{ $group->currency }} {{ formatNo($group->payment_amount) }} | 44 |{{ $group->status }} | 45 |{{ $group->creator->name }} | 46 |47 | @can('view', $group) 48 | {!! link_to_route( 49 | 'groups.show', 50 | trans('app.show'), 51 | [$group], 52 | ['class' => 'btn btn-default btn-xs', 'id' => 'show-group-' . $group->id] 53 | ) !!} 54 | @endcan 55 | | 56 |
{{ __('meeting.meeting') }} | 11 |{{ __('meeting.date') }} | 12 |{{ __('meeting.place') }} | 13 |{{ __('meeting.winner') }} | 14 |{{ __('meeting.payment') }} | 15 |{{ __('app.action') }} | 16 |
---|---|---|---|---|---|
{{ $meetingNumber }} | 26 |{{ $meeting->date }} | 27 |{{ $meeting->place }} | 28 |29 | | 30 | | 31 | {{ link_to_route( 32 | 'meetings.show', 33 | __('app.show'), 34 | [$meeting], 35 | ['id' => 'show-meeting-'.$meetingNumber] 36 | ) }} 37 | | 38 |
{{ $meetingNumber }} | 42 |43 | {{ link_to_route( 44 | 'groups.meetings.index', 45 | __('meeting.create', ['number' => $meetingNumber]), 46 | [$group, 'number' => $meetingNumber, 'action' => 'set-meeting'], 47 | ['id' => 'set-meeting-'.$meetingNumber] 48 | ) }} 49 | | 50 |51 | |
{{ __('app.table_no') }} | 11 |{{ __('user.name') }} | 12 |{{ __('meeting.win') }} | 13 |{{ __('app.action') }} | 14 |
---|---|---|---|
{{ 1 + $key }} | 24 |{{ $member->name }} | 25 |{{ $winningMeeting ? __('meeting.meeting').' '.$winningMeeting->number : '' }} | 26 |27 | @unless ($winningMeeting) 28 | {!! FormField::delete([ 29 | 'route' => ['groups.members.destroy', $group, $member], 30 | 'onsubmit' => __('group.remove_member_confirm', ['name' => $member->name]), 31 | 'class' => '', 32 | ], __('group.remove_member'), [ 33 | 'class' => 'btn btn-danger btn-xs', 34 | 'id' => 'remove-member-' . $member->pivot->id, 35 | 'title' => __('group.remove_member'), 36 | ], [ 37 | 'group_member_id' => $member->pivot->id 38 | ]) !!} 39 | @endunless 40 | | 41 |
{{ __('group.empty_member') }} |
{{ __('app.table_no') }} | 20 |{{ __('group.members') }} | 21 |{{ __('payment.unpaid') }} | 22 |{{ __('app.action') }} | 23 |
---|---|---|---|
{{ ++$no }} | 41 |{{ $member->name }} | 42 |43 | {{ formatNo($group->payment_amount) }} 44 | | 45 |46 | {{ link_to_route('meetings.show', __('payment.pay'), $meeting, ['class' => 'btn btn-default btn-xs']) }} 47 | | 48 |
{{ __('app.total') }} {{ __('payment.unpaid') }} | 58 |{{ $group->currency }} {{ formatNo($outstandingPaymentAmount) }} | 59 |60 | |
{{ trans('app.table_no') }} | 16 |{{ trans('group.name') }} | 17 |{{ trans('group.members') }} | 18 |{{ trans('group.payment_amount') }} | 19 |{{ trans('app.status') }} | 20 |
---|---|---|---|---|
{{ 1 + $key }} | 26 |{{ $group->nameLink() }} | 27 |{{ $group->members_count }} | 28 |{{ $group->currency }} {{ formatNo($group->payment_amount) }} | 29 |{{ $group->status }} | 30 |
{{ __('group.empty') }} |
{{ trans('app.table_no') }} | 47 |{{ trans('group.name') }} | 48 |{{ trans('meeting.number') }} | 49 |{{ trans('payment.payment') }} | 50 |{{ trans('app.status') }} | 51 |
---|---|---|---|---|
{{ __('user.no_outstanding_payment') }} | ||||
{{ ++$no }} | 72 |{{ $meeting->group->nameLink() }} | 73 |{{ link_to_route('meetings.show', $meeting->number, $meeting) }} | 74 |75 | {{ formatNo($paymentAmount = $meeting->group->payment_amount) }} 76 | | 77 |{{ __('payment.not_yet') }} | 78 |
{{ __('app.total') }} | 84 |{{ formatNo($outstandingPaymentsTotal) }} | 85 |86 | |
{{ __('group.name') }} | {{ $group->name }} |
{{ __('app.status') }} | {{ $group->status }} |
{{ __('group.capacity') }} | {{ $group->capacity }} |
{{ __('group.members') }} | {{ $group->members->count() }} |
{{ __('group.payment_amount') }} | 31 |{{ $group->currency }} {{ formatNo($group->payment_amount) }} | 32 |
{{ __('group.creator') }} | {{ $group->creator->name }} |
{{ __('group.description') }} | {{ $group->description }} |
Develop by Nafies Luthfi with Laravel 5.5.
95 |