예제 #1
0
 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function index()
 {
     //
     $users = User::orderBy('created_at', 'asc')->get();
     $templates = Template::orderBy('created_at', 'asc')->get();
     $i = 0;
     return view('admin.index', ['users' => $users, 'templates' => $templates, 'i' => $i]);
 }
예제 #2
0
 public function populateDropdowns()
 {
     $populatecountry = Country::orderBy('created_at', 'asc')->paginate(100);
     $populatemunicipality = Municipality::orderBy('created_at', 'asc')->paginate(100);
     $populateregion = Region::orderBy('created_at', 'asc')->paginate(100);
     $populateschool_level = School_level::orderBy('created_at', 'asc')->paginate(100);
     $populateschool_type = School_type::orderBy('created_at', 'asc')->paginate(100);
     $populateacademic_year = Academic_year::orderBy('created_at', 'asc')->paginate(100);
     $populatetemplate = Template::orderBy('created_at', 'asc')->paginate(100);
     $site_code = Settings::first()->site_code;
     $site_title = Settings::first()->site_title;
     $owner = Settings::first()->owner;
     $street = Settings::first()->street;
     $barangay = Settings::first()->barangay;
     $zip_code = Settings::first()->zip_code;
     $contact = Settings::first()->contact;
     $fax = Settings::first()->fax;
     $tin = Settings::first()->tin;
     //$posts=Post::orderBy('created_at','desc')->paginate(15);
     //return view('general-settings',['populatecountry' => $populatecountry]);
     return view('general-settings')->with('populatecountry', $populatecountry)->with('populatemunicipality', $populatemunicipality)->with('populateregion', $populateregion)->with('populateschool_level', $populateschool_level)->with('populateschool_type', $populateschool_type)->with('populateacademic_year', $populateacademic_year)->with('populatetemplate', $populatetemplate)->with('site_code', $site_code)->with('site_title', $site_title)->with('owner', $owner)->with('street', $street)->with('barangay', $barangay)->with('zip_code', $zip_code)->with('contact', $contact)->with('fax', $fax)->with('tin', $tin);
 }
예제 #3
0
 public function getEdit($id)
 {
     $vote = Vote::find($id);
     $templates = Template::orderBy('id')->get();
     return view('vote.edit', ['title' => '编辑' . $vote->title, 'vote' => $vote, 'templates' => $templates]);
 }
예제 #4
0
 public function index(Request $request)
 {
     //
     $templates = Template::orderBy('created_at', 'asc')->get();
     return view('templates', ['templates' => $templates]);
 }