관리-도구
편집 파일: Hour.php.tar
home/tattooscyy/www/app/Libs/Hour.php 0000644 00000001110 15224610574 0013640 0 ustar 00 <?php namespace App\Libs; /** * Created by PhpStorm. * User: Александр * Date: 19.05.2015 * Time: 22:08 */ use App; use App\Size; class Hour { public function __construct() { } public function get($width = null, $height = null, $catalog_id = null) { $sd = \App::make('\App\Libs\Sum')->getPrice($width, $height); $price = Size::where('size', $sd)->where('catalogs_id', $catalog_id)->first(); $p = $price->price; $h = ceil($p / 80) / 2; if ($h > 4) { $h = 4; } return $h; } } home/tattooscyy/test/app/Libs/Hour.php 0000604 00000001110 15224664154 0013772 0 ustar 00 <?php namespace App\Libs; /** * Created by PhpStorm. * User: Александр * Date: 19.05.2015 * Time: 22:08 */ use App; use App\Size; class Hour { public function __construct() { } public function get($width = null, $height = null, $catalog_id = null) { $sd = \App::make('\App\Libs\Sum')->getPrice($width, $height); $price = Size::where('size', $sd)->where('catalogs_id', $catalog_id)->first(); $p = $price->price; $h = ceil($p / 80) / 2; if ($h > 4) { $h = 4; } return $h; } }