6acypman

6acypman

Member Since 11 Months Ago

Experience Points 3,230
Experience Level 1

1,770 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 17
Lessons
Completed
Best Reply Awards 0
Best Reply
Awards
  • Start Your Engines Achievement

    Start Your Engines

    Earned once you have completed your first Laracasts lesson.

  • First Thousand Achievement

    First Thousand

    Earned once you have earned your first 1000 experience points.

  • One Year Member Achievement

    One Year Member

    Earned when you have been with Laracasts for 1 year.

  • Two Year Member Achievement

    Two Year Member

    Earned when you have been with Laracasts for 2 years.

  • Three Year Member Achievement

    Three Year Member

    Earned when you have been with Laracasts for 3 years.

  • Four Year Member Achievement

    Four Year Member

    Earned when you have been with Laracasts for 4 years.

  • Five Year Member Achievement

    Five Year Member

    Earned when you have been with Laracasts for 5 years.

  • School In Session Achievement

    School In Session

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

  • Welcome To The Community Achievement

    Welcome To The Community

    Earned after your first post on the Laracasts forum.

  • Full Time Learner Achievement

    Full Time Learner

    Earned once 100 Laracasts lessons have been completed.

  • Pay It Forward Achievement

    Pay It Forward

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

  • Subscriber Achievement

    Subscriber

    Earned if you are a paying Laracasts subscriber.

  • Lifer Achievement

    Lifer

    Earned if you have a lifetime subscription to Laracasts.

  • Laracasts Evangelist Achievement

    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 Achievement

    Chatty Cathy

    Earned once you have achieved 500 forum replies.

  • Laracasts Veteran Achievement

    Laracasts Veteran

    Earned once your experience points passes 100,000.

  • Ten Thousand Strong Achievement

    Ten Thousand Strong

    Earned once your experience points hits 10,000.

  • Laracasts Master Achievement

    Laracasts Master

    Earned once 1000 Laracasts lessons have been completed.

  • Laracasts Tutor Achievement

    Laracasts Tutor

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

  • Laracasts Sensei Achievement

    Laracasts Sensei

    Earned once your experience points passes 1 million.

  • Top 50 Achievement

    Top 50

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

20 Jun
6 days ago

6acypman started a new conversation Best Practice To Run Artisan Commands With Docker?

I'm moving to dockerized development and wonder what is a good way of running artisan commands? I see 2 ways which I don't really like:

  1. exec to container
  2. install php on the host and run there
07 Jun
2 weeks ago

6acypman started a new conversation Di Outside Of Controller?

Documentation is not clear about weaver automatic dependency injection works outside of controllers, jobs etc. Does it works in regular classes?

So far I notices that constructor DI is working, but method is not working.

29 May
4 weeks ago

6acypman started a new conversation Business Layer With Data Driven Approach?

As far as I understand, now DDD is dominant approach, but it is not possible to use it with active record. Instead we use data driven approach with eloquent.

I can't find good resources about structuring business logic layer with this approach. Please advise good books and resources on that topic.

22 May
1 month ago

6acypman started a new conversation Open Source Real World Laravel Projects?

Is there more open source real world Laravel projects like https://github.com/invoiceninja/invoiceninja ?

06 Mar
3 months ago

6acypman left a reply on Eloquent Copy From Csv

@VANDAN - I got page not found by this link

6acypman started a new conversation Eloquent Copy From Csv

I want to copy data from csv to postgress running following sql query:

DB::statement("\COPY marketo.leads FROM '/home/mark/dw_files/tests/leads.csv' DELIMITER ',' CSV HEADER;");

And I get the error :

` Illuminate\Database\QueryException : SQLSTATE[42601]: Syntax error: 7 ERROR: syntax error at or near "" LINE 1: \COPY marketo.leads FROM '/home/mark/dw_files/tests/leads.cs... ^ (SQL: \COPY marketo.leads FROM '/home/mark/dw_files/tests/leads.csv' DELIMITER ',' CSV HEADER;)

Caused by PDOException: SQLSTATE[42601]: Syntax error: 7 ERROR: syntax error at or near "" LINE 1: \COPY marketo.leads FROM '/home/mark/dw_files/tests/leads.cs... ^ `

Although when I run this query in psql it works ok.

27 Feb
3 months ago

6acypman left a reply on ReflectionException : Class Log Does Not Exist

Sure, supposed to do it. Some error didn't let me do it from mobile:)

26 Feb
4 months ago
25 Feb
4 months ago

6acypman left a reply on ReflectionException : Class Log Does Not Exist

