mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-05-24 07:39:59 +08:00
Added created_by and updated_by to entities. Fixes #3
This commit is contained in:
@ -5,6 +5,7 @@ namespace Oxbow\Http\Controllers;
|
||||
use Illuminate\Filesystem\Filesystem as File;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Intervention\Image\Facades\Image as ImageTool;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Oxbow\Http\Requests;
|
||||
@ -126,6 +127,8 @@ class ImageController extends Controller
|
||||
// Create and save image object
|
||||
$this->image->name = $name;
|
||||
$this->image->url = $imagePath . $name;
|
||||
$this->image->created_by = Auth::user()->id;
|
||||
$this->image->updated_by = Auth::user()->id;
|
||||
$this->image->save();
|
||||
return response()->json($this->image);
|
||||
}
|
||||
|
Reference in New Issue
Block a user