本文整理汇总了PHP中View函数的典型用法代码示例。如果您正苦于以下问题:PHP View函数的具体用法?PHP View怎么用?PHP View使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了View函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: edit
/**
* Show the form for editing the specified resource.
*
* @param int $id
* @return Response
*/
public function edit($idkas)
{
$kas = Kas::find($idkas);
$cust = Customer::all();
$data = array('kas' => $kas, 'cust' => $cust);
return View('kas.edit')->with('data', $data);
}
示例2: create
/**
* Show the form for creating a new resource.
*
* @return Response
*/
public function create()
{
//
$data['title'] = 'Tambah Berita';
$data['kategori_berita'] = Kategori::all();
return View('backend.berita.create', $data);
}
示例3: users
public function users()
{
$ppk = Auth::user()->ppk->id;
$level = Auth::user()->level->id;
$users = User::where('ppk_id', $ppk)->where('level_id', '>', $level)->get();
return View('ppk.rekod.users', compact('users'));
}
示例4: index
public function index()
{
$id = Auth::id();
$user = User::find($id);
$expire_date = Carbon::parse($user->activated_at)->addMonth($user->duration);
return View('user.index')->with('expire_date', $expire_date);
}
示例5: getReset
/**
* Display the password reset view for the given token.
*
* @param string $token
* @return Response
*/
public function getReset($token = null)
{
if (is_null($token)) {
throw new NotFoundHttpException();
}
return View('kagi::auth.reset')->with('token', $token);
}
示例6: index
public function index()
{
$brands = Brand::Listing(['status' => 1]);
$categories = Category::Listing(['status' => 1]);
$products = Product::Listing(['status' => 1]);
return View('home', ['brands' => $brands['result'], 'categories' => $categories['result'], 'products' => $products['result']]);
}
示例7: index
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function index()
{
//get all watchlist items
$watchlist = Watchlist::where('user_id', Auth::user()->id)->get();
$data['watchlist'] = $watchlist;
return View('Watchlist.index')->with($data);
}
示例8: index
/**
* Display login page.
*
* @return Response
*/
public function index()
{
if (Auth::check() && Auth::user()->UserRoles->role >= 2) {
return Redirect::to('/admin/dashboard');
}
return View('admin.login.index');
}
示例9: store
/**
* Store a newly created resource in storage.
*
* @param \Illuminate\Http\Request $request
* @return \Illuminate\Http\Response
*/
public function store(Request $request)
{
// $this->validate($request, [
$fan = new Fans($request->all());
$fan->save();
return View('layouts/tabhub');
}
示例10: getPayment
public function getPayment($invoiceid)
{
$id = $invoiceid;
$invoice = Invoice::with(['payments', 'comments'])->where('Id', $id)->get();
//dd($invoice);
return View('collectionmodule/payment')->with(array('invoice' => $invoice));
}
示例11: create
/**
* Store a newly created resource in storage.
*
* @return Response
*/
public function create($album_id = null)
{
//
$data['album_id'] = $album_id;
$data['title'] = 'Tambah Foto';
return View('backend.foto.create', $data);
}
示例12: terkini
public function terkini()
{
$users = User::where('unit', Auth::user()->unit)->where('level_id', 3)->where('status', 1)->get();
if (Auth::user()->level->id == 1) {
$users = User::where('status', 1)->where('level_id', '>', 1)->get();
}
$data[] = null;
$bil = 1;
foreach ($users as $user) {
//Belum Selesai
$belumSelesai = Laporan::where('user', $user->username)->where('tarikh', '>=', Carbon::now()->startOfMonth())->where('status', 0)->count();
$user['belumSelesai'] = $belumSelesai;
// dd(Carbon::now()->startOfMonth()->format('Y-m-d'));
// dd($belumSelesai);
//KIV
$kiv = Laporan::where('user', $user->username)->where('tarikh', '>=', Carbon::now()->startOfMonth())->where('status', 3)->count();
$user['kiv'] = $kiv;
//Selesai
$selesai = Laporan::where('user', $user->username)->where('tarikh', '>=', Carbon::now()->startOfMonth())->where('status', 4)->count();
$user['selesai'] = $selesai;
//Closing
$closing = Laporan::where('user', $user->username)->where('tarikh', '>=', Carbon::now()->startOfMonth())->where('status', 1)->count();
$user['closing'] = $closing;
//Jumlah tugasan current month
$totalCurrentMonth = Laporan::where('user', $user->username)->where('tarikh', '>=', Carbon::now()->startOfMonth())->count();
$user['totalCurrentMonth'] = $totalCurrentMonth;
//Jumlah tugasan bulan sebelum dan belum selesai
$totalPreviousMonth = Laporan::where('user', $user->username)->where('tarikh', '<', Carbon::now()->startOfMonth())->where('status', '!=', 4)->count();
$user['totalPreviousMonth'] = $totalPreviousMonth;
//Jumlah Bulan Semasa, KIV dan Belum Selesai
$grandTotal = Laporan::where('user', $user->username)->where('status', '!=', 4)->count();
$user['grandTotal'] = $grandTotal;
}
return View('members.supervisor.laporan.cetak.terkini', compact('bil', 'users'));
}
示例13: edit
/**
* Show the form for editing the specified resource.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function edit($id)
{
//
$member = Member::find($id);
// show the edit form and pass the member info to it
return View('members.edit_form')->with('member', $member);
}
示例14: setCalendar
public function setCalendar($start)
{
$month = $start->format('F Y');
$nrOfDays = $start->daysInMonth;
//count days in this month
if ($start->dayOfWeek != Carbon::MONDAY) {
$dayStartWeek = $start->startOfWeek()->format('d');
//find the number day
$daysInPrev = $start->startOfWeek()->daysInMonth;
//days is previous month
$daysToAddPrev = $daysInPrev - $dayStartWeek;
// find the difference
} else {
$daysInPrev = 0;
$daysToAddPrev = 0;
}
$daysToAddNext = 7 - ($daysToAddPrev + 1 + $nrOfDays) % 7;
//+1 -> dayscount from 0
//count all days add at the moment % 7
// 1 week minus the rest
$next = $start->addMonth()->format('F Y');
$previous = $start->subMonth()->format('F Y');
$data = array('month' => $month, 'nrOfDays' => $nrOfDays, 'daysInPrev' => $daysInPrev, 'daysToAddPrev' => $daysToAddPrev, 'daysToAddNext' => $daysToAddNext, 'next' => $next, 'previous' => $previous);
return View('calender')->with($data);
}
示例15: file_upload
public function file_upload()
{
include "models/file_upload.php";
$file = new File_upload();
$file->id = $_SESSION["usuarios_id"];
return View("file_upload/main", $file);
}