コード例 #1
0
ファイル: TipsController.php プロジェクト: jesstrux/pharmacy
 /**
  * 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
0
 /**
  * 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
0
ファイル: BranchController.php プロジェクト: huanghua581/erp
 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
0
ファイル: RoomsController.php プロジェクト: andrinda/myhotel
 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
0
ファイル: routes.php プロジェクト: Gaibe/lebonappart
            $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
0
 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     $types = $this->type->all();
     return View::make('admin.types.index', compact('types'));
 }
コード例 #7
0
<?php

// Public Routes
Route::get('/', array('as' => 'home', 'uses' => 'MainController@main'));
Route::get('change_password', function () {
    $user = Sentry::findUserById(1);
    $user->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
0
ファイル: SiteMap.php プロジェクト: trantung/company
 public static function getTypeUrlSiteMap()
 {
     return Type::all();
 }
コード例 #9
0
 public function json()
 {
     $types = Type::all();
     return Response::json($types);
 }