enhance css
This commit is contained in:
@@ -42,4 +42,9 @@ class OrderController extends Controller
|
||||
{
|
||||
return Orders::delete($id);
|
||||
}
|
||||
|
||||
public function download($id)
|
||||
{
|
||||
return Orders::download($id);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,6 +29,10 @@ class CategoryController extends Controller
|
||||
$product_type = 'botanic';
|
||||
$article_nature_id = 2;
|
||||
break;
|
||||
case 'legumes':
|
||||
$product_type = 'botanic';
|
||||
$article_nature_id = 3;
|
||||
break;
|
||||
default:
|
||||
$product_type = 'botanic';
|
||||
$article_nature_id = 1;
|
||||
|
||||
@@ -9,6 +9,9 @@ use App\Repositories\Shop\Articles;
|
||||
use App\Repositories\Shop\TagGroups;
|
||||
use App\Repositories\Shop\Homepages;
|
||||
|
||||
use App\Repositories\Config;
|
||||
use App\Repositories\Core\Arrays;
|
||||
|
||||
class HomeController extends Controller
|
||||
{
|
||||
public function index(Request $request)
|
||||
|
||||
@@ -31,6 +31,7 @@ class PayboxController extends Controller
|
||||
public function process(Request $request)
|
||||
{
|
||||
dump($request);
|
||||
exit;
|
||||
return view('paybox.send');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,4 +16,50 @@ class Arrays
|
||||
unset($array[$oldkey]);
|
||||
return $array;
|
||||
}
|
||||
|
||||
public static function slotify($array, $length)
|
||||
{
|
||||
// Create a placeholder array and calculate the number of items
|
||||
// needed per slot (think card dealing LtoR).
|
||||
for ($slots = array_fill(0, $length, 0), $count = count($array), $i = 0; $i < $count; $slots[$i % $length]++, $i++);
|
||||
|
||||
// Now just take slices of the original array
|
||||
// depending on the calculated slot number and place in our slots
|
||||
foreach ($slots as $k => $n) {
|
||||
$slots[$k] = array_splice($array, 0, $n);
|
||||
}
|
||||
|
||||
return $slots;
|
||||
}
|
||||
|
||||
public static function alternate_chunk($array, $parts)
|
||||
{
|
||||
$t = 0;
|
||||
$result = array();
|
||||
$max = ceil(count($array) / $parts);
|
||||
foreach (array_chunk($array, $max) as $v) {
|
||||
if ($t < $parts) {
|
||||
$result[] = $v;
|
||||
} else {
|
||||
foreach ($v as $d) {
|
||||
$result[] = array($d);
|
||||
}
|
||||
}
|
||||
$t += count($v);
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
public static function fill_chunk($array, $parts)
|
||||
{
|
||||
$t = 0;
|
||||
$result = array_fill(0, $parts - 1, array());
|
||||
$max = ceil(count($array) / $parts);
|
||||
foreach ($array as $v) {
|
||||
count($result[$t]) >= $max and $t ++;
|
||||
$result[$t][] = $v;
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -86,6 +86,12 @@ class Orders
|
||||
return Order::destroy($id);
|
||||
}
|
||||
|
||||
public static function download($id)
|
||||
{
|
||||
dump($id);
|
||||
exit;
|
||||
}
|
||||
|
||||
public static function getStatus($id)
|
||||
{
|
||||
return self::statuses()[$id] ?? false;
|
||||
|
||||
Reference in New Issue
Block a user