please see the link (https://reqres.in/) for list of endpoints
This API wrapper use Faraday client, please install faraday client in your local env
gem install faraday
<?php | |
// Function to convert a file to base64 | |
function fileToBase64($filePath) { | |
if (file_exists($filePath)) { | |
$fileData = file_get_contents($filePath); | |
if ($fileData !== false) { | |
return base64_encode($fileData); | |
} else { | |
return false; // Error reading file |
# create magick shell command to convert the first page of PDF file into image format | |
# Usage: convert_magic.sh <PDF file> <image format> <output name> | |
# convert_magic.sh input.pdf png output.png | |
# check if the PDF file exists | |
if [ ! -f $1 ]; then | |
echo "File $1 does not exist" | |
exit 1 | |
fi |
1xx Informational | |
100 :continue | |
101 :switching_protocols | |
102 :processing | |
2xx Success | |
200 :ok | |
201 :created | |
202 :accepted | |
203 :non_authoritative_information |
use Psr\Http\Message\ServerRequestInterface; | |
function product(ServerRequestInterface $request) | |
{ | |
$name = "Banana"; | |
$phoneNumber = "62812334444" | |
$queryString = $request->getQueryParams(); | |
$name = $queryString['name'] ?? $name; | |
header("Location: https://api.whatsapp.com/send?phone=" . $phoneNumber . "&text=" . $name); |
please see the link (https://reqres.in/) for list of endpoints
This API wrapper use Faraday client, please install faraday client in your local env
gem install faraday
# Be sure to restart your server when you modify this file. | |
# Configure sensitive parameters which will be filtered from the log file. | |
Rails.application.config.filter_parameters += %i[ | |
passw password vendorable_id | |
] |
<div> | |
<div class="container-fluid"> | |
<div class="row"> | |
<div class="col-md-8"> | |
<b-card class="mb-3"> | |
<b-form inline> | |
<label class="sr-only" for="inline-form-input-username">Cari Produk</label> | |
<b-input-group class="mb-2 mr-sm-2 mb-sm-0" size="lg" style="width: 50%"> | |
<b-input id="search-product" placeholder="Cari produk..."></b-input> | |
<b-input-group-append> |
<?php | |
namespace App\Models\Traits; | |
use Carbon\Carbon; | |
trait DateFormater | |
{ | |
public function appDate($attribute, $format = null) | |
{ |
// app/Providers/AppServiceProvider.php | |
<?php | |
namespace App\Providers; | |
use Illuminate\Support\ServiceProvider; | |
use App\Services\FooApp\FooAppSocialite; | |
class AppServiceProvider extends ServiceProvider |
set global sql_mode='STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION'; | |
set session sql_mode='STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION'; |