-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- 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
- Loading branch information
Showing
43 changed files
with
137 additions
and
118 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,21 +10,19 @@ | |
"homepage": "https://github.com/laravel-enso/files", | ||
"type": "library", | ||
"license": "MIT", | ||
"authors": [ | ||
{ | ||
"name": "Adrian Ocneanu", | ||
"email": "[email protected]", | ||
"homepage": "https://laravel-enso.com", | ||
"role": "Developer" | ||
} | ||
], | ||
"authors": [{ | ||
"name": "Adrian Ocneanu", | ||
"email": "[email protected]", | ||
"homepage": "https://laravel-enso.com", | ||
"role": "Developer" | ||
}], | ||
"require": { | ||
"php": ">=7.4.0", | ||
"laravel-enso/core": "4.8.*", | ||
"laravel-enso/helpers": "1.15.*", | ||
"laravel-enso/image-transformer": "1.6.*", | ||
"laravel-enso/migrator": "1.1.*", | ||
"laravel-enso/track-who": "1.9.*" | ||
"laravel-enso/core": "^5.0", | ||
"laravel-enso/helpers": "^2.0", | ||
"laravel-enso/image-transformer": "^2.0", | ||
"laravel-enso/migrator": "^2.0", | ||
"laravel-enso/track-who": "^2.0" | ||
}, | ||
"autoload": { | ||
"psr-4": { | ||
|
@@ -40,8 +38,8 @@ | |
"LaravelEnso\\Files\\UploadServiceProvider" | ||
], | ||
"aliases": { | ||
"FileBrowser": "LaravelEnso\\Files\\App\\Facades\\FileBrowser" | ||
"FileBrowser": "LaravelEnso\\Files\\Facades\\FileBrowser" | ||
} | ||
} | ||
} | ||
} | ||
} |
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions
6
..._25_101000_create_structure_for_files.php → ..._25_101000_create_structure_for_files.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,18 @@ | ||
<?php | ||
|
||
use LaravelEnso\Migrator\App\Database\Migration; | ||
use LaravelEnso\Migrator\Database\Migration; | ||
|
||
class CreateStructureForFiles extends Migration | ||
{ | ||
protected $permissions = [ | ||
protected array $permissions = [ | ||
['name' => 'core.files.index', 'description' => 'List files', 'is_default' => true], | ||
['name' => 'core.files.link', 'description' => 'Get file download temporary link', 'is_default' => true], | ||
['name' => 'core.files.show', 'description' => 'Open file in browser', 'is_default' => true], | ||
['name' => 'core.files.download', 'description' => 'Download file', 'is_default' => true], | ||
['name' => 'core.files.destroy', 'description' => 'Delete file', 'is_default' => true], | ||
]; | ||
|
||
protected $menu = [ | ||
protected array $menu = [ | ||
'name' => 'Files', 'icon' => 'folder-open', 'route' => 'core.files.index', 'order_index' => 255, 'has_children' => false, | ||
]; | ||
} |
File renamed without changes.
4 changes: 2 additions & 2 deletions
4
...5_103000_create_structure_for_uploads.php → ...5_103000_create_structure_for_uploads.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
src/App/Contracts/Attachable.php → src/Contracts/Attachable.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
src/App/Contracts/AuthorizesFileAccess.php → src/Contracts/AuthorizesFileAccess.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?php | ||
|
||
namespace LaravelEnso\Files\DynamicsRelations; | ||
|
||
use Closure; | ||
use LaravelEnso\DynamicMethods\Contracts\Method; | ||
use LaravelEnso\Files\Models\Upload; | ||
|
||
class Uploads implements Method | ||
{ | ||
public function name(): string | ||
{ | ||
return 'uploads'; | ||
} | ||
|
||
public function closure(): Closure | ||
{ | ||
return fn () => $this->hasMany(Upload::class, 'created_by'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
src/App/Http/Controllers/File/Destroy.php → src/Http/Controllers/File/Destroy.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
src/App/Http/Controllers/File/Download.php → src/Http/Controllers/File/Download.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
src/App/Http/Controllers/File/Index.php → src/Http/Controllers/File/Index.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
src/App/Http/Controllers/File/Link.php → src/Http/Controllers/File/Link.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
src/App/Http/Controllers/File/Share.php → src/Http/Controllers/File/Share.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
src/App/Http/Controllers/File/Show.php → src/Http/Controllers/File/Show.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
src/App/Http/Controllers/Upload/Destroy.php → src/Http/Controllers/Upload/Destroy.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
src/App/Http/Controllers/Upload/Store.php → src/Http/Controllers/Upload/Store.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
src/App/Http/Resources/Collection.php → src/Http/Resources/Collection.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
src/App/Http/Resources/File.php → src/Http/Resources/File.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 4 additions & 4 deletions
8
src/App/Http/Responses/Files.php → src/Http/Responses/Files.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.