本文整理汇总了PHP中Illuminate\Support\Facades\View类的典型用法代码示例。如果您正苦于以下问题:PHP View类的具体用法?PHP View怎么用?PHP View使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了View类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: sendquotation
public function sendquotation()
{
$input = Input::all();
$name = $input['name'];
$email_client = $input['email'];
$phone_client = $input['phone'];
$title = $input['title'];
$msg_webneoo = nl2br($input['msg_webneoo']);
Mail::send('emails.quotation', ['name' => $name, 'email_client' => $email_client, 'phone_client' => $phone_client, 'msg_webneoo' => $msg_webneoo], function ($m) use($email_client, $title) {
$m->from($email_client, 'Webneoo')->subject($title);
$m->to('info@webneoo.com');
});
/*Mail::send('emails.contact', array('name' => $name, 'email_client' => $email_client, 'subject_client' => $subject_client, 'msg_webneoo' => $msg_webneoo), function($message) use ($email_client)
{
$message->from($email_client, 'Webneoo')->subject('From Webneoo Website');
$message->to('info@webneoo.com');
});*/
/*Mail::send('emails.quotation', array('name' => $name, 'email_client' => $email_client,
'subject_client' => $subject_client, 'msg_webneoo' => $msg_webneoo),
function($message) use ($email_client, $title)
{
$message->from($email_client, 'Webneoo')->subject($title);
$message->to('info@webneoo.com');
});*/
return View::make('pricing.index');
}
示例2: getResize
/**
* Dipsplay image for resizing
*
* @return mixed
*/
public function getResize()
{
$ratio = 1.0;
$image = Input::get('img');
$path_to_image = parent::getPath('directory') . $image;
$original_width = Image::make($path_to_image)->width();
$original_height = Image::make($path_to_image)->height();
$scaled = false;
if ($original_width > 600) {
$ratio = 600 / $original_width;
$width = $original_width * $ratio;
$height = $original_height * $ratio;
$scaled = true;
} else {
$width = $original_width;
$height = $original_height;
}
if ($height > 400) {
$ratio = 400 / $original_height;
$width = $original_width * $ratio;
$height = $original_height * $ratio;
$scaled = true;
}
return View::make('laravel-filemanager::resize')->with('img', parent::getUrl('directory') . $image)->with('height', number_format($height, 0))->with('width', $width)->with('original_height', $original_height)->with('original_width', $original_width)->with('scaled', $scaled)->with('ratio', $ratio);
}
示例3: setupLayout
/**
* Setup the layout used by the controller.
*
* @return void
*/
protected function setupLayout()
{
$this->layout = View::make(Config::get('syntara::views.master'));
$this->layout->title = 'VietSol CMS';
$this->layout->breadcrumb = array();
View::share('siteName', 'VietSol CMS');
}
示例4: getResize
/**
* Dipsplay image for resizing
*
* @return mixed
*/
public function getResize()
{
$ratio = 1.0;
$image = Input::get('img');
$dir = Input::get('dir');
$original_width = Image::make(base_path() . "/" . Config::get('lfm.images_dir') . $dir . "/" . $image)->width();
$original_height = Image::make(base_path() . "/" . Config::get('lfm.images_dir') . $dir . "/" . $image)->height();
$scaled = false;
if ($original_width > 600) {
$ratio = 600 / $original_width;
$width = $original_width * $ratio;
$height = $original_height * $ratio;
$scaled = true;
} else {
$height = $original_height;
$width = $original_width;
}
if ($height > 400) {
$ratio = 400 / $original_height;
$width = $original_width * $ratio;
$height = $original_height * $ratio;
$scaled = true;
}
return View::make('laravel-filemanager::resize')->with('img', Config::get('lfm.images_url') . $dir . "/" . $image)->with('dir', $dir)->with('image', $image)->with('height', number_format($height, 0))->with('width', $width)->with('original_height', $original_height)->with('original_width', $original_width)->with('scaled', $scaled)->with('ratio', $ratio);
}
示例5: edit
/**
* Show the form for editing the specified resource.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function edit($id)
{
$task = Task::find($id);
$projects = Project::lists('name', 'id');
//
return View::make('tasks.edit', compact('task', 'projects'));
}
示例6: messages
public function messages()
{
if ($this->hasMessages()) {
$this->messages = Session::get('messages');
return View::make(Platform::getPackageName() . '::page/messages')->with('items', $this->messages)->render();
}
}
示例7: index
public function index($owner, $project)
{
$repository = $project->getRepository();
$commitishPath = $repository->getHead();
list($branch, $file) = $this->extractReference($repository, $commitishPath, $project->slug);
return View::make('projects/merge_requests')->withOwner($owner)->withProject($project)->withBranch($branch);
}
示例8: crawler
public function crawler($action = "")
{
$action = Input::get('action') ? Input::get('action') : $action;
//Available Maintenance Functions
$this->available_maintenances = array('recreateurls' => Lang::get('cms::m.recreate-urls'), 'convertToPages' => Lang::get('cms::m.crawl-reate-pages'));
return View::make('cms::admin/maintenance', array("available_maintenances" => $this->available_maintenances));
}
示例9: getEditBancaEntitate
public function getEditBancaEntitate($id, $id_entitate, $entitate)
{
$banca_class = new BancaController();
$banci = $banca_class->getBanciOrganizatie();
$banca = DB::select("SELECT\n id,\n id_banca,\n iban, \n sucursala\n FROM banca_entitate\n\t\t\tWHERE id = :id", array('id' => $id));
return View::make("banca::banca_entitate.edit")->with("banca", $banca[0])->with("banci", $banci)->with("id_entitate", $id_entitate)->with("entitate", $entitate);
}
示例10: scoreboard
/**
* Shows the live scoreboard
*/
public function scoreboard()
{
$games = Game::with(['servers' => function ($query) {
$query->active()->orderBy('ServerName');
}])->get();
return View::make('scoreboard', compact('games'))->with('page_title', Lang::get('navigation.main.items.scoreboard.title'));
}
示例11: user
public function user()
{
if (Session::get('isLogged') == true) {
$path = storage_path() . '\\upload\\' . Session::get('index');
$files = array_diff(scandir($path), array('.', '..'));
$parse = array();
foreach ($files as $k => $v) {
// име на фајл
$array = array();
array_push($array, $v);
// големина на фајл
$path = storage_path() . '\\upload\\' . Session::get('index') . '\\' . $v;
$bytes = File::size($path);
$bytes = self::formatSizeUnits($bytes);
array_push($array, $bytes);
// пат до фајлот
array_push($array, $path);
// array-от кој се испраќа на view
array_push($parse, $array);
}
$data = array('files' => $parse);
return View::make('user')->with($data);
} else {
abort(404);
}
}
示例12: getUpdate
public function getUpdate($id)
{
$breadcrumbs = array(array("Kompetensi" => url("admin/competency/type")), array("Tipe Kompetensi" => ""), array("Ubah Data" => ""));
$data = CompetencyType::find($id);
$this->layout->breadcrumbs = View::make('layouts.breadcrumb', compact('breadcrumbs'));
$this->layout->content = View::make('competency::adminType.update', compact('data'));
}
示例13: send
public function send($view, array $data, $callback)
{
$message = new Message(new Swift_Message());
if ($callback instanceof Closure) {
// callback must assign $to and $subject, deal with it
call_user_func($callback, $message);
} else {
throw new InvalidArgumentException('Callback is not valid.');
}
$m = $message->getSwiftMessage();
$filteredTo = array_filter(array_keys($message->getTo()), function ($email) {
$skip = DB::table('ses_feedback')->where('email', $email)->first();
if ($skip) {
Log::info("skipping email:{$email}");
}
return !$skip;
});
if ($filteredTo) {
$converter = new CssToInlineStyles();
$converter->setEncoding($message->getCharset());
$converter->setStripOriginalStyleTags();
$converter->setUseInlineStylesBlock();
$converter->setExcludeMediaQueries(false);
$converter->setCleanup();
$converter->setHTML(View::make($view, $data)->render());
$body = $converter->convert();
$config = Config::get('services.amazon');
SesClient::factory($config)->sendEmail(array('Source' => $config['from'], 'Destination' => array('ToAddresses' => $filteredTo), 'Message' => array('Subject' => array('Data' => $m->getSubject(), 'Charset' => 'UTF-8'), 'Body' => array('Text' => array('Data' => strip_tags(str_replace("<br/>", "\n", $body)), 'Charset' => 'UTF-8'), 'Html' => array('Data' => $body, 'Charset' => 'UTF-8'))), 'ReplyToAddresses' => array()));
}
}
示例14: testPjaxAndFullpageResponses
public function testPjaxAndFullpageResponses()
{
$this->mockRequest->shouldReceive('wantsJson')->andReturn(false);
View::shouldReceive('make')->with('view', [], [])->once()->andReturn('view');
$this->respondable->respond('view');
$this->assertEquals('whatever', $this->respondable->layout->main);
}
示例15: index
public function index()
{
$lectures = Lessontype::join('ocena', 'ocena.lessonTypeId', '=', 'lessontypes.id')->where('userId', Auth::user()->id)->groupBy('lessontypes.id')->get(array('lessonTypeId'));
$les = Lessontype::all('id');
$data1 = array();
$data2 = array();
foreach ($lectures as $key => $value) {
$data1[] = $value->lessonTypeId;
}
foreach ($les as $key => $value) {
$data2[] = $value->id;
}
$data1;
$data2;
$collection1 = collect($data1);
$collection2 = collect($data2);
$diff = $collection2->diff($collection1);
$data3 = array();
foreach ($diff as $key => $value) {
$data3[] = $value;
}
$data3;
$users = Auth::user();
$lessonNo = Lessontype::whereIn('id', $data3)->get();
$lessonYes = Lessontype::join('ocena', 'lessontypes.id', '=', 'lessonTypeId')->selectRaw('lessontypes.*, SUM(ocena.jedinica) as total')->groupBy('lessontypes.id')->get();
return View::make('dashboard', compact('users', 'les', 'lessonYes', 'lessonNo'));
}