keizah

keizah

Member Since 1 Year Ago

Vilnius

Experience Points
43,010
Total
Experience

1,990 experience to go until the next level!

In case you were wondering, you earn Laracasts experience when you:

  • Complete a lesson — 100pts
  • Create a forum thread — 50pts
  • Reply to a thread — 10pts
  • Leave a reply that is liked — 50pts
  • Receive a "Best Reply" award — 500pts
Lessons Completed
396
Lessons
Completed
Best Reply Awards
2
Best Reply
Awards
  • start your engines Created with Sketch.

    Start Your Engines

    Earned once you have completed your first Laracasts lesson.

  • first-thousand Created with Sketch.

    First Thousand

    Earned once you have earned your first 1000 experience points.

  • 1-year Created with Sketch.

    One Year Member

    Earned when you have been with Laracasts for 1 year.

  • 2-years Created with Sketch.

    Two Year Member

    Earned when you have been with Laracasts for 2 years.

  • 3-years Created with Sketch.

    Three Year Member

    Earned when you have been with Laracasts for 3 years.

  • 4-years Created with Sketch.

    Four Year Member

    Earned when you have been with Laracasts for 4 years.

  • 5-years Created with Sketch.

    Five Year Member

    Earned when you have been with Laracasts for 5 years.

  • school-in-session Created with Sketch.

    School In Session

    Earned when at least one Laracasts series has been fully completed.

  • welcome-newcomer Created with Sketch.

    Welcome To The Community

    Earned after your first post on the Laracasts forum.

  • full-time-student Created with Sketch.

    Full Time Learner

    Earned once 100 Laracasts lessons have been completed.

  • pay-it-forward Created with Sketch.

    Pay It Forward

    Earned once you receive your first "Best Reply" award on the Laracasts forum.

  • subscriber Created with Sketch.

    Subscriber

    Earned if you are a paying Laracasts subscriber.

  • lifer Created with Sketch.

    Lifer

    Earned if you have a lifetime subscription to Laracasts.

  • evangelist Created with Sketch.

    Laracasts Evangelist

    Earned if you share a link to Laracasts on social media. Please email [email protected] with your username and post URL to be awarded this badge.

  • chatty-cathy Created with Sketch.

    Chatty Cathy

    Earned once you have achieved 500 forum replies.

  • lara-veteran Created with Sketch.

    Laracasts Veteran

    Earned once your experience points passes 100,000.

  • 10k-strong Created with Sketch.

    Ten Thousand Strong

    Earned once your experience points hits 10,000.

  • lara-master Created with Sketch.

    Laracasts Master

    Earned once 1000 Laracasts lessons have been completed.

  • laracasts-tutor Created with Sketch.

    Laracasts Tutor

    Earned once your "Best Reply" award count is 100 or more.

  • laracasts-sensei Created with Sketch.

    Laracasts Sensei

    Earned once your experience points passes 1 million.

  • top-50 Created with Sketch.

    Top 50

    Earned once your experience points ranks in the top 50 of all Laracasts users.

Level 9
43,010 XP
Oct
08
3 weeks ago
Oct
02
3 weeks ago
Activity icon

Replied to Prevent Json Column Reorder

I know a way with indexed arrays but I need stick to same json structure as before.

Oct
01
4 weeks ago
Activity icon

Started a new Conversation Prevent Json Column Reorder

Mysql 5.7

I have json column in my model. How I can prevent mysql json field reorder? I want to still have json column type not varchar or something else

Sep
22
1 month ago
Sep
21
1 month ago
Activity icon

Started a new Conversation Hide Some Fields In Modal

Order resource has client belongsTo field. It has showCreateRelationButton.

How I can hide some fields in client create modal?

Sep
15
1 month ago
Activity icon

Replied to How To Change DateFilter Format?

Thanks. Everybody talk about this problem since v1.

https://github.com/laravel/nova-issues/issues/2866

I think I will create custom filter if they ignore it :)

Activity icon

Started a new Conversation How To Change DateFilter Format?

I created DateFilter and I don't find solution to change dataPicker format to Y-m-d H:i

<?php

namespace App\Nova\Filters;

use Illuminate\Http\Request;
use Illuminate\Support\Carbon;
use Laravel\Nova\Filters\DateFilter;

class StartedAtFilter extends DateFilter
{

    /**
     * Apply the filter to the given query.
     *
     * @param  \Illuminate\Http\Request  $request
     * @param  \Illuminate\Database\Eloquent\Builder  $query
     * @param  mixed  $value
     * @return \Illuminate\Database\Eloquent\Builder
     */
    public function apply(Request $request, $query, $value)
    {
        $value = Carbon::parse($value);
        $nextDay = Carbon::parse($value)->addDay();

        return $query->where('started_at', '>=', $value)->where('started_at', '<=', $nextDay);
    }
}

component in nova files has hardcoded format

