aboutsummaryrefslogtreecommitdiffstats
path: root/README.md
blob: 6a44e50e64ba7f649d3420c81a5ed6a3a0b52ae7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
# What it's ?

It's a mvc structure  written to be useful for everybody, in order to make websites more simply.


# Installation

`composer create-project shaolin/shaolin app_name`

* [**Source code**](https://git.fumseck.eu/cgit/shaolin)
    * [**Bug reports**](mailto:bugzilla@laposte.net)
    * [**Download**](https://git.fumseck.eu/cgit/shaolin/snapshot/shaolin-1.2.zip)
    * [**Show diff**](https://git.fumseck.eu/cgit/shaolin/diff/?id=1.2&id2=1.1&dt=2)

* **Route management**
    * Create a new route
        * `php shaolin route:add`
    * Show routes
        * `php shaolin route:list`
    * Search a route
        * `php shaolin route:find`
    * Remove a route
        * `php shaolin route:destroy`
    * Update a route
        * `php shaolin route:update`
    * Create route base
        * `php shaolin route:generate`
* **Code generation**
    * Create a controller
        *   `php shaolin make:controller $name`
    * Create a view
      * `php shaolin make:view $name [$dir]`
    * Create a model
        * `php shaolin make:model $model $table`
    * Create a middleware
        * `php shaolin make:middleware $name`
* **Database**
    * Create migration and seeding
        * `php shaolin db:add $table`
    * Clean database (drop all tables)
        * `php shaolin db:clean`
    * Dump database 
        * `php shaolin dump`
    * Migrate database 
        * `php shaolin migrate`
    * Rollback last migration 
        * `php shaolin rollback`
    * Seed database 
        * `php shaolin seed`
* **Email**
    * Generate dkim key (used to sign email)
        * `php shaolin dkim:generate`

* **Mode**
    * Turn application in maintenance mode
        * `php shaolin down`
    * Turn application in production mode
        * `php shaolin up`

* **Controllers**
    * [Available methods](https://git.fumseck.eu/cgit/imperium/tree/imperium/App.php)
    * [Available helpers](https://git.fumseck.eu/cgit/imperium/tree/helpers)
    * [Views helpers](https://git.fumseck.eu/cgit/imperium/tree/imperium/View/View.php)
* **helpers**
    * Create an admin helper
        * Edit the `admin.php` inside the `app/Helpers` directory 
    * Create a web helper
        * Edit the `web.php` inside the `app/Helpers` directory
   
# Assets

I want to quit bootstrap to design my application.

So i've created sass directory with compass. 

You can to be not all right with me so you can use your prefered library.

It's project come like it, but you can use bootstrap. 


# Model

To call a model use one of it static function and finish by the `all()` method.

All method return an instance expected specific method.

[See model source code](https://git.fumseck.eu/cgit/imperium/tree/imperium/Model/Model.php)

> The users model is used by the authentication

> The paginate callback must be take two arguments the key first and the in second the value

> The value will be an object stdclass so you can use `$value->column` in the callback function


# Document root

> Document root must be the web directory