Skip to content

Instantly share code, notes, and snippets.

@jongravois
Created August 5, 2020 16:04
Show Gist options
  • Save jongravois/ad518c2c3044ff21168c49df4cbbb375 to your computer and use it in GitHub Desktop.
Save jongravois/ad518c2c3044ff21168c49df4cbbb375 to your computer and use it in GitHub Desktop.
<?php
namespace App\Http\Livewire\Deals;
use App\Models\Deal;
use App\Models\DealFin;
use App\Services\DealFinancialsService;
use App\User;
use Carbon\Carbon;
use Livewire\Component;
class FinModeler extends Component
{
public $dealID;
public $dates = [];
public $deal = [];
public $fins = [];
public function mount($id)
{
$this->dealID = $id;
$this->deal = Deal::with('fins', 'timeline')->find($id);
$this->fins = DealFin::whereDealId($id)->first();
$this->dates = Deal::dates($this->deal->salesStart());
} // end function
public function render()
{
return view('livewire.deals.fin-modeler');
} // end function
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment