// -------- index
$app->route('GET|POST /ab/data/@data', function() use($app) {
$app->call("ab_data->". $app->get('PARAMS.data'));
}
);
// ------ controllers/ab_data
class ab_data {
function bookings(){
echo "ab_data->bookings";
$records = \models\bookings::getAll();
echo $records;
}
}
// ------models/bookings
namespace models;
use \F3 as F3;
class bookings {
public static function getAll($where = "", $orderby = "client ASC") {
$return = "models/bookings";
return $return;
}
}
// -------------------------------------------------------- end result ------------------------------------
ab_data->bookings
//it doesnt read $records = \models\bookings::getAll(); and even exits pre running it since my end of page echo doesnt fire