A bare bones front-end for knockout designed for maximum compatibility with "obsolete" browsers
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
604B

  1. <?php
  2. namespace App\Http\Controllers;
  3. use App\Knockout\Subforum;
  4. use App\Knockout\Stat;
  5. class IndexController extends Controller {
  6. public function get()
  7. {
  8. $subforums = Subforum::all();
  9. $records = $subforums->getRecords();
  10. $len = count($records);
  11. $leftSubforums = array_slice($records, 0, $len / 2);
  12. $rightSubforums = array_slice($records, $len / 2);
  13. return view('page/index', [
  14. 'leftSubforums' => $leftSubforums,
  15. 'rightSubforums' => $rightSubforums,
  16. 'stat' => Stat::all()->getRecord()
  17. ]);
  18. }
  19. }