Php Phar is powerful file compression tool, first of all change config in your php.ini and trun off read-only “phar.readonly=off” in your php.ini // external file url, filename and local path $url = “http://youtr external file url;” $filename = basename($file->url).”.tar”; $localfile = storage_path(“app” . DIRECTORY_SEPARATOR . $filename); //make tar.gz file from add file method $targz […]
In laravel there is default view for error page but when you need to make json format error response there is some thing you need to change in your handler file, for json response in error you can change your app\Exceptions\Handler.php file with following method. 1. include symphony’s NotFoundHttpException in you class. use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; […]
Render custom json response for undefined routes and methods in laravel error handler.
add this code in your Exceptions/Handler.php file , which check all request and check if invalid method and send json response .
To create the index, follow these steps:
- Insert a new worksheet at the beginning of your workbook and rename it Index.
- Right-click on the sheet tab and select View Code.
- Enter the following code in Listing A.
You can whitelists your ip in Laravel 5 and prevent access to other ip or vice versa. to do so , you have to follow following steps.
you can work in Laravel without defie any route, there is way to make dynamic route request form your app.
add this line in your route file.
create “CustomService” class file in your “App\Services” folder , which handle all route from client request, then you can directly call your function name without defining route, even though you have to define your methods in CustomService class.
From last three months i’m working in a project, which have six different component as six different server, each component have it’s own database, and each server communicate with each other using HTTP connection. it’s pretty exciting, when Laravel as main API component and Lumen as microservice component, which authenticate with JWT and provide data in Json format.
Handy – Handmade Shop WordPress WooCommerce Theme is a stylish responsive and easy to use WordPress theme. Handy Shop WooCommerce theme is a great start for any one who is looking to start his one handmade online shop or looking to create a handmade goods marketplace.
to display map and track user’s location in SWIFT 3 map, import iOS map kit
import MapKit your map view form your story board to your controller file
@IBOutlet weak var theMap: MKMapView!
in view did load add map delegate, mapType and enable user tracking mode
I tried to display user’s data using HTTP GET request in swift3. after get token form laravel JWT backend here is the complete code to display auth data.
firstly, save your received token in your local and you can pass your token in header while making request.