Do you really need entrust or laravel-permission to implement your authorization?

 
3r3-31. “So I need a simple authorization. Any admin role, and can be an editor /moderator. Now google. ABOUT! For laravel there are already ready packages! 3r3141. zizaco /entrust [/b] , 3r3141. spatie /laravel-permission [/b] other! Let's pick one! ”3r3157.  
 
That's how it happens. Then the migration of the package adds 5 plates to the database to store the roles, permissions and their relationships. All authorization rules, such as roles 3r3141. 'admin' [/b] and 3r3141. 'editor' [/b] can do 3r3141. 'edit posts' [/b] are stored in these tables. Typically, a project has many copies of the database...
+ 0 -

PHP Digest number 141 (October 1 - 1? 2018)

+ 0 -

Docker + Laravel = ❤

<{full}>
Docker + Laravel = ❤
 
In this article I will talk about my experience of "wrapping" the Laravel-application in a Docker-container and so that the frontend and backend developers could work with it locally, and launching it on production was as simple as possible. Also, CI will automatically run static code analyzers, phpunit -tests, perform the assembly of images.
 

"And what, in fact, is the difficulty?" - you can say, and you will be partly right. The fact is that quite a lot of discussions are devoted to this topic in Russian-speaking and English-speaking communities, and almost all studied threads I would conditionally ...

+ 0 -

PHP Digest No. 140 (September 17 - 3? 2018)

PHP Digest No. 140 (September 17 - 3? 2018)

 
A fresh selection with links to news and materials. In the release: PHP 7.3 RC? Codeception 2.5 and other releases, typed properties in PHP 7.? the concept of preloading code from Dmitry Stogov, a portion of useful tools, and much more.
 
Enjoy reading!
 
PHP 7.3 RC2 - The second release candidate was delivered to timetable . The next release is expected on 11 October. One more review of innovations PHP ???r3r3502. .
 
PhpStorm 2018.3 EAP
- The early access ...
+ 0 -

MVC + Scenario against Thick Controllers

MVC + Scenario Against Thick Controllers
 
Modern PHP frameworks (Symphony, Laravel, further everywhere) convincingly show that it is not so easy to implement the Model-View-Controller pattern. All implementations for some reason are prone to Thick Controllers ( Fat controllers ), Condemned by all, and developers, and the frameworks themselves.
 

Why is it so? And is it possible to cope with this somehow? Let's understand.

github.com .
 
This example is in the directory example MVCS.MVC + Scenario Against Thick Controllers Modern PHP frameworks (Symphony, Laravel, further everywhere) convincingly show that it is not so easy to implement the Model-View-Controller pattern. All implementations for some reason are prone to Thick Controllers ( Fat controllers ), Condemned by all, and developers, and the frameworks themselves.   Why is it so? And is it possible to cope with this somehow? Let's understand. github.com .   This example is in the directory example MVCS...
+ 0 -

You need to raise the Kubernetes cluster, but I'm just a code programmer. The output is

You need to raise the Kubernetes cluster, but I'm just a code programmer. The output is  
 
Good day. Another note from my experience. This time, it is superficial about the basic infrastructure that I use, if I need to unload something, and there is not nearby. devOps children. But the current level of abstraction, in technology, allows for about a year to live with this infrastructure raised overnight, using the Internet and ready-made things.
 
 
Key words - AWS + Terraform + kops . If it is useful to me - it will probably be useful to someone else. Welcome to the comments.
 
K8S Dashboard , if you need ...
+ 0 -

PHP Digest No. 133 (June 10 - June 2? 2018)

PHP Digest No. 133 (June 10 - June 2? 2018)

 
A fresh selection with links to news and materials. In the release: PHP ??? Alpha ? Typed Properties and other RFCs from PHP Internals, a portion of useful tools, and much more.
 
Enjoy reading!
 
PHP ??? Alpha 2 - The second planned alpha release with bug fixes. For a complete list of branch changes, see here , and the main innovations in the last issue of digest . Another alpha is expected and then feature-freeze on July 17th.
 
...
+ 0 -

Experience of developing a SPA on VueJS + Nuxt

Our company is mainly engaged in the development of online stores and we want to share our experience developing the project on a bundle of VueJS + Nuxt + Laravel.
 
https://github.com/nuxt/nuxt.js/issues/805 .
 
The problem occurred when we in the asyncData method of our pages did several requisitioning.
 
 
Experience of developing a SPA on VueJS + Nuxt  
 
Fortunately, nuxt developers quickly solved this problem, and at the moment the process consumes about 40mb of memory.
 
 

Interesting problems and their solutions


 
Articles with components
 
In the control panel of the site, it is possible to add articles and insert into ...[/h]
+ 0 -

PHP Digest No. 132 (May 27 - June 1? 2018)

PHP Digest No. 132 (May 27 - June 1? 2018)

 
A fresh selection with links to news and materials. In the release: PHP ??? alpha ? Yii 3.0 alpha 1 and other releases, a fresh book on asynchronous PHP, video reports, a handful of useful tools, and much more.
 
Enjoy reading!
 
PHP ??? alpha 1 - The first alpha version of the new PHP branch is available for testing. Started semi-annual testing cycle , the final release is expected in late November.
 
 
Among the changes:
 
• Improvements to Heredoc and Nowdoc syntax RFC
 
• The json_encode () and json_decode ...
+ 0 -

The system of automatic documentation of REST-API in Laravel projects

Preamble
 
In order to describe and document the rules of client-server
 
interaction using Rest-api, three main methods can be distinguished:
 
 
Describe your colleagues the rules of accessing the server on the fingers
 
This method is fast and does not require long-term support, but there is a high probability that you will be beaten for this.
 
The system of automatic documentation of REST-API in Laravel projects  
Make up Google-docs /Wiki /Readme in project
with your hands.
 
Conveniently, once written documentation does not require a second explanation. It can be shown to colleagues and even sometimes to the customer. The disadvantage of this method is the long-term ...
+ 0 -