Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Laravel Restify

Laravel Restify Laravel Package

binaryk/laravel-restify

Laravel Restify is a fast, modular API builder for Laravel. Define repositories to expose Eloquent models with built-in filtering, sorting, pagination, relationships, validation, and authorization—helping you ship clean RESTful APIs with less boilerplate.

View on GitHub
Deep Wiki
Context7

Laravel Restify is a powerful package for building REST APIs in Laravel with minimal boilerplate. It offers a structured, resource-oriented approach with automatic route generation, controllers, and CRUD operations, letting you focus on business logic instead of repetitive API wiring.

  • Automatic routing and controller generation for RESTful resources
  • Built-in filtering, sorting, pagination, and search
  • Validation, authorization, and relationship handling
  • Extensible repository/resource architecture for custom endpoints
Frequently asked questions about Laravel Restify
How do I install and use binaryk/laravel-restify in Laravel?
Install it with Composer using composer require binaryk/laravel-restify, then publish the package config and define your repositories. Laravel Restify builds structured REST APIs with CRUD endpoints, filtering, sorting, search, relationships, validation, authorization, and custom actions. It integrates with Laravel policies for relationship writes, so set up policy coverage for attach and sync paths.
What Laravel and PHP versions are supported by Laravel Restify?
The package is a Laravel/PHP Composer package, but the exact Laravel and PHP constraints depend on the release. Check composer.json and the changelog for version 10.4.62 before upgrading. Confirm those constraints match your application's runtime and framework version.
How does Laravel Restify authorize attach and sync operations?
It uses Laravel policies as the authorization boundary for relationship writes. The 10.4.62 release fails closed when no parent policy exists, so attach or sync requests are denied or throw instead of proceeding. Custom attachers skip the package's authorization, so you must add explicit checks for those paths.
What changed in Laravel Restify 10.4.62 that could affect production?
Version 10.4.62 makes authorization fail closed when no parent policy exists, applies global scopes and soft deletes during related-ID resolution, and runs writes on the model's own connection. The fail-closed change is the biggest behavioral risk because previously permissive flows may now be denied. Treat the upgrade as a patch-level but behavioral change and test in staging first.
How should I migrate an existing Laravel app to Laravel Restify 10.4.62?
Audit every attach and sync call site for parent-policy coverage, then add or update missing policies. Identify custom attachers and add explicit authorization because the package cannot enforce it for those paths. Run the full test suite with cases for soft-deleted related models, global-scoped related models, and non-default database connections, then deploy to staging and monitor authorization denials.
Does Laravel Restify apply global scopes and soft deletes when resolving related IDs?
Yes, the 10.4.62 fixes apply global scopes and soft deletes during related-ID resolution. This improves query correctness but may change which IDs are resolved compared with earlier behavior. Update tests that relied on unscoped resolution and verify query results in staging.
Can Laravel Restify handle multi-database or multi-tenant Laravel applications?
The 10.4.62 connection fix makes attach and sync writes use the model's own connection, which helps multi-database and multi-tenant apps. You should still verify transaction boundaries in staging for attach, sync, detach, and pivot updates. Confirm the fix covers all write paths your application uses.
What happens if a parent model has no policy in Laravel Restify?
The package now fails closed, so the attach or sync operation is denied or throws when no applicable parent policy exists. Existing flows that succeeded under permissive behavior will need policies added before they work again. This is a security improvement, but it can surface as production authorization errors if policy coverage is incomplete.
How do I secure custom attachers in Laravel Restify?
Custom attachers skip the package's built-in authorization, so the package cannot enforce policy checks for them. Inventory all custom attachers in your codebase and add explicit authorization logic inside each one. Document this caveat for your team and include authorization tests for custom attacher paths.
What testing should I run before upgrading Laravel Restify?
Run your full test suite plus targeted tests for soft-deleted related models, global-scoped related models, and non-default database connections. Add authorization tests for attach and sync call sites, including cases with missing parent policies. Use staging with query logging and monitor for authorization denials after deployment.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console
pnscripts/filament-broadquill-lite
pnscripts/laravel-sentfold-lite
vleap/mx-sdk-laravel-internal
twidpay/utils
htetmyathlaing/scout-elasticsearch-driver
artisan-toolbox/front-awesome
ls/client-assistant
users-au/laravel-client
cgv/localized-resource
noith/settings
kda/laravel-package
kda/filament-dynamic-navigation
bypersoft/signbox
pairus/product-data
fayne/laravel-filament-cms-core