A blog series for PHP developers working on larger-than-average Laravel projects
Written for projects with a development lifespan of six to twelve months, with a team of three to six developers working on them simultaneously.
| // If the script does not work, you may need to allow same site scripting https://stackoverflow.com/a/50902950 | |
| Linkedin = { | |
| config: { | |
| scrollDelay: 3000, | |
| actionDelay: 5000, | |
| nextPageDelay: 5000, | |
| // set to -1 for no limit | |
| maxRequests: -1, | |
| totalRequestsSent: 0, |
| const https = require('https'); | |
| /* | |
| * Complete the function below. | |
| * Use console.log to print the result, you should not return from the function. | |
| */ | |
| function getMovieTitles(substr) { | |
| if (substr === '') | |
| return '' |
| namespace App\Http\Middleware; | |
| use Illuminate\Support\Facades\Log; | |
| class LogAfterRequest { | |
| public function handle($request, \Closure $next) | |
| { | |
| return $next($request); | |
| } |
| Simple contract or interface, call as you wish: | |
| interface UnitOfWork | |
| { | |
| public function begin(); | |
| public function commit(); | |
| public function rollback(); | |
| } |
Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.
| #!/bin/bash | |
| # uncomment and fix with appropriate values if you are behind a proxy | |
| #export https_proxy='http://localhost:3128' | |
| sl=en | |
| tl=$(basename $0) | |
| if [[ "${tl}" != "es" ]]; then | |
| sl=es | |
| fi | |
| base_url="https://translate.googleapis.com/translate_a/single?client=gtx&sl=${sl}&tl=${tl}&dt=t&q=" | |
| ua='Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Safari/537.36' |
| #!/usr/bin/python3 | |
| import requests | |
| url = "http://127.0.0.1:8000/api/test" | |
| payload={} | |
| headers = { | |
| 'Accept': 'application/json', | |
| 'Authorization': 'Bearer xxxxx' #add your API token |