Skip to content

Instantly share code, notes, and snippets.

View normykinz's full-sized avatar

Norman Potter normykinz

  • Xenkoo
View GitHub Profile
@normykinz
normykinz / laravel_make_typed_collection_command
Last active March 7, 2023 14:52
Lavel Typed Collection Make Command
<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
use Illuminate\Filesystem\Filesystem;
class CollectionCommand extends Command
{
protected $signature = 'make:collection {model}';
@normykinz
normykinz / laravel_model_getters and setters
Created March 7, 2023 13:33
VsCode Laravel Model Setters and Setters
{
"Lavavel Model Getter and Setter": {
"prefix": "lgs",
"body": [
"public function get$1(): $2 {",
"\treturn $$this->attributes['$3'];",
"}\n",
"public function set$1($2 $$value): void {",
"\t$$this->attributes['$3'] = $$value;",
"}"