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


PHP App::make方法代码示例

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


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

示例1: callback

 /**
  * Callback action that should be called by auth0, logs the user in
  */
 public function callback()
 {
     // Get a handle of the Auth0 service (we don't know if it has an alias)
     $service = \App::make('auth0');
     // Try to get the user information
     $profile = $service->getUser();
     // Get the user related to the profile
     $auth0User = $this->userRepository->getUserByUserInfo($profile);
     if ($auth0User) {
         if (!str_contains($auth0User->name, '@')) {
             $name = $auth0User->name;
         } else {
             $name = $auth0User->nickname;
         }
         // If we have a user, we are going to log him in, but if
         // there is an onLogin defined we need to allow the Laravel developer
         // to implement the user as he wants an also let him store it.
         $flight = User::firstOrCreate(['github_id' => $auth0User->user_id, 'email' => $auth0User->email, 'picture' => $auth0User->picture, 'name' => $name]);
         if ($service->hasOnLogin()) {
             $user = $service->callOnLogin($auth0User);
         } else {
             // If not, the user will be fine
             $user = $auth0User;
         }
         \Auth::login($user);
     }
     return \Redirect::intended('/');
 }
开发者ID:sgf-web-devs,项目名称:sgf-winner,代码行数:31,代码来源:Auth0Controller.php

示例2: facturar

 public function facturar(Request $request)
 {
     $productos = Venta::obtenerListaReporte($request->input('id_venta'));
     $dompdf = \App::make('dompdf.wrapper');
     $dompdf->loadView('factura', compact('productos'));
     return $dompdf->stream();
 }
开发者ID:GriseldaCuevas,项目名称:WebShop,代码行数:7,代码来源:UsuarioController.php

示例3: crearPdf

 /**
  * Show the form for creating a new resource.
  *
  * @return Response
  */
 public function crearPdf($id)
 {
     $reporte = ReporteBajas::consultar($id);
     $pdf = \App::make('dompdf.wrapper');
     $pdf->loadView('generarPdf', compact('reporte'));
     return $pdf->stream();
 }
开发者ID:jlzor,项目名称:proyectoAlmacen,代码行数:12,代码来源:homeController.php

示例4: __construct

 public function __construct()
 {
     $this->helper = new HelperRepository();
     $this->request = \App::make('Illuminate\\Http\\Request');
     $this->redirect = \App::make('Illuminate\\Routing\\Redirector');
     $this->session = $this->request->session();
 }
开发者ID:alientronics,项目名称:fleetany-web,代码行数:7,代码来源:Controller.php

示例5: __construct

 public function __construct()
 {
     $this->shop = \App::make('\\Interfaces\\ShopInterface');
     $this->postcode = \App::make('\\Interfaces\\PostcodeInterface');
     $this->calendar = \App::make('\\Interfaces\\CalendarInterface');
     //Input::merge(array('postcodes'=>array('hu52up','m193qd','m80lx')));
 }
开发者ID:nq2916,项目名称:savings,代码行数:7,代码来源:ShopController.php

示例6: graficos

 public function graficos(Request $request)
 {
     $html = $request->input('htmlContent');
     $pdf = \App::make('dompdf.wrapper');
     $pdf->loadHTML($html);
     return $pdf->stream('graficos');
 }
开发者ID:Mowex,项目名称:preg,代码行数:7,代码来源:EncuestaController.php

示例7: index

 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function index()
 {
     $view = \View::make('Expensas.expensas');
     $pdf = \App::make('dompdf.wrapper');
     $pdf->loadHTML($view);
     return $pdf->stream('FicheroEjemplo.pdf');
 }
开发者ID:danielrolonbenitez,项目名称:vertical,代码行数:12,代码来源:PdfController.php

