public function createPayment(Request $r){
$amount = '1';
$payway = $r->type_curr;
$shop_id_freekassa = '123';
$secret_word_freekassa = '123';
// не помогает $user = User::where('id', $user->user_id)->first();
$order = Order::create([
'user_id' => $this->user->id, // ошибка тут
'amount' => $amount
]);
$sign = md5($shop_id_freekassa . ':' . $amount . ':' . $secret_word_freekassa . ':' . $order->id);
return redirect('http://www.free-kassa.ru/merchant/cash.php?m=' . $shop_id_freekassa . '&oa=' . $amount . '&o=' . $order->id . '&s=' . $sign);
}