jake83 liked a comment+100 XP
2mos ago
Color theme for those looking to copy:
--color-background: oklch(0.12 0 0);
--color-foreground: oklch(0.95 0 0);
--color-card: oklch(0.16 0 0);
--color-primary: oklch(0.65 0.15 160);
--color-primary-foreground: oklch(0.12 0 0);
--color-border: oklch(0.24 0 0);
--color-input: oklch(0.24 0 0);
--color-muted-foreground: oklch(0.6 0 0);
jake83 liked a comment+100 XP
3mos ago
<?php
declare(strict_types=1);
use Rector\Config\RectorConfig;
use Rector\TypeDeclaration\Rector\ArrowFunction\AddArrowFunctionReturnTypeRector;
use Rector\TypeDeclaration\Rector\ClassMethod\ReturnTypeFromStrictTypedCallRector;
use Rector\TypeDeclaration\Rector\ClassMethod\ReturnUnionTypeRector;
use Rector\TypeDeclaration\Rector\Closure\AddClosureVoidReturnTypeWhereNoReturnRector;
use Rector\TypeDeclaration\Rector\StmtsAwareInterface\DeclareStrictTypesRector;
use RectorLaravel\Set\LaravelSetProvider;
return RectorConfig::configure()
->withPaths([
__DIR__.'/app',
__DIR__.'/bootstrap',
__DIR__.'/config',
__DIR__.'/public',
__DIR__.'/resources',
__DIR__.'/routes',
__DIR__.'/tests',
])
->withSkip([
__DIR__.'/bootstrap/cache',
__DIR__.'/storage',
__DIR__.'/vendor',
AddClosureVoidReturnTypeWhereNoReturnRector::class,
ReturnTypeFromStrictTypedCallRector::class,
ReturnUnionTypeRector::class,
DeclareStrictTypesRector::class => [
__DIR__.'/resources/views',
],
AddArrowFunctionReturnTypeRector::class,
])
->withPhpSets()
->withSetProviders(LaravelSetProvider::class)
->withImportNames()
->withComposerBased(laravel: true)
->withPreparedSets(
deadCode: true,
codeQuality: true,
typeDeclarations: true,
privatization: true,
earlyReturn: true,
)
->withRules([
DeclareStrictTypesRector::class,
]);
jake83 wrote a comment+100 XP
3mos ago
jake83 liked a comment+100 XP
3mos ago
There might be some differences in environment, but when I changed ->waitForText('Editing User') to ->waitFor('@modal-content') as shown around 7:30 in the video, my test started failing like this:
FAILED Tests\Browser\ExampleTest > it can open a modal and close it
Actual URL [http://laracasts-modal.test/users/50/edit] does not equal expected URL [http://laracasts-modal.test/users].
Failed asserting that 'http://laracasts-modal.test/users/50/edit' matches PCRE pattern "/^http:\/\/laracasts\-modal\.test\/users$/u".
jake83 liked a comment+100 XP
4mos ago
I think you are confusing Vue Reactivity with the old options API from Vue 2. You don't need to use Object.assign when you want to assign an object to a reactive object. You said we need to do it to keep errors variable reactive, but it's not true; you don't lose reactivity unless you use Vue 2. Here is a snippet:
import { ref } from 'vue'
const errors = ref({})
const errorsFromServer = { name: 'Name is incorrect' }
errors.value = errorsFromServer
errors.value.name = 'Override error message'
console.log(errors.value.name) // prints 'Override error message'
Great video btw, I'm enjoying this series 👍
jake83 liked a comment+100 XP
4mos ago
jake83 wrote a comment+100 XP
4mos ago
@zoilodev late with the reply, but I'm just getting to this tutorial myself. For the benefit of anyone starting this - it looks like this is the intended repo: https://github.com/SabatinoMasala/vue-state-management-backend
jake83 liked a comment+100 XP
4mos ago
For working with local storage, I like to use VueUse's useStorage (https://vueuse.org/core/useStorage/), which makes the local storage reactive.
jake83 wrote a comment+100 XP
4mos ago
@zoilodev A bit late (sorry!), but for anyone else's benefit I think the intended repo is https://github.com/SabatinoMasala/vue-state-management/tree/composable