Skip to content

Commit

Permalink
fix: delete activities function
Browse files Browse the repository at this point in the history
  • Loading branch information
picerld committed Aug 31, 2024
1 parent 2bf2b70 commit 5db864b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 22 deletions.
22 changes: 1 addition & 21 deletions app/Livewire/Activity.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,28 +7,8 @@

class Activity extends Component
{
public $search = '';
public $activities;

public function mount(): void
{
$this->activities = ModelsActivity::where('is_draft', false)->orderBy('created_at', 'DESC')->take(4)->get();
}

// public function activities(): LengthAwarePaginator
// {
// return ActivityModel::query()
// ->when($this->search, function ($query) {
// $query->where('name', 'like', '%' . $this->search . '%');
// })
// ->orderBy('created_at', 'DESC')
// ->paginate(4);
// }

public function render()
{
return view('livewire.activity', [
'activities' => $this->activities
]);
return view('livewire.activity');
}
}
2 changes: 1 addition & 1 deletion resources/views/livewire/detail-mitra.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<div id="detailMitra" class="px-40 pt-20 pb-10">
<livewire:components.container>
<div class="px-4 md:px-20">
<div class="flex flex-col my-5 px-14">
<div class="flex flex-col my-5">
<div class="flex items-center justify-center w-full bg-gray-50">
<img src="{{ asset($mitra->logo) }}" alt="{{ $mitra->company_name }}"
class="object-contain w-48 h-48">
Expand Down

0 comments on commit 5db864b

Please sign in to comment.