kmw 2 years ago
commit cc3710db61

@ -29,7 +29,7 @@ class LoginController extends Controller
* *
* @var string * @var string
*/ */
protected $redirectTo = '/cms'; protected $redirectTo = '/';
/** /**
* Create a new controller instance. * Create a new controller instance.

@ -51,7 +51,7 @@ class IndexController extends Controller
*/ */
public function galleryList(Request $request) public function galleryList(Request $request)
{ {
$result = $this->getPostList($request, 'gallery', 4); $result = $this->getPostList($request, 'gallery', 12);
// logger(json_decode(json_encode($result), true)); // logger(json_decode(json_encode($result), true));
$lists = []; $lists = [];

@ -3,6 +3,7 @@ namespace App\Http\Middleware;
use Closure; use Closure;
use Illuminate\Auth\Middleware\Authenticate as Middleware; use Illuminate\Auth\Middleware\Authenticate as Middleware;
use Illuminate\Http\Request;
use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException; use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException;
class AuthAdmin extends Middleware class AuthAdmin extends Middleware
@ -11,8 +12,9 @@ class AuthAdmin extends Middleware
/** /**
* Handle an incoming request. * Handle an incoming request.
* *
* @param \Illuminate\Http\Request $request * @param Request $request
* @param \Closure $next * @param \Closure $next
* @param mixed ...$guards
* @return mixed * @return mixed
*/ */
public function handle($request, Closure $next, ...$guards) public function handle($request, Closure $next, ...$guards)

@ -330,10 +330,13 @@ trait TraitBoard
} else { } else {
$appends = [ $appends = [
'uid' => Str::uuid()->toString(), 'uid' => Str::uuid()->toString(),
'created_id' => auth()->user()->id,
'created_at' => (string)Carbon::now() 'created_at' => (string)Carbon::now()
]; ];
if (auth()->check()) {
$appends['created_id'] = auth()->user()->id;
}
$postData = array_merge($postData, $appends); $postData = array_merge($postData, $appends);
$data = BoardArticle::query()->create($postData); $data = BoardArticle::query()->create($postData);

@ -23,27 +23,7 @@ $(document).ready(function() {
return false; return false;
}); });
});
$(window).on('resize', function() {
resizeGallery();
});
function resizeGallery() {
$('.g-main').each(function() {
if($(this).find('.empty-txt').length > 0 || $(this).find('.grid').length == 0) return;
var gel = $(this).find('.grid').eq(0);
var gw = parseFloat(gel[0].getBoundingClientRect().width);
var gpl = parseFloat(gel.css('padding-left').replace(/[^0-9]/g,''));
var gpr = parseFloat(gel.css('padding-right').replace(/[^0-9]/g,''));
var g_img_height = (gw - (gpl+gpr)) * parseFloat(1);
$(this).find('.grid .g-img').css('height', g_img_height + 'px');
});
}
$(document).ready(function() {
var currentPage = 1; var currentPage = 1;
function getGalleryData(uid) { function getGalleryData(uid) {
@ -112,5 +92,22 @@ $(document).ready(function() {
e.preventDefault(); e.preventDefault();
getGalleryList(); getGalleryList();
}) })
});
$(window).on('resize', function() {
resizeGallery();
}); });
function resizeGallery() {
$('.g-main').each(function() {
if($(this).find('.empty-txt').length > 0 || $(this).find('.grid').length == 0) return;
var gel = $(this).find('.grid').eq(0);
var gw = parseFloat(gel[0].getBoundingClientRect().width);
var gpl = parseFloat(gel.css('padding-left').replace(/[^0-9]/g,''));
var gpr = parseFloat(gel.css('padding-right').replace(/[^0-9]/g,''));
var g_img_height = (gw - (gpl+gpr)) * parseFloat(1);
$(this).find('.grid .g-img').css('height', g_img_height + 'px');
});
}

@ -16,6 +16,7 @@
<input type="hidden" name="board_id" value="3" /> <input type="hidden" name="board_id" value="3" />
<input type="hidden" name="uid" value="" /> <input type="hidden" name="uid" value="" />
<input type="hidden" name="category" value="" /> <input type="hidden" name="category" value="" />
<input type="hidden" name="notice" value="0" />
<div class="row"> <div class="row">
<div class="col-12"> <div class="col-12">
<label for="name" class="form-label mb-3">이름 또는 업체명 *</label> <label for="name" class="form-label mb-3">이름 또는 업체명 *</label>

Loading…
Cancel
Save