const toggler = document.getElementById('menu-toggle');
const menuLinks = document.querySelectorAll(".menu-link");
for (let el of menuLinks) {
el.addEventListener("click", () => {
toggler.checked = !toggler.checked;
// toggler.checked = false; // или так
});
}
<?php
return [
'db_host' => '',
'db_name' => '',
'db_user' => '',
'db_pass' => '',
];
$config = include 'config.php';
$conn = mysqli_connect(
hostname: $config['db_host'],
username: $config['db_user'],
password: $config['db_pass'],
database: $config['db_name'],
);
$ ssh-keygen -t rsa -C "your.email@example.com" -b 4096
Generating public/private rsa key pair.
Enter file in which to save the key ($PWD/.ssh/id_rsa): [\n]
Enter passphrase (empty for no passphrase):[your password]
Enter same passphrase again: [your password]
Your identification has been saved in $PWD/.ssh/id_rsa.
Your public key has been saved in $PWD/.ssh/id_rsa.pub.
$ ssh -i $PWD/.ssh/id_rsa git@github.com
Enter passphrase for key "$PWD/.ssh/id_rsa": [your password]
PTY allocation request failed on channel 0
Welcome to Githab, you!
Connection to github.com closed.
$ git clone git@github.com:username/reponame.git .
Cloning into 'YourFolder'...
remote: Counting objects: 69, done.
remote: Compressing objects: 100% (65/65), done.
remote: Total 69 (delta 14), reused 0 (delta 0)
Unpacking objects: 100% (69/69), done.
https://github.com/username/reponame.git
,git@github.com:username/reponame.git
id | text
id | content | …
tag_id | content_id
class Content extends Model {
public function tags(): BelongsToMany {
return $this->belongsToMany(Tag::class);
}
}
class Tag extends Model {
public function contents(): BelongsToMany {
return $this->belongsToMany(Content::class);
}
}
dd($content->tags);
...
<code>
Qua in vita tantum abest ut voluptates consectentur, etiam
curas, sollicitudines, vigilias perferunt optimaque parte
hominis, quae in nobis divina ducenda est, ingenii et mentis
acie fruuntur nec voluptatem requirentes nec fugientes
laborem.
Modo etiam paulum ad dexteram de via declinavi, ut ad
Pericli sepulcrum accederem.
</code>
f = () => {
return {
...fields
}
}
f = () => {
...fields
}
f = () => ({
...fields
})
<div class="body">
<button class="button">B1</button>
<div class="content">Content 1</div>
<button class="button">B2</button>
<div class="content">Content 2</div>
<button class="button">B2</button>
<div class="content">Content 2</div>
</div>
Route::post("article/{article}", [ArticleController::class, 'update')
->name('article.update');
class ArticleController extends Controller
{
public function update(Article $article, ArticleUpdateRequest $request)
{
$article
->fill($request->validated())
->save();
return redirect(route('article.edit', $article));
}
}
Route::name('user.')->group(function(){
//Route::view('/private','priv')->middleware(('auth'))->name('private');
Route::view('/private','priv')->middleware(['auth'])->name('private');
Route::get('/login',function(){
if(Auth::check()){
return redirect(route('user.private'));
}
return view('loggin'); // Вынести из условия
})->name('login');
Route::get('/reg',function(){
if(Auth::check()){
return redirect(route('user.private'));
}
return view('reg'); // Вынести из условия
})->name('reg');
});