当前位置: 首页>>代码示例>>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;未经允许,请勿转载。