Skip to content

Latest commit

 

History

History
177 lines (112 loc) · 6.42 KB

DOCS.md

File metadata and controls

177 lines (112 loc) · 6.42 KB

📦 Preinstalled laravel packages

  • pretty-routes: List all routes in one UI.

    • Navigate to /routes in your browser.
  • LogViewer: View Laravel logs in one UI.

    • Navigate to /logs in your browser.
  • laravel-data: Powerful data objects for Laravel.

  • spatie/laravel-ignition: Better error page layout. (packageist: binarytorch/larecipe)

  • saleem-hadad/larecipe: Write documentation via Markdown inside your Laravel App.

    • First, you must run php artisan larecipe:install command to publish the needed assets and configurations.
    • Then, Navigate to /docs in your browser.
  • laravel/ui: Ready to use auth views, forms, UI utilities and presets.

    • Views and controllers are already installed but you can overwrite with run php artisan ui:auth command to publish the needed assets and configurations.
  • Debugging

    • clockwork: Modern debugging tool for Laravel. (debugbar alternative)

      • Navigate to /clockwork in your browser.
    • debugbar: In UI, see app metrics and logs.

    • laravel-ray: Debug with Ray to fix problems faster in Laravel apps. It requires ray app (paid app).

  • Support

    • readable-numbers: Human readable numbers.
    • ultimate-support: Useful helper collection.
    • hasin: The 'hasin' is 'Relation Mixin' of 'Laravel ORM'. Replacement for some has and whereHas cases.
    • once: A magic memoization function to cache the result of a function call.
  • Code Analysis

    • larastan: Adds code analysis to Laravel improving developer productivity and code quality (PHPStan wrapper).
    • pint: PHP code style fixer (PHP-CS Fixer wrapper).
    • pest: Pest is an elegant PHP Testing Framework with a focus on simplicity.

🚩 Languages

  • en: native/default
  • tr

🔰 Laravel Mix

This project uses Laravel Mix to compile the assets.

Preinstalled packages

  • browser-sync: Keep multiple browsers & devices in sync when building apps.
    • First, you must run php artisan serve to start the server. Then run npm run watch to watch for changes. Browsersync listens to laravel app 8000 port and exposes it to your browser at localhost:3000 and Browsersync UI localhost:3001 ports.

⚡ ViteJS

Also this project uses ViteJS to speed up the development process. You can use it to build your project faster.

Why we are using both of them?

ViteJS is a JavaScript runtime that is optimized for web applications. For example, it is optimized for the Vue.js framework. But if you want to use blade templates, Laravel Mix is still a useful option. Plus, browser-sync is a great solution for smooth development.

🎨 Artisan Commands

Click to see artisan commands
# serve app

php artisan serve --port=8000
# quick start

php artisan make:model Folder/ModelName -a
# quick start

php artisan make:model Folder/ModelName -a
# create factory and seeder

php artisan make:factory Folder/ModelNameFactory
php artisan make:seeder Folder/ModelNameSeeder


# then seed the database
php artisan db:seed

# or run see specific seeder
php artisan db:seed --class=Database\Seeders\Folder\SeedTheSeeder
# seed for development
php artisan db:seed --class=DevelopmentSeeder

# seed for production
php artisan db:seed --class=ProductionSeeder
# composer autoload optimization

composer dump-autoload -o

Larastan Commands

To ignore specific lines of code, add the following comments to your code.

Click to see larastan commands
# analyze code

php ./vendor/bin/phpstan analyse --memory-limit=2G --level=9

✂️ Pint Commands

See full config list and examples here.

Click to see pint commands
# check and fix code style

php ./vendor/bin/pint -v

🔬 Pest Commands

See more examples abouts pesting here.

Click to see pest commands
# run tests

php ./vendor/bin/pest

⚠️ Commit Messages

Otherwise, I won't be able to review your commits.

🐳 Docker

This project comes with a docker stack for laravel. It contains: serversideup/php image for Laravel app, MySQL, and Redis containers.

docker-compose.yml use .env file for configurations. So, you need to rename .env-example to .env and fill it with your own credentials. Then you can run docker-compose up -d to start the stack.

👍 Suggested Tools

  • Use command aliases to save time and make your development environment more comfortable.

  • This project handles multiple terminals on startup with Terminals Manager. You can configure it in .vscode/terminals.json file.

  • If you are working on multiple projects, you can set accent color for each project with Peacock. You can configure it in .vscode/settings.json file.

  • To consistent workplace, you can use EditorConfig extension.