문의하기 작성자 ID 오류 수정, cms 로그인 후 이동 url 변경

master
barunsoft 2 years ago
parent 5fae7376fd
commit 63bd4f3760

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

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

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

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

@ -23,27 +23,7 @@ $(document).ready(function() {
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;
function getGalleryData(uid) {
@ -112,5 +92,22 @@ $(document).ready(function() {
e.preventDefault();
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="uid" value="" />
<input type="hidden" name="category" value="" />
<input type="hidden" name="notice" value="0" />
<div class="row">
<div class="col-12">
<input type="text" class="k-input" name="name" id="name" value="" placeholder="이름" required />

Loading…
Cancel
Save