Created
July 27, 2020 09:20
-
-
Save jongravois/99a9f24e005ec4797d0730860da0574d to your computer and use it in GitHub Desktop.
This file contains hidden or 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
<?php | |
namespace App\Http\Livewire\Levo; | |
use App\Models\Invoice; | |
use Livewire\Component; | |
class InvoicesManager extends Component | |
{ | |
public $showTable = false; | |
public $start; | |
public $end; | |
public $sales = 'all'; | |
public $salesTeam = []; | |
public function mount() | |
{ | |
$this->start = now()->firstOfYear()->format('Y-m-d'); | |
$this->end = now()->format('Y-m-d'); | |
$this->salesTeam = Invoice::select('salesperson_code') | |
->orderBy('salesperson_code') | |
->get() | |
->pluck('salesperson_code') | |
->unique() | |
->toArray(); | |
} // end function | |
public function render() | |
{ | |
return view('livewire.levo.invoices-manager'); | |
} // end function | |
public function updatedStart() | |
{ | |
//dd($this->start); | |
$this->render(); | |
} // end function | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment