Jeśli jesteś właścicielem tej strony, możesz wyłączyć reklamę poniżej zmieniając pakiet na PRO lub VIP w panelu naszego hostingu już od 4zł!
Strony WWWSerwery VPSDomenyHostingDarmowy Hosting CBA.pl

Archive for the ‘WEB and PHP Development’ Category

Ben Sampson: Creating a decent Laravel deploy script

Ben Sampson: Creating a decent Laravel deploy script

Ben Sampson has posted a quick guide on his site sharing a deployment script for Laravel applications he’s found useful.

A good deploy script can save you time and speed up your application, and it only takes a few minutes to set one up.

I have a standard deploy script which I use for almost all of my projects, which I’m going to break down and share with you.

Note: This article assumes that you’re using Laravel Forge. If you’re not, many of the settings will be applicable, but the setup steps may be a bit different.

He starts with a brief description of what a deployment script is and goes through the functionality he has included in his:

  • switching the site to maintenance mode
  • clearing caches
  • clearing and optimizing routes
  • clearing and optimizing the configuration
  • clearing expired password reset tokens
  • compiling front-end assets

He puts it all together into a single file that’s then included in the Forge deployment process. He doesn’t provide other instruction as to how to use this script with another deployment method but it can potentially be used anywhere a bash script could.

Source: http://www.phpdeveloper.org/news/26278

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>

SitePoint PHP Blog: Apache vs Nginx Performance: Optimization Techniques

SitePoint PHP Blog: Apache vs Nginx Performance: Optimization Techniques

On the SitePoint PHP blog they’ve posted a tutorial from author Tonino Jankov sharing some techniques you can use to increase the performance of Apache and Nginx when serving up your web applications.

The article starts with some of the basics, introducing both the software and some of the concepts around their use and evaluation:

  • an introduction to Apache and Nginx
  • hardware considerations
  • monitoring
  • testing the systems (benchmarking)

It then starts on the tuning tips, one section for each of the web servers. For Apache it covers changes for the mpm modules, disabling htaccess and browser cache control with mod_expires. On the Nginx side, they mention changing the number of workers created, tuning the keepalive timout and setting up server-side caching.

Source: http://www.phpdeveloper.org/news/26277

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>

php[architect]: Self-Host Your Team’s Git With Gitolite

php[architect]: Self-Host Your Team’s Git With Gitolite

On the php[architect] site they’ve shared a post from their most recent issue (June 2018 – Command and Control) from author Gabriel Zerbib covering self-hosting Git with Gitolite.

If you wish to set up a private Git server for your personal, work, or team projects, but favor free software and simple architecture, or don’t want a service hosted by a third party, then Gitolite is the solution for you.

The article starts with a brief history of Git and a listing of some of the options for hosting private Git repositories. It then gets into talking about Gitolite, a "collection of Perl scripts, wisely arranged to allow easy management of Git repositories served over the SSH protocol." He talks through some of the features that come along with the tool and how to get it installed. With that setup, he shows how to use it as a Git hosting platform, how to configure repositories, create and configure users, and perform backups. The post ends with some helpful troubleshooting tips and a look at Gitolite’s hook system.

Source: http://www.phpdeveloper.org/news/26276

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>

php[architect]: Self-Host Your Team’s Git With Gitolite

php[architect]: Self-Host Your Team’s Git With Gitolite

On the php[architect] site they’ve shared a post from their most recent issue (June 2018 – Command and Control) from author Gabriel Zerbib covering self-hosting Git with Gitolite.

If you wish to set up a private Git server for your personal, work, or team projects, but favor free software and simple architecture, or don’t want a service hosted by a third party, then Gitolite is the solution for you.

The article starts with a brief history of Git and a listing of some of the options for hosting private Git repositories. It then gets into talking about Gitolite, a "collection of Perl scripts, wisely arranged to allow easy management of Git repositories served over the SSH protocol." He talks through some of the features that come along with the tool and how to get it installed. With that setup, he shows how to use it as a Git hosting platform, how to configure repositories, create and configure users, and perform backups. The post ends with some helpful troubleshooting tips and a look at Gitolite’s hook system.

