D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
home
/
tattooscyy
/
stage
/
app
/
Http
/
Controllers
/
Filename :
PriceController.php
back
Copy
<?php namespace App\Http\Controllers; use Illuminate\Http\Request; use App\Saloon; use App\Artist; use App\Catalogs; use App\Picture; use Auth; use App\Libs\Sum; use App\Size; class PriceController extends Controller { public function getIndex(Request $request) { if (isset($_GET['reload'])) { return redirect('price'); } $pipec = $request->pipec; $picture = $request->picture; $arr = @getimagesize($pipec); $width_c = isset($arr[0])?(int)$arr[0] / 38 : 1; $height_c = isset($arr[1])?(int)$arr[1] / 38 : 1; if (isset($_COOKIE['width'])) { $width_c = $_COOKIE['width']; } if (isset($_COOKIE['height'])) { $height_c = $_COOKIE['height']; } //echo $request->catalogs_id; $sum = new Sum; $size = $sum->getPrice($width_c, $height_c); // dd($size, $width_c, $height_c); $real_s = Size::where('catalogs_id', $request->catalogs_id)->where('size', $size)->first(); if (isset($real_s)) { $sum = $real_s->price; } else { $sum = 0; } $saloons = Saloon::where('showhide', 'show')->get(); $artists = Artist::where('showhide', 'show')->get(); return view('price', compact('saloons', 'artists', 'picture', 'width_c', 'height_c', 'sum')); } public function getOrder() { } }