This file contains hidden or 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\Providers; | |
| use Illuminate\Support\Collection; | |
| use Illuminate\Pagination\LengthAwarePaginator; | |
| class AppServiceProvider extends ServiceProvider | |
| { | |
| public function boot() |
This file contains hidden or 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 Valet\Drivers\ValetDriver; | |
| class LocalValetDriver extends ValetDriver | |
| { | |
| public function serves(string $sitePath, string $siteName, string $uri): bool | |
| { | |
| return true; | |
| } |
This file contains hidden or 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 | |
| /** | |
| * Statamic v3 User Migrator | |
| * @author Simon Hamp <simon.hamp@me.com> | |
| * @copyright Copyright (c) 2021, Simon Hamp | |
| * @license MIT | |
| */ | |
| namespace App\Console\Commands; | |
| use Exception; |
This file contains hidden or 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\Controllers; | |
| use Illuminate\Http\Request; | |
| class WebhookController | |
| { | |
| public function create(Request $request) | |
| { |
This file contains hidden or 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\Concerns\Notifications; | |
| trait Reroutable | |
| { | |
| protected array $routes; | |
| public function routes(string ...$routes): static | |
| { |
This file contains hidden or 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\Providers; | |
| use Illuminate\Support\Str; | |
| class AppServiceProvider extends ServiceProvider | |
| { | |
| public function boot() |
This file contains hidden or 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 | |
| class VersionMatcher | |
| { | |
| protected $specificity = 'major'; | |
| protected $originals = []; | |
| protected $current; | |
| protected $target; | |
| protected static $padDigits; |
This file contains hidden or 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\Console\Commands; | |
| use Illuminate\Console\Command; | |
| use Illuminate\Support\Str; | |
| use Statamic\Facades\Collection; | |
| use Statamic\Eloquent\Entries\UuidEntryModel as EntryModel; | |
| use Statamic\Facades\Entry; | |
| use Statamic\Structures\CollectionTree; |
This file contains hidden or 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 | |
| /** | |
| * Return the common parts from 2 strings. | |
| * | |
| * @param string $str1 | |
| * @param string $str2 | |
| * @param bool $from_end | |
| * return string | |
| */ |
This file contains hidden or 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 | |
| $items = [ | |
| ['field' => 'field1', 'values' => [0, 1, 2, 3, 4]], | |
| ['field' => 'field2', 'values' => ['cat', 'dog', 'horse']] | |
| ]; | |
| foreach ($items as list('field' => $field, 'values' => $values)) { | |
| // can use $field and $values here now! | |
| } |
NewerOlder