Source: http://www.phpdeveloper.org/news/26276

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>

Laravel News: PHP 7.3: Trailing Commas in Function Calls

Laravel News: PHP 7.3: Trailing Commas in Function Calls

In a post in the Laravel News site, they quickly cover one of the many changes coming with the next jump in versions of the PHP language (v7.3): trailing commas in function calls.

Well PHP 7.3 won’t have arrow functions (that would be dreamy). However, trailing commas in function calls is an excellent addition coming to PHP 7.3.

In PHP 7.3, trailing commas in function calls will be valid syntax. That is to say, you can use trailing commas when calling functions, but not defining them.

They then include two places where these trailing commas could be useful: in the use of variadic functions and in PHP array definitions. The remainder of the post shows the concept of "trailing commas" in other languages including Javascript, Python, and Haskell. The first alpha release of PHP 7.3 has been released if you’d like to try this out with your own code.

Source: http://www.phpdeveloper.org/news/26275

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>

Tomas Votruba: Collector Pattern for Dummies

Tomas Votruba: Collector Pattern for Dummies

In a new post to his site Tomas Votruba comes back to a topic he posted about previously – the collector pattern – and provides a simpler, more introductory look at the pattern and what it’s useful for.

I wrote Why is Collector Pattern so Awesome a while ago, but I got feeling and feedback that it’s way too complicated.

The pattern itself is simple but put in framework context, it might be too confusing to understand. That’s why we look on collector pattern in minimalistic plain PHP way today.

He uses a calculator example help explain the use of the pattern, starting with a simple class that calculates the price of a product + VAT. He then shows a few examples of how it could grow over time as business requirements change. He refactors the class to make it easier to add in these one-off changes by setting them all as "calculators’ in a calculator collection. He provides the code examples for this refactor and an example of it in use.

Source: http://www.phpdeveloper.org/news/26274

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>

Laravel News: PHP 7.3: Trailing Commas in Function Calls

Laravel News: PHP 7.3: Trailing Commas in Function Calls

In a post in the Laravel News site, they quickly cover one of the many changes coming with the next jump in versions of the PHP language (v7.3): trailing commas in function calls.

Well PHP 7.3 won’t have arrow functions (that would be dreamy). However, trailing commas in function calls is an excellent addition coming to PHP 7.3.

In PHP 7.3, trailing commas in function calls will be valid syntax. That is to say, you can use trailing commas when calling functions, but not defining them.

They then include two places where these trailing commas could be useful: in the use of variadic functions and in PHP array definitions. The remainder of the post shows the concept of "trailing commas" in other languages including Javascript, Python, and Haskell. The first alpha release of PHP 7.3 has been released if you’d like to try this out with your own code.

Source: http://www.phpdeveloper.org/news/26275

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>

Tomas Votruba: Collector Pattern for Dummies

Tomas Votruba: Collector Pattern for Dummies

In a new post to his site Tomas Votruba comes back to a topic he posted about previously – the collector pattern – and provides a simpler, more introductory look at the pattern and what it’s useful for.

I wrote Why is Collector Pattern so Awesome a while ago, but I got feeling and feedback that it’s way too complicated.

The pattern itself is simple but put in framework context, it might be too confusing to understand. That’s why we look on collector pattern in minimalistic plain PHP way today.

He uses a calculator example help explain the use of the pattern, starting with a simple class that calculates the price of a product + VAT. He then shows a few examples of how it could grow over time as business requirements change. He refactors the class to make it easier to add in these one-off changes by setting them all as "calculators’ in a calculator collection. He provides the code examples for this refactor and an example of it in use.

Source: http://www.phpdeveloper.org/news/26274

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>

Site News: Popular Posts for This Week (06.15.2018)

Site News: Popular Posts for This Week (06.15.2018)

Popular posts from PHPDeveloper.org for the past week:

Source: http://www.phpdeveloper.org/news/26279

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>

Site News: Popular Posts for This Week (06.15.2018)

Site News: Popular Posts for This Week (06.15.2018)

Popular posts from PHPDeveloper.org for the past week:

Source: http://www.phpdeveloper.org/news/26279

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>