本文整理汇总了PHP中View::make方法的典型用法代码示例。如果您正苦于以下问题:PHP View::make方法的具体用法?PHP View::make怎么用?PHP View::make使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类View
的用法示例。
在下文中一共展示了View::make方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: postCancelar
public function postCancelar()
{
//return Input::all();
$this->response->Cancelar(Input::get('contratos'), Input::get('penaCapital'), Input::get('penaAccesorios'), Input::get('penaMoratorios'), Input::get('capital'));
$cliente = DB::table('expediente')->where('id_expediente', Input::get('contratos'))->join('cliente', 'cliente.rfc', '=', 'expediente.fk_rfc')->select('cliente.nombre', 'cliente.ape_mate', 'cliente.ape_pate')->get()[0];
$terreno = DB::table('expediente')->where('id_expediente', Input::get('contratos'))->join('solicitud', 'solicitud.fk_expediente', '=', 'expediente.id_expediente')->join('lote', 'lote.id_lote', '=', 'solicitud.fk_lote')->join('manzana', 'manzana.id_manzana', '=', 'lote.fk_manzana')->join('desarrollo', 'desarrollo.id_desarrollo', '=', 'manzana.fk_desarrollo')->select('lote.lote', 'manzana.num_letra', 'desarrollo.nombre')->get()[0];
if (Input::get('capital') - Input::get('penaCapital') > 0) {
$ImporteLiquido = Input::get('capital') - Input::get('penaCapital');
} else {
$ImporteLiquido = 0;
}
$PHPWord = new PHPWord();
$document = $PHPWord->loadTemplate(dirname(__FILE__) . '/PHPWord/recibo_liquidacion.docx');
$fecha = explode('-', date('Y-m-d'));
$document->setValue('dia', $fecha[2]);
$document->setValue('mes', $fecha[1]);
$document->setValue('anio', $fecha[0]);
$document->setValue('cantidadDevuelta', '$' . $ImporteLiquido);
$document->setValue('expediente', Input::get('contratos'));
$document->setValue('Terreno', $terreno->lote);
$document->setValue('Manzana', $terreno->num_letra);
$document->setValue('Fraccionamiento', $terreno->nombre);
$document->setValue('Penalizacion', Input::get('penalizacionCapital') . '%');
$document->setValue('PrecioVenta', '$' . Input::get('importeTotal'));
$document->setValue('CapitalPagado', '$' . Input::get('capital'));
$document->setValue('cantidadPenal', '$' . Input::get('penaCapital'));
$document->setValue('ImporteLiquido', '$' . $ImporteLiquido);
$document->setValue('Cliente', $cliente->nombre . " " . $cliente->ape_pate . " " . $cliente->ape_mate);
$document->save(Input::get('contratos') . '_cancelacion.docx');
return View::make('cobranza/mensajeCobranza')->with('datos', array('seccion' => 'SICyA | Cobranza | Cancealr Terreno', 'cabecera' => 'Cancelando Contrato', 'icono' => 'glyphicon glyphicon-file', 'tipo_mensaje' => true, 'mensaje' => "Se ha Cancelado el Contrato."));
}
示例2: getLoggedinDashboard
public function getLoggedinDashboard()
{
$role = Auth::user()->role;
if ($role == 'hotel-staff') {
$branch_code = $this->getStaffBranch();
$data_room_booked_details = DB::table('hotel_rooms')->join('branch', 'hotel_rooms.branch_code', '=', 'branch.branch_code')->where('branch.branch_code', '=', $branch_code)->where('hotel_rooms.status', '=', 'booked')->count();
$data_room_details = DB::table('hotel_rooms')->join('branch', 'hotel_rooms.branch_code', '=', 'branch.branch_code')->where('branch.branch_code', '=', $branch_code)->where('hotel_rooms.status', '=', 'available')->count();
$data_total_sales = DB::table('sales')->where('branch_code', '=', $branch_code)->sum('sale_value');
$total_client = DB::table('customer')->join('accommodation', 'customer.customer_id', '=', 'accommodation.customer_id')->select('customer.customer_id', 'accommodation.branch_code')->where('accommodation.branch_code', '=', $branch_code)->count();
$data_room = DB::table('hotel_rooms')->join('branch', 'hotel_rooms.branch_code', '=', 'branch.branch_code')->select('hotel_rooms.room_code', 'hotel_rooms.branch_code', 'hotel_rooms.price_per_night', 'hotel_rooms.description', 'hotel_rooms.status', 'hotel_rooms.image', 'branch.branch_name', 'branch.address', 'branch.email', 'branch.city')->where('branch.branch_code', '=', $branch_code)->where('hotel_rooms.status', '=', 'available')->take(5)->get();
$data_room_booked = DB::table('accommodation')->join('customer', 'accommodation.customer_id', '=', 'customer.customer_id')->select('customer.fullname', 'accommodation.branch_code', 'accommodation.room_code', 'accommodation.checkin_time', 'accommodation.checkout_time')->where('accommodation.branch_code', '=', $branch_code)->orderBy('checkout_time')->take(5)->get();
$cancelled = DB::table('refund')->where('date', '=', date('y-m-d'))->where('branch_id', '=', $branch_code)->count('refund_id');
} else {
DB::setFetchMode(PDO::FETCH_ASSOC);
$company_id_logged_user = Auth::user()->comp_id;
$data_room_details = DB::table('hotel_rooms')->join('branch', 'hotel_rooms.branch_code', '=', 'branch.branch_code')->where('branch.company_id', '=', $company_id_logged_user)->where('hotel_rooms.status', '=', 'available')->count();
$data_room_booked_details = DB::table('hotel_rooms')->join('branch', 'hotel_rooms.branch_code', '=', 'branch.branch_code')->where('branch.company_id', '=', $company_id_logged_user)->where('hotel_rooms.status', '=', 'booked')->count();
$data_total_sales = DB::table('sales')->where('company_id', '=', Auth::user()->comp_id)->sum('sale_value');
$total_client = DB::table('customer')->select('customer_id')->where('company_id', '=', Auth::user()->comp_id)->count();
$company_id_logged_user = Auth::user()->comp_id;
$data_room = DB::table('hotel_rooms')->join('branch', 'hotel_rooms.branch_code', '=', 'branch.branch_code')->select('hotel_rooms.room_code', 'hotel_rooms.branch_code', 'hotel_rooms.price_per_night', 'hotel_rooms.description', 'hotel_rooms.status', 'hotel_rooms.image', 'branch.branch_name', 'branch.address', 'branch.email', 'branch.city')->where('branch.company_id', '=', $company_id_logged_user)->where('hotel_rooms.status', '=', 'available')->take(5)->get();
$data_room_booked = DB::table('accommodation')->join('customer', 'accommodation.customer_id', '=', 'customer.customer_id')->select('customer.fullname', 'accommodation.branch_code', 'accommodation.room_code', 'accommodation.checkin_time', 'accommodation.checkout_time')->where('accommodation.comp_id', '=', Auth::user()->comp_id)->orderBy('checkout_time')->take(5)->get();
$cancelled = DB::table('refund')->join('branch', 'refund.branch_id', '=', 'branch.branch_code')->where('branch.company_id', '=', Auth::user()->comp_id)->count('refund_id');
}
return View::make('dashboard', array('data' => $data_room_details, 'booked' => $data_room_booked_details, 'sales' => $data_total_sales, 'clients' => $total_client, 'room_details' => $data_room, 'room_booked' => $data_room_booked, 'cancelled' => $cancelled));
}
示例3: mostrarPost
public function mostrarPost($page = 1)
{
// traemos la cantidad de registros para el paginador
$registros = DB::table('post')->join('temas', 'post_tema', '=', 'temas.tema_id')->where('post_tipo', 'ENTRADA')->orderBy('post_fec', 'desc')->get();
$totalRegistros = count($registros);
//die("totalRegistros ".$totalRegistros); //16
$paginador = 15;
// Parametrizarlo desde DB
$cantPagina = $totalRegistros / $paginador;
//die("cantPagina ".$cantPagina); //1.066
$cantPagina = ceil($cantPagina);
//die("cantidad de paginas ".$cantPagina); //2
if ($page != 1) {
$comienzo = $page * $paginador - $paginador + 1;
// ((2*15)-15+1);
// (30)-14
// comenzara en la 16, pagina 2 y asi sucesivamente..
} else {
$comienzo = 1;
}
$final = $page * $paginador;
$post = DB::table('post')->join('temas', 'post_tema', '=', 'temas.tema_id')->where('post_tipo', 'ENTRADA')->orderBy('post_fec', 'desc')->skip($comienzo - 1)->take($final)->get();
//
if (count($post) < 1) {
$error = "No hay más resultados para mostrar.";
} else {
$error = "";
}
$tema = DB::table('post as p')->select('tm.tema_txt', 'tm.tema_img')->distinct()->join('usuarios as u', 'p.post_usu', '=', 'u.usuarios_id')->join('temas as tm', 'p.post_tema', '=', 'tm.tema_id')->orderBy('tm.tema_txt', 'asc')->get();
// Retornamos todos los datos
$entradas = DB::table('post as p')->select('p.*', 'u.usuarios_name', 'tm.tema_txt')->join('usuarios as u', 'p.post_usu', '=', 'u.usuarios_id')->join('temas as tm', 'p.post_tema', '=', 'tm.tema_id')->orderBy('p.post_fec', 'desc')->get();
return View::make('index', array('post' => $post, 'temas' => $tema, 'cantidadPag' => $cantPagina, 'errores' => $error, 'entradas' => $entradas));
}
示例4: save
public function save () {
$param = Input::all();
$validator = Validator::make($param, [
'site_title' => 'required',
'meta_description' => 'required',
'meta_keywords' => 'required',
'email_support' => 'required|email',
'count_pagination' => 'required'
]);
if ( $validator->fails() ) {
$output = '';
$errors = $validator->messages()->toArray();
foreach ($errors as $error) {
$output .= $error[0] . '<br>';
}
return View::make('admin.elements.error')->with('errors', $output);
}
AppSettings::set('site_title', $param['site_title']);
AppSettings::set('meta_description', $param['meta_description']);
AppSettings::set('meta_keywords', $param['meta_keywords']);
AppSettings::set('email_support', $param['email_support']);
AppSettings::set('count_pagination', $param['count_pagination']);
return Redirect::to(URL::previous());
}
示例5: getIndex
public function getIndex($location = '')
{
$loading_arr = Config::get('loading');
$loading = $loading_arr[array_rand($loading_arr)];
View::share('location', $location);
$this->layout->content = View::make('index', compact('loading'));
}
示例6: render
public function render()
{
$this->loadFiles();
$args = $this->arguments;
$seq = $this->seq();
// set default file upload options
$fileuploadOptions = ['previewMaxWidth' => 280, 'previewMaxHeight' => 120, 'previewCrop' => false, 'autoUpload' => false, 'acceptFileTypes' => "(\\.|\\/)(.*)\$", 'maxFileSize' => 5000000, 'replaceFileInput' => false, 'disableImageResize' => true, 'imageCrop' => false, 'imageMaxWidth' => 480, 'imageMaxHeight' => 240];
// set file
if (isset($args['file'])) {
$file = File::find($args['file']);
if ($file === null) {
unset($args['file']);
} else {
$filename = $file->clientname;
$args['file'] = $filename;
}
}
// resolve arguments
$fileuploadOptions = array_merge($fileuploadOptions, array_get($args, 'fileuploadOptions', []));
$args = array_add($args, 'width', 420);
$args = array_add($args, 'height', 240);
array_set($fileuploadOptions, 'previewMaxWidth', $args['width']);
array_set($fileuploadOptions, 'previewMaxHeight', $args['height']);
$types = array_get($args, 'types');
if ($types !== null) {
array_set($fileuploadOptions, 'acceptFileTypes', '(\\.|\\/)(' . implode('|', (array) $types) . ')$');
}
array_set($args, 'fileuploadOptions', $fileuploadOptions);
// render template
$this->template = \View::make($this->view, ['args' => $args, 'seq' => $seq])->render();
return parent::render();
}
示例7: action_show
/**
* get_show takes in a username, finds the user's id from the username, gets the information about the user from the
* followers and critts table and outputs it into the others.profile view
*/
public function action_show($username)
{
// we get the user's id that matches the username
$user_id = User::where('username', '=', $username)->only('id');
// declare some default values for variables
$following = null;
$followers = 0;
// if the username is not found, display an error
if ($user_id == null) {
echo "This username does not exist.";
} else {
if (Auth::user()) {
// if the user tries to go to his/her own profile, redirect to user's profile action.
if ($user_id == Auth::user()->id) {
return Redirect::to_action('user@index');
}
// check if the current user is already following $username
$following = Follower::where('user_id', '=', Auth::user()->id)->where('following_id', '=', $user_id)->get() ? true : false;
}
// eager load the critts with user data
$allcritts = Critt::with('user')->where('user_id', '=', $user_id);
// order the critts and split them in chunks of 10 per page
$critts = $allcritts->order_by('created_at', 'desc')->paginate(10);
// count the critts
$critts_count = $allcritts->count();
// count the followers
$followers = Follower::where('following_id', '=', $user_id)->count();
// bind data to the view
return View::make('others.profile')->with('username', $username)->with('user_id', $user_id)->with('following', $following)->with('followers', $followers)->with('count', $critts_count)->with('critts', $critts);
}
}
示例8: index
/**
* Display a listing of the resource.
*
* @return Response
*/
public function index($id)
{
$site = Site::find($id);
$users = User::all();
$data = array('page' => 'sites', 'tab' => 'access', 'site' => $site, 'users' => $users);
return View::make('site_user.index', $data);
}
示例9: getReset
public function getReset($token = null)
{
if (is_null($token)) {
App::abort(404);
}
return View::make('password.reset')->with('token', $token);
}
示例10: create
/**
* Show the form for creating a new resource.
*
* @return Response
*/
public function create()
{
//
//
$newId = User::generateId();
return View::make('user.new', ['id' => $newId]);
}
示例11: index
/**
* Display a listing of products on the wishlist.
*
* @return \Illuminate\View\View
*/
public function index()
{
$wishlist = $this->wishlist;
$items = $this->wishlist->items();
$total = $this->wishlist->total();
return View::make('cart.wishlist', compact('wishlist', 'items', 'total'));
}
示例12: edit
/**
* Show the form for editing the specified resource.
*
* @param int $id
* @return Response
*/
public function edit($id)
{
$receipt = Receipt::find($id);
$suppliers = Supplier::all()->lists('name', 'id');
$commodities = Commodity::all()->lists('name', 'id');
return View::make('receipt.edit')->with('receipt', $receipt)->with('commodities', $commodities)->with('suppliers', $suppliers);
}
示例13: imprimeRenta
public function imprimeRenta($datos)
{
$vista = \View::make('pdf.renta', compact('datos'))->render();
$pdf = \App::make('dompdf.wrapper');
$pdf->loadHTML($vista);
return $pdf->download('renta.pdf');
}
示例14: show
public function show($name)
{
if (\Auth::check() && \Auth::user()->permission->name == 'admin') {
if (is_numeric($name)) {
$dl = Downloads::where('id', '=', $name)->where('trash', '=', '0')->first();
if (is_null($dl)) {
return \Redirect::to('404');
}
return \View::make('downloads.show')->with('entry', $dl);
} else {
$dl = Downloads::where('name', '=', $name)->where('trash', '=', '0')->first();
if (is_null($dl)) {
return \Redirect::to('404');
}
return \View::make('downloads.show')->with('entry', $dl);
}
} else {
if (is_numeric($name)) {
$dl = Downloads::where('id', '=', $name)->where('trash', '=', '0')->where('state', '=', '1')->first();
if (is_null($dl)) {
return \Redirect::to('404');
}
return \View::make('downloads.show')->with('entry', $dl);
} else {
$dl = Downloads::where('name', '=', $name)->where('trash', '=', '0')->where('state', '=', '1')->first();
if (is_null($dl)) {
return \Redirect::to('404');
}
return \View::make('downloads.show')->with('entry', $dl);
}
}
}
示例15: getTaskListHtml
public function getTaskListHtml($filter_str, $done_num)
{
$recent_done_num = $done_num;
$tasks = $this->getTasks($filter_str, $done_num);
$layout = Session::get('layout', 'default');
return View::make('tasks.layouts.' . $layout, compact('tasks', 'recent_done_num'))->render();
}