These steps should have been mentioned in the prerequisites of the Laravel Installation Guide, since I'm surely not the only person trying to get Laravel running on macOS.
Install Mcrypt using Homebrew and PECL (comes with PHP)
# PHP 7.3
These steps should have been mentioned in the prerequisites of the Laravel Installation Guide, since I'm surely not the only person trying to get Laravel running on macOS.
Install Mcrypt using Homebrew and PECL (comes with PHP)
# PHP 7.3
/** | |
* Created by M on 15/04/17. With ❤ | |
*/ | |
/* | |
* Reverse Geocode JS [ES7] Gist. Converts latitude/longitude to a human readable address. | |
* Firstly, tries to judge whether the lat/long is over a road. If so, returns the local street address | |
* with state and country stripped out. | |
* If not, returns the local address for the nearest point of interest. (or place). The second condition works even if | |
* the lat/long belongs to a disputed territory such as Kashmir, India. |
<?php | |
$endpoint_url="your_url_here"; | |
$string_json = "your_json_string"; | |
$username="username"; | |
$password ="password"; | |
$client = new Client(); | |
$options= array( | |
'auth' => [ | |
$username, |
<?php | |
// This model simply inherits from the base Corcel Taxonomy model. | |
// It allows us to set our DB connection and also implement the | |
// ImportsTermSeo trait (see next file) | |
namespace App\Models\Corcel; | |
use App\Wordpress\ImportsTermSeo; |
sudo apt-get update | |
sudo apt-get install -y vim git curl wget unzip zip gcc build-essential make | |
sudo apt-get install software-properties-common | |
curl -O http://vestacp.com/pub/vst-install.sh | |
bash vst-install.sh --nginx yes --apache yes --phpfpm no --named yes --remi yes --vsftpd yes --proftpd no --iptables yes --fail2ban yes --quota no --exim yes --dovecot yes --spamassassin no --clamav no --softaculous no --mysql yes --postgresql no |
import React from 'react'; | |
import styled from 'styled-components'; | |
const Button = styled.a` | |
line-height: 2; | |
height: 5rem; | |
text-decoration: none; | |
display:inline-flex; | |
color: #FFFFFF; | |
background-color: #FF813F; |
/** | |
* Bootstrap any application services. | |
* | |
* @return void | |
*/ | |
public function boot() | |
{ | |
Component::macro('notify', function ($message, $title = '', $type = 'success') { | |
$this->dispatchBrowserEvent('notify', ['message' => $message, 'title' => $title, 'type' => $type]); | |
}); |
I've made a new web template to make Laravel work easily on VestaCP, and so I wouldn't have to change my Laravel installation, if I ever wanted to deploy it elsewhere.
Each file should be put in /usr/local/vesta/data/templates/web/apache2
Then, when you edit your domain/site, you can change the web template to Laravel and just upload your whole project into public_html
RewriteEngine On | |
RewriteBase / | |
RewriteRule ^index\.php$ - [L] | |
# add a trailing slash to /wp-admin | |
RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L] | |
RewriteCond %{REQUEST_FILENAME} -f [OR] | |
RewriteCond %{REQUEST_FILENAME} -d | |
RewriteRule ^ - [L] | |
RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L] | |
RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L] |
{{root}} | |
{{nginx_access_log}} | |
{{nginx_error_log}} | |
if ($scheme != "https") { | |
rewrite ^ https://$host$uri permanent; | |
} | |
location ~ /.well-known { |