1. Go to this page and download the library: Download protonemedia/laravel-mixins library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
$rule = new ProtoneMedia\LaravelMixins\Rules\CurrentPassword;
use ProtoneMedia\LaravelMixins\Rules\DimensionsWithMargin;
$rule = DimensionsWithMargin::make()->ratio(20 / 9)->margin(1),
use ProtoneMedia\LaravelMixins\Rules\Host;
$rule = Host::make(['facebook.com', 'fb.me']);
use ProtoneMedia\LaravelMixins\Rules\InKeys;
$rule = new InKeys(['laravel' => 'Laravel Framework', 'tailwindcss' => 'Tailwind CSS framework']);
// same as
use Illuminate\Validation\Rules\In;
$rule = new In(['laravel', 'tailwindcss']);
use ProtoneMedia\LaravelMixins\Rules\MaxWords;
$rule = MaxWords::make(250);
$rule = new ProtoneMedia\LaravelMixins\Rules\UrlWithoutScheme;
Str::mixin(new ProtoneMedia\LaravelMixins\String\Compact);
$string = "Hoe simpeler hoe beter. Want hoe minder keuze je een speler laat, hoe groter de kans dat hij het juiste doet.";
// Hoe simpeler hoe beter. Want hoe ... de kans dat hij het juiste doet.
echo Str::compact($string);
Str::mixin(new ProtoneMedia\LaravelMixins\String\SecondsToTime);
Str::secondsToTime(10); // 00:10
Str::secondsToTime(580); // 09:40
Str::secondsToTime(3610); // 01:00:10
// force 'hh:mm:ss' format, even under an hour:
Str::secondsToTime(580, false); // 00:09:40
$ghostscript = new ProtoneMedia\LaravelMixins\Pdf\Ghostscript;
$regeneratedPdf = $ghostscript->regeneratePdf(
file_get_contents('/uploads/invoice.pdf')
);
$ghostscript = new Ghostscript('gs-binary');
use Illuminate\Foundation\Http\FormRequest;
use ProtoneMedia\LaravelMixins\Request\ConvertsBase64ToFiles;
class ImageRequest extends FormRequest
{
use ConvertsBase64ToFiles;
protected function base64FileKeys(): array
{
return [
'jpg_image' => 'Logo.jpg',
];
}
public function rules()
{
return [
'jpg_image' => ['