Sirik

Member Since 5 Years Ago

Experience Points
11,820
Total
Experience

3,180 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
41
Lessons
Completed
Best Reply Awards
11
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.

  • Community Pillar

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

Level 3
11,820 XP
Apr
26
2 weeks ago
Activity icon

Awarded Best Reply on Filtering On The Created_at Field

$from = date('2021-01-01');
$to = date('2021-01-01');

Product::whereBetween('created_at', [$from, $to])->get();
Activity icon

Replied to Filtering On The Created_at Field

$from = date('2021-01-01');
$to = date('2021-01-01');

Product::whereBetween('created_at', [$from, $to])->get();
Apr
13
1 month ago
Activity icon

Replied to Attempt To Read Property "id" On Null .

Try this

$id = optional(Auth::user())->id;
Activity icon

Replied to Comparing Time In Eloquent

please avoid using Raw queries, it will hellp you in the future

Activity icon

Replied to Laravel Excel Collection Not Working

Stop using Laravel Excel for simple import or exports it's not fast enough and uses a lot of memory.

Use https://github.com/rap2hpoutre/fast-excel

$data = (new FastExcel)->import('file.xlsx', function ($line) {
    return Quantitie::create([
                'SKU' => $line[0],
                'Quantity'=> $line[1]
            ]);
});

But if you want to make complex Excel Files than use Laravel Excel

Activity icon

Replied to Comparing Time In Eloquent

$permitsdata1 = Permit::whereTime('timeofvisit', '<=', \Carbon\Carbon::now())->get();

Didn't test it but give it a try

Apr
01
1 month ago
Activity icon

Replied to How To Convert Mysql Column Content To Citation .ris File

(new FastExcel(JournalArticle::all()))->download('citation1.ris', function ($journal_article) {
    return [
            'citation' => $journal_article->citation,
        ];
});

I didn't validated the code but can you try this.

Mar
31
1 month ago
Activity icon

Awarded Best Reply on How To Convert Mysql Column Content To Citation .ris File

You could export it to a .ris file, it's a formatted ASCII file

Use this for Fast exporting https://github.com/rap2hpoutre/fast-excel

Mar
30
1 month ago
Activity icon

Replied to How To Delete Duplicate Item On Select Option Foreach Loop

Correct, in your controller, the view in my opinion only contains data for presentation

Activity icon

Replied to How To Delete Duplicate Item On Select Option Foreach Loop

try to handle your data in php not in your view

Activity icon

Replied to Profanity Filter.

Long time no commits

Activity icon

Replied to How To Remove Laravel / Nova From My Project

I think this should resolve your problem

Activity icon

Replied to Profanity Filter.

Ok

Activity icon

Replied to Profanity Filter.

I should fork it an give it a try

Activity icon

Awarded Best Reply on Problem Editing ViaResource

I've detected that this has nothing to do with the relations, it only appears when i delete an attachment via a resource, so if I edit the form there is no problem but if I delete the attachment the problem appears.

File::make('Attachment')
                    ->store(new StoreCompanyFormAttachmentRequest)
                    ->deletable()
                    ->prunable()
                    ->storeOriginalName('attachment_name')
                    ->storeSize('attachment_size')
                    ->hideFromIndex()

This is how I store the data

<?php namespace App\Nova\Requests;

use App\CompanyForm;
use Illuminate\Http\Request;

/**
 * Class StoreCompanyFormAttachmentRequest
 *
 * @author Sirik Koster <[email protected]>
 * @package App\Nova\Requests
 */
class StoreCompanyFormAttachmentRequest
{

    /**
     * @param  \Illuminate\Http\Request  $request
     * @param  \App\CompanyForm  $company_form
     *
     * @return array
     */
    public function __invoke(Request $request, CompanyForm $company_form) : array
    {
        return [
            'attachment' => $request->attachment->store($company_form->getTable().'/'.$company_form->id, 'attachments'),
            'attachment_name' => $request->attachment->getClientOriginalName(),
            'attachment_size' => $request->attachment->getSize(),
        ];
    }
}
Activity icon

Replied to API Encryption Key Issue

Do you use OPcache https://www.php.net/manual/en/book.opcache.php if so try to disable it.

I've noticed this problem a long time ago

Activity icon

Replied to How To Convert Mysql Column Content To Citation .ris File

You could export it to a .ris file, it's a formatted ASCII file

Use this for Fast exporting https://github.com/rap2hpoutre/fast-excel

Activity icon

Replied to How To Initialize Value In Summernote Editor

please mark this as solved

Activity icon

Replied to Route '/resources' Naming Issue

Try this

Route::resource(
		'resources',
		'ResourcesController',
		['names' => 'resources']
	);
Mar
29
1 month ago
Activity icon

Replied to Nova Partition Metric : GroupByColumn Error

Does the table "leads" contain a field named like "groupByColumn"?

Activity icon

Awarded Best Reply on How To Insert Multiple Data In One Column For Loop

Please check if this works

TourDay (Model)

protected $fillable = [
		'lunch'	
	];

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

Code

$tourdays->lunch = [1,2,3]
Activity icon

Replied to How To Insert Multiple Data In One Column For Loop

Please check if this works

TourDay (Model)

protected $fillable = [
		'lunch'	
	];

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

Code

$tourdays->lunch = [1,2,3]
Activity icon

Replied to How To Insert Multiple Data In One Column For Loop

Did you define the variable lunch as an array? or as a relation

Mar
12
2 months ago
Activity icon

Awarded Best Reply on Laravel Dd() Doesn't Work Since 8.32 Update

I think Laravel Telescope was the problem.

https://github.com/laravel/telescope/commit/c8a5ece4576f4669028bd921414d13ecc5debeb8

composer update and it's fixed

Mar
11
2 months ago
Activity icon

Replied to Middleware Problem

can't see any code

Activity icon

Replied to Laravel Dd() Doesn't Work Since 8.32 Update

I think Laravel Telescope was the problem.

https://github.com/laravel/telescope/commit/c8a5ece4576f4669028bd921414d13ecc5debeb8

composer update and it's fixed