-
Notifications
You must be signed in to change notification settings - Fork 293
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
28 changed files
with
501 additions
and
421 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
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 |
---|---|---|
@@ -1,69 +1,90 @@ | ||
# Installation | ||
|
||
1. Install package - using composer | ||
|
||
```bash | ||
composer require alexusmai/laravel-file-manager | ||
``` | ||
``` | ||
composer require alexusmai/laravel-file-manager | ||
``` | ||
|
||
For Laravel 5 - 8 use v2.5.4 | ||
|
||
``` | ||
composer require alexusmai/laravel-file-manager "2.5.4" | ||
``` | ||
|
||
2. If you use Laravel 5.4, then add service provider to config/app.php (for the Laravel 5.5 and higher skip this step): | ||
|
||
```php | ||
Alexusmai\LaravelFileManager\FileManagerServiceProvider::class, | ||
``` | ||
```php | ||
Alexusmai\LaravelFileManager\FileManagerServiceProvider::class, | ||
``` | ||
|
||
3. Publish configuration file | ||
|
||
```bash | ||
php artisan vendor:publish --tag=fm-config | ||
``` | ||
```bash | ||
php artisan vendor:publish --tag=fm-config | ||
``` | ||
|
||
4. You can install npm package directly and use it in your vue application - more information about it - | ||
[vue-laravel-file-manager](https://github.com/alexusmai/vue-laravel-file-manager) | ||
|
||
>OR | ||
|
||
Publish compiled and minimized js and css files | ||
|
||
``` | ||
php artisan vendor:publish --tag=fm-assets | ||
``` | ||
Open the view file where you want to place the application block, and add: | ||
* add a csrf token to head block if you did not do it before | ||
```html | ||
<!-- CSRF Token --> | ||
<meta name="csrf-token" content="{{ csrf_token() }}"> | ||
``` | ||
* the frontend package uses **Bootstrap 4** and **Font Awesome 5** styles, if you already use it, then you do not need to connect any styles. | ||
Otherwise add - | ||
```html | ||
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.7.0/css/all.css"> | ||
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css"> | ||
``` | ||
* add file manager styles | ||
```html | ||
<link rel="stylesheet" href="{{ asset('vendor/file-manager/css/file-manager.css') }}"> | ||
``` | ||
* add file manager js | ||
```html | ||
<script src="{{ asset('vendor/file-manager/js/file-manager.js') }}"></script> | ||
``` | ||
* add div for application (set application height!) | ||
```html | ||
<div style="height: 600px;"> | ||
<div id="fm"></div> | ||
</div> | ||
``` | ||
|
||
> OR | ||
Publish compiled and minimized js and css files | ||
|
||
``` | ||
php artisan vendor:publish --tag=fm-assets | ||
``` | ||
|
||
Open the view file where you want to place the application block, and add: | ||
|
||
* add a csrf token to head block if you did not do it before | ||
|
||
``` | ||
<!-- CSRF Token --> | ||
<meta name="csrf-token" content="{{ csrf_token() }}"> | ||
``` | ||
|
||
* For version 3 and higher - the frontend package uses **Bootstrap 5** and **Bootstrap Icons** styles, if you already use it, | ||
then you do not need to connect any styles. Otherwise, add - | ||
|
||
``` | ||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css"> | ||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/font/bootstrap-icons.css"> | ||
``` | ||
|
||
* For old versions - the frontend package uses **Bootstrap 4** and **Font Awesome 5** styles, if you already use it, | ||
then you do not need to connect any styles. Otherwise, add - | ||
|
||
``` | ||
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.7.0/css/all.css"> | ||
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css"> | ||
``` | ||
|
||
* add file manager styles | ||
|
||
``` | ||
<link rel="stylesheet" href="{{ asset('vendor/file-manager/css/file-manager.css') }}"> | ||
``` | ||
|
||
* add file manager js | ||
|
||
``` | ||
<script src="{{ asset('vendor/file-manager/js/file-manager.js') }}"></script> | ||
``` | ||
|
||
* For version 3 and higher - add div for application (set application height!) | ||
|
||
``` | ||
<div id="fm" style="height: 600px;"></div> | ||
``` | ||
|
||
* For old versions - add div for application (set application height!) | ||
|
||
``` | ||
<div style="height: 600px;"> | ||
<div id="fm"></div> | ||
</div> | ||
``` | ||
|
||
## What's next | ||
|
||
|
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 |
---|---|---|
|
@@ -6,7 +6,7 @@ | |
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> | ||
|
||
<!-- Bootstrap CSS --> | ||
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css"> | ||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css"> | ||
|
||
<title>File manager and CKeditor</title> | ||
</head> | ||
|
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 |
---|---|---|
|
@@ -3,10 +3,10 @@ | |
<head> | ||
<!-- Required meta tags --> | ||
<meta charset="utf-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
|
||
<!-- Bootstrap CSS --> | ||
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css"> | ||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css"> | ||
|
||
<title>File Manager and standalone button</title> | ||
</head> | ||
|
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 |
---|---|---|
|
@@ -3,10 +3,10 @@ | |
<head> | ||
<!-- Required meta tags --> | ||
<meta charset="utf-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
|
||
<!-- Bootstrap CSS --> | ||
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css"> | ||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css"> | ||
<!-- SummerNote --> | ||
<link href="https://cdnjs.cloudflare.com/ajax/libs/summernote/0.8.11/summernote-bs4.css" rel="stylesheet"> | ||
|
||
|
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 |
---|---|---|
|
@@ -3,10 +3,10 @@ | |
<head> | ||
<!-- Required meta tags --> | ||
<meta charset="utf-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
|
||
<!-- Bootstrap CSS --> | ||
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css"> | ||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css"> | ||
|
||
<title>File manager and TinyMCE</title> | ||
</head> | ||
|
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -2,17 +2,16 @@ | |
<html lang="{{ app()->getLocale() }}"> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> | ||
|
||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
<!-- CSRF Token --> | ||
<meta name="csrf-token" content="{{ csrf_token() }}"> | ||
|
||
<title>{{ config('app.name', 'File Manager') }}</title> | ||
|
||
<!-- Styles --> | ||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.6.0/dist/css/bootstrap.min.css"> | ||
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.15.2/css/all.css"> | ||
<link href="{{ asset('vendor/file-manager/css/file-manager.css') }}" rel="stylesheet"> | ||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css"> | ||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/font/bootstrap-icons.css"> | ||
<link rel="stylesheet" href="{{ asset('vendor/file-manager/css/file-manager.css') }}"> | ||
</head> | ||
<body> | ||
<div class="container-fluid"> | ||
|
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 |
---|---|---|
|
@@ -2,17 +2,16 @@ | |
<html lang="{{ app()->getLocale() }}"> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> | ||
|
||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
<!-- CSRF Token --> | ||
<meta name="csrf-token" content="{{ csrf_token() }}"> | ||
|
||
<title>{{ config('app.name', 'File Manager') }}</title> | ||
|
||
<!-- Styles --> | ||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.6.0/dist/css/bootstrap.min.css"> | ||
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.15.2/css/all.css"> | ||
<link href="{{ asset('vendor/file-manager/css/file-manager.css') }}" rel="stylesheet"> | ||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css"> | ||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/font/bootstrap-icons.css"> | ||
<link rel="stylesheet" href="{{ asset('vendor/file-manager/css/file-manager.css') }}"> | ||
</head> | ||
<body> | ||
<div class="container-fluid"> | ||
|
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 |
---|---|---|
|
@@ -2,17 +2,16 @@ | |
<html lang="{{ app()->getLocale() }}"> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> | ||
|
||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
<!-- CSRF Token --> | ||
<meta name="csrf-token" content="{{ csrf_token() }}"> | ||
|
||
<title>{{ config('app.name', 'File Manager') }}</title> | ||
|
||
<!-- Styles --> | ||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.6.0/dist/css/bootstrap.min.css"> | ||
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.15.2/css/all.css"> | ||
<link href="{{ asset('vendor/file-manager/css/file-manager.css') }}" rel="stylesheet"> | ||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css"> | ||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/font/bootstrap-icons.css"> | ||
<link rel="stylesheet" href="{{ asset('vendor/file-manager/css/file-manager.css') }}"> | ||
</head> | ||
<body> | ||
<div class="container-fluid"> | ||
|
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 |
---|---|---|
|
@@ -2,17 +2,16 @@ | |
<html lang="{{ app()->getLocale() }}"> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> | ||
|
||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
<!-- CSRF Token --> | ||
<meta name="csrf-token" content="{{ csrf_token() }}"> | ||
|
||
<title>{{ config('app.name', 'File Manager') }}</title> | ||
|
||
<!-- Styles --> | ||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.6.0/dist/css/bootstrap.min.css"> | ||
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.15.2/css/all.css"> | ||
<link href="{{ asset('vendor/file-manager/css/file-manager.css') }}" rel="stylesheet"> | ||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css"> | ||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/font/bootstrap-icons.css"> | ||
<link rel="stylesheet" href="{{ asset('vendor/file-manager/css/file-manager.css') }}"> | ||
</head> | ||
<body> | ||
<div class="container-fluid"> | ||
|
Oops, something went wrong.