Skip to content

Commit e2f293c

Browse files
authored
Update README.md
1 parent 26369a3 commit e2f293c

File tree

1 file changed

+47
-45
lines changed

1 file changed

+47
-45
lines changed

README.md

Lines changed: 47 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,88 +1,90 @@
1-
# 📂 ساختار پوشه‌ها در لاراول
1+
# 📂 Laravel Directory Structure
22

3-
در این مطلب با ساختار پوشه‌ها و فایل‌های اصلی لاراول آشنا می‌شویم. این ساختار به گونه‌ای طراحی شده است که توسعه‌دهنده بتواند به راحتی کدها، تنظیمات و منابع پروژه را مدیریت کند.
3+
In this post, we’ll explore Laravel’s default folder and file structure.
4+
This structure is designed to keep your application’s logic, configuration, and resources well organized.
45

56
---
67

78
## 1. `app/`
8-
- **هسته اصلی برنامه**
9-
- شامل منطق اصلی پروژه مانند مدل‌ها، کنترلرها، Middleware و ...
10-
- زیرپوشه‌های مهم:
11-
- **`Http/`**کنترلرها، میدلور‌ها و Request ها.
12-
- **`Models/`**مدل‌ها برای ارتباط با دیتابیس.
13-
- **`Console/`**دستورات Artisan.
14-
- **`Providers/`**سرویس‌پراوایدرها.
9+
- **The core of your application**.
10+
- Contains main application logic such as Models, Controllers, Middleware, etc.
11+
- Important subfolders:
12+
- **`Http/`**Controllers, Middleware, and Requests.
13+
- **`Models/`**Eloquent models for database interaction.
14+
- **`Console/`**Custom Artisan commands.
15+
- **`Providers/`**Service providers.
1516

1617
---
1718

1819
## 2. `bootstrap/`
19-
- شامل فایل‌های راه‌اندازی اولیه لاراول.
20-
- `app.php` هسته برنامه را آماده اجرا می‌کند.
21-
- پوشه `cache/` برای کش مسیرها و تنظیمات.
20+
- Contains the files needed to bootstrap Laravel.
21+
- `app.php` initializes the application.
22+
- The `cache/` folder stores cached routes and configuration files.
2223

2324
---
2425

2526
## 3. `config/`
26-
- همه **تنظیمات پروژه** اینجاست.
27-
- مثال: `app.php`, `database.php`, `mail.php` و ...
28-
- مقادیر `.env` از اینجا به پروژه تزریق می‌شود.
27+
- Holds all **configuration files** for the project.
28+
- Examples: `app.php`, `database.php`, `mail.php`, etc.
29+
- Values from `.env` are loaded here.
2930

3031
---
3132

3233
## 4. `database/`
33-
- مدیریت دیتابیس:
34-
- **`migrations/`**ساخت جداول.
35-
- **`factories/`**ساخت داده تستی.
36-
- **`seeders/`**داده اولیه.
34+
- Database-related files:
35+
- **`migrations/`**Create or modify database tables.
36+
- **`factories/`**Generate test data.
37+
- **`seeders/`**Insert initial data.
3738

3839
---
3940

4041
## 5. `public/`
41-
- تنها پوشه قابل دسترسی مستقیم از وب.
42-
- شامل:
43-
- `index.php`ورودی اصلی برنامه.
44-
- فایل‌های استاتیک (CSS, JS, تصاویر).
42+
- The only directory accessible from the web.
43+
- Contains:
44+
- `index.php`The entry point of the application.
45+
- Static files (CSS, JS, images).
4546

4647
---
4748

4849
## 6. `resources/`
49-
- شامل منابع خام پروژه:
50-
- **`views/`**قالب‌های Blade.
51-
- **`lang/`**فایل‌های زبان.
52-
- **`css/`, `js/`**کدهای فرانت‌اند.
50+
- Contains raw resources for the application:
51+
- **`views/`** → Blade templates.
52+
- **`lang/`**Language files.
53+
- **`css/`, `js/`**Front-end source files.
5354

5455
---
5556

5657
## 7. `routes/`
57-
- تعریف مسیرها:
58-
- `web.php`مسیرهای وب.
59-
- `api.php`مسیرهای API.
60-
- `console.php`مسیرهای Artisan.
61-
- `channels.php`مسیرهای Broadcast.
58+
- Route definitions:
59+
- `web.php`Web routes (with sessions & cookies).
60+
- `api.php` → API routes (stateless).
61+
- `console.php` → Artisan command routes.
62+
- `channels.php` → Broadcast channels.
6263

6364
---
6465

6566
## 8. `storage/`
66-
- محل ذخیره‌سازی فایل‌های تولیدشده توسط برنامه:
67-
- **`app/`**فایل‌های آپلودی.
68-
- **`framework/`**کش‌ها و سشن‌ها.
69-
- **`logs/`**لاگ‌های برنامه.
67+
- Stores files generated by the application:
68+
- **`app/`**Uploaded files.
69+
- **`framework/`**Cache, sessions, and compiled templates.
70+
- **`logs/`**Application logs.
7071

7172
---
7273

7374
## 9. `tests/`
74-
- تست‌های Unit و Feature.
75+
- Unit and Feature test files.
7576

7677
---
7778

78-
## 10. سایر فایل‌ها:
79-
- **`vendor/`**پکیج‌های Composer.
80-
- **`.env`**تنظیمات محیطی.
81-
- **`artisan`**ابزار خط فرمان لاراول.
82-
- **`composer.json`**لیست پکیج‌ها.
83-
- **`package.json`**پکیج‌های جاوااسکریپت.
79+
## 10. Other important files:
80+
- **`vendor/`** → Composer dependencies.
81+
- **`.env`**Environment configuration.
82+
- **`artisan`**Laravel CLI tool.
83+
- **`composer.json`**Composer package list.
84+
- **`package.json`**JavaScript dependencies.
8485

8586
---
8687

87-
## 📌 نتیجه‌گیری
88-
لاراول با این ساختار پوشه‌ای منظم، مدیریت پروژه را ساده و سریع می‌کند. آشنایی کامل با این ساختار باعث می‌شود در توسعه و نگهداری کدها عملکرد بهتری داشته باشید.
88+
## 📌 Conclusion
89+
Laravel’s organized directory structure helps developers manage their applications efficiently.
90+
Familiarity with this structure will improve your development workflow and code maintenance.

0 commit comments

Comments
 (0)