本文整理汇总了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'));
}
示例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);
}
示例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'));
}
示例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));
}
示例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');
示例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'));
}
示例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"]))) {
示例8: getTypeUrlSiteMap
public static function getTypeUrlSiteMap()
{
return Type::all();
}
示例9: json
public function json()
{
$types = Type::all();
return Response::json($types);
}