Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

118140062 - Leonard Rizta Anugerah Perdana, 118140077 - Muhammad Tyaz Gagaman, 118140190 - Nestiawan Ferdiyanto #62

Open
wants to merge 72 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
a2e4fbe
Installing Laravel on Lapor Project
leonardrizta Dec 1, 2020
57f0d6d
Migration and New branch
nestiawanfyans Dec 16, 2020
8223191
Fix error on database migration
leonardrizta Dec 16, 2020
92eafce
example layout for development
nestiawanfyans Dec 16, 2020
8ea559a
add master style navbar and footetr
nestiawanfyans Dec 16, 2020
8912af6
Add Database Seeder for City and Province
leonardrizta Dec 17, 2020
b5d4d9c
Add profile page
leonardrizta Dec 17, 2020
800fd0d
Adding viewLapor and viewComment to views
tyazgm Dec 18, 2020
5672353
add viewLapor and viewComment to routes and merge layout with master
leonardrizta Dec 18, 2020
f53eb39
Adding search at views & fixing the logo at viewLapor and viewComment
tyazgm Dec 18, 2020
4f4d8ec
fixing search
tyazgm Dec 18, 2020
25f7d4e
Layout list Lapor
nestiawanfyans Dec 19, 2020
513b088
Landing Page
nestiawanfyans Dec 19, 2020
e71de99
make default migration and seeder run all file
leonardrizta Dec 19, 2020
ca3c536
fixing view Comment and ViewLapor
nestiawanfyans Dec 19, 2020
5e60d70
Merge branch 'Development' of https://github.com/leonardrizta/-IF3028…
nestiawanfyans Dec 19, 2020
5f39a85
Add models
leonardrizta Dec 19, 2020
102dba4
update table name on model
leonardrizta Dec 19, 2020
7cd8253
query
tyazgm Dec 19, 2020
939d94b
Merge branch 'Development' of https://github.com/leonardrizta/-IF3028…
tyazgm Dec 19, 2020
215b8f2
update model relation
leonardrizta Dec 19, 2020
504ad44
Merge branch 'Development' of https://github.com/leonardrizta/-IF3028…
tyazgm Dec 19, 2020
68be64f
bug
tyazgm Dec 19, 2020
4fd8919
fix bug
tyazgm Dec 19, 2020
dba1568
login and register route - controller
nestiawanfyans Dec 19, 2020
b82bb92
Query LaporController and ProfileController
tyazgm Dec 19, 2020
44256b1
Merge branch 'Development' of https://github.com/leonardrizta/-IF3028…
tyazgm Dec 19, 2020
a1bdf74
update migration table and relation between table
leonardrizta Dec 19, 2020
97e4003
update URL
nestiawanfyans Dec 19, 2020
bb27d77
error pull test
nestiawanfyans Dec 19, 2020
0028610
error pull test
nestiawanfyans Dec 19, 2020
6a16208
fix bug on query and parsing data between view and controller
leonardrizta Dec 19, 2020
729b820
fix bug on query and parsing data between view and controller
leonardrizta Dec 19, 2020
66b4c10
fix conflict on inputalert
leonardrizta Dec 19, 2020
f0e8d12
add select values on lapor form
leonardrizta Dec 19, 2020
834df43
update
nestiawanfyans Dec 19, 2020
cbdefb0
add search-bar
leonardrizta Dec 19, 2020
83c0597
log-reg
nestiawanfyans Dec 19, 2020
0eb1b25
Merge branch 'Development' of https://github.com/leonardrizta/-IF3028…
nestiawanfyans Dec 19, 2020
7525215
add backend for search
leonardrizta Dec 19, 2020
7ac85bb
delete print_r on search
leonardrizta Dec 19, 2020
2bb1855
fix data on search
leonardrizta Dec 19, 2020
043d3de
Add UserSeeder
leonardrizta Dec 19, 2020
f22847b
Adding login and register view && save.js save.php
tyazgm Dec 19, 2020
580de0c
Merge branch 'Development' of https://github.com/leonardrizta/-IF3028…
tyazgm Dec 19, 2020
201a8a2
add form post
nestiawanfyans Dec 19, 2020
22bd282
add lapor post
nestiawanfyans Dec 19, 2020
0a285dd
add all seeder
leonardrizta Dec 19, 2020
11a722e
Merge branch 'Development' of https://github.com/leonardrizta/-IF3028…
leonardrizta Dec 19, 2020
a248046
add default created_at value on database table
leonardrizta Dec 19, 2020
b28d99f
atur view lapor dan data lapor, serta login
nestiawanfyans Dec 19, 2020
f484e3b
atur view lapor dan data lapor, serta login
nestiawanfyans Dec 19, 2020
11e821f
fix conflict
leonardrizta Dec 19, 2020
2953dc6
conflig
nestiawanfyans Dec 19, 2020
4ed2094
Merge branch 'Development' of https://github.com/leonardrizta/-IF3028…
nestiawanfyans Dec 19, 2020
f546dfe
view instansi
tyazgm Dec 19, 2020
7d96d56
view instansi
tyazgm Dec 19, 2020
add524e
add penjelasan teknis dan sql
leonardrizta Dec 19, 2020
a48a6d6
view instansiListView
tyazgm Dec 19, 2020
833d33d
update penjelasan teknis
leonardrizta Dec 19, 2020
bf41e15
Merge branch 'Development' of https://github.com/leonardrizta/-IF3028…
leonardrizta Dec 19, 2020
599490c
update penjelasan teknis
leonardrizta Dec 19, 2020
7db4ec0
tambah koment, data view lapor, register user
nestiawanfyans Dec 19, 2020
d5b90b2
tambah koment, data view lapor, register user
nestiawanfyans Dec 19, 2020
4801dd3
tambah koment, data view lapor, register user
nestiawanfyans Dec 19, 2020
13a0043
tambah koment, data view lapor, register user
nestiawanfyans Dec 19, 2020
6fdc356
tambah koment, data view lapor, register user
nestiawanfyans Dec 19, 2020
a3e6f8f
fix login bug
nestiawanfyans Dec 19, 2020
92a36bb
Fix Search Bug
leonardrizta Dec 19, 2020
7bfd045
add post submit di list lapor
nestiawanfyans Dec 19, 2020
8ad4fab
Merge branch 'Development' of https://github.com/leonardrizta/-IF3028…
nestiawanfyans Dec 19, 2020
0f4397e
master fix bug
nestiawanfyans Dec 19, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,18 @@ Validasi **wajib** dilakukan pada *client-side*, dengan menggunakan **javascript
Pengguna dapat mencari laporan/komentar dengan melakukan search ke `isi laporan/komentar`.

