Skip to content

Commit 8c83ec0

Browse files
committed
- removes the App folder / namespace
- adds guarded = ['id'] to model - changes `web` middleware to `api` - adds type to props in structure migrations - updates relation - updates codacy badge
1 parent 5203c6a commit 8c83ec0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+137
-118
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# File Manager
22

3-
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/6e342eff10f24db5b89be5fe203e424d)](https://www.codacy.com/app/laravel-enso/files?utm_source=github.com&utm_medium=referral&utm_content=laravel-enso/files&utm_campaign=Badge_Grade)
3+
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/0ad3f6e21d9e42279dedd5432602891b)](https://www.codacy.com/gh/laravel-enso/files?utm_source=github.com&utm_medium=referral&utm_content=laravel-enso/files&utm_campaign=Badge_Grade)
44
[![StyleCI](https://github.styleci.io/repos/85492361/shield?branch=master)](https://github.styleci.io/repos/85492361)
55
[![License](https://poser.pugx.org/laravel-enso/datatable/license)](https://packagist.org/packages/laravel-enso/datatable)
66
[![Total Downloads](https://poser.pugx.org/laravel-enso/files/downloads)](https://packagist.org/packages/laravel-enso/files)

composer.json

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,19 @@
1010
"homepage": "https://github.com/laravel-enso/files",
1111
"type": "library",
1212
"license": "MIT",
13-
"authors": [
14-
{
15-
"name": "Adrian Ocneanu",
16-
"email": "[email protected]",
17-
"homepage": "https://laravel-enso.com",
18-
"role": "Developer"
19-
}
20-
],
13+
"authors": [{
14+
"name": "Adrian Ocneanu",
15+
"email": "[email protected]",
16+
"homepage": "https://laravel-enso.com",
17+
"role": "Developer"
18+
}],
2119
"require": {
2220
"php": ">=7.4.0",
23-
"laravel-enso/core": "4.8.*",
24-
"laravel-enso/helpers": "1.15.*",
25-
"laravel-enso/image-transformer": "1.6.*",
26-
"laravel-enso/migrator": "1.1.*",
27-
"laravel-enso/track-who": "1.9.*"
21+
"laravel-enso/core": "^5.0",
22+
"laravel-enso/helpers": "^2.0",
23+
"laravel-enso/image-transformer": "^2.0",
24+
"laravel-enso/migrator": "^2.0",
25+
"laravel-enso/track-who": "^2.0"
2826
},
2927
"autoload": {
3028
"psr-4": {
@@ -40,8 +38,8 @@
4038
"LaravelEnso\\Files\\UploadServiceProvider"
4139
],
4240
"aliases": {
43-
"FileBrowser": "LaravelEnso\\Files\\App\\Facades\\FileBrowser"
41+
"FileBrowser": "LaravelEnso\\Files\\Facades\\FileBrowser"
4442
}
4543
}
4644
}
47-
}
45+
}
File renamed without changes.
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
<?php
22

3-
use LaravelEnso\Migrator\App\Database\Migration;
3+
use LaravelEnso\Migrator\Database\Migration;
44

55
class CreateStructureForFiles extends Migration
66
{
7-
protected $permissions = [
7+
protected array $permissions = [
88
['name' => 'core.files.index', 'description' => 'List files', 'is_default' => true],
99
['name' => 'core.files.link', 'description' => 'Get file download temporary link', 'is_default' => true],
1010
['name' => 'core.files.show', 'description' => 'Open file in browser', 'is_default' => true],
1111
['name' => 'core.files.download', 'description' => 'Download file', 'is_default' => true],
1212
['name' => 'core.files.destroy', 'description' => 'Delete file', 'is_default' => true],
1313
];
1414

15-
protected $menu = [
15+
protected array $menu = [
1616
'name' => 'Files', 'icon' => 'folder-open', 'route' => 'core.files.index', 'order_index' => 255, 'has_children' => false,
1717
];
1818
}

src/database/migrations/2018_08_25_103000_create_structure_for_uploads.php renamed to database/migrations/2018_08_25_103000_create_structure_for_uploads.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<?php
22

3-
use LaravelEnso\Migrator\App\Database\Migration;
3+
use LaravelEnso\Migrator\Database\Migration;
44

55
class CreateStructureForUploads extends Migration
66
{
7-
protected $permissions = [
7+
protected array $permissions = [
88
['name' => 'core.uploads.store', 'description' => 'Upload file', 'is_default' => true],
99
['name' => 'core.uploads.destroy', 'description' => 'Delete upload', 'is_default' => true],
1010
];

src/routes/api.php renamed to routes/api.php

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

33
use Illuminate\Support\Facades\Route;
44

5-
Route::middleware(['web', 'auth', 'core'])
6-
->namespace('LaravelEnso\Files\App\Http\Controllers')
5+
Route::middleware(['api', 'auth', 'core'])
6+
->namespace('LaravelEnso\Files\Http\Controllers')
77
->prefix('api/core')
88
->as('core.')
99
->group(function () {
@@ -12,7 +12,7 @@
1212
});
1313

1414
Route::middleware(['signed', 'bindings'])
15-
->namespace('LaravelEnso\Files\App\Http\Controllers\File')
15+
->namespace('LaravelEnso\Files\Http\Controllers\File')
1616
->prefix('api/core/files')
1717
->as('core.files.')
1818
->group(function () {
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)