Skip to content

Commit 7ce6d9a

Browse files
committed
update readme.md
1 parent e37eb3c commit 7ce6d9a

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

README.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,15 @@ By default Laravel does not allow to generate observers or even does not allow t
3737
Open the console and enter this command to generate a new repository :
3838

3939
```shell
40-
php artisan laravel:repository {Entity}
40+
php artisan make:repository {Entity}
4141
```
4242

4343
The generate file look like this :
4444

4545
```php
4646
namespace App\Repositories;
4747

48-
use App\Entity;
48+
use App\Models\Entity;
4949

5050
class EntityRepository
5151
{
@@ -75,24 +75,24 @@ class EntityRepository
7575
}
7676
```
7777

78-
By default Repository load Model in the default application namespace `App\` If your models are in another namespace, it will be necessary to change the use in the repository to have no error like :
78+
By default Repository load Model in the default application namespace `App\Models` If your models are in another namespace, it will be necessary to change the use in the repository to have no error like :
7979

8080
```php
8181
use MODELS\NAMESPACE\Entity;
8282
```
8383

84-
This is the same action to perform for the observers, it also loads the models in the default namespace App \. To generate an observer, you must execute the command:
84+
This is the same action to perform for the observers, it also loads the models in the namespace App\Models. To generate an observer, you must execute the command:
8585

8686
```shell
87-
php artisan laravel:observer {Entity}
87+
php artisan make:observer {Entity}
8888
```
8989

9090
The generate file look like this :
9191

9292
```php
9393
namespace App\Observers;
9494

95-
use App\Entity;
95+
use App\Models\Entity;
9696

9797
class EntityObserver
9898
{
@@ -125,7 +125,7 @@ class EntityObserver
125125
- Helper files
126126

127127
``` bash
128-
$ php artisan laravel:helper {Entity}
128+
$ php artisan make:helper {Entity}
129129
```
130130

131131
The generate file look like this :
@@ -188,18 +188,18 @@ class MediaHelper
188188
/**
189189
* resize, To rezise and image
190190
*
191-
* @param string $file, l'image à redimmensionner
192-
* @param int $width, la largeur à laquelle on doit redimensionner l'image
193-
* @param int $height, la hateur à laquelle on doit redimensionner l'image
194-
* @param string $filepath, le chemin ou est garder le fichier redimensionner
191+
* @param string $file file to rezise
192+
* @param int $width width of the file
193+
* @param int $height height of the file
194+
* @param string $filepath path to save file
195195
*/
196196
public static function resize($file, $width, $height, $filepath)
197197
{
198198
Image::make($file)->resize($width, $height)->save($filepath);
199199
}
200200

201201
/**
202-
* getImageWeight, permet de retourner le poids d'une image
202+
* getImageWeight
203203
*
204204
* @param $octets
205205
* @return string

0 commit comments

Comments
 (0)