### Penjelasan Teknis
`Silakan isi bagian ini dengan penjelasan anda, sesuai Petunjuk Pengerjaan di atas.`
Cara Instalasi Project
- install XAMPP
- install composer
- clone repository project ini
- pindah ke folder lapor pada project ini
- buka terminal pada folder lapor, lalu ketik `composer install`
- masih diterminal yang sama, lalu ketik `cp .env.example .env`
- masih diterminal yang sama, lalu ketik `php artisan key:generate`
- buat database dengan nama `lapor`
- untuk data database, terdapat 2 pilihan import database, pertama menggunakan lapor.sql pada folder lapor ini pada phpmyadmin, atau yang kedua dengan menggunakan perintah `php artisan migrate:refresh --seed`
- masih diterminal yang sama, lalu ketik `php artisan serve` untuk merunning project ini
- maka project akan dijalankan pada `http://127.0.0.1:8000`

### Knowledge
Untuk meringankan beban tugas ini, ada berberapa keyword yang bisa anda cari untuk menyelesaikan tugas ini.
Expand Down
15 changes: 15 additions & 0 deletions lapor/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
root = true

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

[*.md]
trim_trailing_whitespace = false

[*.{yml,yaml}]
indent_size = 2
49 changes: 49 additions & 0 deletions lapor/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
APP_NAME=Laravel
APP_ENV=local
APP_KEY=
APP_DEBUG=true
APP_URL=http://localhost

LOG_CHANNEL=stack
LOG_LEVEL=debug

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=lapor
DB_USERNAME=root
DB_PASSWORD=

BROADCAST_DRIVER=log
CACHE_DRIVER=file
QUEUE_CONNECTION=sync
SESSION_DRIVER=file
SESSION_LIFETIME=120

