df -h
How to check CPU brand on Mac
sysctl -a | grep cpu.brand
How to check macOS version
sw_vers
How to check Ubuntu version
lsb_release -a
How to check which Shell you are using
echo $SHELL
Laravel Request Lifecycle
1. public/index.php
2. bootstrap/app.php
3. vendor/laravel/framework/src/Illuminate/Foundation/Application.php
handleRequest => vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php
handleCommand => vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php
How to install Homebrew on Mac
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
How to find your CPU, Memory, Storage, Model Name and Serial Number on Mac
Hardware:
system_profiler SPHardwareDataType
Software:
system_profiler SPSoftwareDataType
Memory:
system_profiler SPMemoryDataType
Storage:
system_profiler SPStorageDataType
GPU:
system_profiler SPDisplaysDataType
Network:
system_profiler SPNetworkDataType
Available Datatypes:
system_profiler -listDataTypes
How to check Laravel health with route
bootstrap/app.php
return Application::configure(basePath: dirname(__DIR__))
->withRouting(
web: __DIR__.'/../routes/web.php',
commands: __DIR__.'/../routes/console.php',
health: '/up',
)
->withMiddleware(function (Middleware $middleware) {
//
})
->withExceptions(function (Exceptions $exceptions) {
//
})->create();
How to do optimization in Laravel
Production environment
php artisan optimize
Local development
php artisan optimize:clear