當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Type::all方法代碼示例

本文整理匯總了PHP中Type::all方法的典型用法代碼示例。如果您正苦於以下問題:PHP Type::all方法的具體用法?PHP Type::all怎麽用?PHP Type::all使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Type的用法示例。


在下文中一共展示了Type::all方法的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: index

 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     $types = Type::all();
     $types->toarray();
     $tips = Tip::all();
     $tips->toarray();
     $breeds = Breed::all();
     $breeds->toarray();
     // $tips = DB::table('pet_tips')
     // 		->where('breed_id', '=', $breed_id)
     //    		->get();
     return View::make('tips.tips', compact('types', 'breeds', 'tips'));
 }
開發者ID:jesstrux,項目名稱:pharmacy,代碼行數:18,代碼來源:TipsController.php

示例2: index

 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     $types_data = Type::all();
     return View::make('admin.type.list')->with('types', $types_data);
 }
開發者ID:mertindervish,項目名稱:registerbg,代碼行數:10,代碼來源:AdminTypeController.php

示例3: getEdit

 public function getEdit($BranchId)
 {
     // 區域
     //
     $area = Area::all();
     // 線路
     //
     $line = Line::all();
     // 客戶類型
     //
     $type = Type::all();
     // 業務員
     //
     $users = User::where('grade', '10')->where('disable', '0')->get();
     return View::make('branch.edit')->with('branch', Branch::find($BranchId))->with(compact('area'))->with(compact('line'))->with(compact('type'))->with(compact('users'));
 }
開發者ID:huanghua581,項目名稱:erp,代碼行數:16,代碼來源:BranchController.php

示例4: getEdit

 public function getEdit($id)
 {
     $type = Type::all();
     $data = Room::find($id);
     return View::make('home/dashboard', array())->nest('content', 'room/edit', array('data' => $data, 'type' => $type));
 }
開發者ID:andrinda,項目名稱:myhotel,代碼行數:6,代碼來源:RoomsController.php

示例5: function

            $img->save();
        }
    }
    $app->redirect($app->urlFor("accueil"));
})->name('depot');
//Avoir le détail d'une annonce
$app->get('/:id', function ($id) use($app) {
    $annonce = Annonce::with('image', 'type', 'quartier', 'quartier.ville', 'vendeur')->where("id_annonce", "=", $id)->get();
    $app->render('annonce.twig', array('annonce' => $annonce));
})->name("annonce");
//Ouverture page de modification
$app->post('/modification/:id/', function ($id) use($app) {
    $annonce = Annonce::with('vendeur', 'quartier', 'quartier.ville')->where("id_annonce", "=", $id)->get();
    $types = Type::all();
    $villes = Ville::all();
    $types = Type::all();
    $quartiers = Quartier::all();
    $app->render('modification.twig', array('types' => $types, 'quartiers' => $quartiers, 'villes' => $villes, 'annonce' => $annonce));
})->name("modification");
//suppression d'annonce
$app->post('/suppression/:id', function ($id) use($app) {
    $image = Image::with('annonce')->where("id_annonce", "=", $id)->delete();
    $annonce = Annonce::with('vendeur')->where("id_annonce", "=", $id)->delete();
    $app->redirect($app->urlFor("accueil"));
})->name("suppression");
//Validation modification dans bdd
$app->post('/modification/valider-modif/:id/', function ($id) use($app) {
    $annonce = Annonce::with('vendeur', 'quartier', 'quartier.ville')->where("id_annonce", "=", $id)->first();
    $annonce->description = $app->request->post('description');
    $annonce->superficie = $app->request->post('superficie');
    $annonce->loc_vente = $app->request->post('loc_vente');
開發者ID:Gaibe,項目名稱:lebonappart,代碼行數:31,代碼來源:routes.php

示例6: index

 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     $types = $this->type->all();
     return View::make('admin.types.index', compact('types'));
 }
開發者ID:jacobDaeHyung,項目名稱:Laravel-Real-Estate-Manager,代碼行數:10,代碼來源:TypesController.php

示例7: array

<?php

// Public Routes
Route::get('/', array('as' => 'home', 'uses' => 'MainController@main'));
Route::get('change_password', function () {
    $user = Sentry::findUserById(1);
    $user->password = 'password';
    $user->permissions = array('superuser' => 1);
    $user->save();
});
Route::post('request_location', function () {
    if (Request::ajax()) {
        $location = strtolower(Input::get('location'));
        $all_types = Type::all();
        $all_developers = Developer::all();
        $response = array('count' => 0, 'types' => array(0 => 'Any'), 'developers' => array(0 => 'Any'));
        foreach ($all_types as $a) {
            $response['types'][$a->id] = ucwords($a->name);
        }
        foreach ($all_developers as $a) {
            $response['developers'][$a->id] = ucwords($a->name);
        }
        // LETS FIND PROPERTIES WITH
        $properties = Property::where('location_id', $location)->get();
        $count = count($properties);
        if ($count > 0) {
            $response['count'] = 1;
            $response['types'] = array(0 => 'Any');
            $response['developers'] = array(0 => 'Any');
            foreach ($properties as $p) {
                if (!in_array($p->type->id, array_keys($response["types"]))) {
開發者ID:jacobDaeHyung,項目名稱:Laravel-Real-Estate-Manager,代碼行數:31,代碼來源:routes.php

示例8: getTypeUrlSiteMap

 public static function getTypeUrlSiteMap()
 {
     return Type::all();
 }
開發者ID:trantung,項目名稱:company,代碼行數:4,代碼來源:SiteMap.php

示例9: json

 public function json()
 {
     $types = Type::all();
     return Response::json($types);
 }
開發者ID:edgarhumberto,項目名稱:Prueba,代碼行數:5,代碼來源:TypesController.php


注:本文中的Type::all方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。