示例8: rncStad

 /**
  *Devuelve un pdf con todos los datos 
  *estadisticos del Reg, de tumores del año  
  *y del mes que se pase
  *responde a @GET /reporte/estadisticas/rncs
  */
 public function rncStad(Request $data)
 {
     //Reglas de validacion
     $rules = ['year' => 'required', 'mon' => 'required|numeric|min:1|max:12'];
     /*
      *Valida datos segun las reglas $rules
      *y genera mensajes segun $messages
      */
     $validator = Validator::make($data->all(), $rules, $this->messages);
     /*
      *Si hay error en los datos, 
      *regresa el primer mensaje de
      *error
      */
     if ($validator->fails()) {
         //Primer mensaje de error
         $errMessage = $validator->errors()->first();
         return Response()->json(['status' => 'danger', 'message' => $errMessage]);
     } else {
         $year = $data->year;
         $mon = '0' . $data->mon;
         $date = $year . '-' . $mon;
         $mons = ['ENERO', 'FEBRERO', 'MARZO', 'ABRIL', 'MAYO', 'JUNIO', 'JULIO', 'AGOSTO', 'SEPTIEMBRE', 'OCTUBRE', 'NOVIEMBRE', 'DICIEMBRE'];
         $mo = $mons[$mon - 1];
         $registers = DB::table('rncs')->where('fec_reg', 'like', $date . '%')->select('reg_rgn', 'nom_pri', 'nom_seg', 'ape_pri', 'ape_seg', 'sex', 'eda_adm', 'prc_edo', 'mun_prc', 'des_ltg', 'cod_ltg', 'sco_ltg', 'des_morf', 'cod_morf', 'fec_fall', 'qui_otra', 'num_his')->get();
         $man = DB::table('rncs')->where('fec_reg', 'like', $date . '%')->where('sex', 'MASCULINO')->count();
         $girl = DB::table('rncs')->where('fec_reg', 'like', $date . '%')->where('sex', 'FEMENINO')->count();
         $view = \View::make('pdfs.rncStad', compact('registers', 'year', 'mo', 'man', 'girl'))->render();
         $pdf = \App::make('dompdf.wrapper');
         $pdf->loadHTML($view)->setPaper('latter')->setOrientation('landscape');
         return $pdf->stream('invoice');
     }
 }
开发者ID:herodez,项目名称:oncologia,代码行数:39,代码来源:reposController.php

示例9: InDanhSachDeTaiNhom

 public function InDanhSachDeTaiNhom($mahp, $macb)
 {
     $date = date('Y-m-d');
     $nguoiin = DB::table('giang_vien')->where('macb', $macb)->value('hoten');
     //Lấy giá trị năm học và học kỳ hiện tại
     $namht = DB::table('nien_khoa')->distinct()->orderBy('nam', 'desc')->value('nam');
     $hkht = DB::table('nien_khoa')->distinct()->orderBy('hocky', 'desc')->where('nam', $namht)->value('hocky');
     $mank = DB::table('nien_khoa as nk')->join('nhom_hocphan as hp', 'nk.mank', '=', 'hp.mank')->where('nk.nam', $namht)->where('nk.hocky', $hkht)->value('nk.mank');
     $mahp = \Request::segment(3);
     if ($mahp == "all") {
         $gv_hp = DB::table('nhom_hocphan as hp')->select('gv.macb', 'gv.hoten', 'hp.tennhomhp', 'hp.manhomhp')->join('giang_vien as gv', 'gv.macb', '=', 'hp.macb')->where('gv.macb', $macb)->where('hp.mank', $mank)->get();
         //Lấy mảng các mã nhóm HP của cán bộ này ở hk-nk hiện tại
         $ds_hpgv = DB::table('nhom_hocphan as hp')->select('hp.manhomhp')->join('giang_vien as gv', 'gv.macb', '=', 'hp.macb')->where('gv.macb', $macb)->where('hp.mank', $mank)->lists('hp.manhomhp');
         $dssv = DB::table('sinh_vien as sv')->leftjoin('chia_nhom as chn', 'sv.mssv', '=', 'chn.mssv')->leftjoin('ra_de_tai as radt', 'chn.manhomthuchien', '=', 'radt.manhomthuchien')->leftjoin('de_tai as dt', 'radt.madt', '=', 'dt.madt')->whereIn('chn.manhomhp', $ds_hpgv)->orderBy('chn.manhomthuchien', 'asc')->get();
     } else {
         if ($mahp != null) {
             $gv_hp = DB::table('nhom_hocphan as hp')->select('gv.macb', 'gv.hoten', 'hp.tennhomhp')->join('giang_vien as gv', 'gv.macb', '=', 'hp.macb')->where('hp.manhomhp', $mahp)->first();
             $dssv = DB::table('sinh_vien as sv')->leftjoin('chia_nhom as chn', 'sv.mssv', '=', 'chn.mssv')->leftjoin('ra_de_tai as radt', 'chn.manhomthuchien', '=', 'radt.manhomthuchien')->leftjoin('de_tai as dt', 'radt.madt', '=', 'dt.madt')->where('chn.manhomhp', $mahp)->orderBy('chn.manhomthuchien', 'asc')->get();
         }
     }
     $view = \View::make('giangvien.in-danh-sach-de-tai-nhom', compact('macb', 'nguoiin', 'namht', 'hkht', 'gv_hp', 'dssv', 'date', 'mahp'));
     $pdf = \App::make('dompdf.wrapper');
     $pdf = \PDF::loadHTML($view)->setPaper('a4')->setOrientation('landscape');
     return $pdf->stream("DanhSachDeTaiNhom.pdf");
 }
开发者ID:HaNguyen1410,项目名称:laravProject1,代码行数:25,代码来源:ChianhomController.php

