Agelios

Agelios

Member Since 2 Years Ago

Lviv

Experience Points
16,860
Total
Experience

3,140 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
115
Lessons
Completed
Best Reply Awards
8
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 4
16,860 XP
Mar
26
4 days ago
Activity icon

Replied to User Activity Log

Sorry, wasnt attentive. So maybe you can add 2 fields to table. Something like user_id and interacted_user_id where interacted_user_id can be null. And here you also can add type field for situation, when you need to not only receive, but also send money

Activity icon

Replied to User Activity Log

I think you dont need to have name in your activity_log. I would add foreign key user_id to activity_log and take name from user using belongsTo()

https://laravel.com/docs/7.x/eloquent-relationships#one-to-one

Mar
24
6 days ago
Activity icon

Replied to "Unable To Write In The "/var/www/html/laraapp/public/storage/documents/appraisal_goal" Directory"

You have only 1 line which can trigger this error:

$appraisal_doc->move(public_path('storage/documents/appraisal_goal'), $new_name);

And i dont know what you have done.

  1. Have you created link (php artisan storage:link)
  2. Do you have this directory on your server?
  3. Or maybe your directory doesnt have permissions? (https://stackoverflow.com/questions/30639174/how-to-set-up-file-permissions-for-laravel)

Hope it helps

Mar
23
1 week ago
Activity icon

Awarded Best Reply on Multi Domains To Single Laravel App

I usually do it in this way

Route::domain('domainA.' . config('app.url'))->group(function () {
//your routes
});

Route::middleware(['roles', 'owners'])->domain('domainB.' . config('app.url'))->group(function () {
//your routes
});

But in 1 file take all routes it seems to me not quite convenient, so you can separate them.

In RouteServiceProvider you can add to map function this code

 Route::middleware('web')
             ->namespace($this->namespace)
             ->group(base_path('routes/domainA.php'));
Mar
21
1 week ago
Activity icon

Replied to Multi Domains To Single Laravel App

I usually do it in this way

Route::domain('domainA.' . config('app.url'))->group(function () {
//your routes
});

Route::middleware(['roles', 'owners'])->domain('domainB.' . config('app.url'))->group(function () {
//your routes
});

But in 1 file take all routes it seems to me not quite convenient, so you can separate them.

In RouteServiceProvider you can add to map function this code

 Route::middleware('web')
             ->namespace($this->namespace)
             ->group(base_path('routes/domainA.php'));
Activity icon

Replied to Make All Models Use Triat/Scope In Laravel

As you can see your models extend Illuminate\Database\Eloquent\Model and you cannot add trait there. You can create your own model class and extend Illuminate\Database\Eloquent\Model + add your trait

class ModelWithScope extends \Illuminate\Database\Eloquent\Model
{
    public function scopeFilter($query, QueryFilters $filters)
    {
        return $filters->apply($query);
    }
}

and use it

class YourModel extends ModelWithScope
{
}
Mar
11
2 weeks ago
Activity icon

Replied to Collection Basics - How Do I Access Elements Of Collection With `->` ?

You can do something like this:

1.Create your own class and extend collection functionality and add functional which you want

class MyCollection extends \Illuminate\Support\Collection
{
    public function __get($key)
    {
        return $this[$key];
    }
}

2.Profit :)

$test = new MyCollection(['one' => 1]);
dd($test->one);
// 1
Activity icon

Replied to Dynamic Subdomain Issue

It can be. But i dont need model everywhere and add for example 50 route paths isnt clear and i dont want to add GET route path to model

Activity icon

Started a new Conversation Dynamic Subdomain Issue

Hello. I use this code for dynamic subdomains

Route::domain('{account}.' . config('app.url'))->group(function () {
	Route::get('test', '[email protected]')->name('test');
	Route::post('test', '[email protected]')->name('postTest');
});

On GET /test view i have route('postTest') and this link wants required parameter $account. But i dont want to write everywhere something like this route('postTest', request()->route('account') )

Do you know solution?

p.s. Make domain('{account?}') doesnt help

Dec
06
3 months ago
Activity icon

Replied to How To Display Dynamic Data In Datatable ?

It works with my data

let table = $('#kt_table_1').DataTable({
                serverSide: true,
                ajax: "url",
                columns: [
                    {name: 'id'}
                    {name: 'name'}
                ]
Activity icon

Replied to How To Display Dynamic Data In Datatable ?

https://github.com/freshbitsweb/laratables

this package has a lot of useful functionality with datatables. i think you can find answer to your question in the examples

Activity icon

Started a new Conversation AssertNotDeleted

Hi. I saw $this->assertDeleted() function which was added in 6.6.0. But i didnt found something like $this->assertNotDeleted() to model. Does laravel have it?

p.s. I know about assertDatabaseHas. and interesting about new 6+ functional