...
"require": {
"vendor/package": "1.3.2", // exactly 1.3.2 (exact)
// >, <, >=, <= | specify upper / lower bounds
"vendor/package": ">=1.3.2", // anything above or equal to 1.3.2
"vendor/package": "<1.3.2", // anything below 1.3.2
// * | wildcard
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/************************************************************************* | |
* Get File Information | |
*/ | |
// Assuming these come from some data source in your app | |
$s3FileKey = 's3/key/path/to/file.ext'; | |
$fileName = 'file.ext'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Http\Middleware; | |
use Closure; | |
use Illuminate\Http\Response; | |
/** | |
* Validate Mailgun Webhooks | |
* @see https://documentation.mailgun.com/user_manual.html#securing-webhooks |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Add this function to app/helpers.php | |
if ( ! function_exists('str_possessive')) { | |
/** | |
* Make a string possessive. | |
* @param string $string | |
* @return string | |
*/ | |
function str_possessive($string) { | |
return $string.'\''.($string[strlen($string) - 1] != 's' ? 's' : ''); |