-
-
Notifications
You must be signed in to change notification settings - Fork 372
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Laravel Fixer #725
Merged
Merged
Laravel Fixer #725
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The Laravel framework adopts the PSR-2 coding style with some additions. Laravel apps *should* adopt this coding style as well. However, Shift allows you to customize the adopted coding style through the [.shiftrc][1] file by using your [PHP CS Fixer][2] config. [1]: https://laravelshift.com/shiftrc-configuration-file [2]: https://github.com/FriendsOfPHP/PHP-CS-Fixer
Laravel 5.1 requires PHP 5.5.9+ which provides the new static `class` property to get the fully qualified name of a class and is preferred over using class name strings.
Laravel [automatically loads Commands][1] within the `app/Console/Command` folder. As such, there is no need to register them within the _Console Kernel_. [1]: https://laravel.com/docs/5.7/artisan#registering-commands
Laravel offers many built-in Blade directives, including: `@auth`, `@guest` ,`@csrf`, `@method`, `@json`, and more. Review the [Blade][1] documentation for more details. [1]: https://laravel.com/docs/5.7/blade
Laravel recommends using the `Str` and `Arr` class methods directly instead of the respective helper functions. These helper functions are [deprecated in Laravel 5.8][1] and will be removed in a future version. [1]: laravel/framework#26898
Laravel automatically injects the current Http [request object][1] to all Controller actions and Middleware. Leveraging this object improves consistency and testability. [1]: https://laravel.com/docs/5.7/requests#accessing-the-request
By convention, Laravel uses the "snake case", plural name of the class as the table name.
[ci skip] [skip ci]
Apply fixes from StyleCI
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request includes changes and recommendations for crafting your Laravel application. These are based on the Laravel documentation and widely adopted practices within the community.
Before merging, you should:
shift-14576
branchDon't hesitate to send your feedback to shift@laravelshift.com or share on Twitter.