Skip to content

Commit e788edd

Browse files
committed
first commit
0 parents commit e788edd

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+2013
-0
lines changed

.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Auto detect text files and perform LF normalization
2+
* text=auto

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
vendor
2+
Files/~$data.xlsx

README.md

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# mts-fetching-data
2+
3+
## Step One Clone Repo
4+
5+
git clone git@github.com:coder0010/mts-fetching-data
6+
7+
or you can download it by the desktop application of github
8+
9+
https://github.com/coder0010/mts-fetching-data
10+
11+
Switch to the repo folder
12+
13+
cd mts-fetching-data
14+
15+
---
16+
## Step Two Prepare Project
17+
18+
1 Prepare the project
19+
20+
run composer i
21+
22+
2 open src\Env file to set your config of database
23+
24+
---
25+
# Task Core Files
26+
* **Database**
27+
* Connections => grouping all connection to dbms like (mysql, sqllite, ...)
28+
* DatabaseFactory.php => return instance of requested connection
29+
* Executer.php => it's data layer between eloquents and db [ it's very important ]
30+
31+
* **Repositories**
32+
* Contracts
33+
* BaseRepository.php => it's the main ( contract ) interface that all model contract with extend from them
34+
35+
* Eloquents
36+
* BaseEloquent.php => it's the main ( eloquent ) class that all eloquents will extend from them and has all the implementation of BaseRepository.php
37+
38+
* **Services**
39+
* MigrateService.php => start connection to db by executor then run creation of db and tables
40+
* ImportService.php => Reading data from excel per page
41+
* SeedService.php => construct needed Contracts ( Repos ) and set by encapsulation to local properties and push them to models then save them my eloquents
42+
* ExportService.php => construct needed Contracts ( Repos ) and set by encapsulation to local properties and convert them to json and put them to json file
43+
44+
* **Controllers**
45+
* MigrateController.php
46+
* ImportController.php
47+
* SeedController.php
48+
* ExportController.php

composer.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"name": "mostafakamel/fetching-data",
3+
"description": "fetching data from excel and append data to db",
4+
"type": "project",
5+
"require": {
6+
"box/spout": "^3.3"
7+
},
8+
"license": "MIT",
9+
"authors": [
10+
{
11+
"name": "Mostafa Kamel Masoud",
12+
"email": "mostafakamel000@gmail.com"
13+
}
14+
],
15+
"autoload": {
16+
"psr-4": {
17+
"App\\": "src/"
18+
}
19+
}
20+
}

composer.lock

Lines changed: 93 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)