This file contains hidden or 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
let os = require('os') | |
let nativefier = require('nativefier').default | |
let c = require('colors') | |
let icon = './src/icon.png' | |
let options = { | |
name: 'Gmail Desktop', | |
targetUrl: 'https://mail.google.com/mail/mu/?mui=ca', |
This file contains hidden or 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
<template> | |
<!-- root node required --> | |
<div> | |
<grid-layout :layout="layout" :col-num="12" :row-height="30" :is-draggable="true" :is-resizable="true" :vertical-compact="true" :margin="[10,10]" :use-css-transforms="true"> | |
<grid-item v-for="item in layout" :x="item.x" :y="item.y" :w="item.w" :h="item.h" :i="item.i"> | |
{{content[item.i].text}} | |
</grid-item> | |
</grid-layout> | |
</div> | |
</template> |
This file contains hidden or 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 | |
public function store() | |
{ | |
$product = $this->createProduct(); | |
$this->applyDiscount('newProduct', $product); | |
$this->notifyUsersVia('email'); | |
return 'Success'; | |
} |
This file contains hidden or 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 | |
// This will create a product, apply a discount since it is a new | |
// product, and send a notification via email | |
public function store() | |
{ | |
// Create product from request | |
$product = Product::create($request->all()); | |
// Get the discount to be applied | |
$discount = Discount::byType('newProduct'); |
This file contains hidden or 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 | |
public function store() | |
{ | |
$product = $this->createProduct(); | |
$this->applyDiscount('newProduct', $product); | |
$this->notifyUsersVia('email'); | |
return 'Success'; | |
} |
This file contains hidden or 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 | |
protected function createProduct() | |
{ | |
return Product::create($this->request->all()); | |
} | |
protected function applyDiscount($type, $product) | |
{ | |
$discount = Discount::byType($type); |
This file contains hidden or 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 | |
protected function createProduct() | |
{ | |
} | |
protected function applyDiscount($type, $product) | |
{ | |
} |
This file contains hidden or 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 | |
// This will create a product, apply a discount since it is a new | |
// product, and send a notification via email | |
public function store() | |
{ | |
// Create product from request | |
$product = Product::create($request->all()); | |
// Get the discount to be applied | |
$discount = Discount::byType('newProduct'); |
This file contains hidden or 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 | |
use Illuminate\Database\Migrations\Migration; | |
use Illuminate\Database\Schema\Blueprint; | |
class CreateUsersFotosTable extends Migration | |
{ | |
/** | |
* Run the migrations. |
This file contains hidden or 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 | |
// APENAS A PARTE RELEVANTE | |
public function fotos() | |
{ | |
return $this->hasMany('\App\UserFoto'); | |
} | |
?> |