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 | |
class FIK | |
{ | |
const REQUIRED_LENGTH = 15; | |
const INVOICE_ID = 0; | |
const REMINDER_ID = 3; | |
public function generate( $invoiceNumber = 1, $isReminder = false ): string | |
{ |
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
function generateFormData() { | |
// define upload field | |
let file_input = document.getElementById('profile_picture'); | |
// define form data | |
let data = new FormData(); | |
// Add regular text field | |
data.append("name", "John Doe"); |
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
{ | |
"product": {..data..} | |
} |
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
{..data..} |
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\Requests; | |
use Illuminate\Foundation\Http\FormRequest; | |
class ProductStoreRequest extends FormRequest | |
{ | |
public function rules() | |
{ | |
return [ |
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
::-webkit-input-placeholder { | |
color: #999; | |
} | |
::-moz-placeholder { | |
color: #999; | |
} | |
:-ms-input-placeholder { | |
color: #999; | |
} | |
:-moz-placeholder { |
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 | |
// Create Instance | |
$dinero = new \LasseRafn\Dinero\Dinero( $clientId, $clientSecret ); // Client ID + Secret gotten from Dinero | |
// Auth to a Dinero account | |
$dinero->auth( $apiKey, $orgId ); // API key created in Dinero + company ID (bottom left when logged in) | |
// Create the invoice | |
$invoice = $dinero->invoices()->create([ |
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
$taxPercentage = 25; | |
echo ( 100 / ( 1 + ( $taxPercentage / 100 ) ) ) / 100; // 0.8 |
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\Exceptions; | |
class MigrationsCanOnlyMoveUpException extends \Exception | |
{ | |
protected $message = 'Never gonna let you down.'; | |
} |