This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// routes/api.php | |
<?php | |
use Illuminate\Support\Facades\Route; | |
use App\Http\Controllers\AuthController; | |
Route::post('/register', [AuthController::class, 'register']); | |
Route::post('/login', [AuthController::class, 'login']); | |
Route::middleware('auth:sanctum')->get('/whoami', [AuthController::class, 'whoami']); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en" data-theme="coffee"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<link | |
href="https://cdn.jsdelivr.net/npm/daisyui@2.6.0/dist/full.css" | |
rel="stylesheet" | |
type="text/css" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
from PyQt5.QtWidgets import QMessageBox, QApplication, QWidget | |
def showMessageBox(title, text, icon="NoIcon", buttons=False, buttonsText=[],callback=None): | |
qmb = QMessageBox() | |
qmb.setText(text) | |
qmb.setWindowTitle(title) | |
if icon == "NoIcon": | |
qmb.setIcon(QMessageBox.NoIcon) | |
if icon == "Information": |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sqlite3 | |
import pandas as pd | |
def create_connection(db): | |
conn = None | |
try: | |
conn = sqlite3.connect(db) | |
conn.execute("PRAGMA foreign_keys = 1") | |
except sqlite3.Error as err: | |
print(err) |