I use logger helper function. And it works fine when I run test without setUp() method.

6acypman started a new conversation ReflectionException : Class Log Does Not Exist

In my phpUnit test, I initialize class, and it works ok. But once I add setUp() method, I get an error ReflectionException : Class log does not exist at the logger(). What could be the issue?

21 Feb
4 months ago

6acypman left a reply on Manage Env With Envoyer

@bobbybouwmann Thank you.

Do you know what will happen if there is situation: Foo=1 in envoyer. And Foo=2 at instance after I changed it directly. And then I do a deployment, does envoyer overwrite back Foo=1 ?

6acypman started a new conversation Manage Env With Envoyer

I have a situation that I started to work on a project which is deployed with envoyer. And I need to change a variable in .env file. But unfortunately I don't have a key to manage environment in envoyer.

If I just ssh to the instance and change the variable, will it work? Does envoyer overwrite .env file with it's own information on the next deployment?

16 Feb
4 months ago

6acypman left a reply on Workers Concurrency

they now setup though queue:work --deamon

15 Feb
4 months ago

6acypman left a reply on Workers Concurrency

I don't use it. It should be the limit somewhere in settings, but I can't figure out where.

6acypman started a new conversation Workers Concurecy

I have a parsing job at starting by custom artisan commands and I runed it 3 times for concurecy with deamon workers. So I have 3 workers working at a time, but now I can't run any more. When I run any artisan command it just freeze. What is the reason for that, where is the limit?

04 Feb
4 months ago

6acypman left a reply on Config('value') Returns Null

I had complex logic of generating variable name, turned out that one part was not set in env fiile. Thank everyone for the help

6acypman left a reply on Config('value') Returns Null

guys, I've cloned git repo of project that is working, it is something in configuration. Syntax is right for sure.

6acypman left a reply on Config('value') Returns Null

I know, it is there.

6acypman started a new conversation Config('value') Returns Null

I got the problem that config('value') returns null. So far I tried

php artisan config:cache
php artisan config:clear
composer dump autoload

Any advices?

22 Jan
5 months ago

6acypman left a reply on Model::trackable()

I found public function scopeTrackable($query). It is Local Scopes functionality.

6acypman started a new conversation Model::trackable()

I met in code SomeModelName::trackable(). But cant find its desctiprion in docs. Can you explain it please? And point me to laravel internal declaration if you know.

18 Jan
5 months ago

6acypman started a new conversation When Exactly Job Fails

When we have queue:work --tries=3 And at the first try job gets uncaught exception, does it fails and then get retied, or does it keeps retiring 3 times and only then fails?

11 Jan
5 months ago

6acypman started a new conversation Queue Worker Timeout

Recently I met in a code --timeout=0 for worker. In docs it is said the maximum number of seconds that jobs can run According to it all jobs should fail since they will run more that 0, but in the code i met it, they actually run. Can you explain that please?

26 Dec
6 months ago

6acypman started a new conversation Cant Find Queue:work And Queue:listen Comands Source Code

In /src/Illuminate/Foundation/Console/ located artisan comand files, but there is no files for queue:work and queue:listen. Can you please tell me where are they located?

13 Dec
6 months ago

6acypman left a reply on Passport For User Authentication

Saying other words, what is best practice of using passport for consuming my own api in front-end?

6acypman started a new conversation Passport For User Authentication

I faced that using passport personal access tokens, there is no way to set them tokensExpireIn. It is so inconvenient, why it is done so? Is there any workaround? Because it is a bad practice set so long ttl for tokens. Also refresh tokens are not issued for personal tokens.

How to refresh personal tokens, is the only way to manually delete them and issue new one? Is there any build in methods for that?

6acypman left a reply on Call To Undefined Method Illuminate\Auth\TokenGuard::attempt()

Thank you for reply, now it is clear.

12 Dec
6 months ago

6acypman started a new conversation Call To Undefined Method Illuminate\Auth\TokenGuard::attempt()

I'm trying to make login with api guard so i using in my LoginController

    protected function guard()
    {
        return Auth::guard('api');
    }

And then i get this error Call to undefined method Illuminate\Auth\TokenGuard::attempt()

6acypman left a reply on PHPstorm Laravel Plugin Not Working

Solved, i forget to add models php artisan ide-helper:models

6acypman started a new conversation PHPstorm Laravel Plugin Not Working

I installed barryvdh/laravel-ide-helper added it to service providers, then added

 "post-update-cmd": [
            "Illuminate\Foundation\ComposerScripts::postUpdate",
            "php artisan ide-helper:generate",
            "php artisan ide-helper:meta"
        ], 

