The Next Generation PHP Development
A powerful, flexible, and modern PHP framework designed for rapid application development
Optimized for speed and efficiency, outperforming many popular frameworks.
Built-in protection against common web vulnerabilities and attacks.
Modular design allowing for easy customization and extension.
Intuitive database interactions with advanced relationship handling.
Multi-level caching system for optimal application performance.
CLI tools, debugging aids, and comprehensive testing support.
*Based on benchmark tests processing 1000 requests with a "Hello World" response
namespace Yabasi\Controllers;
use Yabasi\Http\Request;
use Yabasi\Http\Response;
use Yabasi\Cache\CacheManager;
use Yabasi\Events\EventDispatcher;
class PostController extends Controller
{
public function __construct(
protected CacheManager $cache,
protected EventDispatcher $events
) {
$this->middleware('cache')->only('index', 'show');
$this->middleware('auth')->except('index', 'show');
}
public function index(Request $request): Response
{
$posts = Post::query()
->filter($request->only('category', 'tag', 'status'))
->latest()
->paginate();
return $this->json($posts);
}
public function store(Request $request): Response
{
$post = Post::create(
$request->validate([
'title' => 'required|min:3',
'content' => 'required',
'status' => 'in:draft,published'
])
);
$this->cache->tags('posts')->flush();
$this->events->dispatch('post.created', $post);
return $this->json($post, 201);
}
public function show(string $slug): Response
{
return $this->json(
$this->cache->tags('posts')->remember(
"post.{$slug}",
fn() => Post::whereSlug($slug)
->with('author', 'comments')
->firstOrFail()
)
);
}
}
Clean, concise, and powerful: Experience rapid development without compromising code quality.
Advanced ORM with support for multiple databases, migrations, and seeders.
Robust security system with multi-auth support and role-based permissions.
Built-in tools for RESTful API development, including versioning and rate limiting.
Efficient background job processing with multiple queue drivers.
Real-time communication capabilities with WebSocket integration.
Comprehensive testing suite and powerful debugging tools for robust development.
Everything you need to know about Yabasi, from getting started to advanced topics
Explore the DocsGitHub Stars
Community Members
Contributors