-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from devuniverse/1.1.2
Support to Laravel 7, 8
- Loading branch information
Showing
44 changed files
with
6,591 additions
and
211 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,6 +13,10 @@ | |
{ | ||
"name": "Devuniverse", | ||
"email": "[email protected]" | ||
}, | ||
{ | ||
"name": "Laravrix", | ||
"email": "[email protected]" | ||
} | ||
], | ||
"autoload": { | ||
|
@@ -32,11 +36,11 @@ | |
}, | ||
"minimum-stability": "stable", | ||
"require": { | ||
"laravel/framework": "5.8.*", | ||
"intervention/image": "2.4", | ||
"codiiv/laravel-taxonomies": "1.0.*" | ||
"codiiv/laravel-taxonomies":"^1.2", | ||
"laravel/framework": "^6.0 || ^7.0 || ^8.0", | ||
"intervention/image": "^2.5" | ||
}, | ||
"require-dev": { | ||
"laravel/laravel": "5.8.*" | ||
"laravel/laravel": "^6.0" | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<?php | ||
|
||
namespace Devuniverse\Filemanager\Models; | ||
|
||
use Illuminate\Database\Eloquent\Model; | ||
|
||
class Filemanager extends Model | ||
{ | ||
/** | ||
* This allows to create a custom input field, to launch modal upload | ||
* @param customId | ||
* @param module | ||
* @param uniqueTo | ||
* @param placeholder | ||
*/ | ||
static public function customTextInput($customId, $module='',$uniqueTo=null,$placeholder ='', $type="input"){ | ||
switch ($type) { | ||
case 'button': | ||
$html = '<div class="custominput-container">'. | ||
'<button type="button" class="form-control uploadunique" id="'.$customId.'" '.($uniqueTo ? 'data-uniqueto="'.$uniqueTo.'"' : '').' '.($module!="" ? 'data-module="'.$module.'"' : '').'>'.$placeholder.'</button>'. | ||
'</div>'; | ||
break; | ||
default: | ||
$html = '<div class="custominput-container">'. | ||
'<input type="text" class="form-control uploadunique" id="'.$customId.'" placeholder="'.$placeholder.'" '.($uniqueTo ? 'data-uniqueto="'.$uniqueTo.'"' : '').' '.($module!="" ? 'data-module="'.$module.'"' : '').' value="">'. | ||
'</div>'; | ||
break; | ||
} | ||
return $html; | ||
} | ||
} |
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,10 @@ | ||
<?php | ||
|
||
$filemanagerPath = Config::get('filemanager.mode')=='multi' ? '{global_entity?}/'.Config::get('filemanager.filemanager_url') : Config::get('filemanager.filemanager_url'); | ||
|
||
Route::group(['prefix' => $filemanagerPath, 'middleware' => ['web','auth']], function() | ||
{ | ||
|
||
include('web.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,22 +1,21 @@ | ||
<?php | ||
|
||
$filemanagerPath = Config::get('filemanager.filemanager_url'); | ||
/** | ||
* GET ROUTES | ||
*/ | ||
Route::get('/', 'Devuniverse\Filemanager\Controllers\FilemanagerController@loadIndex'); | ||
Route::get('create', 'Devuniverse\Filemanager\Controllers\FilemanagerController@create')->name('filemanager.create'); | ||
Route::get('showfiles', 'Devuniverse\Filemanager\Controllers\FilemanagerController@index')->name('load.filemanager.index'); | ||
Route::get('modaluploader', 'Devuniverse\Filemanager\Controllers\FilemanagerController@loadGallery')->name('load.filemanager.gallery'); | ||
Route::get('modalcropper', 'Devuniverse\Filemanager\Controllers\FilemanagerController@getModalCropper'); | ||
|
||
Route::group(['prefix' => $filemanagerPath, 'middleware' => ['web','auth']], function() | ||
{ | ||
/** | ||
* GET ROUTES | ||
*/ | ||
Route::get('/', 'Devuniverse\Filemanager\Controllers\FilemanagerController@loadIndex'); | ||
Route::get('create', 'Devuniverse\Filemanager\Controllers\FilemanagerController@create')->name('filemanager.create'); | ||
Route::get('showfiles', 'Devuniverse\Filemanager\Controllers\FilemanagerController@index')->name('load.filemanager.index'); | ||
|
||
Route::post('/file-save', 'Devuniverse\Filemanager\Controllers\FilemanagerController@store'); | ||
Route::post('/file-delete', 'Devuniverse\Filemanager\Controllers\FilemanagerController@destroy'); | ||
Route::post('/delete-files', 'Devuniverse\Filemanager\Controllers\FilemanagerController@deleteFiles'); | ||
Route::post('/file-save', 'Devuniverse\Filemanager\Controllers\FilemanagerController@store'); | ||
Route::post('/file-delete', 'Devuniverse\Filemanager\Controllers\FilemanagerController@destroy'); | ||
Route::post('/delete-files', 'Devuniverse\Filemanager\Controllers\FilemanagerController@deleteFiles'); | ||
|
||
/** | ||
* POST ROUTES | ||
*/ | ||
|
||
}); | ||
/** | ||
* POST ROUTES | ||
*/ | ||
Route::post('/modaluploader', 'Devuniverse\Filemanager\Controllers\FilemanagerController@modalUploader'); | ||
Route::post('/modalcropper', 'Devuniverse\Filemanager\Controllers\FilemanagerController@modalCropper'); |
38 changes: 38 additions & 0 deletions
38
src/database/migrations/2019_08_20_224634_add_unique_to_column_to_uploads_table.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 |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<?php | ||
|
||
use Illuminate\Support\Facades\Schema; | ||
use Illuminate\Database\Schema\Blueprint; | ||
use Illuminate\Database\Migrations\Migration; | ||
|
||
class AddUniqueToColumnToUploadsTable extends Migration | ||
{ | ||
/** | ||
* Run the migrations. | ||
* | ||
* @return void | ||
*/ | ||
public function up() | ||
{ | ||
if (!Schema::hasColumn('uploads', 'uniqueto')){ | ||
Schema::table('uploads', function (Blueprint $table) { | ||
$table->string('module')->default('')->after('file_url'); | ||
$table->string('uniqueto')->default('')->after('module'); | ||
}); | ||
} | ||
} | ||
|
||
/** | ||
* Reverse the migrations. | ||
* | ||
* @return void | ||
*/ | ||
public function down() | ||
{ | ||
if (Schema::hasColumn('uploads', 'uniqueto')){ | ||
Schema::table('uploads', function (Blueprint $table) { | ||
$table->dropColumn('module'); | ||
$table->dropColumn('uniqueto'); | ||
}); | ||
} | ||
} | ||
} |
Oops, something went wrong.