installed laravel plugin, enabled it. Runed composer update. Restarted ide, tryed to invalidate cashes. Still i got plugin is not working, what can be the reason?

11 Dec
6 months ago

6acypman started a new conversation How To Use Hydration In Laravel/doctrine

I cant find an information in docs about how to use default hydrations in laravel/doctrine like fetchOne(array(), Doctrine_Core::HYDRATE_ARRAY);

6acypman left a reply on Doctrine Timestamps Error

    public function run()
    {
        $password = Hash::make('toptal');


        DB::table('users')->insert([
            'name' => 'Mark',
            'email' => '[email protected]',
            'password' => Hash::make('1111')
        ]);

6acypman started a new conversation Doctrine Timestamps Error

I've added doctrine and used Timestamps trait in entity, and after migration my table have created_at and updated_at fields. But strangely when i make db:seed i got error 1364 Field 'created_at' doesn't have a default value" . In DatabaseSeeder i just use DB facade but not entitymanager, could that be the problem?

10 Dec
6 months ago

6acypman left a reply on Is It Possible To Install Doctrine On Laravel 5.7?

ops, 1.4 installed successfully. Thanks)

6acypman started a new conversation Is It Possible To Install Doctrine On Laravel 5.7?

I got an error trying to install doctrine on laravel 5.7, in docs it is info only till 5.4.*. Does that means that i can use doctrine only with maximum of 5.4 version?

16 Nov
7 months ago

6acypman left a reply on How To Artisan Serve Watch?

Any .php file in my project

6acypman started a new conversation How To Artisan Serve Watch?

Now every time i update file i need to stop server and run php artisan serve again. Is it possible to make it automatically?

14 Nov
7 months ago

6acypman left a reply on Vendor Publish Dont Work

Yes, it writed out published succesfuly . Yes, i fun composer. Eventually it works afrer i manually aded service provider and aliase as for <=5.4 version.

6acypman started a new conversation Vendor Publish Dont Work

I'm trying to add laravel-graphql

my version is 5.7. So according to instructions i should php artisan vendor:publish --provider="Folklore\GraphQL\ServiceProvider"

And then Review the configuration file config/graphql.php but it doesnt appear. And when i try to use $schema = GraphQL::schema(); get an error. So seems that publishing dont work properly, what can be the problem? Package is installed with composer

28 Oct
7 months ago

6acypman left a reply on Why Helpers Acessible From All Namespaces?

This is correct answer why helpers works in all namespaces: For functions and constants, PHP will fall back to global functions or constants if a namespaced function or constant does not exist. From PHP docs 'http://php.net/manual/en/language.namespaces.fallback.php' .

Very strange that a lot of people here don't know how PHP interpreter works.

6acypman left a reply on Why Helpers Acessible From All Namespaces?

It comes down that don't understand how composer autoloader doing it

function composerRequire4b299eb5732a472abef81c6ea06043af($fileIdentifier, $file)
{
    if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
        require $file;

        $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
    }
}

Can you explain me how that works for all namespaces?

6acypman left a reply on Why Helpers Acessible From All Namespaces?

Ok, there are two lists of functions in these files in composer.json. But we import it in global namespace, and in my controller for example i use namespace App\Http\Controllers; and still 'app();' helper works. Can you explain me how does that happen?

6acypman started a new conversation Why Helpers Acessible From All Namespaces?

Can you explain me please, why we can use helpers functions from any namespace, if autoloader just requires it, they should be only in global namespace?

26 Oct
8 months ago

6acypman left a reply on Automatic Injection

Ok, finally i get it, it all happening in build method, it just checks for dependencies before make new class and build them recursively.

6acypman left a reply on Automatic Injection

I'v read it couple of times already. It is only a general concepts there. My question was how it works internally.

6acypman left a reply on Automatic Injection

Thanks a lot, and can you also point me where is it triggered and how does resolved classes pases to destination?

6acypman started a new conversation Automatic Injection

I want to know how exactly laravel inject dependences. So far i googled that we can do it with Reflection, but can someone give me link to code, which classes and methods are doing it?

24 Oct
8 months ago

6acypman left a reply on Bootstrap/app.php

Ah, ok, i checked php docs, didn't see before construction with include return.

6acypman started a new conversation Bootstrap/app.php

In index.php we have a line $app = require_once DIR.'/../bootstrap/app.php'; and then in app.php i cant understand this line:

return $app;

Can you explain me where it goes, and why using return if there is no function?