Put SearchTrait.php
in app
directory. Then use SearchTrait
in your model, like so
use App\SearchTrait;
use Illuminate\Database\Eloquent\Model;
class Article extends Model
{
I have two Github accounts: oanhnn (personal) and superman (for work). I want to use both accounts on same computer (without typing password everytime, when doing git push or pull).
Use ssh keys and define host aliases in ssh config file (each alias for an account).
<?php | |
namespace App\Console\Commands; | |
use Illuminate\Console\Command; | |
use Symfony\Component\Process\Process; | |
use Symfony\Component\Process\Exception\ProcessFailedException; | |
class BackUpDatabase extends Command | |
{ |
<!DOCTYPE html> | |
<html> | |
<!-- The following HTML page together with the accompanying | |
javascript is published under the Unlicense. | |
SPDX-License-Identifier: Unlicense | |
--> | |
<head> | |
<meta charset="utf-8"> | |
<title>Air traffic map</title> |
// API key | |
// https://2captcha.com/enterpage | |
const API_KEY = "XXXX"; | |
// Find site key of a website | |
const googleSiteKey = document | |
.getElementsByClassName("g-recaptcha")[0] | |
.getAttribute("data-sitekey"); | |
// Helper parsing function |