<template>
  <div>
    <h3 class="text-sm uppercase tracking-wide text-80 bg-30 p-3">
      {{ filter.name }}
    </h3>

    <div class="p-2">
      <date-time-picker
        class="w-full form-control form-input form-input-bordered"
        dusk="date-filter"
        name="date-filter"
        autocomplete="off"
        :value="value"
        alt-format="Y-m-d"
        date-format="Y-m-d"
        :placeholder="placeholder"
        :enable-time="false"
        :enable-seconds="false"
        :first-day-of-week="firstDayOfWeek"
        @input.prevent=""
        @change="handleChange"
      />
    </div>
  </div>
</template>

Is there way to achieve my target without editing source files?

Sep
13
1 month ago
Activity icon

Replied to Fill Custom Field's Value On Edit Page

ModelFill::make(__('Prekės'), 'products')
    ->fields([
        'no' => [
            'label' => 'Artikulas',
            'placeholder' => 'Prekės numeris',
            'searchable' => true,
        ],
    ])

The coolest thing is that if second argument is relationship it automatically loads it to this.field.value

Jul
02
3 months ago
Activity icon

Replied to Using Factory In PHPUnit Provider Fails

@aite This is not working in Laravel 7. Maybe you know a solution?

The data provider specified for Tests\Feature\Category\ValidationTest::createCategoryRequest is invalid.
Illuminate\Database\QueryException: SQLSTATE[HY000]: General error: 1 no such table: categories (SQL: select count(*) as aggregate from "categories")

EDIT: Solved by using closure. https://tighten.co/blog/tidying-up-your-phpunit-tests-with-data-providers/ Explained in Caveat

Activity icon

Started a new Conversation PhpUnit Feature Tests Fails Locate Factory In Data Provider

I'm using dataProvider (https://phpunit.de/manual/3.7/en/appendixes.annotations.html#appendixes.annotations.dataProvider) in my Feature tests

<?php

namespace Tests\Feature\Category;

use App\Category;
use Tests\TestCase;

class ValidationTest extends TestCase
{
    /**
     * @dataProvider provider
     */
    public function testAdd($a, $b, $c)
    {
        $this->assertEquals($c, $a + $b);
    }

    public function provider()
    {
        return array(
            array(0, 0, 0),
            array(0, 1, 1),
            array(1, 0, 1),
            array(1, 1, \factory(Category::class)->create()->id)
        );
    }
}

For some reason factory is not working in provider.

1) Warning
The data provider specified for Tests\Feature\Category\ValidationTest::testAdd is invalid.
InvalidArgumentException: Unable to locate factory for [App\Category].
C:\Users\Arturas\code\iskelbimai\vendor\laravel\framework\src\Illuminate\Database\Eloquent\FactoryBuilder.php:273
C:\Users\Arturas\code\iskelbimai\vendor\laravel\framework\src\Illuminate\Database\Eloquent\FactoryBuilder.php:296
C:\Users\Arturas\code\iskelbimai\vendor\laravel\framework\src\Illuminate\Database\Eloquent\Concerns\GuardsAttributes.php:148
C:\Users\Arturas\code\iskelbimai\vendor\laravel\framework\src\Illuminate\Database\Eloquent\FactoryBuilder.php:304
C:\Users\Arturas\code\iskelbimai\vendor\laravel\framework\src\Illuminate\Database\Eloquent\FactoryBuilder.php:223
C:\Users\Arturas\code\iskelbimai\vendor\laravel\framework\src\Illuminate\Database\Eloquent\FactoryBuilder.php:169
C:\Users\Arturas\code\iskelbimai\tests\Feature\Category\ValidationTest.php:26

If I run test in PhpStorm I got message No tests executed

dump(factory(Category::class)->create()->id) in testAdd() works, but it is not working in provider. Where is the problem?

May
28
5 months ago
Activity icon

Awarded Best Reply on Model $casts Brake Json

Problem was solved by removing json_encode method

Activity icon

Replied to Model $casts Brake Json

Problem was solved by removing json_encode method

May
27
5 months ago
Activity icon

Replied to My Tailwind Css Gets Error

https://github.com/keizah7/birdboard you can checkout sass files and tailwind config

Activity icon

Started a new Conversation Model $casts Brake Json

I got a model factory

$factory->define(Advert::class, function (Faker $faker) {
return [
//................
    'photos' => json_encode([
        [
            'name' => 'default',
            'extension' => 'gif',
            'file_name' => 'default.gif',
        ],
    ])
//................
];
});

photos column has json type in migration and after model seeding database photos column result is:

[{"name": "default", "extension": "gif", "file_name": "default.gif"}]

After that I added cast to model

protected $casts = ['photos' => 'array'];

to got casted result in priting photos. $advert->photos returns an array with one value, wich has 3 keys.

Problem starts then I seeding database again, or just creating an advert myself. After adding $casts variable new json values stores as

"[{\"name\":\"default\",\"extension\":\"gif\",\"file_name\":\"default.gif\"}]"

also casting in photos printing also not working. Where is the problem?

May
25
5 months ago
Activity icon

Replied to SQLite Foreign Key Dont Set Null On Delete In Phpunit Test

Thanks for advice, I just followed Jeffrey tutorial, so this was his decision

May
24
5 months ago
Activity icon

Replied to SQLite Foreign Key Dont Set Null On Delete In Phpunit Test

Why you don't like it? It is enabled by default, I checked, even when I try to enable it I got same result

May
17
5 months ago