0]); Output::render(); } /** * Store * * Store the param on the database * @param State $state */ function store(State $state) { } /** * Search * * Store the param on the database * @param State $state */ function search() { $states = State::findAll(['id', 'shortname']); $return = ""; foreach ($states as $state) { if ($state->id == $_GET['value']) { $return .= ""; } else { $return .= ""; } } echo $return; } /** * Show * * Render one register * * @param State $state */ function show(State $state) { \RR\Response::json($state)->send(); } /** * Edit * * Render the formular for a database State * * @param State $state */ function edit(State $state) { Output::setView('form', $state); Output::render(); } /** * Update * Store the changes of the param on the database * * @param State $state */ function update(State $state) { } /** * Destroy * If the object has soft delete. * * @param State $state */ function destroy(State $state) { } /** * Purge * Remove object even with soft delete. * * @param State $state */ function purge(State $state) { } function loadSelect() { //ddd(State::findMany(['country_id' => ['=', '25']])->get()); Output::render( 'select', [ 'states' => State::findMany(['country_id' => ['=', '25']])->get(), //'selected' => $_GET['value'] ] ); } }