Skip to content

Commit 130d019

Browse files
Merge pull request #1 from Pharaonic/feature/structure-enhancement
Feature/structure enhancement
2 parents 9147957 + 41f63a9 commit 130d019

File tree

12 files changed

+387
-254
lines changed

12 files changed

+387
-254
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/vendor
2+
composer.lock

composer.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@
1111
"authors": [
1212
{
1313
"name": "Moamen Eltouny (Raggi)",
14-
"email": "raggi@raggitech.com"
14+
"email": "raggigroup@gmail.com"
1515
}
1616
],
1717
"require": {
18-
"php": ">=7.2",
19-
"laravel/framework": ">=6.0",
20-
"pharaonic/laravel-uploader": ">=1.0",
21-
"pharaonic/laravel-helpers": ">=1.0"
18+
"php": ">=8.0",
19+
"laravel/framework": ">=10.0",
20+
"pharaonic/laravel-uploader": "^4.0",
21+
"pharaonic/laravel-assistant": "^1.0"
2222
},
2323
"autoload": {
2424
"psr-4": {

src/database/migrations/2021_02_01_000003_create_files_table.php renamed to database/migrations/2021_02_01_000003_create_files_table.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
use Illuminate\Database\Schema\Blueprint;
55
use Illuminate\Support\Facades\Schema;
66

7-
class CreateFilesTable extends Migration
7+
return new class extends Migration
88
{
99
/**
1010
* Run the migrations.
@@ -37,4 +37,4 @@ public function down()
3737
{
3838
Schema::dropIfExists('files');
3939
}
40-
}
40+
};

src/File.php

Lines changed: 0 additions & 59 deletions
This file was deleted.

src/FilesServiceProvider.php

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,19 @@
33
namespace Pharaonic\Laravel\Files;
44

55
use Illuminate\Support\ServiceProvider;
6+
use Pharaonic\Laravel\Files\Models\File;
7+
use Pharaonic\Laravel\Files\Observers\FileObserver;
68

79
class FilesServiceProvider extends ServiceProvider
810
{
9-
1011
/**
1112
* Register services.
1213
*
1314
* @return void
1415
*/
1516
public function register()
1617
{
17-
// Config Merge
18-
$this->mergeConfigFrom(__DIR__ . '/config/files.php', 'laravel-has-files');
19-
20-
// Migration Loading
21-
$this->loadMigrationsFrom(__DIR__ . '/database/migrations');
18+
$this->loadMigrationsFrom(__DIR__ . '/../database/migrations');
2219
}
2320

2421
/**
@@ -28,11 +25,12 @@ public function register()
2825
*/
2926
public function boot()
3027
{
28+
// Observers
29+
File::observe(FileObserver::class);
30+
3131
// Publishes
3232
$this->publishes([
33-
__DIR__ . '/config/files.php' => config_path('Pharaonic/files.php'),
34-
__DIR__ . '/database/migrations/2021_02_01_000003_create_files_table.php' => database_path('migrations/2021_02_01_000003_create_files_table.php'),
33+
__DIR__ . '/../database/migrations' => database_path('migrations'),
3534
], ['pharaonic', 'laravel-has-files']);
36-
3735
}
3836
}

src/HasFiles.php

Lines changed: 0 additions & 171 deletions
This file was deleted.

0 commit comments

Comments
 (0)