/**
  * Reverse the migrations.
  *
  * @return void
  */
 public function down()
 {
     Proposal::where('in_committee', false)->update(['in_committee' => null]);
 }
예제 #2
0
 /**
  * Get all of the responses proposals for a given user.
  *
  * @param User $user
  *
  * @return Collection
  */
 public function getResponsesForUser($user_id)
 {
     return Proposal::where('responder_id', $user_id)->orderBy('created_at', 'asc')->get();
 }
예제 #3
0
파일: User.php 프로젝트: alerj/edemocracia
 public function getProposalsRespondedCountAttribute()
 {
     return Proposal::where('responder_id', $this->id)->count();
 }
예제 #4
0
 public function progress()
 {
     return view('proposals.index')->with('proposals', Proposal::where('open', true)->orderBy('created_at', 'desc')->paginate(config('global.pagination')));
 }