DopparWhere Performance Meets Aristocratic Syntax
Unlock the Full Potential of Your PHP Applications with Modern Syntax and Uncompromising Performance
Unlock the Full Potential of Your PHP Applications with Modern Syntax and Uncompromising Performance
With Doppar, a single line like
#[Route('user/store', methods: ['POST'], name: 'user.store', middleware: ['auth'])]gives you full routing power — HTTP method restriction, route naming, and middleware support — all declaratively, elegantly, and without boilerplate.
#[Route(
uri:'user/store',
methods: ['POST', 'PATCH'],
name: 'user.store',
middleware: ['auth'],
rateLimit: 10,
rateLimitDecay: 1
)]
public function updateOrCreate(Request $request)
{
// This route handles POST and PATCH requests sent to 'user/store'.
// The 'auth' middleware ensures that only authenticated users can access this endpoint.
// The route name 'user.store' allows you to reference this route elsewhere in your code,
// such as when generating URLs or redirects.
// Only 10 request is allowed for this client within 1 minute
}Doppar allows you to inject dependencies directly at the method signature. By simply decorating a parameter, it immediately clear which concrete implementation is being used:
#[Route(uri: 'user/store', methods: ['POST'])]
public function store(
#[Bind(UserRepository::class)] UserRepositoryInterface $userRepository
) {
// The framework now explicitly knows to resolve UserRepositoryInterface to UserRepository.
// The binding is visible exactly where it is used.
}Doppar’s Model Hooks provide an elegant way to tap into your models’ lifecycle events, allowing you to execute custom logic automatically during creation, updates, deletion, or booting.
class User extends Model
{
protected $hooks = [
'after_updated' => [
'handler' => App\Hooks\UserUpdatedHook::class,
'when' => [self::class, 'isAdmin']
],
];
public static function isAdmin(Model $model): bool
{
return (int) $model->role === 'admin';
}
}
class UserUpdatedHook
{
public function handle(Model $model): void
{
if ($model->isDirtyAttr('name')) {
info("Name changed from {$model->getOriginal('name')} to {$model->name}");
}
}
}Doppar’s request handling system combines dependency injection, data pipelines, and contextual transformations into a concise and expressive syntax
public function store(PostRequst $request, #[BindPayload] Post $post)
{
$data = $request
->pipeInputs([
'title' => fn($v) => ucfirst(trim($v)),
'tags' => fn($v) => is_string($v) ? explode(',', $v) : $v
])
->contextual(fn($data) => [
'slug' => Str::slug($data['title'])
])
->ensure('slug', fn($slug) => strlen($slug) > 0)
->only('title','slug');
Post::createFromModel($post);
}Traditionally, a controller action receiving a POST request to create a user. With Doppar’s #[BindPayload], this entire setup collapses into a declarative, single line in your method signature:
public function store(Request $request) {
// 1. Validate the request data.
// 2. Extract the data.
// 3. Create a new User object and fill it manually.
$user = new User();
$user->name = $request->input('name');
// ... many more lines of mapping
$user->save();
}
// With #[BindPayload] Attribute
public function store(
#[BindPayload] User $user // The $user object is fully ready!
) {
return User::createFromModel($user);
}Doppar Entity ORM functionality with expressive reusable query, selective fields, and embedded relationships, all while keeping code clean and readable delivering pure, high-performance data handling with zero external overhead.
public function __active(Builder $query): Builder
{
return $query->whereStatus(true);
}
Post::active()
->search(attributes: [
'title',
'user.name',
'category.name'
], searchTerm: $request->search, caseSensitive: true)
->embed(relations: ['category', 'user', 'tags'])
->paginate(perPage: 10);Doppar is engineered for speed — every repeated execution is intelligently memoized, ensuring results are delivered instantly without unnecessary reprocessing.
Doppar’s highly optimized core is engineered for maximum speed—delivering near-instant response times, low latency, and seamless execution even under heavy load.
Doppar brings advanced Just-in-Time (JIT) compilation to the Blade template engine — a performance-focused feature that transforms how views are compiled and rendered at runtime.
Crafted entirely within Doppar's core, this ORM eliminates all third-party dependencies—delivering pure, high-performance data handling with zero external overhead.
Doppar’s model hooks goes beyond and a cleaner, more flexible lifecycle API with support for inline, class-based, and conditional hooks directly in the ORM core.
Doppar offers a rich set of features out of the box — from a fast, core-powered ORM to built-in routing, validation, and concurrency controls. Everything you need to build modern, high-performance applications with zero unnecessary dependencies.