$functions = [ ‘function1’ => function ($echo) { echo $echo; } ]; or function do_echo($echo) { echo $echo; } $functions
Category: Web
Laravel Test HTTP Client Calls
Get a test url fromĀ https://webhook.site/ Make sure Laravel and Guzzle are installed Go to a directory where Laravel is
Laravel Add a Column to a Table
php artisan make:migration add_colName_to_tableName –table=tableName This will create migration file under the database/migration directory Update in the generated file the
Laravel Factory and Seeder
Follow the steps below to seed a database with sample data: Make factory associated with a table: php artisan make:factory
Useful Laravel Tutorials
Laravel API Tutorial: How to Build and Test a RESTful API Sample code: Laravel 5.8 from scratch click here
Laravel and Netbeans
Use Netbeans with a Laravel project on Windows Install Laravel follow instructions here or if you already have composer installed
Good REST Tutorials
Step by Step Guide Creating a REST API in PHP Rest Resouce Naming Guide
Laravel Add An Unique Index To A Table
Execute the following command to create a migration file under the database directory in a Lavarel project: php artisan make:migration
ngrok notes
ngrok allows you to expose a web server running on your local machine to the internet. Just tell ngrok what
Twilio API Calls
An example of translating definition from Twilio API Explorer to an actual call in the code: Click here to see