By default, the store method will generate a unique ID to serve as the file name. The file's extension will be determined by examining the file's MIME type. The path to the file will be returned by the store method so you can store the path, including the generated file name, in your database.
$path = $request->file('avatar')->storeAs(
'avatars', $request->user()->id
);
Какие существуют решения на этот счет?
Я понял, что можно использовать цикл с range, но так и не придумал как, решил иначе.
from math import gcd
a = 2
for b in range(3, 21):
a = a * b // gcd(a, b)
print(a)
$query = "INSERT INTO users SET login = ?, name = ?, email = ?, pass = ?, status = 'user'";
$stmt = $link->prepare($query);
$stmt->bind_param("ssss",$login,$name,$email,$pass);
$stmt->execute();