diff --git a/app/Http/Controllers/UsersController.php b/app/Http/Controllers/UsersController.php index e5f7e1a..0f0f9e1 100644 --- a/app/Http/Controllers/UsersController.php +++ b/app/Http/Controllers/UsersController.php @@ -9,7 +9,7 @@ use Illuminate\Http\Request; class UsersController extends Controller { /** - * Display a listing of the resource. + * Search user by keyword. * * @return \Illuminate\Http\Response */ @@ -31,28 +31,7 @@ class UsersController extends Controller } /** - * Show the form for creating a new resource. - * - * @return \Illuminate\Http\Response - */ - public function create() - { - // - } - - /** - * Store a newly created resource in storage. - * - * @param \Illuminate\Http\Request $request - * @return \Illuminate\Http\Response - */ - public function store(Request $request) - { - // - } - - /** - * Display the specified resource. + * Display the specified User. * * @param \App\User $user * @return \Illuminate\Http\Response @@ -112,7 +91,7 @@ class UsersController extends Controller } /** - * Show the form for editing the specified resource. + * Show the form for editing the specified User. * * @param \App\User $user * @return \Illuminate\Http\Response @@ -125,7 +104,7 @@ class UsersController extends Controller } /** - * Update the specified resource in storage. + * Update the specified User in storage. * * @param \Illuminate\Http\Request $request * @param \App\User $user @@ -173,7 +152,7 @@ class UsersController extends Controller } /** - * Remove the specified resource from storage. + * Remove the specified User from storage. * * @param \App\User $user * @return \Illuminate\Http\Response diff --git a/readme.en.md b/readme.en.md new file mode 100644 index 0000000..151a7eb --- /dev/null +++ b/readme.en.md @@ -0,0 +1,92 @@ +![Laravel](https://laravel.com/assets/img/components/logo-laravel.svg) + +

Geanology Application

+ +[![Build Status](https://travis-ci.org/nafiesl/silsilah.svg?branch=master)](https://travis-ci.org/nafiesl/silsilah) + +>**Development in progress** + +## About +Geanology (Silsilah) application to record our family members. + +## Features +This application uses Bahasa Indonesia and English based on `config.locale`. + +### Logic Concept +1. A person can have one father +2. A person can have one mother +3. A person can have one parent (couple of mother and father) +4. A person can have 0 to many childrens +5. A person can have 0 to many spouses (husbands or wife) +6. A couple can have 0 to many childrens (based on parent_id) + +### Family Member Entry +1. Enter Name and Gender +2. Set Father +3. Set Mother +4. Add Spouse +5. Add Child + +### Person Attribute +1. Nickname +2. Gender +3. Fullname +4. Date of birht +5. Date of death (or at least year of death) +6. Address +7. Phone Number +8. Email + +### Couple Attribute (TODO) +1. Husband +2. Wife +3. Marriage Date +4. Divorce Date +5. Address + +## How to Install +1. Clone the repo : `git clone https://github.com/nafiesl/silsilah.git` +2. `cd silsilah` +3. `composer install` +4. `cp .env.example .env` +5. `php artisan key:generate` +6. Create **database on MySQL** +7. **Set database credentials** on `.env` file +8. `php artisan migrate` +9. `php artisan serve` +10. Done (Register as new user to start using the application). + +## Testing +This application built with testing (TDD) using in-memory sqlite database. +```bash +$ vendor/bin/phpunit +``` + +## Contributing +Feel free to submit Issue for bugs or sugestions and Pull Request. + +## Screenshots + +#### Family Tree +![Family Tree](public/images/02-pohon-keluarga.jpg "Family Tree") + +#### Family Chart +![Family Chart](public/images/03-bagan-keluarga.jpg "Family Chart") + +#### Search Family Member +![Search Family Member](public/images/01-cari-keluarga.jpg "Search Family Member") + +#### User Profile +![User Profile](public/images/04-profil.jpg "User Profile") + +#### Profile Form +![Profile Form](public/images/05-form-profil.jpg "Profile Form") + +#### Profil Edit Form +![Profil Edit Form](public/images/06-edit-profil.jpg "Profil Edit Form") + +#### Automated Testing +![Automated Testing](public/images/07-automated-testing.jpg "Automated Testing") + +## License +The Laravel framework is open-sourced software licensed under the [MIT license](LICENSE). \ No newline at end of file diff --git a/readme.md b/readme.md index 9367ed3..4b46566 100644 --- a/readme.md +++ b/readme.md @@ -9,20 +9,19 @@ ## Tentang Aplikasi silsilah keluarga untuk mempermudah pendataan keluarga kita. - ## Pemanfaatan 1. Melihat Silsilah keluarga 2. Melihat data ahli waris ## Fitur -### Logic +### Konsep 1. Satu orang memiliki satu ayah (belum sebagai tentu orang tua) 2. Satu orang memiliki satu ibu (belum sebagai tentu orang tua) 3. satu orang memiliki satu orang tua 4. Satu orang memiliki 0 s/d beberapa anak 5. Satu orang bisa memiliki pasangan (Istri/Suami) -6. Satu pasangan bisa memiliki 0 s/d bberapa anak +6. Satu pasangan bisa memiliki 0 s/d beberapa anak 7. Satu orang laki-laki bisa memiliki maksimal 4 pasangan yang tidak cerai (TODO) 8. Satu orang perempuan bisa memiliki maksimal 1 pasangan yang tidak cerai (TODO) 9. Satu orang perempuan yang suaminya meninggal otomatis set tanggal cerai (pada data pasangan) (TODO) @@ -31,7 +30,8 @@ Aplikasi silsilah keluarga untuk mempermudah pendataan keluarga kita. 1. Input Nama dan Jenis Kelamin 2. Tambah Ayah 3. Tambah Ibu -4. Tambah Anak +4. Tambah Pasangan +5. Tambah Anak ### Data Orang 1. Nama Panggilan diff --git a/resources/views/users/search.blade.php b/resources/views/users/search.blade.php index ef512de..e82d084 100644 --- a/resources/views/users/search.blade.php +++ b/resources/views/users/search.blade.php @@ -21,7 +21,7 @@ @if (request('q'))
-{!! str_replace('/?', '?', $users->appends(Request::except('page'))->render()) !!} +{{ $users->appends(Request::except('page'))->render() }} @foreach ($users->chunk(4) as $chunkedUser)
@foreach ($chunkedUser as $user) @@ -31,7 +31,7 @@
{{ trans('user.nickname') }} : {{ $user->nickname }}

-
{{ trans('user.fahter') }} : {{ $user->father_id ? $user->father->name : '' }}
+
{{ trans('user.father') }} : {{ $user->father_id ? $user->father->name : '' }}
{{ trans('user.mother') }} : {{ $user->mother_id ? $user->mother->name : '' }}
@endforeach -{!! str_replace('/?', '?', $users->appends(Request::except('page'))->render()) !!} +{{ $users->appends(Request::except('page'))->render() }} @endif @endsection