不一定是编码标准(命名约定、避免使用 else 等),而是更像是 'app' 指南 - 你不想忘记的事情。
⚠️ Work in progress! ⚠️
❤️ We proudly support the community by developing Laravel packages and giving them away for free. If this package saves you time or if you're relying on it professionally, please consider sponsoring the maintenance and development and check out our latest premium package: Inertia Table. Keeping track of issues and pull requests takes time, but we're happy to help!
UpdatesUserProfileInformation, and its implementation UpdateUserProfileInformation.approve method, or use an invokable ApproveBlogPost controller.chunk or chunkById method.toArray() on a Model. Also, never directly use a request to save a model (e.g. Model::create($request->all())). Always validate and manually specify all fields (e.g. Model::create($request->validated())). This way, we can unguard the models.query() method to begin querying an Eloquent Model.published_at instead of is_published.handleExceedingCumulativeQueryDuration PR.if (!app()->isProduction()) {
DB::listen(function (QueryExecuted $event) {
if ($event->time > 100) {
throw new QueryException(
$event->sql,
$event->bindings,
new Exception("Individual database query exceeded 100ms.")
);
}
});
}Relation::requireMorphMap().orWhere* constraints. When combined with other constraints, you often need to wrap orWhere* method calls.timeout on the HTTP Client.You may use ESLint to find problems that can be automatically fixed. You'll find a sensible default .eslintrc.js file in this repository.
npm install eslint eslint-plugin-vue --devNPM script:
"scripts": {
"eslint": "./node_modules/.bin/eslint resources/js/ --ext .js,.vue --fix"
}You may use PHP CS Fixer to fix your code to follow standards. You'll find a sensible default .php-cs-fixer.php file in this repository.
composer require friendsofphp/php-cs-fixer --devComposer script:
"scripts": {
"php-cs-fixer": [
"vendor/bin/php-cs-fixer fix --config=.php-cs-fixer.php --verbose"
],
}You may use Babel to support code splitting with Inertia.
npm install @babel/plugin-syntax-dynamic-import --devDeprecated: For new projects, start using Vite.
Install Polyfill extension to include polyfills by using Babel, core-js, and regenerator-runtime.
npm install laravel-mix-polyfill --devCheckout the webpack.mix.js example file, which includes fixes for some older browsers.
We proudly support the community by developing Laravel packages and giving them away for free. Keeping track of issues and pull requests takes time, but we're happy to help! If this package saves you time or if you're relying on it professionally, please consider supporting the maintenance and development.
Inertia Table: The Ultimate Table for Inertia.js with built-in Query Builder.Laravel Blade On Demand: Laravel package to compile Blade templates in memory.Laravel Cross Eloquent Search: Laravel package to search through multiple Eloquent models.Laravel Eloquent Scope as Select: Stop duplicating your Eloquent query scopes and constraints in PHP. This package lets you re-use your query scopes and constraints by adding them as a subquery.Laravel MinIO Testing Tools: This package provides a trait to run your tests against a MinIO S3 server.Laravel Mixins: A collection of Laravel goodies.Laravel Paddle: Paddle.com API integration for Laravel with support for webhooks/events.Laravel Verify New Email: This package adds support for verifying new email addresses: when a user updates its email address, it won't replace the old one until the new one is verified.Laravel XSS Protection Middleware: Laravel Middleware to protect your app against Cross-site scripting (XSS). It sanitizes request input by utilising the Laravel Security package, and it can sanatize Blade echo statements as well.The MIT License (MIT). Please see License File for more information.
暂无开放 Issues,或尚未同步最近议题。