当前位置: 首页>>代码示例>>PHP>>正文


PHP Pessoa::all方法代码示例

本文整理汇总了PHP中Pessoa::all方法的典型用法代码示例。如果您正苦于以下问题:PHP Pessoa::all方法的具体用法?PHP Pessoa::all怎么用?PHP Pessoa::all使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Pessoa的用法示例。


在下文中一共展示了Pessoa::all方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: create

 /**
  * Show the form for creating a new resource.
  *
  * @return Response
  */
 public function create()
 {
     $pessoas = Pessoa::all();
     $tiposContratos = ContratacaoTipo::all();
     $tiposClasses = ContratacaoClasse::all();
     $tiposCargos = ContratacaoCargo::all();
     $tiposDisciplinas = ContratacaoDisciplina::all();
     return View::make('contratos.create', compact('pessoas', 'tiposContratos', 'tiposClasses', 'tiposCargos', 'tiposDisciplinas'));
 }
开发者ID:renankabal,项目名称:laravel-contratacoes,代码行数:14,代码来源:ContratosController.php

示例2: PhpRenderer

<?php

require '../vendor/autoload.php';
require 'bootEloquent.php';
use Slim\Views\PhpRenderer;
$app = new \Slim\App(['settings' => ['displayErrorDetails' => true]]);
$container = $app->getContainer();
$container['view'] = new PhpRenderer(__DIR__ . '/../views/');
$app->get('/', function ($request, $response, $args) {
    return $this->view->render($response, 'hello.php', ['pessoas' => Pessoa::all()]);
});
$app->post('/pessoas', function ($request, $response, $args) {
    $pessoa = new Pessoa();
    $pessoa->nome = $request->getParam('nome');
    $pessoa->save();
    return $response->withRedirect('/');
});
$app->run();
开发者ID:neylsongularte,项目名称:bootstrap-slim-microframework-php,代码行数:18,代码来源:run.php

示例3: index

 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     $pessoas = $this->pessoa->all();
     return View::make('pessoas.index', compact('pessoas'));
 }
开发者ID:alexfalcucc,项目名称:try-user,代码行数:10,代码来源:PessoasController.php

示例4: function

<?php

require __DIR__ . '/database/bootEloquent.php';
Flight::set('flight.views.path', __DIR__ . '/views');
// routes
Flight::route('/', function () {
    Flight::render('hello.php', ['pessoas' => Pessoa::all()]);
});
Flight::route('POST /pessoas', function () {
    $pessoa = new Pessoa();
    $pessoa->nome = Flight::request()->data['nome'];
    $pessoa->save();
    Flight::redirect('/');
});
Flight::start();
开发者ID:neylsongularte,项目名称:bootstrap-flight-microframework-php,代码行数:15,代码来源:run.php

示例5: getIndex

 public function getIndex()
 {
     $usuario = Pessoa::all();
     return View::make('lista-user', compact('usuario'));
 }
开发者ID:blendosantos,项目名称:restaurante,代码行数:5,代码来源:AuthController.php


注:本文中的Pessoa::all方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。