title: SQLSTATE[22007]: Invalid datetime format: 1292 Incorrect datetime value: '28-01-2022 12:00' for column `fotostudio`.`transaction_details`
body: <p>I have gotten an error.
  SQLSTATE[22007]: Invalid datetime format: 1292 Incorrect datetime value: '28-01-2022 12:00' for column <code>fotostudio</code>.<code>transaction_details</code>.<code>datetime</code> at row 1 (SQL: insert into <code>transaction_details</code> (<code>username</code>, <code>phone</code>, <code>datetime</code>, <code>transactions_id</code>, <code>updated_at</code>, <code>created_at</code>) values (Candradimuka Production, 085328663110, 28-01-2022 12:00, 11, 2022-01-09 08:13:14, 2022-01-09 08:13:14))</p>
  <p>Here's my Model</p>
  <pre><code>&lt;?php
  
  namespace App\Models;
  
  use Illuminate\Database\Eloquent\Factories\HasFactory;
  use Illuminate\Database\Eloquent\Model;
  use Illuminate\Database\Eloquent\SoftDeletes;
  
  class Transaction extends Model
  {
      use SoftDeletes;
      
      protected $fillable = [
          'reservations_id', 'reservations_title', 'users_id',
          'transaction_total', 'transaction_status'
      ];
  
      protected $hidden = [
      ];
  
      //relasi ke galery dan reservasi
      public function details() {
          return $this-&gt;hasMany(
              TransactionDetail::class, 'transactions_id', 'id');
      }
  
      public function reservation() {
          return $this-&gt;belongsTo(
              Reservation::class, 'reservations_id', 'id');
      }
  
      public function user() {
          return $this-&gt;belongsTo(User::class, 'users_id', 'id');
      }
  
  }```
  </code></pre>
  <p>And here's my Controller</p>
  <pre><code>&lt;?php
  
  namespace App\Http\Controllers;
  
  use App\Models\Transaction;
  use App\Models\TransactionDetail;
  use App\Models\Reservation;
  use Carbon\Carbon;
  use Illuminate\Http\Request;
  use Illuminate\Support\Facades\Auth;
  
  class CheckoutController extends Controller
  {
      public function index(request $request, $id)
      {
         $item = Transaction::with(
             ['details', 'reservation', 'user'])-&gt;findOrFail($id);
         return view('pages.checkout',
             ['item' =&gt; $item]);
      }
  
      public function process(request $request, $id)
      {
          $reservation = Reservation::findOrFail($id);
  
          $transaction = Transaction::create([
              'reservations_id' =&gt; $id,
              'reservations_title' =&gt; $reservation-&gt;title,
              'user_id' =&gt; Auth::user()-&gt;id,
              'transaction_total' =&gt; $reservation-&gt;price,
              'transaction_status' =&gt; 'IN_CART'
          ]);
  
          return redirect()-&gt;route('checkout', $transaction-&gt;id);
      }
  
      public function remove(request $request, $detail_id)
      {
          $item = TransactionDetail::findOrFail($detail_id);
          //dd($item); 
          $transaction = Transaction::with(['details', 'reservation'])
                -&gt;findOrFail($item-&gt;transaction_id);
                
          $item-&gt;delete();
  
          return redirect()-&gt;route('checkout', $item-&gt;transaction_id);
      }
  
      public function create(request $request, $id)
      {
          $request-&gt;validate([
              'username' =&gt; 'required|string|exists:users,username',
              'phone' =&gt; 'required|string',
              'datetime' =&gt; 'required|date'
          ]);
  
          $data = $request-&gt;all();
          $data['transactions_id'] = $id;
  
          TransactionDetail::create($data);
  
          $transaction = Transaction::with(['reservation'])-&gt;find($id);
  
          return redirect()-&gt;route('checkout', $id);
      }
  
      public function success(request $request, $id)
      {
          $transaction = Transaction::findOrFail($id);
          $transaction-&gt;transaction_status = 'PENDING';
  
          $transaction-&gt;save();
          return view('pages.success');
      }
  }
  </code></pre>