- Spin up a new App server, choose PHP 8
- SSH into it and run
sudo -i
to become root - Run
pecl install swoole
and enable what you need. (I disabled curl as it did not work for me) - Add a new Site to your server and use git to pull in your Laravel project that has Octane installed.
- Point your DNS to your new site
- Enable SSL using Lets Encrypt
- Change your new Sites Nginx settings to (assuing your site is named octane.example.com):
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
declare(strict_types=1); | |
namespace App\DataTransferObjects; | |
use Carbon\CarbonImmutable; | |
use Spatie\DataTransferObject\Caster; | |
class CarbonImmutableCaster implements Caster |
- Adopted from: https://stubby4j.com/docs/admin_portal.html
- Inspired by Swagger API docs style & structure: https://petstore.swagger.io/#/pet
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use Illuminate\Database\Eloquent\Builder; | |
Builder::macro('toSqlWithBindings', function () { | |
$bindings = array_map( | |
fn ($value) => is_numeric($value) ? $value : "'{$value}'", | |
$this->getBindings() | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Http\Middleware; | |
use Closure; | |
use Illuminate\Http\Request; | |
class JsonMiddleware | |
{ | |
public function handle(Request $request, Closure $next) |
This is a compiled list of Laravel interview questions. If Laravel is an engineer's PHP framework of choice, they definitely have potential to be a good candidate, but a lot of new PHP engineers have been into Laravel too. The framework itself is very welcoming to newcomers, which makes it easy for beginners to feel that they know more than they really do.
1. How long have you been using Laravel?
This question can help decide what level of questions to ask.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* A helper file for Laravel 5, to provide autocomplete information to your IDE | |
* Generated for Laravel Lumen (5.1.1) (Laravel Components 5.1.*) on 2015-08-18. | |
* | |
* @author Barry vd. Heuvel <barryvdh@gmail.com> | |
* @see https://github.com/barryvdh/laravel-ide-helper | |
*/ | |
namespace { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use Silex\Application; | |
use Silex\ServiceProviderInterface; | |
use Illuminate\Database\Capsule\Manager as Capsule; | |
use Illuminate\Events\Dispatcher; | |
use Illuminate\Container\Container; | |
use Illuminate\Cache\CacheManager; | |
class CapsuleServiceProvider implements ServiceProviderInterface | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
echo ">>> Starting Install Script" | |
# Update | |
sudo apt-get update | |
# Install MySQL without prompt | |
sudo debconf-set-selections <<< 'mysql-server mysql-server/root_password password root' | |
sudo debconf-set-selections <<< 'mysql-server mysql-server/root_password_again password root' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Array | |
( | |
[0] => 1889883229 | |
[1] => 488835183 | |
[2] => 550593395 | |
[3] => 763493425 | |
[4] => 1932858889 | |
[5] => 2095048392 | |
[6] => 1762303890 | |
[7] => 1408443226 |
NewerOlder