Run this command in sail project folder:
docker-compose exec mysql bash
execute the mysql -u root -p command
provide the default password password
then executes
Run this command in sail project folder:
docker-compose exec mysql bash
execute the mysql -u root -p command
provide the default password password
then executes
| // Setup canvas .. | |
| var canvas = document.getElementById('main-canvas'), | |
| ctx = canvas.getContext('2d'); | |
| // setup lines styles .. | |
| ctx.strokeStyle = "#DDD"; | |
| ctx.lineWidth = 2; | |
| // some variables we'll need .. | |
| var drawing = false; |
| private function findNearestLocation(Request $request) | |
| { | |
| $location = DB::table('locations') | |
| ->select('name', 'latitude', 'longitude', 'region', DB::raw(sprintf( | |
| '(6371 * acos(cos(radians(%1$.7f)) * cos(radians(latitude)) * cos(radians(longitude) - radians(%2$.7f)) + sin(radians(%1$.7f)) * sin(radians(latitude)))) AS distance', | |
| $request->input('latitude'), | |
| $request->input('longitude') | |
| ))) | |
| ->having('distance', '<', 50) | |
| ->orderBy('distance', 'asc') |
In this blog post I talk about Laravel's Service Providers and about its life cycles.
In brief, a Laravel application is bootstrapped (started) whenever a webrequest hits index.php in the public folder, or when an artisan command is executed. Tough both the index.php and artisan file work very similarly, I will only talk about index.php.
When the index.php file is called it registers the autoloader. After that Laravel's Application is initiated and stored in the $app variable which is used to construct a kernel that manages the input and output of our app.
After handling the input by our $kernel it returns a $response object which is send back to our visitor.
Let's rewind a bit, there are four1 important things that are done in the index.php:
Application class is initiated and stored in $app$app's Service Container.| # to generate your dhparam.pem file, run in the terminal | |
| openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 |
This gist assumes:
www-data (may be apache on other systems)create different ssh key according the article Mac Set-Up Git
$ ssh-keygen -t rsa -C "[email protected]"