Skip to content

Commit

Permalink
Minor changes...
Browse files Browse the repository at this point in the history
  • Loading branch information
jlrtutor committed Apr 17, 2019
1 parent f11764d commit 82498db
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
20 changes: 11 additions & 9 deletions README.md
Expand Up @@ -3,7 +3,7 @@ Courses management application, with subjects, students, grades and registration

Requires PHP 7.x, MySQL 5.4.x
```
v0.1
v0.1.1
08/04/2019
(c)Juan Luis Ramírez Tutor
Email: juanluis.ramirez.tutor@gmail.com
Expand All @@ -19,6 +19,7 @@ Please, report any issue you may have using this application.




#Installation
----------------------------

Expand All @@ -42,18 +43,19 @@ following file */app/config.php, line 2*
```php
define( 'BASE_URL', '/university-app/'); //WEB directory, external path url
```
5.1. Choose your interface language (spanish default), by changing */app/config, line 10*:

6. Locale (spanish default), choose english (en-EN) or spanish language (es-ES) by changing */app/config, line 10*:
```php
define( 'LANG', 'es-ES'); //es-ES|en-EN
```

6. LOGIN. You must authenticate before you use this application:
7. LOGIN. You must authenticate before you use this application:
```
| user: root@root.com
| password: admin
```

7. Make
8. Make
```
composer install
```
Expand All @@ -70,10 +72,10 @@ the fields that the model needs and its relationships with other tables or entit
So, the system can validate data automatically, for example:

```php
$this->field('id', 'integer', ['PK'=>true, 'validate'=>false] );
$this->field('student_id', 'integer', ['FK'=>true]);
$this->field('course_id', 'integer', ['FK'=>true]);
$this->field('level', 'integer');
$this->field('id', 'integer', ['PK'=>true, 'validate'=>false] );
$this->field('student_id', 'integer', ['FK'=>true]); //FK of Student table
$this->field('course_id', 'integer', ['FK'=>true]); //FK of Course table
$this->field('level', 'integer');
$this->field('date_of_creation','date', [ 'validate'=>false,
'required'=>false,
'default'=>date('Y-m-d') ] );
Expand All @@ -86,7 +88,7 @@ These relationships make it easier to obtain information from foreign tables:
```php
//Load object Registration
$obj_registration = new Registration($id);
//Binding with Students tabla
//Binding with Students table
echo "The name of the students is: " . $obj_registration->getStudent()->name;
echo "And he courses " . $obj_registration->getCourse()->name;
```
Expand Down
3 changes: 1 addition & 2 deletions app/init.php
Expand Up @@ -37,8 +37,7 @@
$smarty->assign('_TEMPLATE_VIEWS_URL', VIEWS_BASE_URL);
//Set Language for use in templates
$smarty->assign('_LANG_CODE', LANG); //Lang code
\App\Core::set('lang', $_LANG);
$smarty->assign('_LANG', $_LANG); //array of words
$smarty->assign('_LANG', $_LANG); //$_LANG is an array loaded from /public/lang
//Init
\App\Core::set('smarty', $smarty);

Expand Down

0 comments on commit 82498db

Please sign in to comment.