MEMCACHED_HOST=127.0.0.1

REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379

MAIL_MAILER=smtp
MAIL_HOST=mailhog
MAIL_PORT=1025
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null
MAIL_FROM_ADDRESS=null
MAIL_FROM_NAME="${APP_NAME}"

AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
AWS_DEFAULT_REGION=us-east-1
AWS_BUCKET=

PUSHER_APP_ID=
PUSHER_APP_KEY=
PUSHER_APP_SECRET=
PUSHER_APP_CLUSTER=mt1

MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
5 changes: 5 additions & 0 deletions lapor/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
* text=auto
*.css linguist-vendored
*.scss linguist-vendored
*.js linguist-vendored
CHANGELOG.md export-ignore
11 changes: 11 additions & 0 deletions lapor/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/node_modules
/public/hot
/public/storage
/storage/*.key
/vendor
.env
.phpunit.result.cache
Homestead.json
Homestead.yaml
npm-debug.log
yarn-error.log
13 changes: 13 additions & 0 deletions lapor/.styleci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
php:
preset: laravel
disabled:
- no_unused_imports
finder:
not-name:
- index.php
- server.php
js:
finder:
not-name:
- webpack.mix.js
css: true
61 changes: 61 additions & 0 deletions lapor/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
<p align="center"><a href="https://laravel.com" target="_blank"><img src="https://raw.githubusercontent.com/laravel/art/master/logo-lockup/5%20SVG/2%20CMYK/1%20Full%20Color/laravel-logolockup-cmyk-red.svg" width="400"></a></p>

<p align="center">
<a href="https://travis-ci.org/laravel/framework"><img src="https://travis-ci.org/laravel/framework.svg" alt="Build Status"></a>
<a href="https://packagist.org/packages/laravel/framework"><img src="https://img.shields.io/packagist/dt/laravel/framework" alt="Total Downloads"></a>
<a href="https://packagist.org/packages/laravel/framework"><img src="https://img.shields.io/packagist/v/laravel/framework" alt="Latest Stable Version"></a>
<a href="https://packagist.org/packages/laravel/framework"><img src="https://img.shields.io/packagist/l/laravel/framework" alt="License"></a>
</p>

## About Laravel

Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experience to be truly fulfilling. Laravel takes the pain out of development by easing common tasks used in many web projects, such as:

- [Simple, fast routing engine](https://laravel.com/docs/routing).
- [Powerful dependency injection container](https://laravel.com/docs/container).
- Multiple back-ends for [session](https://laravel.com/docs/session) and [cache](https://laravel.com/docs/cache) storage.
- Expressive, intuitive [database ORM](https://laravel.com/docs/eloquent).
- Database agnostic [schema migrations](https://laravel.com/docs/migrations).
- [Robust background job processing](https://laravel.com/docs/queues).
- [Real-time event broadcasting](https://laravel.com/docs/broadcasting).

Laravel is accessible, powerful, and provides tools required for large, robust applications.

## Learning Laravel

Laravel has the most extensive and thorough [documentation](https://laravel.com/docs) and video tutorial library of all modern web application frameworks, making it a breeze to get started with the framework.

If you don't feel like reading, [Laracasts](https://laracasts.com) can help. Laracasts contains over 1500 video tutorials on a range of topics including Laravel, modern PHP, unit testing, and JavaScript. Boost your skills by digging into our comprehensive video library.

## Laravel Sponsors

We would like to extend our thanks to the following sponsors for funding Laravel development. If you are interested in becoming a sponsor, please visit the Laravel [Patreon page](https://patreon.com/taylorotwell).

### Premium Partners

- **[Vehikl](https://vehikl.com/)**
- **[Tighten Co.](https://tighten.co)**
- **[Kirschbaum Development Group](https://kirschbaumdevelopment.com)**
- **[64 Robots](https://64robots.com)**
- **[Cubet Techno Labs](https://cubettech.com)**
- **[Cyber-Duck](https://cyber-duck.co.uk)**
- **[Many](https://www.many.co.uk)**
- **[Webdock, Fast VPS Hosting](https://www.webdock.io/en)**
- **[DevSquad](https://devsquad.com)**
- **[OP.GG](https://op.gg)**

## Contributing

Thank you for considering contributing to the Laravel framework! The contribution guide can be found in the [Laravel documentation](https://laravel.com/docs/contributions).

## Code of Conduct

In order to ensure that the Laravel community is welcoming to all, please review and abide by the [Code of Conduct](https://laravel.com/docs/contributions#code-of-conduct).

## Security Vulnerabilities

If you discover a security vulnerability within Laravel, please send an e-mail to Taylor Otwell via [[email protected]](mailto:[email protected]). All security vulnerabilities will be promptly addressed.

## License

The Laravel framework is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT).
41 changes: 41 additions & 0 deletions lapor/app/Console/Kernel.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<?php

namespace App\Console;

use Illuminate\Console\Scheduling\Schedule;
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;

class Kernel extends ConsoleKernel
{
/**
* The Artisan commands provided by your application.
*
* @var array
*/
protected $commands = [
//
];

