Skip to content

Instantly share code, notes, and snippets.

View toonvandenbos's full-sized avatar
🐘
Mainly Laravelin'

Toon Van den Bos toonvandenbos

🐘
Mainly Laravelin'
View GitHub Profile
@toonvandenbos
toonvandenbos / infomaniak_cloud_server_installation_FR.md
Last active May 10, 2024 14:08
Installer un serveur Cloud Infomaniak
@toonvandenbos
toonvandenbos / nova-field-fillAttributeFromRequest-serializable-object.php
Last active March 26, 2019 12:20
Examples used in Medium Post "Making Laravel Nova custom fields more developer-friendly"
<?php
use Acme\MyNovaField\MySerializableNovaFieldValue;
// ...
protected function fillAttributeFromRequest(NovaRequest $request, $requestAttribute, $model, $attribute)
{
if (!$request->exists($requestAttribute)) return;
@toonvandenbos
toonvandenbos / nova-field-fillAttributeFromRequest-handled.php
Last active March 26, 2019 12:20
Examples used in Medium Post "Making Laravel Nova custom fields more developer-friendly"
<?php
protected function fillAttributeFromRequest(NovaRequest $request, $requestAttribute, $model, $attribute)
{
if ($request->exists($requestAttribute)) {
$value = $this->handleIncomingRequestValue($request[$requestAttribute]);
// Now we're storing a verified or manipulated value
$model->{$attribute} = $value;
}
@toonvandenbos
toonvandenbos / nova-field-fillAttributeFromRequest-base.php
Last active March 26, 2019 12:19
Examples used in Medium Post "Making Laravel Nova custom fields more developer-friendly"
<?php
protected function fillAttributeFromRequest(NovaRequest $request, $requestAttribute, $model, $attribute)
{
if ($request->exists($requestAttribute)) {
$model->{$attribute} = $request[$requestAttribute];
}
}
@toonvandenbos
toonvandenbos / gulpfile.js
Created August 23, 2014 14:27
HTML email compilation with SASS & inlined css
/*
# HTML email gulpfile - workflow
This is my standard file for an e-mailing project. Useful for :
- creating e-mail templates using SASS
- automatically minify your images
- inline generated css in your html file
## How to install
@toonvandenbos
toonvandenbos / vagrantfile
Last active February 19, 2016 16:56
nginx - mariaDB - PHP5-FPM | ready for laravel 4 usage !
$script = <<SCRIPT
START_TIME=$SECONDS
# ------------------ ESSENTIALS
apt-get update
apt-get install -y unzip vim git-core curl wget build-essential python-software-properties
# ------------------ INSTALL NGINX
apt-get install -y nginx
sudo service nginx start