コード例 #1
0
 public function sortpvtype()
 {
     $valu = $_GET['valu'];
     $type = $_GET['type'];
     Session::put('valu', $valu);
     Session::put('type', $type);
     if ($type == 'provid') {
         $typename = "Providers Type ID";
         $providers = ProviderType::orderBy('id', $valu)->paginate(10);
     } elseif ($type == 'pvname') {
         $typename = "Providers Name";
         $providers = ProviderType::orderBy('name', $valu)->paginate(10);
     }
     $settings = Settings::where('key', 'default_distance_unit')->first();
     $unit = $settings->value;
     if ($unit == 0) {
         $unit_set = 'kms';
     } elseif ($unit == 1) {
         $unit_set = 'miles';
     }
     $title = ucwords(trans('customize.Provider') . " Types" . " | Sorted by " . $typename . " in " . $valu);
     /* 'Provider Types | Sorted by ' . $typename . ' in ' . $valu */
     return View::make('list_provider_types')->with('title', $title)->with('page', 'provider-type')->with('unit_set', $unit_set)->with('types', $providers);
 }
コード例 #2
0
 public function sortpvtype()
 {
     $valu = $_GET['valu'];
     $type = $_GET['type'];
     Session::put('valu', $valu);
     Session::put('type', $type);
     if ($type == 'provid') {
         $typename = "Providers Type ID";
         $providers = ProviderType::orderBy('id', $valu)->paginate(10);
     } elseif ($type == 'pvname') {
         $typename = "Providers Name";
         $providers = ProviderType::orderBy('name', $valu)->paginate(10);
     }
     return View::make('list_provider_types')->with('title', 'Provider Types | Sorted by ' . $typename . ' in ' . $valu)->with('page', 'list_provider_types')->with('types', $providers);
 }