Ejemplo n.º 1
0
 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function index()
 {
     $users = Member::latest()->paginate(15);
     $membership_types = MembershipType::lists('type', 'id')->put('0', 'all')->sortBy('id');
     $institution_type = InstitutionType::lists('name', 'id');
     return view('backend.memberships.listing', compact('membership_types', 'users', 'institution_type', 'typeName'));
 }
Ejemplo n.º 2
0
 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     DB::table('membership_types')->delete();
     $data = [['membership_id' => 1, 'type' => 'academic', 'prefix' => 'IM'], ['membership_id' => 1, 'type' => 'non-academic', 'prefix' => 'IM'], ['membership_id' => 2, 'type' => 'student', 'prefix' => 'SM'], ['membership_id' => 2, 'type' => 'professional', 'prefix' => 'CM']];
     foreach ($data as $value) {
         MembershipType::create($value);
     }
 }