• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP Facades\View类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中Illuminate\Support\Facades\View的典型用法代码示例。如果您正苦于以下问题:PHP View类的具体用法?PHP View怎么用?PHP View使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了View类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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('[email protected]');
     });
     /*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('[email protected]');
       });*/
     /*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('[email protected]');
       });*/
     return View::make('pricing.index');
 }
开发者ID:Webneoo,项目名称:webneoo,代码行数:26,代码来源:ContactController.php


示例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);
 }
开发者ID:laravel2580,项目名称:llaravel-filemanager,代码行数:30,代码来源:ResizeController.php


示例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');
 }
开发者ID:parabol,项目名称:laravel-cms,代码行数:12,代码来源:RootController.php


示例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);
 }
开发者ID:Rhincodon,项目名称:laravel-filemanager,代码行数:30,代码来源:ResizeController.php


示例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'));
 }
开发者ID:pagegwood,项目名称:timetracker,代码行数:13,代码来源:TasksController.php


示例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();
     }
 }
开发者ID:spescina,项目名称:platform-core,代码行数:7,代码来源:Page.php


示例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);
 }
开发者ID:gitaminhq,项目名称:gitamin,代码行数:7,代码来源:MergeRequestController.php


示例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));
 }
开发者ID:cednet,项目名称:laravel-cms-addon,代码行数:7,代码来源:CrawlerController.php


示例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);
 }
开发者ID:binaryk,项目名称:lareab,代码行数:7,代码来源:BancaEntitateController.php


示例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'));
 }
开发者ID:R3alflash,项目名称:BFAdminCP,代码行数:10,代码来源:HomeController.php


示例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);
     }
 }
开发者ID:kjanko,项目名称:finki-laravel-fileupload,代码行数:26,代码来源:FileController.php


示例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'));
 }
开发者ID:hendrilara,项目名称:kemenpan,代码行数:7,代码来源:AdminTypeController.php


示例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()));
     }
 }
开发者ID:claud145,项目名称:ticketeg-web,代码行数:30,代码来源:CustomMailService.php


示例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);
 }
开发者ID:kamaroly,项目名称:shift,代码行数:7,代码来源:RespondableTest.php


示例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'));
 }
开发者ID:Niiwill,项目名称:E-learner,代码行数:27,代码来源:DashboardController.php


示例16: patientbill

 public function patientbill()
 {
     $id = $_GET['id'];
     //        $patient = \Illuminate\Support\Facades\DB::table('patients')->where('id',$id)->get(['name']);
     $bill = \Illuminate\Support\Facades\DB::table('bills')->where('patient_id', $id)->get();
     return \Illuminate\Support\Facades\View::make('discharge.discharge_home', compact('bill'));
 }
开发者ID:saqibtalib,项目名称:EMR-ex-,代码行数:7,代码来源:IPDController.php


示例17: ProsesJadwal

 public function ProsesJadwal($id)
 {
     $data = DB::table('prestasi_kerja_rekap_penilaian')->join('lpp_kemenpan_siasik.daf_unit_staf', 'prestasi_kerja_rekap_penilaian.id_jabatan', '=', 'lpp_kemenpan_siasik.daf_unit_staf.unit_staf_id')->join('lpp_kemenpan_siasik.master_pegawai', 'prestasi_kerja_rekap_penilaian.nip', '=', 'lpp_kemenpan_siasik.master_pegawai.nip')->join('lpp_kemenpan_siasik.daf_gol', 'lpp_kemenpan_siasik.daf_unit_staf.eselon_id', '=', 'lpp_kemenpan_siasik.daf_gol.gol_id')->select('prestasi_kerja_rekap_penilaian.nip', 'prestasi_kerja_rekap_penilaian.id_jabatan', 'lpp_kemenpan_siasik.daf_unit_staf.nama_lengkap', 'lpp_kemenpan_siasik.daf_unit_staf.unit_staf_id', 'lpp_kemenpan_siasik.master_pegawai.nama', 'lpp_kemenpan_siasik.daf_gol.pangkat', 'lpp_kemenpan_siasik.daf_gol.golongan')->where('lpp_kemenpan_siasik.daf_unit_staf.unit_staf_id', '=', $id)->first();
     $breadcrumbs = array(array("Assessment Internal" => "javascript:void(0)"), array("Pengaturan" => ""), array("Tambah Kandidat Promosi" => ""));
     $this->layout->breadcrumbs = View::make('layouts.breadcrumb', compact('breadcrumbs'));
     $this->layout->content = View::make('career::jadwal/jadwalasessment', compact('data'));
 }
开发者ID:hendrilara,项目名称:kemenpan,代码行数:7,代码来源:KandidatPromosiController.php


示例18: getCrop

 /**
  * Show crop page
  *
  * @return mixed
  */
 public function getCrop()
 {
     $working_dir = Input::get('working_dir');
     $img = parent::getUrl('directory') . Input::get('img');
     $imgName = Input::get('img');
     return View::make('laravel-filemanager::crop')->with(compact('working_dir', 'img', 'imgName'));
 }
开发者ID:yesteamtech,项目名称:laravel-file-manager,代码行数:12,代码来源:CropController.php


示例19: getEdit

 public function getEdit($id)
 {
     // Find the product using the user id
     $product = Product::find($id);
     // No such id
     if ($product == null) {
         return \View::make('redminportal::pages/404');
     }
     $categories = array();
     foreach (Category::all() as $category) {
         $categories[$category->id] = $category->name;
     }
     $tagString = "";
     foreach ($product->tags as $tag) {
         if (!empty($tagString)) {
             $tagString .= ",";
         }
         $tagString .= $tag->name;
     }
     if (empty($product->options)) {
         $product_cn = (object) array('name' => $product->name, 'short_description' => $product->short_description, 'long_description' => $product->long_description);
     } else {
         $product_cn = json_decode($product->options);
     }
     return View::make('redminportal::products/edit')->with('product', $product)->with('product_cn', $product_cn)->with('imageUrl', 'assets/img/products/')->with('categories', $categories)->with('tagString', $tagString);
 }
开发者ID:tusharvikky,项目名称:redminportal,代码行数:26,代码来源:ProductController.php


示例20: __construct

 public function __construct()
 {
     $this->middleware('auth');
     // Fetch the Site Settings object
     $this->currentModelName = Lang::get('crud.competitor');
     View::share('currentModelName', $this->currentModelName);
 }
开发者ID:xoco70,项目名称:KendoOnline,代码行数:7,代码来源:CompetitorController.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP Translation\Translator类代码示例发布时间:2022-05-23
下一篇:
PHP Facades\Validator类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap