This repository has been archived by the owner on Jun 20, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
29 changed files
with
494 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?php | ||
|
||
namespace App\Http\Controllers; | ||
|
||
use Illuminate\Http\Request; | ||
|
||
class AdminController extends Controller | ||
{ | ||
public function getCustomersDashboard() | ||
{ | ||
return view('dashboard.customers'); | ||
} | ||
|
||
public function getVehiclesDashboard() | ||
{ | ||
return view('dashboard.vehicles'); | ||
} | ||
|
||
public function getOrdersDashboard() | ||
{ | ||
return view('dashboard.orders'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?php | ||
|
||
namespace App\Http\Controllers; | ||
|
||
use Illuminate\Http\Request; | ||
|
||
class UserController extends Controller | ||
{ | ||
public function getUserProfile() | ||
{ | ||
return view('user-profile'); | ||
} | ||
|
||
public function getUserOrders() | ||
{ | ||
return view('order-history'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?php | ||
|
||
namespace App\Models; | ||
|
||
use Illuminate\Database\Eloquent\Factories\HasFactory; | ||
use Illuminate\Database\Eloquent\Model; | ||
|
||
class Order extends Model | ||
{ | ||
use HasFactory; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?php | ||
|
||
namespace App\Models; | ||
|
||
use Illuminate\Database\Eloquent\Factories\HasFactory; | ||
use Illuminate\Database\Eloquent\Model; | ||
|
||
class SubscriptionEmail extends Model | ||
{ | ||
use HasFactory; | ||
|
||
protected $fillable = [ | ||
'email', | ||
]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,8 @@ | |
|
||
class Footer extends Component | ||
{ | ||
public $success = ""; | ||
|
||
/** | ||
* Create a new component instance. | ||
* | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?php | ||
|
||
return [ | ||
'mercant_id' => env('MIDTRANS_MERCHAT_ID'), | ||
'client_key' => env('MIDTRANS_CLIENT_KEY'), | ||
'server_key' => env('MIDTRANS_SERVER_KEY'), | ||
|
||
'is_production' => false, | ||
'is_sanitized' => false, | ||
'is_3ds' => false, | ||
]; |
32 changes: 32 additions & 0 deletions
32
database/migrations/2022_05_11_181707_create_subscription_emails_table.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<?php | ||
|
||
use Illuminate\Database\Migrations\Migration; | ||
use Illuminate\Database\Schema\Blueprint; | ||
use Illuminate\Support\Facades\Schema; | ||
|
||
return new class extends Migration | ||
{ | ||
/** | ||
* Run the migrations. | ||
* | ||
* @return void | ||
*/ | ||
public function up() | ||
{ | ||
Schema::create('subscription_emails', function (Blueprint $table) { | ||
$table->id(); | ||
$table->string('email'); | ||
$table->timestamps(); | ||
}); | ||
} | ||
|
||
/** | ||
* Reverse the migrations. | ||
* | ||
* @return void | ||
*/ | ||
public function down() | ||
{ | ||
Schema::dropIfExists('subscription_emails'); | ||
} | ||
}; |
54 changes: 54 additions & 0 deletions
54
database/migrations/2022_05_12_130154_create_orders_table.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
<?php | ||
|
||
use Illuminate\Database\Migrations\Migration; | ||
use Illuminate\Database\Schema\Blueprint; | ||
use Illuminate\Support\Facades\Schema; | ||
|
||
return new class extends Migration | ||
{ | ||
/** | ||
* Run the migrations. | ||
* | ||
* @return void | ||
*/ | ||
public function up() | ||
{ | ||
Schema::create('orders', function (Blueprint $table) { | ||
$table->id(); | ||
$table->unsignedBigInteger('user_id')->references('id')->on('users'); | ||
$table->unsignedBigInteger('vehicle_id')->references('id')->on('vehicles'); | ||
$table->string('phone_1'); | ||
$table->string('phone_2'); | ||
$table->string('address_id'); | ||
$table->string('address_mlg'); | ||
$table->time('pickup_time'); | ||
$table->date('pickup_date'); | ||
$table->string('pickup_address'); | ||
$table->time('dropoff_time'); | ||
$table->date('dropoff_date'); | ||
$table->string('dropoff_address'); | ||
$table->string('id_card'); | ||
$table->string('id_card_2'); | ||
$table->string('driver_license'); | ||
$table->float('total_price', 10, 2); | ||
$table->string('note'); | ||
$table->enum('order_status', ['PENDING', 'REJECTED', 'WAITING_FOR_PAYMENT', 'PAYMENT_DONE', 'CANCELED', 'COMPLETED']); | ||
$table->string('payment_method')->nullable(); | ||
$table->string('transaction_id')->nullable(); | ||
$table->string('virtual_account')->nullable(); | ||
$table->string('qr_link')->nullable(); | ||
$table->string('deep_link')->nullable(); | ||
$table->timestamps(); | ||
}); | ||
} | ||
|
||
/** | ||
* Reverse the migrations. | ||
* | ||
* @return void | ||
*/ | ||
public function down() | ||
{ | ||
Schema::dropIfExists('orders'); | ||
} | ||
}; |
38 changes: 38 additions & 0 deletions
38
database/migrations/2022_05_13_062551_update_users_table.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<?php | ||
|
||
use Illuminate\Database\Migrations\Migration; | ||
use Illuminate\Database\Schema\Blueprint; | ||
use Illuminate\Support\Facades\Schema; | ||
|
||
return new class extends Migration | ||
{ | ||
/** | ||
* Run the migrations. | ||
* | ||
* @return void | ||
*/ | ||
public function up() | ||
{ | ||
Schema::table('users', function (Blueprint $table) { | ||
$table->string('phone_1'); | ||
$table->string('phone_2'); | ||
$table->string('address_id'); | ||
$table->string('address_mlg'); | ||
}); | ||
} | ||
|
||
/** | ||
* Reverse the migrations. | ||
* | ||
* @return void | ||
*/ | ||
public function down() | ||
{ | ||
Schema::table('users', function (Blueprint $table) { | ||
$table->dropColumn('phone_1'); | ||
$table->dropColumn('phone_2'); | ||
$table->dropColumn('address_id'); | ||
$table->dropColumn('address_mlg'); | ||
}); | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?php | ||
|
||
namespace Database\Seeders; | ||
|
||
use Illuminate\Database\Console\Seeds\WithoutModelEvents; | ||
use Illuminate\Database\Seeder; | ||
|
||
class BrandSeeder extends Seeder | ||
{ | ||
/** | ||
* Run the database seeds. | ||
* | ||
* @return void | ||
*/ | ||
public function run() | ||
{ | ||
$data = [ | ||
[ 'name' => 'Honda' ], | ||
[ 'name' => 'Suzuki' ], | ||
[ 'name' => 'Toyota' ], | ||
[ 'name' => 'Yamaha' ], | ||
[ 'name' => 'Daihatsu' ], | ||
[ 'name' => 'Nissan' ] | ||
]; | ||
|
||
\DB::table('brands')->insert($data); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.