/**
* Define the application's command schedule.
*
* @param \Illuminate\Console\Scheduling\Schedule $schedule
* @return void
*/
protected function schedule(Schedule $schedule)
{
// $schedule->command('inspire')->hourly();
}

/**
* Register the commands for the application.
*
* @return void
*/
protected function commands()
{
$this->load(__DIR__.'/Commands');

require base_path('routes/console.php');
}
}
40 changes: 40 additions & 0 deletions lapor/app/Exceptions/Handler.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<?php

namespace App\Exceptions;

use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
use Throwable;

class Handler extends ExceptionHandler
{
/**
* A list of the exception types that are not reported.
*
* @var array
*/
protected $dontReport = [
//
];

/**
* A list of the inputs that are never flashed for validation exceptions.
*
* @var array
*/
protected $dontFlash = [
'password',
'password_confirmation',
];

/**
* Register the exception handling callbacks for the application.
*
* @return void
*/
public function register()
{
$this->reportable(function (Throwable $e) {
//
});
}
}
72 changes: 72 additions & 0 deletions lapor/app/Http/Controllers/AuthController.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
<?php

namespace App\Http\Controllers;

use Auth;
use Illuminate\Support\Str;
use Illuminate\Support\Arr;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Validator;
use Illuminate\Support\Facades\Storage;


use App\Models\Users;


class AuthController extends Controller
{
public function register()
{
return view('Lapor.page.register');
}

public function registerPost(request $input)
{
$this->validate($input, [
'username' => 'required|alpha_dash|unique:users,username|min:6|max:80',
'email' => 'required|string|email|unique:users,email|max:55',
'password' => 'required|string|min:6|required_with:confirmpass|same:confirmpass',
'confirmpass' => 'required',
]);

$data = new Users;
$data->name = $input->namalengkap;
$data->role_id = 1002;
$data->username = $input->username;
$data->email = $input->email;
$data->no_tlp = $input->notelepon;
$data->password = bcrypt($input->password);

if($data->save()){
return redirect()->route('login.user')->with('success', 'Berhasil Register - Silakan Melakukan Login');
} return redirect()->back()->with('danger', 'Terjadi Kesalahan saat Register - Silakan Melakukan Login');

}


public function login()
{
return view('Lapor.page.login');
}

public function loginPost(request $input)
{
$userByEmail = Users::where('email', $input->username)->first();
$userByUsername = Users::where('username', $input->username)->first();

if($userByEmail || $userByUsername) {
if (Auth::attempt(['email' => $input->username, 'password' => $input->password], true) || Auth::attempt(['username' => $input->username, 'password' => $input->password], true)) {
return redirect()->route('landing');
}
return redirect()->back()->with('danger', 'Maaf, Password yang Anda masukkan salah.');
}
return redirect()->back()->with('danger', 'Maaf, email/username yang Anda masukkan belum terdaftar');
}

public function logout()
{
Auth::logout();
return redirect()->route('landing');
}

}
13 changes: 13 additions & 0 deletions lapor/app/Http/Controllers/Controller.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?php

namespace App\Http\Controllers;

use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
use Illuminate\Foundation\Bus\DispatchesJobs;
use Illuminate\Foundation\Validation\ValidatesRequests;
use Illuminate\Routing\Controller as BaseController;

class Controller extends BaseController
{
use AuthorizesRequests, DispatchesJobs, ValidatesRequests;
}
Loading