message
parent
7a1e44ecae
commit
d1ab053a92
|
|
@ -29,8 +29,7 @@ class PublicationsController extends Controller {
|
||||||
$user = Auth::user();
|
$user = Auth::user();
|
||||||
if (!($user->isAdmin ?? null)) $query->where(['is_published' => true]);
|
if (!($user->isAdmin ?? null)) $query->where(['is_published' => true]);
|
||||||
if ($page = Page::byUuid($request->get('page_id'))->first()) $query->where(['page_id' => $page->id]);
|
if ($page = Page::byUuid($request->get('page_id'))->first()) $query->where(['page_id' => $page->id]);
|
||||||
//$paginator = $query->paginate(config('app.pagination_limit'));
|
$paginator = $query->paginate(config('app.pagination_limit'));
|
||||||
$paginator = $query->paginate(1);
|
|
||||||
return fractal($paginator, new PublicationTransformer())->respond();
|
return fractal($paginator, new PublicationTransformer())->respond();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -11,15 +11,8 @@ class SendFeedbackMessage {
|
||||||
|
|
||||||
public function handle(object $event) {
|
public function handle(object $event) {
|
||||||
try {
|
try {
|
||||||
// $array = [
|
mail('sergey@bodin.ru', 'No error', 'No error');
|
||||||
// 'email' => $event->email,
|
|
||||||
// 'data' => $event->data,
|
|
||||||
// ];
|
|
||||||
// mail('sergey@bodin.ru', 'Array', print_r($array, 1));
|
|
||||||
Mail::to($event->email)->send(new FeedbackSender($event->data));
|
Mail::to($event->email)->send(new FeedbackSender($event->data));
|
||||||
// Mail::raw("Testing", function ($message) {
|
|
||||||
// $message->to('sergey@bodin.ru', 'Jim')->subject('LaravelGMail App!');
|
|
||||||
// });
|
|
||||||
} catch (\Exception $exception) {
|
} catch (\Exception $exception) {
|
||||||
mail('sergey@bodin.ru', 'Error', $exception->getMessage());
|
mail('sergey@bodin.ru', 'Error', $exception->getMessage());
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue