Skip to content

Instantly share code, notes, and snippets.

View JacquesvanWyk's full-sized avatar
💭
yeah busy coding!!

Jacques van Wyk JacquesvanWyk

💭
yeah busy coding!!
View GitHub Profile
$table = DB::select("SELECT AUTO_INCREMENT FROM information_schema.TABLES WHERE TABLE_SCHEMA = 'databaseName' AND TABLE_NAME = 'tableName'");
if (!empty($table)) { echo $table[0]->AUTO_INCREMENT; }
@JacquesvanWyk
JacquesvanWyk / Custom Validation message Laravel.php
Created August 19, 2021 21:29
Create a custom message on a validation field
$request->validate([
'name' => 'required',
],
[
'name.required' => 'Custom message for validation',
]
);

Share you Wordpress post with facebook using correct post url

If you struggle to get the correct url for your share button here is a fix.

Getting Started

I assume here you know how to get the button up and running if you dont please just go to https://developers.facebook.com/docs/plugins/share-button and follow instructions

Code to get the correct url shared