RTL & Code Direction Demo

Lesson 4 of 4

Mixing Arabic prose with English code

Run php artisan route:list to inspect your routes. The block below stays left-aligned and reads left-to-right:

Route::middleware(['auth'])->group(function () {
    Route::get('/dashboard', [DashboardController::class, 'index'])
        ->name('dashboard');
});

The surrounding paragraph still follows the page direction.

Code Snippets

Generate the controller

php artisan make:controller DashboardController
php artisan route:list --name=dashboard

Shell commands stay left-to-right even in the Arabic UI.

A small JavaScript helper

const greet = (name) => {
    return `Hello, ${name}!`;
};

console.log(greet('Trackaat'));

The snippet renders LTR with correct indentation.

We use cookies to keep you signed in, remember your preferences, and keep the platform secure. You can accept all cookies or manage your preferences. Cookie Policy