function list_all($part_id) { $app = get_app(); // GET if ($app->request()->isGet()) { $procs = Process::find_all_by_part_id($part_id, array('order' => 'priority asc')); } $app->render('Processes/list.php', compact('procs', 'part_id')); }
function p_print($part_id) { $app = get_app(); $part = Part::find_by_id($part_id); $procs = Process::find_all_by_part_id($part_id, array('order' => 'priority asc')); $app->render('Parts/print.php', compact('part', 'procs')); }