示例10: getPrint

 public function getPrint($id, $term)
 {
     // $pdf = \App::make('dompdf.wrapper');
     $ActivitiesData = $this->getCombineData($id, $term);
     // dd($ActivitiesData);
     $pdf = \App::make('dompdf.wrapper');
     $html = '<html><body>-----------------';
     foreach ($ActivitiesData[1] as $data) {
         $html .= '<table><tr><th>' . $data['act_name'] . '  :  ' . $data['score'] . '/' . $data['total'] . '</th> </tr></table>';
     }
     $html .= '-----------------</body></html>';
     $pdf->loadHTML($html)->setPaper('a4')->setOrientation('portrait')->setWarnings(false)->save('myfile.pdf');
     return $pdf->stream();
     /*   $pdf->loadHTML(''
               . ''
               . '<h1 style = "text-align:center;">Class Record</h1>'
               .'<table>'
               . ' <tr>'
               foreach($ActivitiesData[1] as $data){
               .'<th>'.$data['act_name']
               . '</th>'
               }
               . '</tr>'
               . '</table>'
               )->setPaper('a4')->setOrientation('portrait')->setWarnings(false)->save('myfile.pdf');
     
     
               return $pdf->stream(); */
 }
开发者ID:must-classrecord,项目名称:must-classrecord.github.io,代码行数:29,代码来源:MainController.php

示例11: calificacionDocente

 public function calificacionDocente(Request $request)
 {
     $cursanteCalificador = \DB::table('users')->select('nombres', 'paterno', 'materno')->where('id', Auth::user()->id)->get();
     $docenteCalificado = \DB::table('users')->select('nombres', 'paterno', 'materno')->where('id', (int) $request['idDoc'])->get();
     $nombreMateria = \DB::table('materias')->where('id', (int) $request['materia'])->value('nombreMateria');
     $uno = $request['1'];
     $dos = $request['2'];
     $tres = $request['3'];
     $cuatro = $request['4'];
     $cinco = $request['5'];
     $seis = $request['6'];
     $siete = $request['7'];
     $ocho = $request['8'];
     $nueve = $request['9'];
     $diez = $request['10'];
     $once = $request['11'];
     $doce = $request['12'];
     $trece = $request['13'];
     $catorce = $request['14'];
     $quince = $request['15'];
     $dieciseis = $request['16'];
     $diecisiete = $request['17'];
     $dieciocho = $request['18'];
     $diecinueve = $request['19'];
     $veinte = $request['20'];
     $view = \View::make('cursante.pdfCalifDocente', compact('cursanteCalificador', 'nombreMateria', 'docenteCalificado', 'uno', 'dos', 'tres', 'cuatro', 'cinco', 'seis', 'siete', 'ocho', 'nueve', 'diez', 'once', 'doce', 'trece', 'catorce', 'quince', 'dieciseis', 'diecisiete', 'dieciocho', 'diecinueve', 'veinte'))->render();
     $pdf = \App::make('dompdf.wrapper');
     $pdf->loadHTML($view);
     return $pdf->download('calificacionDocente.pdf');
 }
开发者ID:behimar,项目名称:siseaen,代码行数:30,代码来源:PdfController.php

示例12: profile_pdf

 public function profile_pdf($user)
 {
     $pdf = \App::make('dompdf.wrapper');
     $html = view('pages.users.profile_pdf', compact('user'));
     $pdf->loadHTML($html);
     return $pdf->stream();
 }
开发者ID:joaonzangoII,项目名称:find_my_campuses_friend,代码行数:7,代码来源:UsersController.php

示例13: generaPdf

 public function generaPdf($id)
 {
     $salida = salidasModelo::getInfoSalida($id);
     $vista = view('generapdf', compact('salida'));
     $dompdf = \App::make('dompdf.wrapper');
     $dompdf->loadHTML($vista);
     return $dompdf->stream();
 }
开发者ID:Jorgelp01,项目名称:proyectofinal,代码行数:8,代码来源:indexController.php

示例14: imprimirSalida

 public function imprimirSalida($id)
 {
     $data = Salida_Material::find($id);
     $view = \View::make('n_transf', compact('data'))->render();
     $pdf = \App::make('dompdf.wrapper');
     $pdf->loadHTML($view);
     return $pdf->stream('n_salida ' . $data->codigo);
 }
开发者ID:Vialidad,项目名称:inventario,代码行数:8,代码来源:GeneralController.php

示例15: submitEditRequest

 public function submitEditRequest()
 {
     $request = \App::make('request');
     $request['store-id'] = '1';
     $request['key'] = 'sub-category';
     $request['value'] = 'swimming';
     $request['action'] = 'insert';
     \DB::insert("INSERT INTO `store_edit_requests` (`id`, `store_id`, `key`, `value`, `action`, `approved`, `created_at`, `updated_at`) VALUES (NULL, ?, ?, ?, ?, '', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP)", [$request['store-id'], $request['key'], $request['value'], $request['action']]);
 }
开发者ID:bbig979,项目名称:shoppyst,代码行数:9,代码来源:StoreController.php


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