예제 #1
0
 /**
  * Store a newly created resource in storage.
  *
  * @param  \Illuminate\Http\Request  $request
  * @return \Illuminate\Http\Response
  */
 public function store(Request $request)
 {
     $post = ['title' => $request->input('title'), 'author' => Auth::getName(), 'content_raw' => $request->input('editorValue'), 'content_html' => $request->input('editorValue'), 'published_at' => carbon::now()];
     Post::create($post);
     return redirect('/admin/post');
     //
 }
예제 #2
0
 /**
  * Store a newly created resource in storage.
  *
  * @param  \Illuminate\Http\Request  $request
  * @return \Illuminate\Http\Response
  */
 public function store(Request $request)
 {
     $article = ['title' => $request->input('title'), 'author' => User::find(Auth::id())->username, 'content_raw' => $request->input('editorValue'), 'content_html' => $request->input('editorValue'), 'page_image' => $request->input('coverImage'), 'published_at' => carbon::now()];
     Article::create($article);
     return redirect('/admin/article');
     //
 }
예제 #3
0
 /**
  * Store a newly created resource in storage.
  *
  * @param  \Illuminate\Http\Request  $request
  * @return \Illuminate\Http\Response
  */
 public function store(Request $request)
 {
     $input = Request::all();
     $input['ETD_ORIGIN'] = carbon::now();
     $input['ETA_JKT'] = carbon::now();
     $input['PIB_Payment'] = carbon::now();
     $input['Custom_Clearance'] = carbon::now();
     $input['ETA_AIIA'] = carbon::now();
     import::create($input);
     return redirect('import');
 }
예제 #4
0
 public function detailedInvoice($id)
 {
     $folio_services = DB::table('folio_services')->join('services', 'services.service_id', '=', 'folio_services.service_id')->select('folio_services.folio_num as folio_num', 'folio_services.date as date', 'folio_services.price as price', 'services.service_name as service_name', 'folio_services.service_count as count')->where('folio_num', '=', $id)->orderBy('folio_services.date', 'asc')->get();
     $cus_id = DB::table('reservation')->select('cus_id')->where('res_id', '=', $id)->first();
     $cus_name = DB::table('customer')->select('name')->where('cus_id', '=', $cus_id->cus_id)->first();
     $date = carbon::now();
     $date = $date->toDateString();
     //generating the pdf
     $pdf = App::make('dompdf.wrapper');
     $pdf->loadView('test3', array('args' => $folio_services, 'res_id' => $id, 'cus_name' => $cus_name->name));
     return $pdf->download('Reservation_No_' . sprintf("%007d", $id) . "__" . $date . '.pdf');
 }
예제 #5
0
 public function edit($id)
 {
     $warehouse = Bodega::find($id);
     $bodega_id = $warehouse->id;
     $bodega_foto = $warehouse->foto;
     $bodega_precio = \App\Dinero::money_format($warehouse->precio);
     $bodega_pais = $warehouse->pais;
     $bodega_estado = $warehouse->estado;
     $bodega_ciudad = $warehouse->ciudad;
     $bodega_calle_num = $warehouse->calle_num;
     $bodega_colonia = $warehouse->colonia;
     $bodega_ancho = $warehouse->ancho;
     $bodega_largo = $warehouse->largo;
     $bodega_alto = $warehouse->alto;
     $bodega_area = $bodega_ancho * $bodega_largo;
     $fecha = carbon::now();
     $view = \View::make('bodega.pdf', compact('bodega_id', 'bodega_foto', 'bodega_precio', 'bodega_pais', 'bodega_estado', 'bodega_ciudad', 'bodega_calle_num', 'bodega_colonia', 'bodega_ancho', 'bodega_alto', 'bodega_largo', 'bodega_area', 'fecha'))->render();
     $pdf = \App::make('dompdf.wrapper');
     $pdf->loadHTML($view);
     return $pdf->stream('detalle_bodega');
 }
예제 #6
0
require dirname(__DIR__) . '/vendor/autoload.php';
use Carbon\Carbon;
$ip = "Current IP Address: " . $_SERVER['REMOTE_ADDR'];
?>

<div class="footer row">
    <section class="col-sm-8">
        <?php 
echo $ip;
?>
    </section>
    <section class="col-sm-4 ">
    <?php 
if (isset($login->login) && $login->login == 1) {
    $timeZone = new UserPDO();
    echo carbon::now($timeZone->getTimeZoneByUserId($_COOKIE["phpContactId"]))->format('l jS \\of F Y');
}
?>
    </section>
</div>


<!--

Eastern ........... America/New_York
Central ........... America/Chicago
Mountain .......... America/Denver
Mountain no DST ... America/Phoenix
Pacific ........... America/Los_Angeles
Alaska ............ America/Anchorage
Hawaii ............ America/Adak
예제 #7
0
 public function addIntroVisit()
 {
     $inputs = Input::all();
     $result = IntroVisit::addSchedule($inputs);
     $commentsInput['customerId'] = $inputs['customerId'];
     $commentsInput['student_id'] = $inputs['studentIdIntroVisit'];
     $commentsInput['introvisit_id'] = $result->id;
     $commentsInput['commentText'] = Config::get('constants.IV_SCHEDULED_COMMENT') . '  ' . $inputs['customerCommentTxtarea'];
     $commentsInput['commentStatus'] = 'ACTIVE/SCHEDULED';
     $commentsInput['commentType'] = $inputs['commentType'];
     $commentsInput['followupType'] = $inputs['followupType'];
     //$commentsInput['reminderDate']   = date('Y-m-d', strtotime($inputs['reminderTxtBox']));
     $iv_date = Carbon::createFromFormat('m/d/Y', $inputs['introVisitTxtBox']);
     if ($iv_date->eq(carbon::now())) {
         Comments::addComments($commentsInput);
     } else {
         $iv_date->subDay();
         $commentsInput['reminderDate'] = $iv_date->toDateString();
         Comments::addComments($commentsInput);
     }
     if ($result) {
         return Response::json(array("status" => "success"));
     }
     return Response::json(array("status" => "failed"));
 }