Skip to content
This repository was archived by the owner on Jul 9, 2023. It is now read-only.

Commit 3fd16a4

Browse files
committed
change namespaces & package name
1 parent eab6acf commit 3fd16a4

File tree

11 files changed

+27
-26
lines changed

11 files changed

+27
-26
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.idea

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22

33
### Installation:
44
```
5-
composer require serjik/laravel-file-manger
5+
composer require alighale/laravel-file-manger
66
```
77

88
You must add the service provider to `config/app.php`
99
``` php
1010
'providers' => [
1111
// for laravel 5.8 and below
12-
\Serjik\FileManager\FileManagerServiceProvider::class,
12+
\AliGhale\FileManager\FileManagerServiceProvider::class,
1313
];
1414
```
1515

@@ -28,7 +28,7 @@ return [
2828

2929
"types" => [
3030
"default" => [
31-
"provider" => \Serjik\FileManager\Types\File::class,
31+
"provider" => \AliGhale\FileManager\Types\File::class,
3232
"path" => "default_files/test/",
3333
"private" => false,
3434
"date_time_prefix" => true,
@@ -49,7 +49,7 @@ return [
4949

5050
| name | type | description |
5151
|---------------|--------------|---------------------------|
52-
| provider | `string (class name)`| provider class name, must be extended of `Serjik\FileManager\BaseType` |
52+
| provider | `string (class name)`| provider class name, must be extended of `AliGhale\FileManager\BaseType` |
5353
|path | `string` | file upload path |
5454
|private | `boolean` | is private or no if is `true` so upload file in storage folder else if is `false` so upload file in public folder |
5555
|date_time_prefix|`boolean` | if is `true` so upload file with `/{year}/{month}/{day}` prefix|
@@ -78,7 +78,7 @@ $fileName = $upload->getName();
7878
| method |description |
7979
|--------------------------------------|---------------------------------------------|
8080
| `useFileNameToUpload($status = true)`|if is `true` we use of the file original name else we generate a random name|
81-
|`getFile($name = null)` |get file by name and return a `\Serjik\FileManager\Models\File`|
81+
|`getFile($name = null)` |get file by name and return a `\AliGhale\FileManager\Models\File`|
8282
| `setPath($path)` |set file upload path |
8383
| `getUploadPath()` |get upload path |
8484
| `dateTimePrefix($value = true)` |if is `true` so upload file with `/{year}/{month}/{day}` prefix|

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "serjik/laravel-file-manger",
2+
"name": "alighale/laravel-file-manger",
33
"description": "Upload file and download it :)",
44
"type": "library",
55
"require": {
@@ -22,7 +22,7 @@
2222
],
2323
"autoload": {
2424
"psr-4": {
25-
"Serjik\\FileManager\\": "src/"
25+
"AliGhale\\FileManager\\": "src/"
2626
},
2727
"files": [
2828
"src/helper.php"

config/filemanager.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
"types" => [
77
"default" => [
8-
"provider" => \Serjik\FileManager\src\Types\File::class,
8+
"provider" => \AliGhale\FileManager\Types\File::class,
99
"path" => "default_files/test/",
1010
"private" => false,
1111
"date_time_prefix" => true,

src/BaseType.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,18 @@
33
* Created by SERJIK
44
*/
55

6-
namespace Serjik\FileManager;
6+
namespace AliGhale\FileManager;
77

88
use Carbon\Carbon;
99
use Illuminate\Database\Eloquent\Builder;
1010
use Illuminate\Database\Eloquent\Model;
1111
use Illuminate\Support\Str;
12-
use Serjik\FileManager\src\Models\File;
12+
use AliGhale\FileManager\Models\File;
1313
use Symfony\Component\CssSelector\Exception\InternalErrorException;
1414

1515
/**
1616
* Class BaseType
17-
* @package Serjik\FileManager
17+
* @package AliGhale\FileManager
1818
*/
1919
abstract class BaseType
2020
{

src/Controllers/DownloadController.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
* Created by SERJIK
44
*/
55

6-
namespace Serjik\FileManager\src\Controllers;
6+
namespace AliGhale\FileManager\Controllers;
77

88

99
use Carbon\Carbon;
1010
use Illuminate\Support\Facades\Hash;
11-
use Serjik\FileManager\src\Models\File;
11+
use AliGhale\FileManager\Models\File;
1212
use Symfony\Component\CssSelector\Exception\InternalErrorException;
1313
use Symfony\Component\HttpFoundation\BinaryFileResponse;
1414

src/Facades/File.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,19 @@
33
* Created by SERJIK
44
*/
55

6-
namespace Serjik\FileManager\src\Facades;
6+
namespace AliGhale\FileManager\Facades;
77

88

99
use Illuminate\Support\Facades\Facade;
10-
use Serjik\FileManager\BaseType;
10+
use AliGhale\FileManager\BaseType;
1111

1212
/**
1313
* Class File
14-
* @package Serjik\FileManager\src\Facades
14+
* @package AliGhale\FileManager\Facades
1515
*
1616
* @method static BaseType useFileNameToUpload($status = true)
1717
* @method static upload($file)
18-
* @method static \Serjik\FileManager\src\Models\File getFile($name = null)
18+
* @method static \AliGhale\FileManager\Models\File getFile($name = null)
1919
* @method static BaseType setFile(File $file)
2020
* @method static BaseType setConfig(array $config)
2121
* @method static getConfig($name = null)
@@ -40,6 +40,6 @@ class File extends Facade
4040
{
4141
protected static function getFacadeAccessor()
4242
{
43-
return \Serjik\FileManager\src\File::class;
43+
return \AliGhale\FileManager\File::class;
4444
}
4545
}

src/File.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
* Created by SERJIK
44
*/
55

6-
namespace Serjik\FileManager\src;
6+
namespace AliGhale\FileManager;
77

8-
use Serjik\FileManager\BaseType;
8+
use AliGhale\FileManager\BaseType;
99

1010
class File
1111
{

src/FileManagerServiceProvider.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Created by SERJIK
44
*/
55

6-
namespace Serjik\FileManager\src;
6+
namespace AliGhale\FileManager;
77

88

99
use Illuminate\Support\Facades\Route;
@@ -42,7 +42,7 @@ public function registerMigrations()
4242
protected function registerRoutes()
4343
{
4444
Route::prefix('/api/filemanager')
45-
->namespace('Serjik\FileManager\src\Controllers')
45+
->namespace('AliGhale\FileManager\Controllers')
4646
->group(__DIR__ . "/Routes/api.php");
4747
}
4848
}

src/Models/File.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Created by SERJIK
44
*/
55

6-
namespace Serjik\FileManager\src\Models;
6+
namespace AliGhale\FileManager\Models;
77

88

99
use Carbon\Carbon;
@@ -12,7 +12,7 @@
1212

1313
/**
1414
* Class File
15-
* @package Serjik\FileManager\src\Modelsid
15+
* @package AliGhale\FileManager\Modelsid
1616
*
1717
* @property $id
1818
* @property $name

0 commit comments

Comments
 (0)