#[ViewModel(
layout: 'article-list',
js: 'article-list.js'
)]
class ArticleListView implements ViewModelInterface
{
public function __construct(
#[Autowire]
protected ArticleRepository $repository,
) {}
public function prepare(AppContext $app, View $view): array
{
[$id, $page] = $app->input('id', 'page')->values()->dump();
$items = $this->repository->getListSelector()
->where('category_id', $id)
->page($page);
return compact('items');
}
}
FEATURES
Easy but Powerful
Learning a new framework is hard, we provide simple and semantic interface to help developers understand this framework.
Fully Decoupled
Windwalker is a set of PHP tools, you can easily install them by composer without too many dependencies.
Extendable
The package system helps us organize our classes and routing to build large enterprise level applications.
Standard
We follow PSR standard, you can easily integrate 3rd party middlewares or caching library into Windwalker.
Rapid Development
Windwalker is a RAD framework, building a usable system prototype with powerful UI is very fast.
IDE friendly
Class searching, auto-completion and many useful IDE functions are working well with IoC.
GETTING STARTED
$ composer create-project windwalker/starter