Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
29 changes: 9 additions & 20 deletions app/Http/Controllers/CheckoutController.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
use App\Models\User;
use App\Notifications\SendEmailReminder;
use Illuminate\Support\Facades\Notification;
use App\Models\Reminder;


class CheckoutController extends Controller
{
Expand Down Expand Up @@ -100,30 +100,21 @@ function orderPlace(Request $req)
$name = $req->input('O_Name');
$user = User::where('name', $name)->get();

$text = Reminder::where('id', 1)->pluck('data');
$footer = Reminder::where('id', 1)->pluck('footer');
$status = Reminder::where('id', 1)->pluck('status');

if ($status= 1) {

$orderData =[
'body' => $text,
'orderText' => 'Total: RM'.$total.' in AppXilon',
'url' => url('/'),
'thankyou' => $footer
];
Notification::send($user, new SendEmailReminder($orderData));
}

$orderData =[
'body' => 'You Have made an order in AppXilon',
'orderText' => 'Total: RM'.$total.' in AppXilon',
'url' => url('/'),
'thankyou' => 'Thank You For Ordering With AppXilon'
];
Notification::send($user, new SendEmailReminder($orderData));

$logs = new Logs;
$logs->Cust_Id = Auth::id();
$logs->Log_Module = $req->input('Log_Module');
$logs->Log_Pay_Type = 0;
$logs->Log_Total_Price = $total;
$logs->Log_Status = $req->input('Log_Status');
$logs->created_at = Carbon::now();
$logs->updated_at = Carbon::now();
$logs->save();

$cartitems = Cart::where('Cust_Id', Auth::id())->get();
foreach ($cartitems as $item) {
Expand Down Expand Up @@ -194,11 +185,9 @@ public function stripePay(Request $req)
$logs->Cust_Id = Auth::id();
$logs->Log_Module = $req->input('Log_Module');
$logs->Log_Pay_Type = 0;
$logs->Log_Total_Price = $total;
$logs->Log_Status = $req->input('Log_Status');
$logs->created_at = Carbon::now();
$logs->updated_at = Carbon::now();
$logs->save();

$cartitems = Cart::where('Cust_Id', Auth::id())->get();
foreach ($cartitems as $item) {
Expand Down
88 changes: 0 additions & 88 deletions app/Http/Controllers/ReminderController.php

This file was deleted.

4 changes: 2 additions & 2 deletions app/Models/Hour.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
class Hour extends Model
{
public $table = 'business_hour';
protected $primaryKey = 'Day_Id';
protected $primaryKey = 'day_id';
protected $fillable = [
'Day_Id', 'Day_Of_Week', 'Start_Time', 'End_Time', 'Status'
'day_id', 'day_name', 'start_time', 'end_time', 'day_off'
];
public $timestamps = false;
}
15 changes: 0 additions & 15 deletions app/Models/Reminder.php

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,13 @@ class CreateNotificationsTable extends Migration
public function up()
{
Schema::create('notifications', function (Blueprint $table) {
$table->bigIncrements('id');
$table->uuid('id')->primary();
$table->string('type');
$table->integer('status');
$table->string('subject');
$table->morphs('notifiable');
$table->text('data');
$table->string('footer');
$table->timestamp('read_at')->nullable();
$table->timestamps();
});
}
Expand Down
2 changes: 0 additions & 2 deletions database/seeders/DatabaseSeeder.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ public function run()
{
// \App\Models\Data::factory(10)->create();
$this->call(UsersSeeder::class);
$this->call(AdminSeeder::class);
$this->call(Product_CategorySeeder::class);
$this->call(ShopCategorySeeder::class);
$this->call(ShopInfoSeeder::class);
Expand All @@ -34,7 +33,6 @@ public function run()
$this->call(OrderProductSeeder::class);
$this->call(ReviewSeeder::class);
$this->call(ExpensesSeeder::class);
$this->call(ReminderSeeder::class);

$seed = new ExpensesSeeder();
$seed->run();
Expand Down
31 changes: 0 additions & 31 deletions database/seeders/ReminderSeeder.php

This file was deleted.

8 changes: 4 additions & 4 deletions resources/views/admin-layouts/editHours.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
<div class="col-md-4 mb-3">
<label>Start Time:</label>
<input type="time" class="form-control"
value="{{ $biz_hour->Start_Time }}" name="Start_Time" Required>
value="{{ $biz_hour->Start_Time }}" name="start_Time" Required>
</div>
</div>
<div class="form-row">
Expand All @@ -80,11 +80,11 @@
</div>
<div class="form-row">
<label for="example-text-input"
class="col-form-label">Status:</label><br>
class="col-form-label">Day Off:</label><br>
<label class="switch">
<input type="hidden" value="0" name="status">
<input type="hidden" value="0" name="Status">
<input
value="1" type="checkbox" name="status" checked>
value="1" type="checkbox" name="Status" checked>
<span class="slider round"></span>
</label>
</div>
Expand Down
Loading