Answer the question
In order to leave comments, you need to log in
I'm learning php+laravel, made a small website, I want to start looking for a job in php, I wanted to know if this knowledge is enough to find a job?
here is a link to the site code
https://github.com/DmytroMazur/laravel_travel_v1/t...
I would like to know the qualities of the code for finding work as a php developer
Answer the question
In order to leave comments, you need to log in
First most global - why laravel 5.8?
You use the documentation for sure, you have seen it for anyone that 6.0 has been released there for more than six months. And 5.8 is not even supported by critical patches anymore.
Templates are stuck together in the old fashioned way with pieces without structure.
Despite the fact that both @extends and @section are quite used, but the code looks like it looked into WordPress where a bunch of files and tags open in one and close in another. Do not do it this way.
There is no style code, everything is scatter, then vice versa is stuck together. Everywhere heaps of empty lines in different places and all that stuff.
Naming also dances
Traits are good, but rather strange usage. It was as if they were trying to invent repositories or at least take out repetitive code, but why then at least not in models with methods?
What is it and why I did not understand at all. When there is response()->json() for example (and again in some places it is there too). About ->data I generally am silent.
JSON routes are mixed in with regular ones. Although there is even a separate api.php file in routes. In general, this is whatever you like, but again, about the code site and the practices that are well-established inside Laravel.
Methods that are not actually request handlers in controllers are also the same. Not to say that it is a crime, but just again the creation of a hodgepodge.
Requests is good, but why is there only required everywhere, and if you start sending some arrays there, everything will be fine.
You are using a middleware with the role:admin parameter, but in fact admin is hardcoded
. Again, the array() codestyle is not very relevant anymore, it is much more concise to use the short syntax [].
Again, though, there are no hard and fast guidelines.
The indication of classes is not very beautiful, and the support in the IDE is somehow incomprehensible, as if this had long been abandoned. Easier and more comfortable to write . As a bonus, highlighting in the IDE, autocompletion and the class can be imported via use in this case. Why put up with this? Is it reusable code? Did he help make the code cleaner? Instead of one line of code, they made 4 out of the blue.$this->belongsTo('App\City');
$this->belongsTo(City::class);
Well, in general, you can find a lot of such little things. Globally well krud and krud, it works well. Krudy know how to write and Laravel was seen not for the first time already.
In fact, everything is about:
1. PHP codestyle, auto-formatting and that's it. Put an IDE or something that can format by PSR .
2. The Laravel codestyle/structure should also stick to how everything is arranged specifically inside the framework. To keep the code consistent.
Is this knowledge enough to find a job?
went resumes everywhere and go to interviews - you will find out what is required.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question